What the question is really asking
You are given a word and its code. Find the rule. Apply the same rule to a new word. That is all. The difficulty is only in finding the rule quickly, so it helps to know that almost every coding question is one of four types.
Type 1: letter shift
Each letter moves forward or backward by a fixed number.
Method: write the word, write the code under it, and write the position difference for each letter. If every difference is the same, you have the shift.
Watch for wrap-around. Z + 2 comes back to B, because after Z you start again at A. Treat the alphabet as a circle of 26.
Type 2: positional or reverse coding
- Each letter is replaced by its position number:
CABbecomes3 1 2. - Each letter is replaced by its opposite:
AbecomesZ,BbecomesY. Remember the pair adds to 27. - The letters of the word are reversed before or after shifting.
If a plain shift does not fit, check the reverse of the word next. It is the second most common trick.
Type 3: a number for a whole word
The code is a single number, so it comes from arithmetic on the whole word. Check these in order:
- Sum of the letter positions
- Number of letters, or number of letters squared
- Sum multiplied or divided by the number of letters
- Product of the first and last letter positions
Type 4: substitution language
You get three or four sentences in a made-up language and must find which code word means which real word. This looks the hardest and is actually the most mechanical.
The method: find the common word, find the common code. If two sentences share exactly one real word and exactly one code word, those two match. Cross them off and repeat.
Word order in these puzzles is meaningless. Do not assume the first code word matches the first English word. Only the overlap between sentences tells you anything.
Worked problem 1
If TEACHER is coded as VGCEJGT, how is STUDENT coded?
Line them up.
| Letter | Position | Code | Position | Shift |
|---|---|---|---|---|
| T | 20 | V | 22 | +2 |
| E | 5 | G | 7 | +2 |
| A | 1 | C | 3 | +2 |
| C | 3 | E | 5 | +2 |
| H | 8 | J | 10 | +2 |
| E | 5 | G | 7 | +2 |
| R | 18 | T | 20 | +2 |
The rule is +2 on every letter.
Apply it to STUDENT:
S → U
T → V
U → W
D → F
E → G
N → P
T → V
Answer: UVWFGPV
Worked problem 2
In a certain code, CAT is written as 24 and DOG is written as 26. Using the same rule, what is the code for BAT?
Test the sum of positions.
CAT: C = 3, A = 1, T = 20. Sum = 3 + 1 + 20 = 24 OK
DOG: D = 4, O = 15, G = 7. Sum = 4 + 15 + 7 = 26 OK
The rule is the sum of the letter positions.
BAT: B = 2, A = 1, T = 20
Sum = 2 + 1 + 20 = 23
Worked problem 3
In a code language:
sim la po means "he is good"
po ru mi means "good boys play"
mi la ta means "play is fun"
What is the code for "good", and what is the code for "is"?
Work pair by pair.
Sentences 1 and 2. English words in common: only good. Code words in common: only po. Therefore po = good.
Sentences 2 and 3. English words in common: only play. Code words in common: only mi. Therefore mi = play.
Sentences 1 and 3. English words in common: only is. Code words in common: only la. Therefore la = is.
Now finish the leftovers by elimination.
Sentence 1 was sim la po for "he is good". With la = is and po = good, sim = he.
Sentence 2 was po ru mi for "good boys play". With po = good and mi = play, ru = boys.
Sentence 3 was mi la ta for "play is fun". With mi = play and la = is, ta = fun.
Every word is now mapped and every sentence checks out.
Draw a small table with code words down the side and sentence numbers across the top. Tick which sentences each code word appears in. The matching becomes visual and you stop losing track halfway.
Speed notes
- Write the alphabet with positions on your rough sheet at the start of the section. You will use it in three different topics.