Today our professor presented us with a puzzle of interest called The 'eating apple' problem (I have no idea what is it called formally though). The rules are
- There are three compartments, containing 3, 5, and 7 apples respectively.
- Two players, or 'eaters', will eat n apples in turns, until all apples are eaten. (n>0, n not necessarily 1)
- The last player to empty the compartments will be declared the loser.
- Each player can eat from at most one compartment at a time.
After trial and error with my friends, I have discovered that the person who starts the game will have an advantage, if not even a total dominance over the other player, but how can I prove this? As a cs student, I'm not a math geek at all, so a little help to where I can start would be appreciated.
This is the classic game/variant of NIM. The wiki has a good description on the winning strategies.