MathLabs

Problem 1

The Bank of Oslo issues two types of coin: aluminium (denoted AA) and bronze (denoted BB). Marianne has nn aluminium 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 k≤2nk\le2n, Marianne repeatedly performs the following operation: she identifies the longest chain containing the kk-th coin from the left, and moves all coins in that chain to the left end of the row. Find all pairs (n,k)(n,k) with 1≤k≤2n1\le k\le2n such that for every initial ordering, at some moment during the process, the leftmost nn coins will all be of the same type.
Step 3 of 5: If kk lies strictly inside a chain, two chains merge
In plain words

Moving a middle chain to the front joins its two neighbouring same-type chains into one, so the total chain count can only fall.

B1=[l′,l−1],B2=[m+1,m′]B_1=[l',l-1],\quad B_2=[m+1,m']
Detailed analysis

Suppose kk lies inside a chain [l,m][l,m] with l>1l>1 and m<2nm<2n (not the first or last chain). Removing [l,m][l,m] to the front lets the chain B1=[l′,l−1]B_1=[l',l-1] just before it and the chain B2=[m+1,m′]B_2=[m+1,m'] just after it become adjacent; since B1B_1 and B2B_2 have the same coin type, they merge into a single chain, so the total number of chains strictly decreases.