Browse · MathNet
PrintXXX OBM
Brazil counting and probability
Problem
The venusian prophet Zabruberson sent to his pupils a 10000-letter word, each letter being or : the Zabrubic word. Their pupils decided that, for , each word comprised of consecutive letters of the Zabrubic word is a prophetic word of length . It is known that there are at most 7 prophetic words of length 3. Find the maximum number of prophetic words of length 10.
Solution
Let be the maximum number of prophetic words of length . Obviously, , and . Moreover, since there are exactly 3-letter words, each letter being or , there is a forbidden substring of length three. So we can estimate from above: in fact, each of the -letter words belongs to exactly one of three sets: the set of words whose last letter is different from the last letter of ; the set of words whose penultimate letter is different from the second letter of and whose last letter is equal to the last letter of ; the set of words whose third-to-last letter is different from the first letter of and whose two last letters are equal to the two last letters of . There are exactly , and words in these sets, respectively (notice the last letter, two last letters and three last letters of the words in the respective sets are determined and that they don't impose any restriction on the other letters). So . If it's not hard to prove that is actually equal to . Just construct the words without a substring using all words that fit the description above. Substituting, we get and now it remains to prove that there is a Zabrubic word satisfying the conditions of the problem, but this isn't hard, too: first, concatenate all 504 10-letter prophetic words, separate them with an and complete the word with 's. So the maximum number of 10-letter prophetic words is 504.
Final answer
504
Techniques
Recursion, bijectionRecurrence relations