I was trying to solve a puzzle but was not able to find any solutions if any one knows the solutions please, share.
"You own a shop of chocolates. You want to give exact number of chocolates (say for orders up to 1000 chocolates) to customers without counting them at the time of giving. You can prefill chocolates in bags by counting them upfront and give appropriate bags (one or many) to fulfill the order. What is the minimum number of bags will you need to satisfy your first order? (Remember you do not know what is the order upfront)"
The answer is to use bags of size $1, 2, 4, 8, 16, 32, 64, 128, 256, 512$. By binary representation, we can satisfy any order with these bags (up to $1023$, not just up to $1000$). This is $10$ bags.
Now suppose we only had $9$ (or less) bags. Then the number of ways we could give out some subset of these bags would be $2^9$ (or less). But there are $1000$ distinct possible orders we need to be able to satisfy, and we can only make at most $2^9 = 512$ different orders using a subset of the bags we prepared. Thus $10$ bags is the minimum number possible.