Coin Game Decision Tree (n=4)

In this coin game, we start with 4 coins. Players take turns removing 1, 2, or 3 coins. The player who takes the last coin wins!

Let's see why Player 2 always wins with optimal play when starting with 4 coins.

Player 1 has three possible first moves: take 1, 2, or 3 coins.

Let's examine what happens in each case when Player 2 plays optimally.

Case 1: If Player 1 takes 1 coin, leaving 3 coins.

Player 2 can take 3 coins and win immediately!

Case 2: If Player 1 takes 2 coins, leaving 2 coins.

Player 2 can take 2 coins and win immediately!

Case 3: If Player 1 takes 3 coins, leaving 1 coin.

Player 2 can take the last coin and win immediately!

Conclusion: No matter what Player 1 does, Player 2 always has a winning move!

This is because 4 is one more than the maximum number of coins (3) a player can take in one turn.

In general, when the total number of coins is n = (m+1), where m is the maximum allowed to take, the second player will always win with optimal play.