How many one to one functions f: A→A have at least one fixed point?

107 Views Asked by At

Let $A = \{1,2,3, ..., 7\}$. A function $f: A → A$ is said to have a fixed point if for some $x \in A$, $f(x) = x$. How many one- to-one functions $f: A → A$ have at least one fixed point?

This is a derangement question.

My answer is $7! - D7$ for at least one fixed point.

But I am confused with the approach for at least $2$ fixed points. If I choose $2$ fixed out of $7$ it is $7C2$ then remaning can deranged in $D5$.

So it is $7! -7C2\times D5$. Is the answer right?