I am a beginner here and have recently started learning Discrete math. I dont know how to solve the following question.

Please help.

Q. Let A ={0,1,2,3} and B ={0,1,2}. How many functions are there from A to B that are onto?

Printable View

- Oct 2nd 2010, 02:02 PMhimanshugptNumber of Onto Function between two sets?
I am a beginner here and have recently started learning Discrete math. I dont know how to solve the following question.

Please help.

**Q. Let A ={0,1,2,3} and B ={0,1,2}. How many functions are there from A to B that are onto?** - Oct 2nd 2010, 02:33 PMPlato
I will answer this question for the finite case only.

Being beginner, you may not understand the reply.

You need to know how to use the generalized*inclusion/exclusion rule*.

Let $\displaystyle |A|$ denote the number of elements in set $\displaystyle A$.

If $\displaystyle |A|<|B|$**there are no onto**functions $\displaystyle A\to B$.

If $\displaystyle |A|=m\ge~n=|B|$ then number of onto functions $\displaystyle A\to B$ is given by:

$\displaystyle \text{Surj}(m,n)=\sum\limits_{j = 0}^n {\left( { - 1} \right)^j \dbinom{ n}{j} \left( {n - j} \right)^m } $. - Oct 2nd 2010, 02:37 PMhimanshugpt
Thanks for the reply Plato.

Is there any link or topic I have to ponder on to understand this.

I am unable to get what the variablemean in the above formula.*j* - Oct 2nd 2010, 02:49 PMPlato
Well, I did say that you may not have any idea what is going on.

It is rather advanced material. Here is webpage on inclusion/exclusion.

In essence we are selecting elements of $\displaystyle B$ to be included then excluded. - Oct 2nd 2010, 02:51 PMhimanshugpt
Thanks for the Link. I will try to understand this and will post here if I encounter any other problem.

Thanks again. :)