Skip to main content
OlympiadHQ

Browse · MathNet

Print

SAUDI ARABIAN MATHEMATICAL COMPETITIONS

Saudi Arabia counting and probability

Problem

In the garden of Wonderland, there are apples, bananas and oranges. Two monkeys Adu and Bakar play the following game: alternatively each of them takes and eats one fruit of any kind except for the one that he took in previous turn (in the first turn, each of them can take a fruit of any kind). Who can not take a fruit is the loser. Which monkey has the winning strategy if Adu plays first?
Solution
Adu has the strategy to win the game. First, he takes one banana then we have apples, bananas and oranges. In the next turns, we have some cases: 1. If Bakar takes apple or orange, then Adu takes the same. We can see that the number of fruits in these type are always even, then whenever Bakar can takes, so does Adu. 2. If on the next turn, Bakar takes banana, then Adu cannot takes banana anymore base on the constraint. Then Adu takes apple. So the number of apples, bananas and oranges are , , . Then continue, Adu will play with following strategy: - Bakar takes banana then Adu takes apple. - Bakar takes apple then Adu takes banana. - Bakar takes orange then Adu takes orange. Similar with the first case, Adu always can perform his turn. Then in all cases, Adu has the strategy to win this game.
Final answer
Adu

Techniques

Games / greedy algorithmsInvariants / monovariants