Question 1093552
<br>This problem can be solved using binary (base 2) numbers.  In binary, the number 15 is<br>
{{{1111}}}<br>
(1*2^3 + 1*2^2 + 1*2^1 + 1*2^0 = 8+4+2+1 = 15)<br>
Amar can empty all 15 jars in 4 moves, but not in any fewer number.  There are several ways he can do it; one is shown below.<br>
(1) Take 8 cookies out of every jar that contains at least 8 cookies.
(2) Take 4 cookies out of every jar that still contains at least 4 cookies.
(3) Take 2 cookies out of every jar that still contains at least 2 cookies.
(4) Take the last cookie out of every jar that still contains a cookie.<br>
The numbers of cookies in each jar at the beginning, and after each step are the following:<br>
{{{matrix(5,15,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
    1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,
    1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,
    1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}}