##### Counting number of Onto Function

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

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 = 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 such that

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

The 2nd element of the range is missing: 2= 64

The 3rd element of the range is missing: 2= 64

Total  = 64+64+64 = 192

CASE B:

Total number of such that

The 1st  and 2nd elements of the range is missing: 1= 1 // because only one element is present at this time/

The 2nd  and  3rd elements of the range is missing: 1= 1

The 3rd and 1st   elements of the range is missing: 1= 1

Total = 1+1+1 =3

CASE C:

Total number of such that

All of the three elements are missing: 06 =0

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

TOTAL NUMBER OF FUNCTION THAT ARE ONTO is given by :

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