wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> easy >> make the sum zero
(Message started by: sak_lko on Aug 2nd, 2010, 11:34am)

Title: make the sum zero
Post by sak_lko on Aug 2nd, 2010, 11:34am
You are given digits 1 to 30 i.e. 1..2..3..4......30.
Use only + and - signs , and use all the digits only once..so as to make the sum zero

For ex: for digits 1 to 3: -1-2+3=0

Title: Re: make the sum zero
Post by sak_lko on Aug 2nd, 2010, 11:57am
Anyone??

Title: Re: make the sum zero
Post by towr on Aug 2nd, 2010, 12:02pm
Begin by adding all numbers
Then notice [hide]it doesn't divide nicely by 2; so you can't find two equal subsets[/hide]

[edit]note to self, stop confusing can and can't[/edit]

Title: Re: make the sum zero
Post by sak_lko on Aug 2nd, 2010, 12:10pm
the sum comes to 465...tried to find the subsets..still stumped :-[

Title: Re: make the sum zero
Post by towr on Aug 2nd, 2010, 12:21pm
Suppose you divide the numbers into two sets, the ones you add go into set A, and the ones you subtract form set S. Then sum(A) + sum(S) = 465, right? Now, you want sum(A) - sum(S) to be 0. But that would mean sum(A) = sum(S) = 465/2, which is impossible, since both have to be whole numbers.
So in short, there is no way to do it.

Title: Re: make the sum zero
Post by sak_lko on Aug 2nd, 2010, 12:35pm
thnx...  i guess thats why it took so long,,finally i can go to bed...  :)



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board