You are given 1000 one dollar bills and 10 envelopes. Put the bills into the envelopes in such a way that someone can ask you for any amount of money from $1 to $1000 and you can give it to them through a combination of the envelopes.
Fill the envelopes with $1, $2, $4, $8, $16, $32, $64, $128, $256 and $489.
This involves binary maths. Let’s try an easier problem – $31 with 5 envelopes.
The envelopes have to be filled with $1, $2, $4, $8 and $16 . Note that the numbers are in powers of two:
20 = $1
21 = $2
22 = $4
23 = $8
24 = $16
Using this logic, for $1000, the envelopes need to be filled with: $1, $2, $4, $8, $16, $32, $64, $128, $256 and $512. But this adds up to $1023. So, the last envelope will only have $512 – $23 or $489.