Problem 5. On the table, there are 10 stacks of playing cards (the number of cards in the stacks can be different, there should be no empty stacks). The total number of cards on the table is 2015. If a stack has an even number of cards, remove half of the cards. If the number of remaining cards in the stack is still even, remove half again, and so on, until the number of cards in the stack becomes odd. Do this for each stack. Explain:

a) What is the maximum possible number of cards remaining on the table?

b) What is the minimum possible number of cards remaining on the table?

In each case, provide an example of how the playing cards can be distributed among the stacks.
# Solution

a) Since 2014 is an odd number, in any distribution of cards into 10 piles, there will be at least one pile with an even number of cards. Therefore, the number of cards in this pile, and thus the total number of cards, will definitely decrease by at least one card (if there are 2 cards in this pile). This means the final number of cards on the table will always be less than 2015. With the distribution $\underbrace{1,1, \ldots, 1}_{8}, 2,2005$, it is easy to verify that the final number of cards remaining on the table is 2014.

b) The smallest number of cards remaining in a pile is 1. Therefore, the final number of cards remaining on the table cannot be less than 10. In the following example, the final number of cards remaining on the table is 10:

1024, 512, 256, 128, 64, 16, 8, 4, 2, 1.