The simple substitution cipher is a considerable improvement on the Caesar cipher. Like the Caesar cipher, however, this cryptosystem is also fundamentally flawed.

Permutations

A permutation of a set of objects is an arrangement of the objects in some order. For example, (A, B, C), (B, C, A), and (C, A, B) are all permutations of the letters A, B, and C. The total number of possible permutations of A, B, and C is:

3×2×1=63 \times 2 \times 1 = 6

A permutation of all the letters of the alphabet is the 26 letters of the alphabet arranged in some order. The most natural permutation is (A, B, C, . . ., Z), but (Z, Y, X, . . ., A) is also a permutation and so is any other arrangement such as (G, Y, L, . . . , X, B, N). The total number of such permutations is:

26×25×24××3×2×126 \times 25 \times 24 \times \cdots \times 3 \times 2 \times 1

This is such a big number that we normally write it using the notation 26! (which is read as 26 factorial). In general, if we have nn objects, then the total number of possible permutations is:

n!=n×(n1)×(n2)××3×2×1n! = n \times (n - 1) \times (n - 2) \times \cdots \times 3 \times 2 \times 1

Get hands-on with 1200+ tech skills courses.