Coding-Decoding
In a coding-decoding question a word is written in a code, and the candidate must either decode a coded word or encode a new word using the same rule. The whole chapter depends on finding the rule from one or two examples and then applying it without error. The rules are limited in number, and a candidate who knows the common kinds of rules can place a new question into a known type within seconds.
The first kind of rule shifts each letter by a fixed number of places. If COLD is written as DPME, each letter has moved one place forward. If the shift is backwards, the letters move towards A. The shift may be different for different positions, for example the first letter forward by one, the second by two and the third by three, so the candidate must compare every letter of the example rather than only the first.
The second kind reverses the word before shifting, or shifts before reversing. To tell which has been done, the candidate should try both on the example and keep the one that fits. A related rule replaces the word with the letters that are opposite in the alphabet, so that A becomes Z, B becomes Y and so on, and here the place value of the code letter is twenty-seven minus the place value of the original letter.
The third kind codes the letters by their place values as numbers. A word may be written as the numbers one, two, three and so on, or as the products of the place values, or as the sums of the place values of neighbouring letters. The candidate should write the place values above the letters at once, because this makes the numerical rule visible and also allows a quick check of the answer.
The fourth kind uses a code table or a fixed substitution in which each letter is replaced by a particular symbol or another letter. If the substitution is fixed, then the same letter in the question always becomes the same symbol, and the candidate can build a small table as the letters appear. This kind of question is solved by matching the most frequent letters first, just as in a simple cipher.
The fifth kind uses a keyword. Sometimes the alphabet is written under a keyword and the code is read off from that arrangement. The candidate should write out the alphabet with the keyword placed under it, leaving out the repeated letters of the keyword, and then read the code directly. A variant places the keyword and then fills the rest of the alphabet after it, wrapping round to the start.
The sixth kind codes numbers or words by their order, by the number of letters, or by the number of vowels and consonants. A question may give the code of a word as the position of its first letter, or as the sum of the place values of its letters, or as the number of letters between its first and last letters. The candidate should compute the suggested value for the example and confirm it before using it on the question.
A useful general method is to write the example word and its code one above the other and to write the place values of both under each letter. The difference or the ratio between the two place values then shows the rule at a glance. For most questions of the shifting kind this single step gives the answer, and it also guards against a rule that holds for the first few letters but fails later.
The commonest mistakes are to assume that a rule found in one part of the word holds for the whole word, and to forget the wrap round at the ends of the alphabet. A shift of three forwards from X gives A, and a shift of three backwards from C gives Z, and a candidate who forgets this will lose the question. Writing the alphabet at the top of the rough sheet, as in the alphabet test, prevents the second mistake.
Practise the chapter by coding and decoding ordinary words yourself. Take a word such as REASON, apply a shift of two, then of minus two, then the reverse, and write the codes. Ten minutes of this work makes the rules familiar, so that in the examination hall the rule is recognised rather than searched for, and the question is answered in the time it takes to write the code.
A very common rule codes a word by writing the letter that comes a fixed number of places after each letter, and the candidate should check whether the shift is the same for every letter or grows along the word. A growing shift, such as one for the first letter, two for the second and three for the third, is common in the harder questions, and it is found only by comparing every letter of the example rather than the first alone.
Some rules operate on the positions rather than the letters. A word may be coded by writing its letters in reverse order, or by swapping the first and last letters, or by writing the second half first. These rules do not change any letter, so the code contains the same letters as the word. A candidate who notices that the letters are unchanged but the order is different should test the rearrangement rules before the shifting rules.
Number codes are also frequent. A word may be coded by the sum of the place values of its letters, by the product of the first and last place values, or by the difference between the largest and smallest place values. The candidate should write the place values above the letters at once and then compute the suggested value for the example, checking that it matches before using it on the question.
A pair code gives two words and their codes and asks for the code of a third word. Here the rule must be found from both examples together, and a rule that fits only one example is not the rule. The candidate should test the guessed rule on the second example as well, and only when it fits both should the third word be coded.
Substitution codes, in which each letter is replaced by a fixed symbol, are solved by frequency. The most frequent letter in the coded text usually stands for the most frequent letter in ordinary language, and the common short words give further clues. The candidate should not try to guess the whole message at once but should fill in one letter at a time and check each guess against the words already solved.
Conditional coding gives a rule that depends on the letters of the word, for example coding a letter by the one that is three places ahead if the letter is a vowel and three places behind if it is a consonant. The candidate must read the condition carefully and apply the correct branch to each letter. Writing the vowels and consonants of the word in two groups before coding prevents a mix-up.
Some questions code a word by moving its letters by the position of the letter in the alphabet, so that the first letter moves one place, the second two places and so on. The method is the same as the growing shift, and the candidate should write the position of each letter above it before applying the shift. This kind of rule is easy to apply but easy to misapply, so a check at the end is worthwhile.
When the code is given and the word must be found, the candidate works backwards. A forward shift of three is undone by a backward shift of three, a reversal is undone by another reversal, and a substitution is undone by reading the table the other way. Working backwards is the same skill as working forwards, and the candidate should not be frightened by a question that gives the code first.
A useful check is to see whether the code is longer or shorter than the word, or whether it contains digits, because this tells the candidate what kind of rule is at work. A code of the same length and the same kind of letters suggests a shifting or substitution rule; a code of digits suggests a number rule; a code with repeated symbols suggests a substitution. Reading the shape of the code first saves time.
Finally, practise by inventing codes. Take a word, decide a rule, write the code, and then decode it as if it were a fresh question. This habit makes the common rules second nature, so that in the examination hall the rule is recognised from the look of the code rather than searched for from scratch, and the question is answered in the time it takes to write the letters.
- Find the rule from the example before looking at the question.
- For a shifting rule, compare every letter, not only the first.
- Write the place values of both the word and its code under the letters.
- Remember the wrap round: a shift of three forward from X is A.
- For a fixed substitution, match the most frequent letters first.
- For a keyword code, write the alphabet under the keyword and read off the code.
- If the letters are unchanged but reordered, test the reversal and swap rules first.
- For a pair code, the rule must fit both examples, not just one.
- For a substitution code, use letter frequency and the common short words.
- Read the shape of the code first: its length, its kind of letters and the presence of digits.
Frequently Asked Questions
What is the fastest way to find the coding rule?
Write the example word and its code one above the other and write the place values of both under each letter; the difference shows the rule at once.
What is the commonest mistake in this chapter?
Forgetting that the alphabet wraps round, so a forward shift from X passes to A and a backward shift from C passes to Z.
How do I solve a fixed substitution code?
Match the most frequent letters first and build a small table as each letter appears, just as in a simple cipher.
How do I solve a code in which each letter is replaced by a symbol?
Use frequency: match the most frequent symbol to the most frequent letter and use the common short words as clues, filling in one letter at a time.
What does it mean if the code has the same letters as the word but in a different order?
The rule reorders the letters, for example by reversing the word or swapping the first and last letters, so no shifting is involved.