1. ## functions and combinations

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?

2. ## Re: functions and combinations

There are 2^4 functions. Number of onto functions:C(4,2).2!
I want to learn the number of one to one functions and how to find it step by step if it is possible?

3. ## Re: functions and combinations

Originally Posted by serhanbener
There are 2^4 functions. Number of onto functions:C(4,2).2!
I want to learn the number of one to one functions and how to find it step by step if it is possible?
There are $2^4-2$ onto functions.
There are no one-to-one functions.
If $|A|>|B|$ there are no one-to-one functions, $A\to B.$

4. ## Re: functions and combinations

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?

5. ## Re: functions and combinations

Many Thanks for your help. There are 16 functions from A to B and there re only 2 that are not onto..

6. ## Re: functions and combinations

Originally Posted by serhanbener
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) How did you find the onto functions? What is the logic of the solution?
If $N=|A|\ge |B|=K$ then the number of onto functions $A\to B$ is
$\sum\limits_{j = 0}^K {{{\left( { - 1} \right)}^j}\binom{K}{j}{{\left( {K - j} \right)}^N}}$.

7. ## Re: functions and combinations

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!

8. ## Re: functions and combinations

Originally Posted by serhanbener
S(A)=5 and S(B)=3. How many onto functions are there from set A to set B?
Use the inclusion/exclusion summation I posted.
$\text{Surj}(5,3)=150.$ So the are 150 surjections from a set of five to a set of three.

9. ## Re: functions and combinations

Let's solve in my way:
There are 2 choices: 311 and 221.C(5,3).C(2,1).3!/2!+C(5,2).C(3,1)C(2,1)3!/2!=150

10. ## Re: functions and combinations

Originally Posted by serhanbener
Let's solve in my way:
There are 2 choices: 311 and 221.C(5,3).C(2,1).3!/2!+C(5,2).C(3,1)C(2,1)3!/2!=150
Could you show us this method for $\text{Surj}(10,5)$ onto from a set of ten to a set of five?

11. ## Re: functions and combinations

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.