To connect to the OFM site, Alice must choose a password. The latter must be consisting of $n$ characters among the following $27$ characters: $$A, B, C, . . ., Y , Z, \#$$We say that a password $m$ is redundant if we can color in red and blue a block of consecutive letters of $m$ in such a way that the word formed from the red letters is identical to the word formed from blue letters. For example, the password $H\#ZBZJBJZ$ is redundant, because it contains the ZBZJBJ block, where the word $ZBJ$ appears in both blue and red. At otherwise, the $ABCACB$ password is not redundant. Show that, for any integer $n \ge 1$, there exist at least $18^n$ passwords of length $n$, that is to say formed of $n$ characters each, which are not redundant.
Problem
Source: P2 Francophone Math Olympiad Senior 2022
Tags: combinatorics
20.06.2022 09:17
Let $r_n$ denote the number of non-redundant passwords of length $n$ and $b_{2k}$ the number of blocks of length $2k$ that can be two colored in the way described. Notice that if we append a character to a a non-redundant password of length $n-1,$ we get a password of length $n.$ If the resulting password is redundant, then the redundancy must arise from some block containing the last character. Thus, we have $27 r_{n-1} \leq r_n + \sum_{1 \leq k \leq n/2} r_{n-2k} b_{2k}.$ We also bound $b_{2k} \leq \binom{2k}{k} \cdot 27^k \leq 2^{2k} \cdot 27^k = (4 \cdot 27)^k,$ a redundant block can be formed by choosing $k$ of the letters, and assigning characters to them. Then the other $k$ characters are also determined. Since $r_1 = 27 \geq 18,$ it suffices to show by induction that $r_{n} \geq 18 r_{n-1}$ for all $n \geq 1,$ and $r_n \geq 18^n$ follows. So suppose that $r_i \geq 18 r_{i-1}$ for all $i < n.$ Then we have $r_n \geq27 r_{n-1} - \sum_{1 \leq k \leq n/2} r_{n-2k} b_{2k} \geq 27 r_{n-1} - \sum_{1 \leq k \leq n/2} 18^{-2k} r_n \cdot (4 \cdot 27)^k \geq 27r_{n-1} - r_n \cdot \sum_{k=1}^{\infty} \left(\frac{4 \cdot 27}{18^2} \right)^k = 27 r_{n-1} - \frac{1}{2} r_n.$ It follows that $\frac{3}{2} r_n \geq 27 r_{n-1},$ and $r_{n} \geq 18 r_{n-1}$ as desired. $\blacksquare$