Thursday, April 15, 2010

Boxes of Money

You are given b boxes and n dollar bills. The money has to be sealed in the b boxes in a way such that without thereafter opening a box, you can give someone a requested whole amount of dollars from 0 to n. How should b be related to n for this to happen?

1 comment:

  1. 2^(b-1) = n

    Keep the bills as 1(2^0) in box 1, 2(2^1) in box 2, 4(2^2) in box 3, 8(2^3) in box 4 and so on.

    ReplyDelete