Columnar Transposition

The Columnar Transposition Cipher is a transposition cipher that writes the plaintext into a grid row by row, then reads the columns in an order determined by a keyword. The keyword letters determine the column order for reading the ciphertext.

10Worksheets
200+Practice Questions
IntermediateDifficulty
2-3 hoursHours to Master

Introduction to Columnar Transposition

The Columnar Transposition Cipher is a transposition cipher that writes the plaintext into a grid row by row, then reads the columns in an order determined by a keyword. The keyword letters determine the column order for reading the ciphertext.

Prerequisites

Grid construction Keyword sorting Column order determination Reading order
Why This Matters: Columnar Transposition problems appear in 1-2 questions in SSC CGL and Banking PO exams. They test understanding of grid-based transposition.

How to Solve Columnar Transposition Problems

1

Step 1: Determine the number of columns from the keyword length

2

Step 2: Write the plaintext into the grid row by row

3

Step 3: Sort the keyword letters alphabetically to determine column reading order

4

Step 4: Read the columns in the sorted keyword order to get ciphertext

5

Step 5: For decoding, write ciphertext into columns in keyword order, then read row by row

Pro Strategy: Always pad the last row with 'X' or another filler to make the grid complete. The column reading order is determined by the alphabetical order of the keyword letters. For decoding, reverse the process.

Example Problem

Example: Encode 'HELLO WORLD' using keyword 'CIPHER' (remove spaces). Solution: Step 1: Plaintext: HELLOWORLD (10 letters), keyword 'CIPHER' length 6 Step 2: Grid with 6 columns, 2 rows (10 letters, pad if needed): Row0: H E L L O W Row1: O R L D _ _ (pad with X) Step 3: Sort keyword 'CIPHER': alphabetical order: C E H I P R (original positions: 0,4,1,2,3,5) Step 4: Read columns in order: col0(C): H O, col4(E): O R, col1(I): E L, col2(P): L D, col3(H): L _, col5(R): W _ Step 5: Ciphertext: HOOREL LDL WX Answer: HOOREL L D L W X (depending on formatting)

Pro Tips & Tricks

  • Number of rows = ceil(plaintext_length / keyword_length)
  • Pad the last row with filler letters (often 'X' or 'Z')
  • Keyword length determines the number of columns
  • Ties in keyword letters: resolve by position (leftmost comes first)
  • The same keyword is used for both encoding and decoding
  • Decoding: write ciphertext into columns in keyword order, then read row by row

Shortcut Methods to Solve Faster

Column order = indices of keyword letters sorted alphabetically
For encoding: write row by row, read column by column in sorted order
For decoding: write column by column in sorted order, read row by row

Common Mistakes to Avoid

Forgetting to pad the last row
Using the wrong column order (unsorted vs sorted)
Miscounting rows and columns
Confusing encoding and decoding processes

Exam Importance

Columnar Transposition is an important topic for various competitive exams. Here's how frequently it appears:

SSC CGL
1-2 questions
BANKING PO
1-2 questions
RAILWAYS RRB
1-2 questions
CAT
1-2 questions
INSURANCE
1-2 questions

Ready to Master Columnar Transposition?

Start with Worksheet 1 and work your way up to expert level! Each worksheet includes:

20 practice questions
Detailed solutions
Step-by-step explanations
Start Practicing Now