Coding‑Decoding – IIT M.Tech Admission – Reasoning Ability
Coding‑decoding problems test a candidate’s ability to detect patterns, infer rules, and apply them to encode (create) or decode (interpret) information.
They often involve alphabets, numbers, symbols, or even shapes, arranged in a particular order or pattern.
1. Simple Explanation
| Term | What it means | Example |
|---|---|---|
| Code | A set of rules that transforms an input into a new sequence (e.g., turning “CAT” into “XZT”) | Replace each letter by the one 3 positions ahead in the alphabet. |
| Decode | Reverse of coding – find the original input from the coded output using the same rule. | Given “XZT”, find the original word. |
| Pattern | The underlying logic that links the input to its coded output (e.g., shifting, reversing, mirroring). | “1, 2, 3, 4” → “4, 3, 2, 1” (reverse). |
Goal: Recognise the pattern quickly and apply it to deduce missing elements or solve for unknowns.
2. Key Points (What to Look For)
| # | Key Aspect | How to Spot It |
|---|---|---|
| 1 | Alphabetic Shift | Look for consistent letter‑to‑letter changes (e.g., A→D, B→E). |
| 2 | Reverse Order | Words, numbers, or symbols written backwards. |
| 3 | Mirror (Reflection) | Mirror each character about a vertical/horizontal axis. |
| 4 | Positional Mapping | Position of a letter in the alphabet ↔ position in the word. |
| 5 | Alternating Rules | Even positions follow one rule, odd ones another. |
| 6 | Mathematical Operations | Add, subtract, multiply, or divide numbers to get the coded value. |
| 7 | Pattern in Symbols | Shapes or symbols may represent letters (e.g., 0 = O, 1 = I). |
| 8 | Combination of Multiple Rules | Sometimes several of the above rules are combined. |
| 9 | Consistency Check | Verify the rule works for all given examples before decoding. |
| 10 | Time‑Efficiency | Practice quick mental substitution and pattern recognition. |
3. Worked Example
Problem
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 2 | 4 | 6 | 8 | ? | 12 | 14 |
Find the missing element (the “?”).
Step‑by‑Step Solution
-
Identify the sequence type
All numbers are even and increase by 2 each step. -
Check the pattern
2 → 4 (+2)
4 → 6 (+2)
6 → 8 (+2)
8 → ?
? → 12 (+?)
12 → 14 (+2) -
Apply the rule
Add 2 to each number to get the next.
So, 8 + 2 = 10. -
Verify
10 + 2 = 12 → matches given.
12 + 2 = 14 → matches given. -
Answer
The missing element is 10.
4. Another Example (Coding‑Decoding)
Problem
| Word | Code |
|---|---|
| CAT | XZT |
| DOG | UHP |
| BIRD | YGKA |
Decode the word “YJSC”.
Step‑by‑Step Solution
-
Find the rule
Compare each letter’s position in the alphabet:- C(3) → X(24) : +21
- A(1) → Z(26) : +25
- T(20) → T(20) : +0
The shift isn’t uniform.
Check for reverse position (i.e., 27 – original position):- C → 27‑3 = 24 → X ✔
- A → 27‑1 = 26 → Z ✔
- T → 27‑20 = 7 → G (not T).
So rule isn’t simple reverse.
-
Try alternating shifts
Observe:- Positions 1 & 2 shift by +21 and +25 respectively.
- Position 3 remains same.
For DOG → UHP:
D(4) +21 = 25 → Y? (but code U=21). So not that. -
Look for a cyclic shift
Count how many steps from original to coded:- C→X: 21 steps backward (or 5 forward).
- A→Z: 25 steps backward (or 1 forward).
- T→T: 0.
For DOG:
D→U: 21 backward.
O→H: 25 backward.
G→P: 9 forward.
Not consistent. -
Search for a mirror pattern
Compare alphabet positions from opposite ends:- C (3) ↔ X (24) = 27‑3 = 24 ✔
- A (1) ↔ Z (26) = 27‑1 = 26 ✔
- T (20) ↔ T (20) = 27‑20 = 7 → Not T.
But BIRD → YGKA:
B→Y: 27‑2 = 25 ✔
I→G: 27‑9 = 18 → R? (not G).Hmm.
-
Try two separate rules for odd/even positions
- Odd positions (1,3,5): use reverse (27‑pos).
- Even positions (2,4,6): use reverse but then shift by +?
Check CAT:
1st (C) → reverse → X ✔
2nd (A) → reverse → Z ✔
3rd (T) → reverse → G (but code T).So fails.
-
Observation