Olympiad Maths Prep

Library / /39 of 41

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 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.

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.

Looking for a route rather than 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 and solution reproduced as published; topic and difficulty added by this site.