Coding by Analogy (Deriving the Coding Pattern from a Given Example)
Reasoning › Coding-Decoding · Topic 4.5
Coding by analogy gives one or more sample words with their codes, without naming the rule, and asks for the code of a new word. The method is to compare the sample and its code position by position, name the rule (shift, reversal, position values, vowel replacement or swapping), test it on every letter, and then apply the same rule to the new word.
8 min read · Reasoning · Coding-Decoding
Quick Answer
Coding by analogy gives one or more sample words with their codes, without naming the rule, and asks for the code of a new word. The method is to compare the sample and its code position by position, name the rule (shift, reversal, position values, vowel replacement or swapping), test it on every letter, and then apply the same rule to the new word.
At a Glance
- Given A sample word and its code
- Asked The code of a new word
- Step 1 Compare letters position by position
- Step 2 Name the rule
- Step 3 Test it on every letter
- Common rules Shift, reverse, values, vowels, swap
Where Does It Fit?
This is the fifth topic of the Coding-Decoding macro. It combines the shifts of Letter Coding (Direct, Shifted and Reverse Alphabet Coding), the values of Number Coding (Assigning Numeric Values to Letters/Words) and the arrangement changes of Coding Based on Jumbled or Reversed Letters Within a Word, but does not tell you which one is used. The reverse task of reading a coded message is in Decoding a Given Coded Message or Sentence.
What Is Coding by Analogy?
In short: a sample pair shows how one word became another, and the new word must be changed in exactly the same way.
| Sample | Code | Hidden rule | New word and code |
|---|---|---|---|
| BLUE | CMVF | Each letter +1 | GREEN becomes HSFFO |
| PLAN | NALP | Letters reversed | FAST becomes TSAF |
| RED | 27 | Sum of positions (18 + 5 + 4) | BLUE becomes 40 |
| APPLE | 1PPL5 | Vowels replaced by their position numbers | ORANGE becomes 15R1NG5 |
| PAINT | TAINP | First and last letters swapped | WORLD becomes DORLW |
All five rules above can be spotted in under a minute if you look at whether the length of the word changes, whether the letters remain the same, and whether numbers appear in the code.
How Do You Find the Pattern in a Coding Analogy?
In short: check the three obvious things first: do the same letters appear, are they in the same order, and do the codes follow the alphabet.
Pattern checklist
- Same letters, different order: reversal, swap or rotation of letters.
- Different letters, same length: a shift, opposite letters or an alternating shift.
- Numbers in the code: alphabet positions, a sum, or a product.
- Part of the word kept, part changed: vowels or consonants coded differently.
- Different length: first-last letters, counts or positions are used.
- Write positions: for the letter shifts, write alphabet positions under both words, as described in Letter Coding (Direct, Shifted and Reverse Alphabet Coding).
- Test every letter: a rule that fits the first letter and fails the third is not the rule. For TBINPK from SCHOOL, the shifts are +1, -1, +1, -1, +1, -1.
- Two samples: when two samples are given, a rule must fit both. If it does not, you are looking at a different rule, not at an error in the question.
Apply the rule to the new word exactly in the same order. For PLANET with the alternating rule +1, -1, +1, -1, +1, -1 the code is QKBMFS.
What Are the Common Traps in Coding by Analogy?
In short: the usual traps are rules that fit only part of the sample, wrap-around at Z, and a new word with a different length.
- Partial fit: a +1 shift may fit three letters of a five-letter word and fail on the other two. Then the rule is alternating or progressive, not a plain shift.
- Wrap-around: Z shifted forward by one is A. A shift of +2 on the letter Y gives A, not a symbol beyond Z.
- Longer new words: if the new word has more letters than the sample, the pattern must be continued. An alternating shift just continues in the same order.
- Numeric rules: sum and product codes both give a single number. Test both with the sample before using either. The numeric side is explained in Number Coding (Assigning Numeric Values to Letters/Words).
If no rule fits after the checklist, look at the options. Often only one option follows the structure of the sample, for example the same length, or the same number of digits.
Solved Examples
Example 1
Question: If BLUE is coded as CMVF, how is GREEN coded?
- B to C, L to M, U to V, E to F: each letter moves one place forward.
- G to H, R to S, E to F, E to F, N to O.
Answer: GREEN is coded as HSFFO.
Example 2
Question: If PLAN is coded as NALP, how is FAST coded?
- The letters of PLAN are written backwards: N, A, L, P.
- Reverse FAST: T, S, A, F.
Answer: FAST is coded as TSAF.
Example 3
Question: If RED is coded as 27, how is BLUE coded?
- R = 18, E = 5, D = 4, and 18 + 5 + 4 = 27. So the code is the sum of positions.
- B = 2, L = 12, U = 21, E = 5, and 2 + 12 + 21 + 5 = 40.
Answer: BLUE is coded as 40.
Example 4
Question: If APPLE is coded as 1PPL5, how is ORANGE coded?
- The vowels A and E are replaced by their alphabet positions 1 and 5; consonants stay.
- In ORANGE the vowels are O (15), A (1) and E (5).
- Write O = 15, R, A = 1, N, G, E = 5.
Answer: ORANGE is coded as 15R1NG5.
Example 5
Question: If SCHOOL is coded as TBINPK, how is PLANET coded?
- S to T is +1, C to B is -1, H to I is +1, O to N is -1, O to P is +1, L to K is -1, so the shift alternates +1, -1.
- For PLANET: P + 1 = Q, L – 1 = K, A + 1 = B, N – 1 = M, E + 1 = F, T – 1 = S.
Answer: PLANET is coded as QKBMFS.
Shortcuts and Tricks
- Check length first. If the code has the same length, a shift or a swap is likely; if not, look for a count or a sum.
- Write the alphabet positions of both words in two lines and subtract. The pattern is usually visible at once.
- Test the rule on the last letter, not just the first.
- Use the options: wrong options often break the length or the structure of the sample.
- For vowel and consonant rules, mark the vowels A, E, I, O, U in the word before coding.
Common Mistakes
- Stopping as soon as one letter fits the rule.
- Forgetting to continue an alternating shift on a longer word.
- Mixing up sum and product codes.
- Ignoring the wrap-around from Z to A.
- Applying a rule found in one sample to a second sample that follows a different rule.
Practice Questions
- If MILK is coded as NJML, how is TEA coded?
- If PLAN is coded as NALP, how is GATE coded?
- If CAT is coded as 24, how is BOX coded (the code is the sum of positions)?
- If FIRE is coded as 6-9-18-5, how is SUN coded?
- If BANANA is coded as B1N1N1 (A is replaced by its position), how is MANGO coded with the same rule applied to both vowels A and O?
- If PAINT is coded as TAINP, how is WORLD coded?
Answers: 1) UFB; 2) ETAG; 3) 41; 4) 19-21-14; 5) M1NG15; 6) DORLW.
Why Is This Topic Important?
- Common One or more of these questions appear in most reasoning sections.
- Method The checklist trains pattern spotting used in Series Based on Two-Step or Combined Operation Patterns.
- Link It joins together the rules of Letter Coding (Direct, Shifted and Reverse Alphabet Coding) and Number Coding (Assigning Numeric Values to Letters/Words).
- Speed Naming the rule early avoids trial and error.
What Comes Next?
The next topic is Decoding a Given Coded Message or Sentence. It reverses the task: a coded message is given and you must recover its meaning.
Key Terms and Formulas
- Sample The given word and its code
- Rule The hidden operation that turns the word into the code
- Alternating shift A shift that changes direction at each letter
- Progressive shift A shift that grows with each letter
- Reversal Writing the letters in the opposite order
- Swap Exchanging two letters
Related Topics
- Matrix/Grid-Based Coding
- Decoding a Given Coded Message or Sentence
- Letter Coding (Direct, Shifted and Reverse Alphabet Coding)
- Number Coding (Assigning Numeric Values to Letters/Words)
Exam Corner
Points to Remember
- Compare position by position, and name the rule.
- Test the rule on every letter.
- Check length, order and numbers in the code first.
- Continue alternating rules for longer words.
- Use options to eliminate impossible structures.
Do Not Confuse With
- Reversal vs opposite letters Reversal changes the order of letters; opposite letters change the letters themselves.
- Sum vs product Both give a single number; test both with the sample.
- Alternating vs progressive shift Alternating switches between two shifts; progressive increases the shift each time.
- Swap vs reversal A swap exchanges two letters only; reversal flips the whole word.
Memory Hook
Compare, name the rule, test every letter, then apply it.
GS Relevance
Frequently Asked Questions
What is coding by analogy in reasoning?
Coding by analogy is a question in which a sample word and its code are given and you must find the code of another word. The rule is not stated. You deduce it by comparing letters, positions and values in the sample, and then apply the same rule to the new word.
How do you find the pattern in a coding-decoding question?
Compare the sample word and its code position by position. Check whether the letters are the same but reordered, shifted along the alphabet, or replaced by numbers. Write alphabet positions to see the difference, and make sure the rule fits every letter before using it.
What is the shortcut for coding by analogy?
Check three things in order: the length of the code, whether the same letters appear, and whether numbers are present. These quickly separate reversals and swaps from shifts and value codes. Then test the likely rule on the last letter, not only the first.
Why does a rule that fits the first letter fail sometimes?
Many codes use an alternating or progressive shift, so the first letters may agree with a simple shift while later letters do not. Always test the rule on every letter of the sample. If it fails, try alternating or increasing shifts before moving on.
How do the options help in a coding analogy question?
The options give clues about the structure of the answer, such as the number of letters or digits. Options that differ in length from what your rule gives can be removed at once, and often only one option follows the same structure as the sample code.
PYQ Practice — Statement Analysis
1 If BLUE is coded as CMVF, then GREEN is coded as HSFFO.
Each letter moves one place forward in the alphabet.
2 If PLAN is coded as NALP, then FAST is coded as TSAF.
The code is the word written backwards.
3 A rule that fits the first letter of the sample is enough to confirm it.
The rule must be tested on every letter, since codes may alternate or progress.
4 If RED is coded as 27, then BLUE is coded as 40 using the sum of letter positions.
RED is 18 + 5 + 4 = 27, and BLUE is 2 + 12 + 21 + 5 = 40.
Related Topics
Browse the full Reasoning index