|
|  | $[$ Algorithm Theory (other) $]$ |  |

On a magic apple tree, 15 bananas and 20 oranges have grown. It is allowed to pick one or two fruits at a time. If you pick one fruit, the same one will grow back. If you pick two identical fruits at once, an orange will grow back. If you pick two different fruits, a banana will grow back.
a) In what order should the fruits be picked so that only one fruit remains on the tree?

b) Can you determine what this fruit will be?

c) Is it possible to pick the fruits in such a way that nothing remains on the tree?

#
Can the fruits be picked in such a way that the number of bananas on the apple tree becomes even?

## Solution

b), c) Note that the number of bananas on the apple tree will always be odd.

a) For example, we can pick 7 times two bananas (one banana and 27 oranges will remain), and then 27 times pick one banana and one orange.

## Answer

b) Banana; c) impossible.