1

Let $n \in \mathbb{N} $. How many bijections $ \pi: \{1,2, \dots,n \} \to \{1,2, \dots,n \} $ are there such that $ \pi(j) \neq j $, for all $j \in \{1,2, \dots,n \} $?

My solution is quite simple:

$$ \pi(1)\in \{2, \dots,n \} \\ \pi(2)\in \{1, \dots,n \} \backslash \{\pi(1) \} \\ \dots \\ \pi(n)\in \{1,2, \dots,n-1 \} \backslash \{\pi(1), \dots, \pi(n-1) \} $$

So if $ \Pi = \{ \pi \} $, then $ | \Pi | = (n-1)! $

This doesn't add up with the answer though, and I don't know whats wrong with my approach. Whats wrong?

Here's the solution

RobPratt
  • 45,619
Oskar
  • 812
  • 1
    Cf. derangements; this question seems more [tag:combinatorics] than [tag:elementary-number-theory] – J. W. Tanner Mar 10 '21 at 15:29
  • 1
    Note: We don't have $\pi(2)\in{1,\dots, n}\setminus{\pi(1)}$, but $$\pi(2)\in{1,\dots, n}\setminus{2,\pi(1)}$$ – Maximilian Janisch Mar 10 '21 at 15:31
  • 2
  • 2
    As for your mistake and what was wrong with your approach, @MaximilianJanisch hit the nail on the head. The punchline is that to utilize rule of product it must be the case that regardless what earlier choices were made the number of available choices for a particular step must be consistent. Here, if you choose $\pi(1)=2$ in the first step then you have $n-1$ choices for what $\pi(2)$ could be, however if you were to instead have chosen $\pi(1)=3$ or anything else you would instead have $n-2$ choices for what $\pi(2)$ could be as it could neither be $\pi(1)$ nor could it be $2$. – JMoravitz Mar 10 '21 at 15:38
  • I see, thanks! But according to the solution, $ | A | \geq (n-1)! $, right? So it's more than just permutations that move all elements – Oskar Mar 10 '21 at 15:41
  • There was a slight error in what @JMoravitz said too: The number of permutations with $\pi(1)\neq 1$ is $n! - (n-1)!$ . The number of derangements $|A|$, which is the sum in your solution, actually happens to be the nearest integer to $\frac{n!}e$, which is less than $n!- (n-1)!$ – Maximilian Janisch Mar 10 '21 at 15:48
  • Ah, yes, of course. I'll delete that bit – JMoravitz Mar 10 '21 at 15:50

0 Answers0