Finding the number of functions that can be formed.

33 Views Asked by At

Let $A$ is the set of first 7 natural numbers and $B$ is set of first 6 even natural numbers. Consider function $f:A\to B$ such that $f(x)\neq 2x$ $ \forall x\in A$ and $f(x)$ is an onto function. Find total number of functions that can be formed.

My try:

For a general $n$, let $A$ is the set of first $n$ natural numbers and $B$ is set of first $(n-1)$ even natural numbers.

Let $F_n$ be the number of such functions that can be formed.

Then using recursion I find that $$F_n=(!(n-1)) *(n-1)+ (n-1)F_{(n-1)}$$ and $F_2=0$ . Using this I can find $F_7$.

But I want to know if there is some other interesting method to work with such problems. I specifically would like to use the Rook Polynomials but I am not able to do so in this question. Any hints for this method and any other new methods are greatly appreciated