Click to See Complete Forum and Search --> : Answer to puzzler challenge (DONT READ IF YOU DON'T WANT TO KNOW THE ANSWER)


EyesWideOpen
03-13-2001, 04:38 PM
Here's what I got:

$1
$2
$4
$8
$16
$32
$64
$128
$256
$489

I came to this conclusion by making the next dollar amount equal to one more than the all the previous dollar amounts combined (until the tenth envelope wherein I put the remaining amount).

For example: the first obviously has to be $1. The next would be one more than all the previous dollar amounts, which is $1, making it $2. The next would be one more than all previous dollar amounts, which is now $3 ($1 + $2), making it $4 and so on and so forth until the last one where I just added all the previous 9 amounts and used the difference from $1,000.

So what's all this talk of solving in binary? :confused:

[ 13 March 2001: Message edited by: EyesWideOpen ]

[ 13 March 2001: Message edited by: EyesWideOpen ]

kmj
03-13-2001, 04:55 PM
That is binary.
0000 0001 = 1
0000 0010 = 2
0000 0100 = 4
0000 1000 = 8
0001 0000 = 16

etc.

When you program alot, you start thinking that way.

EyesWideOpen
03-13-2001, 05:16 PM
I've been programming for a while now but I've been spoiled using Perl so I don't really worry about binary stuff. I still don't see how that helps though...

kel
03-13-2001, 05:33 PM
each 0 or 1 is a bit. 1 represents on for that bit, 0 represents off. Using 8 bits, and combinations of ons and offs in each bit you can get any number from 0 to 255. The solution to the problem works the same way.

You can liken the first 9 envelopes to a 9 bit binary string. The 10th holds the remaing $489 that you can't get to using only the first 9. Then you start to use the envelopes/bits starting from $1 again.

Any clearer?

EyesWideOpen
03-13-2001, 05:36 PM
Ah! I gotcha. I understand the basics behind binary but I would have never even thought of taking that approach to solve the problem. Thanks for the info.

Dru Lee Parsec
03-13-2001, 06:22 PM
Re: Think Binary

The powers of 2 are
2^0=1
2^1=2
2^2=4
2^3=8
2^4=16
2^5=32

See the pattern?
:)

Sweede
03-13-2001, 08:54 PM
How did you get 489?

1+2+4+8+16+32+64+128+256 = 511 , then if you add the 1 to the end result, you get 512

which is also 2^

moose
03-13-2001, 09:42 PM
sweede,

if you use 512:

1+2+4+8+16+32+64+128+256+512=1023!

The riddle said you only have 1000...so you need to subtract 23

512-23=489.

Later!