What is the number of one-to-one functions f from the set {1, 2, . . . , n} to the setm {1, 2, . . . , n} so that f(x) = x for some x and f(x) $\neq$ x for all the other x?
Alright so the fact that f(x) = x for some x and f(x) $\neq$ x for all the other x is throwing me off.
Here is my attempt, starting with one to one functions for f(x) $\neq$ x.
If we take $A_{i}$ to be a set of one-to one functions so f(x) = x (complement)
$A_{1} \cup A_{2} \cup A_{3} .... \cup A_{n}$
is the set of one to functions so f(x)= x some x
|$A_{i}$| is (n-1)!
|$A_{i} \cap A_{j} $| is (n-2)!
|$A_{i} \cap A_{j} \cap A_{k}$| is (n-3)!
thus
|$A_{i} \cap A_{j} \cap A_{k} ... \cap \ A_{n}$| = (n-n)!
Now since the total number of one to one functions is n!
$n!$ - $ n \choose 1$ (n-1)! + $n \choose 2$ (n-2)! - $n \choose 3$ (n-3)! + … + $(-1)^{n+1}$ ${n \choose n}^{(n-n)!}$
is the number of functions for which f(x) $\neq$ x,
but I'm not sure how to factor in f(x) =x for some x into this solution.. would I just add
$ n \choose 1$ (n-1)! + $n \choose 2$ (n-2)! - $n \choose 3$ (n-3)! + … + $(-1)^{n+1}$ ${n \choose n}^{(n-n)!}$
If i do that I'm just left with n! though right?
To follow up on our exchange in the comments under the main post. If the question means that $f(x)=x$ for only one value of $x$, then @mihaild's answer is correct. But if there can be several values of $x$ such that $f(x)=x$ and $f(x)\ne x$ for all the other ones, then the answer is $$n!-D_n-1,$$ where from the $n!$ of all possible bijections we take away two things: the identity function "$f(x)=x$ for all $x=1,2,\cdots,n$" because it doesn't have any $f(x)\ne x$, and all derangements because they don't have any $f(x)=x$.