Note 21

Coding, Decoding and Word Building

Complete notes for SSC Combined Graduate Level examinations

AD+3Shift
B7Number
#%Symbol
Matrix
Condition
CATWords
A→B→CDictionary
decodeDetect

1The Big Picture — Graphic Mind Map

CODE / DECODEdiscover the transformation LETTERshift • mirror • swap NUMBERposition • sum • rule LANGUAGEcommon word • code WORD LABbuild • order • position symbol / matrix conditional rules
CF+3

Letter Shift

Move alphabet positions by a fixed, changing or alternating value.

A26

Position / Number

Convert letters into direct or reverse positions; then apply arithmetic.

A#

Substitution

Replace each letter, number, word or relation with a consistent code.

Matrix / Table

Locate a character through row–column, coordinate or keyed table rules.

sunishot

Sentence Language

Common words across statements reveal common code tokens.

IFTHEN

Conditional Code

Choose the applicable rule from properties such as vowel, parity, position or case.

ART

Word Building

Respect the exact letter inventory, frequency, case and arrangement conditions.

appleapplyapt

Dictionary Order

Compare from the first unequal letter; a completed prefix comes first.

1. Identify
code family
2. Convert
letters / symbols
3. Compare
position-wise
4. Infer
one consistent rule
5. Reverse-check
decode fully

2The Foundation — Basics to Expert Coding Logic

plaincode

2.1 What Coding Means

Encoding transforms an original item into another representation. Decoding reverses or reconstructs that transformation.

A good rule is consistent, reversible where required, and position-aware. The exam asks you to infer the hidden rule—not to use real cryptography.

AGNT

2.2 Alphabet Position Toolkit

\[A=1,B=2,\ldots,Z=26\]

If direct position is \(p\), reverse position is:

\[p_{\mathrm{rev}}=27-p\]

Thus \(A\leftrightarrow Z\), \(B\leftrightarrow Y\), and every opposite pair sums to \(27\).

2.3 Master Classification of Codes

Code familyOperationPrimary clueFirst action
Letter shiftForward/backward alphabet movementWord length and positions preservedWrite positional differences
Substitution / permutationReplace or rearrange charactersSame letters recur in new places/codesMap input to output position-wise
Number codingPositions become a number through sum/product/ruleWord maps to one or more numbersConvert letters to positions
Symbol codingCharacter/class maps to symbolSymbols replace letters, digits or relationsBuild a mapping table
Matrix / coordinateRow–column location encodes itemGrids, two-digit coordinates, table keysIdentify coordinate order
ConditionalDifferent rule selected by a stated property“If…otherwise…” clausesTest conditions in stated priority
Sentence / artificial languageWords correspond to code tokensMultiple coded statements overlapIntersect common words and tokens
Word building / orderInventory, rearrangement or lexicographic comparisonMeaningful word, positions, dictionaryCount letters or compare first mismatch
AD+3

2.4 Fixed Letter Shift

For a forward shift \(k\), use cyclic positions:

