Maths Olympiad Prep

Library / /103 of 152

Combinatorics Difficulty 6.8 National Olympiad Prove it Russia

The language of Au tribe contains only two letters aa and uu. Some sequences of these letters are words, and each word contains not less than 11 and not more than 1313 letters. Moreover, if one writes down two words consecutively (with no space between them) then the resulting sequence is never a word. Find the maximal possible number of words in such language. (I. Bogdanov)

Solution

Answer. 21427=162562^{14} - 2^7 = 16256.

First solution. If all sequences whose number of letters is at least 77 and at most 1313 are words, then, obviously, the condition of the problem is satisfied; in this case, the number of such words is 27++213=214272^7 + \dots + 2^{13} = 2^{14} - 2^7. It remains to show that this number is the largest possible.

The total number of sequences of length not exceeding 1313 is 2+22++213=21422 + 2^2 + \dots + 2^{13} = 2^{14} - 2. If there are no 77-letter words among the words in the language, then the total number of words does not exceed 214227<214272^{14} - 2 - 2^7 < 2^{14} - 2^7. Suppose, on the contrary, that the language contains a 77-letter word ss. Then for each word tt consisting of 66 or fewer letters, the sequence of letters stst cannot be a word, and all sequences of the form stst are obviously distinct. Therefore, if the language has kk words of 66 or fewer letters, then the number of words of at least 77 letters does not exceed (27++213)k=21427k(2^7 + \dots + 2^{13}) - k = 2^{14} - 2^7 - k. Thus, the total number of words does not exceed k+(21427k)=21427k + (2^{14} - 2^7 - k) = 2^{14} - 2^7, which is what was required to prove.

Second solution. Here is another proof that the number of words in the language does not exceed 214272^{14} - 2^7. Let AA be the set of all sequences of 66 or fewer letters, and BB be the set of all 77-letter sequences. Then AA contains 2+22++26=2722 + 2^2 + \dots + 2^6 = 2^7 - 2 sequences, and BB contains 27>2722^7 > 2^7 - 2 sequences. Therefore, it is possible to assign to each sequence aAa \in A a sequence baBb_a \in B so that all sequences bab_a are distinct. Note that then all sequences of the form abaab_a are also distinct (since their 77-letter endings are distinct).

By the condition, in each of the 2722^7 - 2 triples (a,ba,aba)(a, b_a, ab_a) there are at most two words of the language. Therefore, at least 2722^7 - 2 sequences of 1313 or fewer letters are not words, and the total number of words does not exceed (2142)(272)=21427(2^{14} - 2) - (2^7 - 2) = 2^{14} - 2^7.

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.