(adsbygoogle = window.adsbygoogle || []).push({}); 1. The problem statement, all variables and given/known data

Question: How many simple substitution ciphers are there where no point is fixed (ie: no letter is mapped to itself)?

EDIT: Incase the termonoligy is different, a simple substitution cipher is a mapping where the plaintext in english is encoded so that every letter is mapped to a different letter.

IE:

a maps to Z

b maps to S

c maps to K

etcetcetc

thus abc plaintext is mapped to ZSK.

3. The attempt at a solution

So, I did a few examples to see if I could get some insight into the problem:

1 Letter = 0 mappings

2 Letters = 1 mapping

3 Letters = 2 mappings

4 Letters = 9 mappings

5 Letters = 44 mappings

I stopped here

While I found the reason for the complexity of determining this number I didn't come across any way to do it in general for 26 letters (for English). I know it has to be above (n-1)! and below n! for n letters but other then that I'm unsure.

I'm thinking I can just brute force it using algebraic notation, for example in the case of 4 letters I counted the mappings:

1 - 4cycle and with 4 letters there are 6 distinct combinations

2 - 2cycles and with 4 letters there are 3 distinct combinations

But, with 26 letters the number of different cycle combinations becomes cumbersome.

Any guidance would be appreciated.

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: Simple Substitution Ciphers

**Physics Forums | Science Articles, Homework Help, Discussion**