Maths Olympiad Prep

Track / Stage 7 / 154 of 300 #1554 of 1964

Problem 1554

National olympiad second round; IMO P1/P4
Combinatorics Difficulty 7.3 Find the answer

Given the natural nn. We shall call word sequence from nn letters of the alphabet, and distance ρ(A,B)\rho(A, B) between words A=a1a2anA=a_1a_2\dots a_n and B=b1b2bnB=b_1b_2\dots b_n , the number of digits in which they differ (that is, the number of such ii, for which aibia_i\ne b_i). We will say that the word CC lies between words AA and BB , if ρ(A,B)=ρ(A,C)+ρ(C,B)\rho (A,B)=\rho(A,C)+\rho(C,B). What is the largest number of words you can choose so that among any three, there is a word lying between the other two?

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Official solution

1. Claim: The largest number of words you can choose so that among any three, there is a word lying between the other two is n+1 n + 1 for n2 n \neq 2 and n+2 n + 2 for n=2 n = 2 .

2. **Construction for n2 n \neq 2 **:
- Consider all words consisting of k k letters "a" followed by nk n - k letters "b" for all 0kn 0 \leq k \leq n . This gives us n+1 n + 1 words.

3. **Construction for n=2 n = 2 :
- Consider all words consisting of letters "a" and "b". This gives us the words "aa", "ab", "ba", and "bb", which are 4 words in total.

4. Proof**:
- We need to show that any set S S of words with the described property has Sn+1 |S| \leq n + 1 if n2 n \neq 2 and Sn+2 |S| \leq n + 2 if n=2 n = 2 .

5. Distance Property:
- For any three words A,B,C A, B, C , we have ρ(A,C)+ρ(C,B)ρ(A,B) \rho(A, C) + \rho(C, B) \geq \rho(A, B) with equality if and only if for each i i , either ci=ai c_i = a_i or ci=bi c_i = b_i .

6. Binary Strings:
- For any 1in 1 \leq i \leq n , at most two distinct letters occur in the i i -th position in words in S S . Thus, we can assume all words in S S are binary strings of length n n .

7. **Case n2 n \leq 2 **:
- For n=2 n = 2 , the claim follows directly from the construction. So, assume n3 n \geq 3 .

8. Interpretation as Subsets:
- Interpret each string from S S as a subset of the set [n]={1,2,,n} [n] = \{1, 2, \ldots, n\} . Assume S S contains the string consisting of n n zeros.

9. Claim 1: For any distinct non-empty A,BS A, B \in S , either AB= A \cap B = \emptyset or AB A \subset B , or BA B \subset A .
- Proof: For any distinct non-empty A,BS A, B \in S , either \emptyset lies between A,B A, B , meaning that A,B A, B are disjoint, or A A lies between \emptyset and B B , which implies that AB A \subset B .

10. Claim 2: No three non-empty subsets in S S are pairwise disjoint.
- Proof: Assume otherwise, then there exist non-empty A,B,CS A, B, C \in S such that AB=BC=CA= A \cap B = B \cap C = C \cap A = \emptyset . WLOG B B lies between A A and C C , but then taking some bB b \in B implies that either bA b \in A or bC b \in C , which is absurd.

11. Chain Argument:
- Let S=S{} S' = S \setminus \{\emptyset\} . If the subsets in S S' form a chain, we have Sn |S'| \leq n . Suppose this is not the case. Take disjoint X,YS X, Y \in S' so that X+Y |X| + |Y| is maximum. Then for each ZS{X,Y} Z \in S' \setminus \{X, Y\} , either ZX Z \subset X , or ZY Z \subset Y , or X,YZ X, Y \subset Z .

12. **Bounding S |S| **:
- If [n]S [n] \in S' , then XY=[n] X \cup Y = [n] and S1,S2 S_1, S_2 must be empty, thus S3n |S'| \leq 3 \leq n . Suppose [n]∉S [n] \not \in S . The subsets from S1 S_1 form a chain, so S1X1 |S_1| \leq |X| - 1 and similarly S2Y1 |S_2| \leq |Y| - 1 . The subsets in S3 S_3 form a chain by Claim 1, implying S3nXY |S_3| \leq n - |X| - |Y| .

13. Final Calculation:
S=S{X,Y}+3=S1+S2+S3+3(X1)+(Y1)+(nXY)+3=n+1 |S| = |S' \setminus \{X, Y\}| + 3 = |S_1| + |S_2| + |S_3| + 3 \leq (|X| - 1) + (|Y| - 1) + (n - |X| - |Y|) + 3 = n + 1

The final answer is n+1 \boxed{ n + 1 } for n2 n \neq 2 and n+2 n + 2 for n=2 n = 2 .

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.