Number of bijections for $S_n$ with conditions

42 Views Asked by At

For $n \geq 2$, determine the number of elements $f$ of $S_n$ for which $f(1) \neq 1$ and $f(2) \neq 2$, where $|S_n|$ is the number of bijections from $\{1,2,...,n\}$ to $\{1,2,...,n\}$.

I think I've proved this problem, just need verification. Any feedback welcome.

Proof

There are two cases.

Case 1) $f(1)=2$. If this is the case then of course there are $n-1$ choices for $f(1)$. Since $2$ is already taken in the codomain there are n-1 choices for $f(2)$. There aren't any restrictions on the remaining elements in the domain, thus there are $(n-2)!$ choices for the remaining elements. \bigskip

Hence we get $(n-1)(n-1)(n-2)!=(n-1)(n-1)!$ choices of $f$.

Case 2) $f(1) \neq 2$. Of course there are n-1 choices for $f(1)$. Since 2 has not been mapped to, there are only n-2 choices for $f(2)$. For the remaining elements in the domain there are $(n-2)$ elements in the codomain.

\bigskip

Thus we get $(n-1)(n-2)(n-2)!=(n-2)(n-1)!$

Since there are two cases, we are required to add the formulae. Thus,

$$(n-1)(n-1)!+(n-2)(n-1)!=(n-1)!(n-1+n-2)=(n-1)!(2n-3)$$ are the number of $f$ bijections satisfying the conditions.

1

There are 1 best solutions below

3
On BEST ANSWER

(a) There are $n!$ permutaions in total.

(b) There are $(n-1)!$ permuatios that fix $1$.

(c) There are $(n-1)!$ permuatios that fix $2$.

(d) There are $(n-2)!$ permutatiosn that fix both $1$ and $2$.

Then the number of permutations that fix neither $1$ nor $2$ is $$ (a)-(b)-(c)+(d) = n!-2\cdot (n-1)!+(n-2)!=(n-2)!\cdot (n^2-3n+3)$$