3
$\begingroup$

The letter A can be assigned in 26 ways
The letter B can be assigned in 25 ways
.
.
.
The letter Z can be assigned in 1 ways
So the answer is 26!
and in Euler constant form is $e^{61.26170}$

However, the answer in the text book is $≈ (26!)^2/e$

Could you please help me with this problem?

$\endgroup$
2
  • 2
    $\begingroup$ Your $26!$ would not ensure all the code letters different to their original letters. $(26!)^2/e$ is even bigger so too large, though might have a typo. You might want to investigate derangements $\endgroup$
    – Henry
    Dec 1 '21 at 9:36
  • 1
    $\begingroup$ @coffeemath because $26!$ is squared in $(26!)^2/e$ $\endgroup$
    – Henry
    Dec 1 '21 at 12:20
5
$\begingroup$

I think the book is (implicitly or explicitly) looking for codes where a letter is never mapped onto itself. In other words, it is asking for the number of derangements of 26 objects, which is approximately equal to $\frac{26!}{e}$.

The exact formula is

$$n! \sum_{i=0}^n \frac{(-1)^i}{i!}$$

(which can be derived with the inclusion-exclusion principle)

but for $n \ge 1$ you can just round $\frac{n!}{e}$ to the nearest integer.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.