PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 4.00 average.

1+3+5+7+9+11+13+15+17+19=100 make a sum of 5 numbers make 50

 
 
Ali
Guest
Posts: n/a
 
      22nd Nov 2008
1+3+5+7+9+11+13+15+17+19=100
Choose 5 numbers from these 10 figures so there sum is = 50
 
Reply With Quote
 
 
 
 
Mike Middleton
Guest
Posts: n/a
 
      22nd Nov 2008
Ali -

Tushar Mehta describes two methods with references to others:

http://www.tushar-mehta.com/excel/te...ues/index.html

- Mike Middleton
http://www.DecisionToolworks.com
Decision Analysis Add-ins for Excel



"" <(E-Mail Removed)> wrote in message
news:92D81C03-8E58-491E-9C75-(E-Mail Removed)...
> 1+3+5+7+9+11+13+15+17+19=100
> Choose 5 numbers from these 10 figures so there sum is = 50



 
Reply With Quote
 
Dana DeLouis
Guest
Posts: n/a
 
      22nd Nov 2008
Ali wrote:
> 1+3+5+7+9+11+13+15+17+19=100
> Choose 5 numbers from these 10 figures so there sum is = 50



The sum of 5 Odd numbers is Odd also, so I don't believe there is a
solution as stated that equals an even number (ie 50)

- - -
HTH
Dana DeLouis

 
Reply With Quote
 
Gary''s Student
Guest
Posts: n/a
 
      22nd Nov 2008
1+3+5+7+15+19
--
Gary''s Student - gsnu200815
 
Reply With Quote
 
joeu2004
Guest
Posts: n/a
 
      22nd Nov 2008
On Nov 22, 4:24*am, Dana DeLouis <delo...@bellsouth.net> wrote:
> Ali wrote:
> > 1+3+5+7+9+11+13+15+17+19=100 *
> > Choose 5 numbers from these 10 figures so there sum is = 50

>
> The sum of 5 Odd numbers is Odd also, so I don't
> believe there is a solution as stated that equals
> an even number (ie 50)


Why use well-founded reasoning when brute force will do the trick?

Just kidding. But the following might be a useful paradigm for
solving such problems when the answer is not so obvious.


Sub doit()
x = Array(1, 3, 5, 7, 9, 11, 13, 15, 17, 19)
For i1 = 0 To UBound(x) - 4
For i2 = i1 + 1 To UBound(x) - 3
For i3 = i2 + 1 To UBound(x) - 2
For i4 = i3 + 1 To UBound(x) - 1
For i5 = i4 + 1 To UBound(x)
Sum = x(i1) + x(i2) + x(i3) + x(i4) + x(i5)
If Sum = 50 Then Debug.Print Sum; x(i1); x(i2); x(i3); x(i4); x(i5)
Next i5: Next i4: Next i3: Next i2: Next i1
End Sub


PS: Lots of solutions when choosing 6. I wonder if the OP simply
mistyped.

 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      22nd Nov 2008
That looks like 6 numbers to me.<g>

See Dana's post as to why the problem as asked can't be solved.

--
Rick (MVP - Excel)


"Gary''s Student" <(E-Mail Removed)> wrote in message
news:6E603516-B130-484F-A1AB-(E-Mail Removed)...
> 1+3+5+7+15+19
> --
> Gary''s Student - gsnu200815


 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      22nd Nov 2008
??? The OP's initial post said "Choose 5 numbers from these 10 figures so
there sum is = 50" (where he misspelled "their")... how do you read that as
allowing more than 5 numbers? I read it, to paraphrase, as this... Choose 5
number such that their sum equals 50"

--
Rick (MVP - Excel)


"rebel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Sat, 22 Nov 2008 16:05:07 -0500, "Rick Rothstein"
> <(E-Mail Removed)> wrote:
>
>>That looks like 6 numbers to me.<g>

>
> but the "conditions" didn't say *only* five. It just required use of
> five,
> which the poster has complied with.
>
>>See Dana's post as to why the problem as asked can't be solved.

>
> That was my initial response, but GS's solution appears to be compliant.


 
Reply With Quote
 
Gary''s Student
Guest
Posts: n/a
 
      23rd Nov 2008
