AMC 10 Step by Step

2007 AMC 10B Problem 9

P1-10~3 minPrint

A cryptographic code is designed as follows. The first time a letter appears in a given message it is replaced by the letter that is 11 place to its right in the alphabet (asumming that the letter AA is one place to the right of the letter ZZ ). The second time this same letter appears in the given message, it is replaced by the letter that is 1+21+2 places to the right, the third time it is replaced by the letter that is 1+2+31+2+3 places to the right, and so on. For example, with this code the word "banana" becomes "cbodqg". What letter will replace the last letter ss in the message "Lee’s sis is a Mississippi miss, Chriss!"?\text{"Lee's sis is a Mississippi miss, Chriss!"?}

Log in to save your progress.
Show solution without answering

Key insight

The last s is the 12th s, so it moves 1 + 2 + ... + 12 = 78 places, exactly three trips around the alphabet.

Solution

Two jobs: find which appearance of ss the last one is, then work out how far it moves.

  1. Count the ss's word by word:
wordLee'ssisisaMississippimissChriss
number of ss1210422
running total134481012

The last ss is the 1212th one.
2. The 1212th appearance moves 1+2+3+⋯+121 + 2 + 3 + \cdots + 12 places. Pair the numbers from the outside in: 1+121 + 12, 2+112 + 11, and so on, six pairs of 1313. So the shift is
6×13=78 places.6 \times 13 = 78 \text{ places}.
3. The alphabet has 2626 letters, and moving 2626 places brings a letter back to itself. Since 78=3×2678 = 3 \times 26, the letter goes around three full times and stops where it started.
4. So the last ss becomes ss.

The answer is (D) s\boxed{\textbf{(D)}\ s}.

Why this works

With a wrap-around alphabet, only the leftover after taking out full trips of 2626 matters. Figure out the total shift first and remove the full trips, rather than stepping letter by letter. Most of the danger in this problem is simply counting the ss's correctly, so a table is worth the few seconds.

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

First count how many times the letter ss appears, word by word:

wordLee'ssisisaMississippimissChriss
number of ss1210422

Running total: 1,3,4,4,8,10,121, 3, 4, 4, 8, 10, 12. The final ss is the 1212th occurrence.

The kkth occurrence of a letter moves 1+2+⋯+k=k(k+1)21 + 2 + \cdots + k = \frac{k(k+1)}{2} places to the right. For k=12k = 12 this is 12⋅132=78\frac{12 \cdot 13}{2} = 78.

Since the alphabet has 2626 letters, a shift of 78=3⋅2678 = 3 \cdot 26 brings the letter all the way around three full times and back to where it started. The last ss is replaced by ss itself.

The answer is (D) s\boxed{\textbf{(D)}\ s}.

Review in the AoPS books

Similar problems

Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.