## Game of Coins

Kuku and Pipi decide to play a game. They arrange 50 coins in a line on the table, with various nominations. Then, alternating, each player takes on their turn one of the two coins at the ends of the line and keeps it. Kuku and Pipi continue doing this, until after the 50th move all coins are taken. Prove that whoever starts first can always collect coins with at least as much value as their opponent.

*Remark: On the first turn, Kuku can pick either coin #1 or coin #50. If Kuku picks coin #1, then Pipi can pick on her turn either coin #2 or coin #50. If Kuku picks coin #50, then Pipi can pick on her turn either coin #1 or coin #49.*

**SOLUTION**

Let’s assume Kuku starts first. In the beginning, he calculates the total value of the coins placed on odd positions in the line and compares it with the total value of the coins placed on even positions in the line. If the former has a bigger total value, then on every turn he takes the end coin which was placed on odd position initially. If the latter has bigger value, then on every turn he takes the end coin which was placed on even position initially. It is easy to see that he can always do this because after each of Pipi’s turns there will be one “odd” coin and one “even” coin at the ends of the line.