In the following question,
Suppose that you have an alphabet of 26 letters and a letter in the alphabet is said to be fixed if the encryption of the letter
is the letter itself.
How many simple substitution ciphers are there that
leave no letters fixed.
I know that it can be solved by the subfactorial formula, but I tried something else that gave another answer, and I don't see where am I wrong. My answer is as follows:
I considered each plaintext alphabet letter (the original letter before getting encrypted) to be a box holding its letter on the outside and its correspondent encrypted letter to be a paper with the encrypted letter written on it and is placed inside its correspondent plaintext box. I then arranged the boxes in a cycle such that the box with the encrypted letter X_1 in it is followed by the box with the plaintext letter X_1 on it, and if the box with the plaintext letter X_1 on it contains the encrypted letter X_2 inside it, then this box will be followed by the box with the plaintext letter X_2 on it and so on.
So, each unique cipher substitution (cycle) can be represented by any sequence of the letters X_1, X_2,......,X_26, which means that the box with plaintext letter X_26 contains the encrypted letter X_1, and the box with plaintext letter X_1 on it contains the encrypted letter X_2 inside and so on. So, we can generate any sequence of 26 letters and it will be a valid cipher. So, we have 26! permutations, but because it is a cyclic sequence, the sequence X_1, X_2,....., X_26 is equivalent to the sequence X_2, X_3,...., X_26, X_1. So, we actually have 26!/26 permutations.
Anyone can tell me where am I wrong.
2026-04-14 15:21:57.1776180117