2019 IMO Problems/Problem 5

Revision as of 11:39, 7 November 2019 by Fahmid (talk | contribs) (Created page with "The Bank of Bath issues coins with an <math>H</math> on one side and a <math>T</math> on the other. Harry has <math>n</math> of these coins arranged in a line from left to rig...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The Bank of Bath issues coins with an $H$ on one side and a $T$ on the other. Harry has $n$ of these coins arranged in a line from left to right. He repeatedly performs the following operation:

If there are exactly $k > 0$ coins showing $H$, then he turns over the $k^{th}$ coin from the left; otherwise, all coins show $T$ and he stops. For example, if $n = 3$ the process starting with the configuration $THT$ would be $THT \rightarrow HHT \rightarrow HTT \rightarrow TTT$, which stops after three operations.

(a) Show that, for each initial configuration, Harry stops after a finite number of operations.

(b) For each initial configuration $C$, let $L(C)$ be the number of operations before Harry stops. For example, $L(THT) = 3$ and $L(TTT) = 0$. Determine the average value of $L(C)$ over all $2^n$ possible initial configurations $C$.