Sunday 4 March 2012

A puzzle about discrete distribution


One is carrying one thousand gold coins. These coins are packed in separate small bags. It is supposed to give away coins whatever the discrete amount is demanded without unpacking the bags. How is it going to be packed in ten bags?

Here is the solution

Number of coins in first bag = 1
Number of coins in second bag = 2
Number of coins in third bag = (2+2) = 4
Number of coins in fourth bag = (4+4) = 8
Number of coins in fifth bag = (8+8) = 16
Number of coins in sixth bag = (16+16) = 32
Number of coins in seventh bag = (32+32) = 64
Number of coins in eighth bag = (64+64) = 128
Number of coins in ninth bag = (128+128) = 256

Sum of the coins in all nine bags = 1+2+4+8+16+32+64+128+256 = 511

Number of coins in the tenth bag = 1000-511= 489

For example, if one demands 300 coins 256+32+8+4 = 300 i.e., 9th bag+ 6th bag +4th bag+3rd bag are given away. Likewise any number of coins can be given selecting appropriate bags from 1 to 9 and also by adding them, so that the sum is any number between 1 and 1000.