In: Economics
There are 21 pennies on a table between two players. The two players take turns removing either 1, 2 or 3 pennies at a time. The player who takes the last penny loses. Use backward induction to come up with a strategy that the player who takes the second turn in the game can use to guarantee that she wins the game.
The strategy for player 2 is to remove 4 - number of pennies removed by player 1
By backward induction, player 2 can guarantee winning if he removes the 20th penny in his turn
He can guarantee removeing the 20th penny if he removes the 16th penny. This is because if he removes the 16th penny, the maximum player 1 can reach in 16+3 = 19th penny. Thus, for any choice of player 1, player 2 can always remove the 20th penny.
Following this reasoning, player 2 has to remove the 12th, 8th and the 4th penny (multiples of 4)
Thus, the strategy is if player 1 removes 1 penny, player 2 should remove 4-1 = 3 pennys
if player 1 removes 2 penny, player 2 should remove 4-2 = 2 pennys
if player 1 removes 3 penny, player 2 should remove 4-3 = 1 penny