Given two sets $A=\{1,2,3,4\}$ and $B=\{1,2,3,4,5,6,7\}$. The question is to find the number of non decreasing functions from $A$ to $B$ such that $f(i)$ is not equal to $i$.
My attempt went as follows: The number of non decreasing functions would simply be $10C4$. I then proceeded to subtract the cases where $f(i)=i$ but ended up counting them manually.
Is there any way to remove those extra cases without manual counting? Or even a way in which the problem can be solved without doing “total - undesirable cases”?
(Edit - 10C4 instead of 10C3)