\[p'=((p-1+k)\bmod 26)+1\]

Example: \(CAT\xrightarrow{+3}FDW\). Decoding applies \(-3\).

CFADTW
+1+2+3−1−2−3

2.5 Changing & Alternating Shifts

Shifts may form \(+1,+2,+3,\ldots\), alternate \(+2,-2,+2,-2,\ldots\), or depend on position \(i\).

Write a shift row beneath the letters. A sequence of shifts is often the real pattern.

AZ

2.6 Mirror / Reverse Alphabet

Replace each position \(p\) by \(27-p\).

Example: \(BAD\to YZW\), because \(B\to Y\), \(A\to Z\), \(D\to W\).

Mirror substitution changes letters; reversing a word changes their order. They are different operations.
123

2.7 Rearrangement Codes

The output may reverse, rotate, swap pairs, or follow an index permutation.

If output order is \((3,1,4,2)\), then \(TEAM\to ATME\).

Track where each input position goes; do not search for alphabet shifts first.

GQmap

2.8 Direct Substitution

A mapping such as \(G\mapsto Q\) must be reused wherever \(G\) occurs. Repeated input characters should normally yield repeated outputs under simple substitution.

Create a two-row key instead of holding mappings mentally.

D4

2.9 Direct Position Coding

Each letter may be replaced by direct or reverse position:

\[D=4,\qquad D_{\mathrm{rev}}=23\]

Small and capital letters may share positions unless the question explicitly assigns separate classes.

2.10 Number Coding of Whole Words

3120

Common arithmetic generators

  • Sum: \(S=\sum_{i=1}^{m}p_i\)
  • Product or selected-position product
  • First plus last, or first minus last
  • Sum of vowels/consonants separately
  • Average: \(\bar p=S/m\)
  • Weighted sum: \(\sum i p_i\)
C3A1T2024

How to infer the generator

Convert the word into positions and test the simplest relation.

For \(CAT\), position sum is \(3+1+20=24\). But never assume “sum” until another example confirms it.

A single word–number pair cannot uniquely determine a rule.
5#

2.11 Symbol Codes

Digits, letters, operators or relations may be replaced by symbols. First construct a legend such as \(5\mapsto\#\).

Keep identity and operation separate: a symbol can stand for a value or for an action.

111213

2.12 Matrix / Coordinate Codes

A code \(rc\) may mean row \(r\), column \(c\). Some questions reverse it to \(cr\) or use two alternative matrices.

Verify coordinate order using at least two known entries.

vowel?even?

2.13 Conditional Coding

Apply conditions in the stated order. A typical hierarchy is:

  1. test a special condition;
  2. if false, test the next;
  3. otherwise use the default rule.

If two conditions are true, stated priority decides.

2.14 Sentence / Artificial-Language Coding

COMMON

Intersection principle

If two sentences share exactly one word and their code lists share exactly one token, those common items correspond.

“red flower blooms” → ka mi zo
“red sun rises” → ka tu pe
Therefore red → ka.

wordcode−1−1

Elimination principle

After fixing common pairs, cancel them from every statement. Remaining unmatched words and tokens form smaller one-to-one sets.

Order is usually irrelevant unless the question explicitly preserves order.

Set view: for sentence word-set \(W_i\) and token-set \(C_i\), unique intersections \(W_1\cap W_2\) and \(C_1\cap C_2\) reveal a pair. Multiple common items require another statement.

2.15 Word Building — Letter Inventory Logic

AAR

Frequency rule

A candidate word is possible only if each letter count is available:

\[f_{\mathrm{candidate}}(x)\le f_{\mathrm{source}}(x)\quad\text{for every letter }x\]

Repeated letters must be counted, not merely noticed.

AZpositions

Positional conditions

Questions may fix first/last letters, demand adjacency, separation, vowels at certain places, or unchanged relative order.

“Using letters of” permits rearrangement; “without changing order” permits only a subsequence.

aA

Case classification

Uppercase and lowercase can be distinct symbols when the problem states case-sensitive coding. Otherwise, word formation normally ignores case.

Never infer case significance without evidence.

2.16 Dictionary Order & Letter Positions

CARECARTCAT

Lexicographic algorithm

  1. Compare first letters.
  2. If equal, move right until the first mismatch.
  3. The smaller alphabet position comes first.
  4. If one word ends while all compared letters match, the shorter prefix comes first.

Thus \(CAR\lt CARE\lt CART\lt CAT\) in dictionary order.

12345

Position after rearrangement

Maintain two labels: original position and new position. If a word has length \(m\), the position from the right of the item at left-position \(i\) is:

\[i_{\mathrm{right}}=m-i+1\]

For central positions, odd \(m\) gives one centre; even \(m\) gives two.

2.17 Expert Edge Cases

SituationCorrect interpretationWhy candidates err
Repeated input letter, different outputSimple substitution is unlikely; position-dependent rule may operateThey force a one-to-one key
Output word has same lengthCould be shift, mirror, rearrangement or position-wise mixed ruleThey assume only Caesar shift
Two common words and two common tokensPairs remain ambiguous without another statementThey assign by visual order
Two-digit coordinateCould be row–column or column–rowThey never calibrate the grid
Conditional rules overlapFollow stated priority or exclusivity wordingThey apply every true rule
Candidate uses repeated letterCheck multiplicity against source inventorySet membership hides frequency
One word is prefix of anotherShorter complete word precedes longer oneThey compare an absent next letter
Alphabet crosses \(Z\)Wrap only when the pattern is cyclicThey stop or wrap automatically

3Short Tricks & Magic Formulas — TCS Speed Tools

A1M13N14Z26

3.1 Four Anchors

Memorise \(A=1\), \(M=13\), \(N=14\), \(Z=26\). Derive all nearby positions instead of recounting.

AZ27

3.2 Mirror in One Step

Opposite position is \(27-p\). This instantly handles reverse-alphabet codes and mirror pairs.

C A TF D W+3

3.3 Vertical Difference Row

Write input above output, compare each column, and record signed cyclic shifts. Constant, progressive or alternating patterns become visible.

inputoutput1 22 1

3.4 Position Map First

If the output contains the same characters, mark original indices. Test reversal, pair swap, rotation and odd–even collection before alphabet arithmetic.

3.5 Common–Common Rule

Common word ↔ common token. Use set intersection, then cancel confirmed pairs everywhere.

3.6 Calibrate Coordinates

Use two known symbols to decide whether a two-digit code means \((r,c)\) or \((c,r)\). Never trust the display order.

same prefix

3.7 First-Mismatch Pencil Mark

In dictionary order, underline the first unequal letters only. Ignore every character after that decision point.

AAneed 2

3.8 Inventory Tally

For word building, tally only repeated or scarce letters. Reject a candidate at the first frequency excess.

1?2?

3.9 Condition Priority

Turn prose into a decision tree. Once an exclusive condition matches, stop; use the default only if none match.

inout

3.10 Decode to Confirm

After finding an encoding rule, reverse it on a known example. A rule that cannot reconstruct the input is suspect.

im−i+1

3.11 Right-Position Formula

For length \(m\), left-position \(i\) corresponds to right-position \(m-i+1\). This avoids manual recounting.

knownruleanswer

3.12 Option-Led Elimination

When several rules partly fit, test the options against the most restrictive known position, repeated letter or condition first.

3.13 Compact Formula & Procedure Bank

NeedFormula / procedureSpeed cue
Direct position\(A=1,\ldots,Z=26\)Use four anchors
Reverse position\(p_{\mathrm{rev}}=27-p\)Mirror makes \(27\)
Cyclic forward shift\(p'=((p-1+k)\bmod26)+1\)Wrap after \(Z\)
Cyclic backward shift\(p'=((p-1-k)\bmod26+26)\bmod26+1\)Add \(26\) before remainder
Position from right\(m-i+1\)Length plus one minus left position
Word feasibility\(f_c(x)\le f_s(x)\) for every \(x\)Count duplicates first
Sentence codeIntersect common word/token setsCommon ↔ common
Dictionary orderCompare the first unequal positionPrefix ends first

4The SSC / TCS Traps — Red Flags

XA

🚩 4.1 Wrap Error

A forward shift beyond \(Z\) may cycle to \(A\). But apply wrap only when the rule is alphabetic and cyclic.

ABBA≠ mirror

🚩 4.2 Mirror vs Reverse

Word reversal changes order; alphabet mirror substitutes letters. \(AB\to BA\) and \(AB\to ZY\) are not the same.

2 + 2

🚩 4.3 Ambiguous Intersections

Two common words and two common codes do not identify exact pairs. A third statement is necessary.

🚩 4.4 Row–Column Reversal

Code \(23\) may mean row \(2\), column \(3\), or the reverse. Calibrate before reading the table.

EEonly 1

🚩 4.5 Duplicate-Letter Blindness

A source containing one \(E\) cannot form a candidate needing two \(E\)'s, even though the letter is present.

CARCARE

🚩 4.6 Prefix Rule Forgotten

If all letters of the shorter word match the start of the longer word, the shorter word comes first.

🚩 4.7 Applying Two Conditions

When rules are mutually exclusive, stop after the first matched condition. Stacking them creates a distractor.

GQR

🚩 4.8 Broken One-to-One Mapping

Under simple substitution, the same input must keep the same output. If it changes, inspect position or context.

3120

🚩 4.9 Assuming Position Sum

One word–number pair supports many formulas. Confirm sum, product or endpoint rule with another example.

Aa

🚩 4.10 Inventing Case Rules

Capital and small letters are separate only when stated or demonstrated. Typography alone may be decorative.

oldnew

🚩 4.11 Losing Original Positions

After rearrangement, candidates often answer with the new index when the question asks for the original one. Label both.

first samplewhole rule

🚩 4.12 Local Pattern Overfit

A clever relation fitting one pair is not enough. Verify every known example, repeated character and output position.

TCS decision rule: prefer the simplest transformation that respects every sample and wording condition. Do not repair an inconvenient example by changing the rule halfway.

5Memory Hooks & Mnemonics

S M A R T

5.1 “SMART” Code Scan

Shift, Mirror, Arrange, Replace, Total. Test in this order.

AZ27

5.2 “Mirror Makes 27”

Opposite alphabet positions always total \(27\). See a mirror code—subtract from \(27\).

same

5.3 “Common Meets Common”

In sentence coding, intersect words and tokens before making any pairing.

LL1?

5.4 “Letters Are Coins”

You cannot spend a letter more times than the source word owns it. Count repeated coins.

same same...

5.5 “First Fight Wins”

In dictionary order, the first unequal letter decides. If no fight occurs and one word ends, the shorter wins.

rowthencol

5.6 “Say the Coordinate Aloud”

Before reading \(23\), say “row two, column three”—then verify the convention.

STOP

5.7 “First True, Then Stop”

For priority conditions, take the first applicable branch and do not stack later rules.

lockkey

5.8 “Turn the Key Back”

Decode a known result. A correct key must take you back to the original without exceptions.

Code Recognition Map

  • Same length and similar positions → shift or mirror.
  • Same characters, new order → permutation.
  • Whole word becomes number → position arithmetic.
  • Overlapping coded statements → set intersection.
  • Grid or two-digit labels → coordinates.

Word Reasoning Map

  • Can it be formed? → frequency inventory.
  • Order unchanged? → subsequence, not anagram.
  • Dictionary? → first mismatch / prefix rule.
  • From right? → \(m-i+1\).
  • Case mentioned? → classify capital/small separately.
Final recall line: “Classify the code, map the positions, preserve every condition, and reverse-check the result.”