Open In App

Mathematics | Total number of possible functions

In this article, we are discussing how to find number of functions from one set to another. For understanding the basics of functions, you can refer this: Classes (Injective, surjective, Bijective) of Functions

Number of functions from one set to another: Let X and Y are two sets having m and n elements respectively. In a function from X to Y, every element of X must be mapped to an element of Y. Therefore, each element of X has ‘n’ elements to be chosen from. Therefore, total number of functions will be n×n×n.. m times = nm
For example: X = {a, b, c} and Y = {4, 5}. A function from X to Y can be represented in Figure 1. 
 


Considering all possibilities of mapping elements of X to elements of Y, the set of functions can be represented in Table 1. 

 





Examples: Let us discuss gate questions based on this: 
 


Number of onto functions from one set to another – In onto function from X to Y, all the elements of Y must be used. In the example of functions from X = {a, b, c} to Y = {4, 5}, F1 and F2 given in Table 1 are not onto. In F1, element 5 of set Y is unused and element 4 is unused in function F2. So, total numbers of onto functions from X to Y are 6 (F3 to F8). 
 




Important notes – 
 



Q3. The number of onto functions (surjective functions) from set X = {1, 2, 3, 4} to set Y = {a, b, c} is: 
(A) 36 
(B) 64 
(C) 81 
(D) 72 

Solution: Using m = 4 and n = 3, the number of onto functions is: 
343C1(2)4 + 3C214 = 36. 

 

Article Tags :