1. University MCA (AI/ML) Semester 2
  2. PEA516
  3. Unit 5

PEA516 · Unit 5: Series, coding and arrangements

Coding and decoding

9 practice questions

Key points

  • Shift: add or subtract the same number of places
  • Mirror coding: position p pairs with 27 - p
  • A=1 ... Z=26 for position-value codes
  • Apply combined rules in order
  • Sentence coding: match common words to common codes

Find the rule from the example, then apply it exactly.

Letter shifting. Replace each letter by the one k places ahead (or behind) in the alphabet. With +2, CAT becomes ECV. With +1 (MANGO becomes NBOHP), APPLE becomes BQQMF and SISTER becomes TJTUFS. Shifts can alternate (+1, +2, +1, +2): BOOK becomes CQPM.

Mirror (reverse-alphabet) coding. A pairs with Z, B with Y and so on; the letter at position p pairs with the letter at position 27 - p. CAT becomes XZG; the partner of K (11th) is the 16th letter, P.

Position values. A = 1, B = 2, ..., Z = 26. BAD = 2 + 1 + 4 = 7; DOG = 4 + 15 + 7 = 26.

Combined rules. Apply the steps in the stated order: shift each letter by +3 then reverse the word. LAKE becomes ODNH, then HNDO.

Sentence (word) coding. Words and code words need not appear in the same order. Find a word common to two sentences and the code common to the same two codes.

  • 'sky is blue' = ab cd ef, 'blue sea' = ef gh, 'sea is deep' = gh cd ij.
  • The word common to sentences 1 and 2 is blue and the common code is ef, so blue = ef.
  • The word common to sentences 1 and 3 is is and the common code is cd, so is = cd.
  • The remaining code in sentence 1 is ab, so sky = ab.

Try two questions

Question 1 · Tier 2, Understand

If MANGO is written as NBOHP, how is APPLE written in the same code?

  1. CQQMF
  2. ZOOKD
  3. BQQLF
  4. BQQMF
Show the answer

D. Each letter moves one place ahead: A to B, P to Q, P to Q, L to M, E to F, giving BQQMF.

Question 2 · Tier 4, Analyse

In a code, letters alternately move one place ahead and two places ahead (first letter +1, second +2, third +1, fourth +2). How is BOOK written?

  1. CQPL
  2. CQPM
  3. CPPL
  4. DQQM
Show the answer

B. B+1 = C, O+2 = Q, O+1 = P, K+2 = M, giving CQPM.