Coding Decoding
Coding Decoding is a fundamental topic in the Reasoning Ability section of competitive exams. It tests your ability to decipher a given code or pattern and apply it to solve a problem. The core idea is to identify the logic behind the transformation of letters, numbers, or words.
Types of Coding Decoding Questions
1. Letter Coding
In this type, letters of the alphabet are coded based on a specific rule. This rule could involve shifting letters (Caesar cipher), reversing the alphabet, or pairing letters.
Example:
If 'ROSE' is coded as 'UPTC', how will 'TULIP' be coded?
Analysis:
Let's look at the position of letters in the alphabet:
- R (18) + 3 = U (21)
- O (15) + 3 = R (18) - This is not correct for the example. Let's re-examine.
Let's consider the difference between consecutive letters:
- R (18) to U (21) is +3
- O (15) to P (16) is +1
- S (19) to T (20) is +1
- E (5) to C (3) is -2
This doesn't seem to be a consistent pattern. Let's try another approach. Perhaps the word itself is manipulated.
Let's reconsider the example: If 'ROSE' is coded as 'UPTC'.
- R (18) -> U (21) : +3
- O (15) -> P (16) : +1
- S (19) -> T (20) : +1
- E (5) -> C (3) : -2
The provided example 'ROSE' -> 'UPTC' does not follow a simple, consistent arithmetic progression on letter positions. Let's assume a common pattern for illustration purposes, such as adding a fixed number to each letter's position.
Corrected Example for Illustration: If 'ROSE' is coded as 'URVH', how will 'TULIP' be coded?
Analysis:
- R (18) + 3 = U (21)
- O (15) + 3 = R (18)
- S (19) + 3 = V (22)
- E (5) + 3 = H (8)
The pattern is to add 3 to the positional value of each letter.
Applying this to 'TULIP':
- T (20) + 3 = W (23)
- U (21) + 3 = X (24)
- L (12) + 3 = O (15)
- I (9) + 3 = L (12)
- P (16) + 3 = S (19)
So, 'TULIP' would be coded as 'WXOLS'.
2. Number Coding
Here, words are coded into numbers, or numbers are coded into numbers. The logic can be based on the sum of letter positions, product, difference, or specific rules related to the number of letters.
Example:
If 'CAT' is coded as '24', how is 'DOG' coded?
Analysis:
- C (3) + A (1) + T (20) = 24
The code is the sum of the positional values of the letters.
Applying this to 'DOG':
- D (4) + O (15) + G (7) = 26
So, 'DOG' would be coded as '26'.
3. Mixed Coding (Letter/Number/Symbol)
These are the most common and often trickiest. They involve a combination of letters, numbers, and symbols, often based on arbitrary rules or specific conditions.
Example:
In a certain code:
- 'we go out' is coded as '12 21 19'
- 'go home now' is coded as '21 15 14'
- 'we are home' is coded as '12 1 15'
What is the code for 'out now'?
Analysis:
We need to find the codes for 'out' and 'now'.
- From 'we go out' = '12 21 19', we can infer possible codes for 'we', 'go', 'out'.
- From 'go home now' = '21 15 14', we can infer possible codes for 'go', 'home', 'now'.
- From 'we are home' = '12 1 15', we can infer possible codes for 'we', 'are', 'home'.
Let's match common words:
- 'go' appears in the first two sentences. The number '21' appears in both their codes. So, 'go' = '21'.
- 'we' appears in the first and third sentences. The number '12' appears in both their codes. So, 'we' = '12'.
- 'home' appears in the second and third sentences. The number '15' appears in both their codes. So, 'home' = '15'.
Now we can deduce the codes for the remaining words:
- From 'we go out' = '12 21 19', since 'we' is 12 and 'go' is 21, 'out' must be '19'.
- From 'go home now' = '21 15 14', since 'go' is 21 and 'home' is 15, 'now' must be '14'.
Therefore, the code for 'out now' is '19 14'.
Decoding Strategies
- Identify the Type: Determine if it's letter, number, or mixed coding.
- Analyze the Given Example(s): Carefully examine the relationship between the original word/phrase and its code.
- Look for Patterns:
- Letter Coding: Positional shifts (+/- a number), reverse alphabet, letter pairs (A-Z, B-Y), vowels/consonants.
- Number Coding: Sum/product of positions, number of letters, specific digit manipulation.
- Mixed Coding: Direct mapping, conditional coding (e.g., if word starts with a vowel, code is X).
- Verify the Pattern: Ensure the identified pattern works for all parts of the given example(s).
- Apply the Pattern: Use the verified pattern to decode or encode the required word/phrase.
Common Pitfalls to Avoid
- Assuming a simple pattern too quickly.
- Not checking all given examples for consistency.
- Confusing letter positions (e.g., A=1 vs. A=0).
- Ignoring case sensitivity or special characters if they appear.
Blood Relations
Blood Relations questions assess your ability to understand and map family relationships based on given statements. These problems often involve a set of individuals and descriptions of their connections, requiring you to deduce a specific relationship.
Key Concepts and Symbols
To solve these problems efficiently, it's helpful to use a standard set of symbols:
- = : Represents a married couple.
- - : Represents siblings (brothers, sisters, brother-sister).
- | : Represents parent-child relationship (vertical line).
- → : Represents a directed relationship (e.g., X is father of Y).
- Male : Represented by a square (☐).
- Female : Represented by a circle (○).
Common Relationships
- Mother's/Father's Sister: Aunt
- Mother's/Father's Brother: Uncle
- Mother's/Father's Mother: Grandmother
- Mother's/Father's Father: Grandfather
- Son's/Daughter's Sister: Sister
- Son's/Daughter's Brother: Brother
- Brother's Son: Nephew
- Brother's Daughter: Niece
- Sister's Son: Nephew
- Sister's Daughter: Niece
- Uncle's/Aunt's Son/Daughter: Cousin
- Husband's/Wife's Sister: Sister-in-law
- Husband's/Wife's Brother: Brother-in-law
- Brother's Wife: Sister-in-law
- Sister's Husband: Brother-in-law
- Son's Wife: Daughter-in-law
- Daughter's Husband: Son-in-law
Solving Strategy
- Identify the Reference Person: Determine who the question is asking about (e.g., "How is A related to C?").
- Draw a Family Tree: This is the most effective method. Start with a person mentioned and add others based on the given relationships. Use the symbols consistently.
- Determine Gender: Mark the gender of each person using the square (male) and circle (female) symbols.
- Map Generations: Place individuals on different levels of the tree to represent generations (e.g., grandparents on the top level, parents in the middle, children at the bottom).
- Deduce the Relationship: Once the tree is complete, trace the path from the reference person to the target person to determine their relationship.
Example 1:
Pointing to a photograph, a man said, "She is the daughter of the only son of my father's father." How is the woman in the photograph related to the man?
Diagramming:
- "My father's father" = Paternal Grandfather (☐)
- "Only son of my father's father" = My Father (☐)
- "Daughter of the only son of my father's father" = Daughter of my Father = My Sister (○)
Conclusion: The woman in the photograph is the man's sister.
Example 2:
A, B's brother. C, B's mother. D, C's father. E, D's daughter and B's sister. How is A related to D?
Diagramming:
- A - B (A is brother of B, B's gender unknown yet)
- C is mother of B. So, C is mother of A too. C (○) | A - B
- D is father of C. D (☐) | C (○) | A - B
- E is D's daughter. E (○) and B is E's sister. This means B is also D's daughter.
- So, we have: D (☐) | C (○) - E (○)
- And C is mother of A and B. So: D (☐) | C (○) | A (☐) - B (○) - E (○)
- (Assuming B is female based on E being B's sister and D's daughter. If B was male, E would be B's sister, and D would be their father.) Let's refine:
- A is brother of B. (A☐ - B?)
- C is mother of B. (C○ | B) → A is also C's child. (C○ | A☐ - B?)
- D is father of C. (D☐ | C○ | A☐ - B?)
- E is D's daughter. (D☐ | C○ - E○)
- E is B's sister. This confirms B is also D's child, and specifically, B is E's sibling. Since E is D's daughter, B must also be D's child.
- From "A, B's brother", A is male. From "E, D's daughter and B's sister", E is female, and B is female.
- So the structure is: D (Grandfather) → C (Mother) → A (Son), B (Daughter), E (Daughter)
Question: How is A related to D?
A is the son of C, and C is the daughter of D. Therefore, A is the grandson of D.
Conclusion: A is the grandson of D.
Common Mistakes
- Incorrectly assuming gender (e.g., assuming a name like 'Priya' is always female, which might not be explicitly stated).
- Confusing paternal and maternal relationships.
- Misinterpreting "only son" or "only daughter" clauses.
- Errors in drawing the family tree, leading to incorrect deductions.
Direction Sense
Direction Sense problems test your ability to understand and navigate spatial relationships based on directions (North, South, East, West) and distances. These questions often involve a person moving in various directions and require you to find the final position relative to the starting point, or the total distance traveled.
Basic Directions and Concepts
- Cardinal Directions: North (N), South (S), East (E), West (W).
- Inter-cardinal Directions: Northeast (NE), Southeast (SE), Southwest (SW), Northwest (NW).
- Facing Directions: The direction a person or object is looking towards.
- Movement: Walking in a specific direction for a given distance.
- Turns: Left turns and Right turns. A right turn from North faces East. A left turn from North faces West.
- Relative Positions: Final position with respect to the starting point (e.g., 10m North of start).
- Total Distance: The sum of all distances traveled.
Diagramming Strategy
The most effective way to solve these problems is by drawing a diagram:
- Mark the Starting Point: Usually represented by a dot or 'Start'.
- Draw Directions: Use arrows to represent movement. Assume standard map orientation: North is up, South is down, East is right, West is left.
- Indicate Distances: Write the distance next to each arrow.
- Handle Turns:
- If facing North and turn Right, you face East.
- If facing North and turn Left, you face West.
- If facing East and turn Right, you face South.
- If facing East and turn Left, you face North.
- (And so on for other directions)
- Calculate Final Position: Once all movements are plotted, determine the final position relative to the start. This often involves using the Pythagorean theorem if the movement results in a right-angled triangle (a2 + b2 = c2).
Example 1:
Rohan starts walking from point A. He walks 5 km North, then turns East and walks 3 km. He then turns South and walks 5 km. Finally, he turns West and walks 7 km to reach point B.
Find the shortest distance between A and B, and the direction of B from A.
Diagramming:
1. Start at A.
2. Walk 5 km North (Arrow pointing up, length 5).
3. Turn East, walk 3 km (Arrow pointing right from the end of the first arrow, length 3).
4. Turn South, walk 5 km (Arrow pointing down from the end of the second arrow, length 5). This brings Rohan back to the same horizontal level as the starting point A.
5. Turn West, walk 7 km (Arrow pointing left from the end of the third arrow, length 7).
Analysis:
- The North and South movements (5 km North, 5 km South) cancel each other out in the vertical direction. Rohan is at the same North-South level as A after the third step.
- In the East-West direction: Rohan moved 3 km East and then 7 km West.
- Net movement East-West = 7 km West - 3 km East = 4 km West.
- So, point B is 4 km West of the starting point A.
Conclusion:
- The shortest distance between A and B is 4 km.
- The direction of B from A is West.
Example 2:
A man is facing North. He turns 45 degrees clockwise, then 90 degrees counter-clockwise, and finally 135 degrees clockwise. In which direction is he facing now?
Analysis:
Let North be 0 degrees.
- Initial direction: North (0°)
- Turn 45° clockwise: 0° + 45° = 45° (Northeast)
- Turn 90° counter-clockwise: 45° - 90° = -45°. On a circle, -45° is the same as 360° - 45° = 315° (Northwest).
- Turn 135° clockwise: 315° + 135° = 450°. Since a full circle is 360°, we find the equivalent angle: 450° - 360° = 90°.
- 90° corresponds to East.
Conclusion: The man is now facing East.
Common Directions and Distances
| Movement | Description |
|---|---|
| North | Up |
| South | Down |
| East | Right |
| West | Left |
| North-East | Up and Right (45° from North/East) |
| South-East | Down and Right (45° from South/East) |
| South-West | Down and Left (45° from South/West) |
| North-West | Up and Left (45° from North/West) |
Important Considerations
- Facing vs. Moving Direction: Be clear whether the person is moving in a direction or facing a direction after a turn.
- Relative Directions: Questions might ask for the direction of point X *from* point Y, which is crucial (e.g., North from A is different from North from B).
- Shadow Problems: In the morning, the sun is in the East, so shadows fall to the West. In the evening, the sun is in the West, and shadows fall to the East.