Given the natural . We shall call word sequence from letters of the alphabet, and distance between words and , the number of digits in which they differ (that is, the number of such , for which ). We will say that the word lies between words and , if . What is the largest number of words you can choose so that among any three, there is a word lying between the other two?
Problem 1554
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 for and for .
2. **Construction for **:
- Consider all words consisting of letters "a" followed by letters "b" for all . This gives us words.
3. **Construction for :
- 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 of words with the described property has if and if .
5. Distance Property:
- For any three words , we have with equality if and only if for each , either or .
6. Binary Strings:
- For any , at most two distinct letters occur in the -th position in words in . Thus, we can assume all words in are binary strings of length .
7. **Case **:
- For , the claim follows directly from the construction. So, assume .
8. Interpretation as Subsets:
- Interpret each string from as a subset of the set . Assume contains the string consisting of zeros.
9. Claim 1: For any distinct non-empty , either or , or .
- Proof: For any distinct non-empty , either lies between , meaning that are disjoint, or lies between and , which implies that .
10. Claim 2: No three non-empty subsets in are pairwise disjoint.
- Proof: Assume otherwise, then there exist non-empty such that . WLOG lies between and , but then taking some implies that either or , which is absurd.
11. Chain Argument:
- Let . If the subsets in form a chain, we have . Suppose this is not the case. Take disjoint so that is maximum. Then for each , either , or , or .
12. **Bounding **:
- If , then and must be empty, thus . Suppose . The subsets from form a chain, so and similarly . The subsets in form a chain by Claim 1, implying .
13. Final Calculation:
The final answer is for and for .