Maths Olympiad Prep

Track / Stage 6 / 328 of 400 #1808 of 2444

Problem 1808

National Olympiad, first round
Combinatorics Difficulty 6.8 Prove it Romanian Mathematical Olympiad · 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 nNn \in \mathbb{N}, n3n \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.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official 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 xCx \in C, we define the set Cx={yCd(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 CaCb=C_a \cap C_b = \emptyset.

Let DD be the set of all words of length nn from the language. Then aDCaC\bigcup_{a \in D} C_a \subset C, which implies Card(aDCa)Card(C)\text{Card}\left(\bigcup_{a \in D} C_a\right) \le \text{Card}(C). But Card(aDCa)=(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.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.