This question is done on the 26 letters of the alphabet.
The answer is
[math]!26 = \lfloor \frac{26!}{e} + \frac{1}{2} \rfloor[/math]
I will explain the question for three letters A, B, C
The question is in how many ways can the letters A, B, C be rearranged so that no letter appears in its original position?
All combinations
ABC
ACB
CBA
BAC
CAB
BCA
Only CAB and BCA have no fixed letters
The answer is 2
With the formula
The answer is
[math]!3 = \lfloor \frac{3!}{e} + \frac{1}{2} \rfloor = 2[/math]
How to derive this formula
[math]!n = \lfloor \frac{n!}{e} + \frac{1}{2} \rfloor[/math]
The answer is
[math]!26 = \lfloor \frac{26!}{e} + \frac{1}{2} \rfloor[/math]
I will explain the question for three letters A, B, C
The question is in how many ways can the letters A, B, C be rearranged so that no letter appears in its original position?
All combinations
ABC
ACB
CBA
BAC
CAB
BCA
Only CAB and BCA have no fixed letters
The answer is 2
With the formula
The answer is
[math]!3 = \lfloor \frac{3!}{e} + \frac{1}{2} \rfloor = 2[/math]
How to derive this formula
[math]!n = \lfloor \frac{n!}{e} + \frac{1}{2} \rfloor[/math]