Maths Olympiad Prep

Library / /210 of 229

Combinatorics Difficulty 6.8 National Olympiad Prove it Romania

The people of an ancient tribe used a language in which the words were formed with two letters only: AA and BB. Researchers discovered that any two words of equal length differ in at least three positions. For instance, the words ABBAAABBAA and AAAABAAAAB differ in positions 22, 33 and 55, that is, in three positions.

Let n∈Nn \in \mathbb{N}, n≥3n \ge 3. Prove that this language cannot contain more than ⌊2nn+1⌋\left\lfloor \frac{2^n}{n+1} \right\rfloor words of length nn.

Solution

If we denote by CC the set of all possible words of length nn (not necessarily from the language), we have Card(C)=2n\text{Card}(C) = 2^n. If xx and yy are arbitrary words from CC, let d(x,y)d(x, y) be the number of positions at which the corresponding letters are different (the Hamming distance). Obviously, d(x,x)=0d(x, x) = 0 and d(x,y)=d(y,x)d(x, y) = d(y, x). For each x∈Cx \in C, we define the set Cx={y∈C∣d(x,y)≤1}C_x = \{y \in C \mid d(x, y) \le 1\}. It is not difficult to see that Card(Cx)=n+1\text{Card}(C_x) = n + 1.

If a,ba, b are words of length nn from the given language, then d(a,b)≥3d(a, b) \ge 3, hence Ca∩Cb=∅C_a \cap C_b = \emptyset.

Let DD be the set of all words of length nn from the language. Then ⋃a∈DCa⊂C\bigcup_{a \in D} C_a \subset C, which implies Card(⋃a∈DCa)≤Card(C)\text{Card}\left(\bigcup_{a \in D} C_a\right) \le \text{Card}(C). But Card(⋃a∈DCa)=(n+1)⋅Card(D)\text{Card}\left(\bigcup_{a \in D} C_a\right) = (n+1) \cdot \text{Card}(D), so that (n+1)⋅Card(D)≤2n(n + 1) \cdot \text{Card}(D) \le 2^n, therefore Card(D)≤2nn+1\text{Card}(D) \le \frac{2^n}{n+1}, and the conclusion follows.

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: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.