Let A = {a, b, c, d} and B = {e, f}. How many functions are there from A to B? How many are one-to-one? How many are onto?
If A and B had changed places how many one to one functions should have been?(I am sorry I didn't pay attention when asking the question)
C(4,2).2!?
How did you find the onto functions? What is the logic of the solution?
If $\displaystyle N=|A|\ge |B|=K$ then the number of onto functions $\displaystyle A\to B$ is
$\displaystyle \sum\limits_{j = 0}^K {{{\left( { - 1} \right)}^j}\binom{K}{j}{{\left( {K - j} \right)}^N}}$.
See this page.
S(A)=5 and S(B)=3. How many onto functions are there from set A to
set B?
I am trying to match 5 elements in set A with 3 elements in B. I can
do that in 2 ways.
3,1,1 or 2,2,1
I chose 3 elements from set A C(5,2) and 1 element in C(2,1) ways.
C(5,2)C(2,1).3!/2!
My way takes too much time in the question you have asked but my way is better than memorizing a formula. If there are 10 elements in the image set Binomial formula is better.