Skip to content
Related Articles

Related Articles

Improve Article

Number of possible Functions

  • Last Updated : 25 Nov, 2019

In the below articles, we are going to calculate the number of functions possible from given two sets of the element.

Statement:
Suppose there are two sets ‘A’ and ‘B’ containing ‘n’ and ‘m’ number of elements respectively, i.e., Sets,

'A' = {1, 2, 3, 4, ............, n},
'B' = {1, 2, 3, 4, ............, m} 

Then the number of function possible will be m^n when functions are counted from set ‘A’ to ‘B’ and n^m when function are counted from set ‘B’ to ‘A’.

Explanation:
In the below diagram, as we can see that Set ‘A’ contain ‘n’ elements and set ‘B’ contain ‘m’ element. Each element of set ‘A’ makes ‘m’ number of functions with each element of the set ‘B’ and hence total number of functions possible is m^n.



Examples:

  1. If set ‘A’ contain ‘3’ element and set ‘B’ contain ‘2’ elements then total number of function possible will be 2^3 = 8.
  2. If set ‘A’ contain ‘5’ element and set ‘B’ contain ‘2’ elements then total number of function possible will be 2^5 = 32.

But when functions are counted from set ‘B’ to ‘A’ then the formula will be n^m where n, m are the number of elements present in set ‘A’ and ‘B’ respectively then examples will be like below:

  1. If set ‘A’ contain ‘3’ element and set ‘B’ contain ‘2’ elements then the total number of functions possible will be 3^2 = 9.
  2. If set ‘A’ contain ‘5’ element and set ‘B’ contain ‘2’ elements then the total number of function possible will be 5^2 = 25.

Similarly when the two sets increases to 3 sets,

'A' = {1, 2, 3, 4, ............, n},   
'B' = {1, 2, 3, 4, ............, m} 
'C' = {1, 2, 3, 4, ............, p}  

Then the number of possible function will be p^{(m^n)} when the function is counted from Set ‘A’ to ‘B’ then to ‘C’ and thus so on for any number of sets.

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :