Browse · MathNet
PrintIRL_ABooklet_2023
Ireland 2023 counting and probability
Problem
Leonard Larsson's Language The linguist Leonard Larsson made up a new language in which all words have exactly seven letters and only the twenty letters from to are used. Furthermore, any pair of distinct words differ in at least two places. (For instance, if the words and are part of this language, then and cannot be words.) Leonard claims that if he needs more words, the language rules allow him to create more than million words. His colleague says “I presume you mean more than million words?”. Prove that indeed these rules allow for more than million words but not more than million.
Solution
Let's generalise and consider exactly letters in a word, chosen from an alphabet of letters, with the restriction that any two distinct words must differ in at least two places. We claim that this allows for at most words, and that this bound can be obtained. Since lies strictly between and million, Leonard's colleague makes a valid point, but we need to prove our claim!
The upper bound follows easily from the pigeonhole principle since there are possibilities for the first letters in a word. Thus, if there are more than this number of words, at least two of them must have the same first letters and so cannot differ at two or more places.
Conversely, consider the set of near-words consisting of letters from the alphabet, but with no restriction on the number of differences between two near-words. Clearly, there are near-words. Treat the letters as base- digits and create a word from each near-word by appending a single letter that is congruent to the sum of the letters in modulo . This gives a collection of words with the right number of letters and the right alphabet. But do they all differ in at least two places?
Suppose the distinct near-words and give rise to words and , respectively, by this process. If and differ in at least two places, so do and . If and differ in only one place, then and are different, and so and differ in exactly two places.
The upper bound follows easily from the pigeonhole principle since there are possibilities for the first letters in a word. Thus, if there are more than this number of words, at least two of them must have the same first letters and so cannot differ at two or more places.
Conversely, consider the set of near-words consisting of letters from the alphabet, but with no restriction on the number of differences between two near-words. Clearly, there are near-words. Treat the letters as base- digits and create a word from each near-word by appending a single letter that is congruent to the sum of the letters in modulo . This gives a collection of words with the right number of letters and the right alphabet. But do they all differ in at least two places?
Suppose the distinct near-words and give rise to words and , respectively, by this process. If and differ in at least two places, so do and . If and differ in only one place, then and are different, and so and differ in exactly two places.
Techniques
Pigeonhole principleRecursion, bijectionModular Arithmetic