Counting number of Onto Function

let |A| = 6 and |B| = 3 then total number of Onto function from A to B.

 

Answer

Disclaimer: Please don't use that binomial formula to find the total number of  Onto Function because that is boring. Use this method for that purpose:-

Solution:-

first count total number of function:-

Total number  f:A\rightarrow b = 3 = 729

Then count all the possible function without one, two and then 3 and so on .. elements of the range.

CASE A:

Total number of f:A\rightarrow b such that

The 1st element of the range is missing:        s(A)  = 2= 64 // because only two elements are present at this time/

The 2nd element of the range is missing:      s(B)=2= 64

The 3rd element of the range is missing:       s(C)2= 64

Total  = 64+64+64 = 192

CASE B:

Total number of f:A\rightarrow b such that

The 1st  and 2nd elements of the range is missing:        s(A\cap B)=1= 1 // because only one element is present at this time/

The 2nd  and  3rd elements of the range is missing:       s(B\cap C)=1= 1

The 3rd and 1st   elements of the range is missing:        s(C\cap A)=1= 1

Total = 1+1+1 =3

CASE C:

Total number of f:A\rightarrow b such that

All of the three elements are missing:       s(C\cap A\cap B)=0            06 =0            

 

So the total number of function such that at least one element of the range is missing or NOT ONTO FUNCTION =

S(A\cup B\cup C) = S(A) +S(B)+S(C)-S{(A\cap B)}-S(B\cap C)- S(C\cap A)+S(A\cap B\cap C)

=  64+64+64-1-1-1+0=189

So

TOTAL NUMBER OF FUNCTION THAT ARE ONTO is given by :

total number of function - total number of functions that are not ONTO

729-189=540

 

 

 

 

0Comment