Maths Olympiad Prep

Library / /90 of 106

Combinatorics Difficulty 8.8 Shortlist Find the answer

The Bank of Oslo issues two types of coin: aluminum (denoted A) and bronze (denoted B). Marianne has nn aluminum coins and nn bronze coins arranged in a row in some arbitrary initial order. A chain is any subsequence of consecutive coins of the same type. Given a fixed positive integer k2nk \leq 2n, Gilberty repeatedly performs the following operation: he identifies the longest chain containing the kthk^{th} coin from the left and moves all coins in that chain to the left end of the row. For example, if n=4n=4 and k=4k=4, the process starting from the ordering AABBBABAAABBBABA would be AABBBABABBBAAABAAAABBBBABBBBAAAA...AABBBABA \to BBBAAABA \to AAABBBBA \to BBBBAAAA \to ...

Find all pairs (n,k)(n,k) with 1k2n1 \leq k \leq 2n such that for every initial ordering, at some moment during the process, the leftmost nn coins will all be of the same type.

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

Solution

Given the problem, Marianne has nn aluminum coins and nn bronze coins arranged in a row in some arbitrary initial order. We want to find pairs (n,k)(n, k) for a fixed positive integer k2nk \leq 2n such that as Gilberty performs his operation, at some point, the leftmost nn coins will all be of the same type for every initial ordering.

### Problem Restatement and Approach

For each fixed (n,k)(n, k):
1. Gilberty identifies the longest chain containing the kthk^{th} coin and moves it to the left end.
2. We have to determine the necessary conditions on nn and kk for the process to result in the leftmost nn coins being of the same type eventually.
3. The task is to identify all possible pairs (n,k)(n, k) where this condition is satisfied for any starting configuration of coins.

### Observation and Analysis

1. Key Insight: If knk \geq n, the kthk^{th} coin will definitely involve both aluminum and bronze coins in its chain because the kthk^{th} position cannot be fully occupied by fewer than nn coins of one type.

2. **Critical Range for kk**:
- If knk \leq n, there is no assurance that the operation will result in all nn coins of the same type on the left due to insufficient reach of the chain to involve exclusively nn coins of one type.
- If k>nk > n, at some point, a chain containing the kthk^{th} coin can have its length maximized such that moving it to the start will enable all nn coins at the leftmost end to be of one type.

3. Maximal Criterion:
- If kk is too large, i.e., k>3n2k > \left\lceil \frac{3n}{2} \right\rceil, a chain may get interrupted because the further kk is to the right, the less coincides with the largest chains.

4. Conclusion:
- For the configuration where all first nn coins become the same type, we need nk3n2n \leq k \leq \left\lceil \frac{3n}{2} \right\rceil.

### Mathematical Derivation

Let's denote the longest chain condition involving kk. Assume the sequence is:
Type A, Type B within first k positions. \text{Type A, Type B within first } k \text{ positions.}

If from position kk to position 2n2n we have initially an even split and assume maximal separation:
- By kk moving the majority type entirely to front by optimal chain operation up to kk.

This sequence of operations allows at some stage all leftmost nn coins to either all be A's or B's.

Therefore, the desired pairs (n,k)(n, k) such that the leftmost nn coins become entirely of a single type for any initial ordering satisfies:
nk3n2 \boxed{n \leq k \leq \left\lceil \frac{3n}{2} \right\rceil}

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.