Chapter 47
A Thousand Pounds in Bags
A man brings £1000, all in single pound notes, to a bank and asks for it to be split among bags so that, whatever whole sum he later asks for, the teller can hand him some of the bags, unopened, totalling exactly that amount. What is the smallest number of bags that will do, and how many of them hold an odd number of pounds?
Solution
Ten bags suffice, and no fewer. Fill them with the powers of two up to , with the last bag taking whatever remains, .
The powers of two are the key. Any whole amount from to is the sum of a unique selection of , which is just that amount written in binary. So every request up to can be met from the first nine bags. For anything from to , hand over the bag and make up the rest, between and , from the others. Between them the two ranges, to and to , cover every pound up to with no gap.
Why not fewer than ten? With bags there are only possible selections, and they must produce at least the distinct totals . Since , nine bags cannot manage and ten can. As for odd bags, of the ten amounts only and are odd, so exactly two bags hold an odd number of pounds.