A clear demonstration that just because a person can add does not mean they
can count.
--
Gary''s Student - gsnu200815


"Rick Rothstein" wrote:

> That looks like 6 numbers to me.<g>
>
> See Dana's post as to why the problem as asked can't be solved.
>
> --
> Rick (MVP - Excel)
>
>
> "Gary''s Student" <(E-Mail Removed)> wrote in message
> news:6E603516-B130-484F-A1AB-(E-Mail Removed)...
> > 1+3+5+7+15+19
> > --
> > Gary''s Student - gsnu200815

>
>

 
Reply With Quote
 
Shane Devenshire
Guest
Posts: n/a
 
      23rd Nov 2008
I got more chuckles off this post, than any in a long time!

Next we should square the circle, and trisect the angle with compus and ruler.

1+3+5+7+9+11+13+15+17+19=100

=SUM(100/(9-5-3+1)) = 50

A Mensa quiz!

Some laughs,
Shane Devenshire



"Gary''s Student" wrote:

> A clear demonstration that just because a person can add does not mean they
> can count.
> --
> Gary''s Student - gsnu200815
>
>
> "Rick Rothstein" wrote:
>
> > That looks like 6 numbers to me.<g>
> >
> > See Dana's post as to why the problem as asked can't be solved.
> >
> > --
> > Rick (MVP - Excel)
> >
> >
> > "Gary''s Student" <(E-Mail Removed)> wrote in message
> > news:6E603516-B130-484F-A1AB-(E-Mail Removed)...
> > > 1+3+5+7+15+19
> > > --
> > > Gary''s Student - gsnu200815

> >
> >

 
Reply With Quote
 
AshMorK
Guest
Posts: n/a
 
      4th Dec 2008
Hi Joeu,

Thanks for Your post, it was very helpful for me.
But I would like to know if there's any way to make this code work for a set
of x numbers in a sheet range allowing me to specify how many numbers should
y add to get a result.
for example:

myfunction(LookUpRange as Range, NumberOfElements as integer, LookUpValue as
long)

The expected return of this function would be the address of cells that met
the requirements.

Thanks in Advance!!

"joeu2004" wrote:

> On Nov 22, 4:24 am, Dana DeLouis <delo...@bellsouth.net> wrote:
> > Ali wrote:
> > > 1+3+5+7+9+11+13+15+17+19=100
> > > Choose 5 numbers from these 10 figures so there sum is = 50

> >
> > The sum of 5 Odd numbers is Odd also, so I don't
> > believe there is a solution as stated that equals
> > an even number (ie 50)

>
> Why use well-founded reasoning when brute force will do the trick?
>
> Just kidding. But the following might be a useful paradigm for
> solving such problems when the answer is not so obvious.
>
>
> Sub doit()
> x = Array(1, 3, 5, 7, 9, 11, 13, 15, 17, 19)
> For i1 = 0 To UBound(x) - 4
> For i2 = i1 + 1 To UBound(x) - 3
> For i3 = i2 + 1 To UBound(x) - 2
> For i4 = i3 + 1 To UBound(x) - 1
> For i5 = i4 + 1 To UBound(x)
> Sum = x(i1) + x(i2) + x(i3) + x(i4) + x(i5)
> If Sum = 50 Then Debug.Print Sum; x(i1); x(i2); x(i3); x(i4); x(i5)
> Next i5: Next i4: Next i3: Next i2: Next i1
> End Sub
>
>
> PS: Lots of solutions when choosing 6. I wonder if the OP simply
> mistyped.
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how make a formula for 2 different numbers =?Utf-8?B?amFrZTMw?= Microsoft Excel Misc 2 2nd Oct 2007 02:28 AM
Make varying numbers of label, change info and make more =?Utf-8?B?S2VudA==?= Microsoft Word Document Management 1 10th May 2006 05:43 AM
how i can make the numbers fatih terzioglu Microsoft Excel Misc 1 29th Dec 2004 11:40 AM
Re: Make numbers add up to total John Spencer (MVP) Microsoft Access Reports 0 18th Oct 2003 12:28 AM
Re: Make all numbers positive? Norman Harker Microsoft Excel Worksheet Functions 2 27th Jul 2003 02:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:02 AM.