0

How many functions one-to-one $\phi$ from $\{1,2,3,4,5,\}$ to $\{1,2,3,4,5\}$ such that $\phi(i)\neq i$ for $i=1,2,3,4,5$

my attempt:

the number of one-to-one functions $\phi$ from $\{1,2,3,4,5,\}$ to $\{1,2,3,4,5\}$ is 5!=120

and given condition is $\phi(i)\neq i$ for $i=1,2,3,4,5$ so these are 5

so number of one-to-one functions are $\phi$ from $\{1,2,3,4,5,\}$ to $\{1,2,3,4,5\}$ such that $\phi(i)\neq i$ for $i=1,2,3,4,5$

=120-5=55 is i am right

2 Answers2

2

Actually you are asking for the number of derangements of 5 intergers.i.e., $D_5$.
The general formula for derangements of n intergers is $$D_n=n!\left(1-1/1!+1/2!-1/3!+\cdots+ (-1)^n/n!\right) $$.
Substitute the value for n as 5 you will get the answer.

shwetha
  • 695
1

You could interpret your functions as the result of shuffling a 5-card deck. The number of outcomes where one card only is in the original position is given by (https://en.wikipedia.org/wiki/Inclusion%E2%80%93exclusion_principle, “Counting Derangements” section) $$ W(n) = \sum_{p=1}^{n} \frac{n!}{p!}$$ So, $W(5) = 76$, and the number you look for is given by $120 – 76 = 44$.

An aedonist
  • 2,568