HMMT 二月 2003 · 冲刺赛 · 第 40 题
HMMT February 2003 — Guts Round — Problem 40
题目详情
- [18] All the sequences consisting of five letters from the set { T, U, R, N, I, P } (with repetitions allowed) are arranged in alphabetical order in a dictionary. Two sequences are called “anagrams” of each other if one can be obtained by rearranging the letters of the other. How many pairs of anagrams are there that have exactly 100 other sequences between them in the dictionary?
解析
- All the sequences consisting of five letters from the set { T, U, R, N, I, P } (with repeti- tions allowed) are arranged in alphabetical order in a dictionary. Two sequences are called “anagrams” of each other if one can be obtained by rearranging the letters of the 11 other. How many pairs of anagrams are there that have exactly 100 other sequences between them in the dictionary? Solution: 0 Convert each letter to a digit in base 6: I 7 → 0 , N 7 → 1 , P 7 → 2 , R 7 → 3 , T 7 → 4 , U 7 → 5. Then the dictionary simply consists of all base-6 integers from 00000 to 55555 in 6 6 numerical order. If one number can be obtained from another by a rearrangement of digits, then the numbers are congruent modulo 5 (this holds because a number abcde 6 4 3 2 = 6 · a + 6 · b + 6 · c + 6 · d + e is congruent modulo 5 to a + b + c + d + e ), but if there are 100 other numbers between them, then their difference is 101, which is not divisible by 5. So there are no such pairs.