Maths Olympiad Prep

Library / /16 of 20

Combinatorics Difficulty 6.8 National olympiad Find the answer

Let nn be a positive integer. Anna and Beatrice play a game with a deck of nn cards labelled with the numbers 1,2,...,n1, 2,...,n. Initially, the deck is shuffled. The players take turns, starting with Anna. At each turn, if kk denotes the number written on the topmost card, then the player first looks at all the cards and then rearranges the kk topmost cards. If, after rearranging, the topmost card shows the number k again, then the player has lost and the game ends. Otherwise, the turn of the other player begins. Determine, depending on the initial shuffle, if either player has a winning strategy, and if so, who does.

A number or a short expression. Spacing and $ signs are ignored.

Solution

Consider a deck with n n cards labeled 1,2,,n 1, 2, \ldots, n arranged in some initial order. We need to determine under what circumstances Anna, who starts the game, has a winning strategy. The strategy depends on the number k k on the topmost card at each player's turn.

### Game Description:

1. At each turn, the player observes the topmost card, which has the number k k . The allowed move is to rearrange the top k k cards in any order.
2. If the top card remains as k k after rearrangement the same player loses, and the game ends.

### Strategy Analysis:

Let's consider what gives Anna a winning strategy:

- Anna examines the number k k on the topmost card. She has the freedom to rearrange the k k topmost cards.
- If k k is the smallest among these k k cards, any rearrangement will necessarily keep k k as the topmost card. This results in Anna losing immediately because the topmost card after her rearrangement is still k k .

However, if k k is not the smallest card among the top k k cards, Anna can always rearrange these cards such that a card smaller than k k becomes the topmost card, hence avoiding losing:

- This move changes the topmost card to a number smaller than k k , passing control to Beatrice without losing right away. With each player's optimal play, Beatrice faces the same situation: if the number on the topmost card during her turn is the smallest among the cards she can rearrange, she will lose.

Thus, Anna has a winning strategy if and only if the number k k on the topmost card is not the smallest of the k k topmost cards:

Anna has a winning strategy if and only if k is not the smallest of the k topmost cards. \boxed{\text{Anna has a winning strategy if and only if } k \text{ is not the smallest of the } k \text{ topmost cards.}}
```

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.