The Greenwood School Shift Cipher: Rule, Red Herring and Reverse-Decoding
The Cryptography Club at Greenwood School has invented a shift cipher of its own. To encode a word, move its first letter 1 place forward in the alphabet, its second letter 2 places forward, its third 3 places forward, and so on, where the shift equals the letter's position inside the word. Shifts wrap around: Z moved 1 place becomes A, and Z moved 3 places becomes C. Only letters change; nothing is added or removed. Three code strings are pinned to the club notice board: MQJMH, ABC and MJQQT. A new member, Riya, argues that MQJMH is just LOGIC with every letter moved one place forward, and that MJQQT is HELLO. The club secretary replies that MJQQT was produced by encoding some five-letter word but not HELLO, and that the second string on the board is a complete red herring. No key or worked example is displayed anywhere.
1. Encode LOGIC using the club rule, and state precisely where Riya's 'one place forward' description first fails.
Read the worked answer
Apply the shift equal to the letter's position in the word:
- L (position 1): L + 1 = M
- O (position 2): O + 2 = Q
- G (position 3): G + 3 = J
- I (position 4): I + 4 = M
- C (position 5): C + 5 = H
So LOGIC encodes to MQJMH.
Riya gets the right string from the wrong rule. Her rule fails at the very second letter: O + 1 = P, not Q. Under her description LOGIC would have become MPQJD, which is not the string on the board. The first letter agrees only because position 1 and shift 1 coincide, which is exactly the kind of coincidence the question is testing.
2. Decode the string ABC back into a word, showing every wrap-around step, and verify your answer by re-encoding it.
Read the worked answer
Decoding reverses the shifts, so subtract the position:
- A is in position 1, so A − 1 wraps backwards past A to Z.
- B is in position 2, so B − 2 = Z.
- C is in position 3, so C − 3 = Z.
The decoded word is ZZZ. The wrap is essential: two of the three steps fall off the front of the alphabet, which is why a string made of the first three letters decodes into a string made of the last letter.
Check by re-encoding: Z + 1 = A, Z + 2 = B, Z + 3 = C, giving ABC again. The cipher is reversible because the shift depends only on position, not on the letters themselves.
3. Decode MJQQT. Is the secretary right that it is not HELLO? Also give the string that HELLO would actually produce.
Read the worked answer
Subtract the position from each letter:
- M − 1 = L
- J − 2 = H
- Q − 3 = N
- Q − 4 = M
- T − 5 = O
MJQQT decodes to LHNMO, a string of letters that is not an English word. So the secretary is correct: the string was made by encoding something, but not HELLO.
Encoding HELLO instead: H+1 = I, E+2 = G, L+3 = O, L+4 = P, O+5 = T, giving IGOPT. HELLO and LHNMO are different strings, and only one of them is on the board. The lesson is that a string which matches a guess on a couple of letters (here M, Q and T can be forced to agree with some letter-by-letter story) is not evidence for the guess; only the rule decides.