CSS Prepare

mpt · CSS study notes

Coding–Decoding

Core Idea

A rule transforms real words/letters into a code. Figure out the rule from the given example, then apply the SAME rule to a new word.

Types

  • Letter shift coding: each letter shifted by a fixed number of positions (forward or backward)
  • Number coding: letters assigned position values (A=1...Z=26), then added/subtracted/combined
  • Word/symbol substitution: a full substitution key is given (e.g. "RAIN" means "CLOUD"), apply the mapping directly
  • Reverse coding: word is coded by reversing letter order, sometimes combined with a shift
  • Matrix/grid coding: letters mapped to grid coordinates (row, column pairs)

Worked Examples

  1. If CAT = DBU (each letter +1), decode FOG using same rule → shift each letter +1 → GPH
  2. If DOG = EPH (+1 each), code CAT → shift +1 → DBU
  3. In a code, MADRAS is written as NBESBT (each letter +1). How is BOMBAY written? → CPNCBZ
  4. Reverse coding: If "WORLD" is coded as "DLROW" (simple reversal), code "PEACE" → ECAEP
  5. If ROSE is coded as 6821, CHAIR is coded as 57381, and PREACH is coded as 961473, what is the code for SEARCH? → map each letter's fixed digit from the given codes → 281473

Drill

  1. If DOG uses position values (D=4,O=15,G=7), code CAT using position values. — 3,1,20
  2. If in a code language, FRIEND is written as HTKGPF (+2 each letter), code CANDLE. — ECPFNG
  3. If in a certain code, TIGER is written as UJHFS (+1 each), decode RFUUZ (each letter -1 to decode back). — QETTY
  4. If in a code, APPLE is written as 1,16,16,12,5 using position values, decode 7,18,1,16,5. — GRAPE

Practice tracker

YYYY-MM-DD

  • Attempted/Correct:
  • Mistake pattern: