wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> medium >> Divide $310 into boxes
(Message started by: Kozo Morimoto on Jan 27th, 2003, 5:06am)

Title: Divide $310 into boxes
Post by Kozo Morimoto on Jan 27th, 2003, 5:06am
Divide $310 into a number of boxes so you can give any amount between $1 and $310, when asked.

The amount of Dollars is written on each box so you do not have to open them.

What is the minimum number of boxes required?

(apparently an interview question for quantitative analysts on Wall Street)

Title: Re: NEW: Divide $310 into boxes
Post by BNC on Jan 27th, 2003, 5:30am
Maybe I don't understand something, but I get [hide]9[/hide] boxes.
I simply [hide]divide into binary chuncks as much as possible: 1, 2, 4, 8, 16, 32, 64, 128 => allows any value up to 255. Then leave the remining $55 in the 9th box.
Need up to $255? Use the 8 "binary" boxes.
Need more? Use the 55 box first, then use the "binary" box to complete the sum.
[/hide]

Title: Re: NEW: Divide $310 into boxes
Post by Garzahd on Jan 27th, 2003, 11:12am
Semi-related question: You have an object that weighs an integral number of grams between 1 and 310. You're trying to use a balance scale to determine its exact mass. What's the fewest number of weights you must use, assuming you get to choose the mass of each weight?

Title: Re: NEW: Divide $310 into boxes
Post by BNC on Jan 27th, 2003, 12:14pm
Garzahd,

That's not quite the same, now is it?
In scale balancing, I may place my "1" weight on the "opposite" side (the one I'm trying to weight) to lower the number of required total weghts. Its not the same in the origianl riddle. Nowhere was it mensioned that you may ask for change....

As for your qustion, though, here's what I got:
[hide]
6 weights: 1, 3, 9, 27, 81, 243
[/hide]

Title: Re: NEW: Divide $310 into boxes
Post by BNC on Jan 27th, 2003, 12:18pm
Just had another thought -- the riddle states "you do not have to open them"
OK, I don't have to. But I may. So I'll place all the money in a single box, and count the requested sum on spot.  ;D

Title: Re: NEW: Divide $310 into boxes
Post by Garzahd on Jan 27th, 2003, 12:24pm
BNC: I didn't say it was the same, just that it was semi-related. And yes, your answer is right.



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