Alphabet

nasi112

Full Member
Joined
Aug 23, 2020
Messages
707
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]
 
I don't know how to prove this, but my script confirms this for all [imath]n\leq 10[/imath]
 
An induction requires proving
[math] (-1)^{n+1} +(n+1)\left\lfloor \dfrac{n!}{e}+\dfrac{1}{2}\right\rfloor\stackrel{!}{=} \left\lfloor (n+1) \dfrac{n!}{e}+\dfrac{1}{2}\right\rfloor [/math]
 
It is way easier:
[math]\begin{array}{lll} !n&=n!\displaystyle{\sum_{k=0}^n\dfrac{(-1)^k}{k!}}\\[16pt] \dfrac{1}{e}&=\displaystyle{\sum_{k=0}^\infty \dfrac{(-1)^k}{k!}}\\[16pt] \end{array}[/math][math]\begin{array}{lll} \left\lfloor \dfrac{n!}{e}+\dfrac{1}{2} \right\rfloor&=\left\lfloor \dfrac{1}{2}+n!\displaystyle{\sum_{k=0}^\infty \dfrac{(-1)^k}{k!}}\right\rfloor= !n+\underbrace{\left\lfloor \dfrac{1}{2}+\displaystyle{\sum_{k=n+1}^\infty \dfrac{(-1)^kn!}{k!}}\right\rfloor}_{=0} \end{array}[/math]
 
Top