Twenty visible coins, two ends, and one question: can the first player avoid defeat, whatever the opponent chooses?

The Row of Coins

Strategist
Master plays

Riddle statement

There are 20 coins arranged in a row. Each has a positive value visible to both players; values may be repeated.

The players take turns removing one coin from either end. When the row is empty, each player totals the value of the coins collected.

Can the first player guarantee not to lose, regardless of the values and their order? If so, what strategy should be used?

Show solution

Solution

Answer: yes. The first player can guarantee not to lose.

Number the original positions from left to right, from 1 to 20, and separately total the values in the odd and even positions. One of these two totals must be at least as large as the other.

The first player decides to claim that entire family. To choose the odd positions, take the leftmost coin, originally in position 1. To choose the even positions, begin on the right by taking position 20.

Afterward, always take from the same end just used by the opponent.

After the opening move, both endpoints available to the second player belong to the opposite parity. When the opponent removes one, the next coin exposed at that same end belongs to the parity chosen by the first player, who can take it immediately. The same situation then repeats.

The first player therefore receives all ten coins of the chosen parity, while the second player receives the other ten. Since the chosen family had the greater or equal total, the first player's final value is at least as large as the opponent's.

The key is not to choose the best visible coin each time, but to use the opening move to claim one complete half of the row.