This was a question from a test. There's a set $A$ with elements $\{1,2,3,4,5\}$ and another set $B$ with elements $\{0,1,2,3,4,5\}$. Now $f$ is a function from $A$ to $B$ such that $f(1)$ is not equal to $0$ or $1$ and $f(i)$ is not equal to $i$ (for $i=2,3,4,5$). Then how many such one to one functions are possible?
It looks like an application of the derangement formula, but it's getting way too complex when I apply it. Can anyone help me out in this?
Introduce 0 in set A and place it in position which is not occupied by any 5 elements in set A(no of cases still remain same).
If 0 takes 0 , then it is simply $d_5$
If 0 does not take 0 it would have been $d_6$ if 1 could take 0 but u see 1 has equal probability going to 0,2,3,4,5 right. Out of $d_6$ every 4 out of 5 cases should be counted
Answer is simply $d_5$ + $\frac{4d_6}{5}$ = 44 + $\frac{4*265}{5}$ = 44 + 212=256