The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+12 votes

The number of functions from an $m$ element set to an $n$ element set is

  1. $m + n$
  2. $m^n$
  3. $n^m$
  4. $m*n$
asked in Set Theory & Algebra by Veteran (59.9k points)
edited by | 1.3k views
No of functions: $(size of set 2)^{size of set 1}$

3 Answers

+24 votes
Best answer
No. of functions from an $m$ element set to an $n$ element set is $n^m$ as for each of the $m$ element, we have $n$ choices to map to, giving $\underbrace{n \times n \times \dots n}_{m \text{ times}} = n^m$.

PS: Each element of the domain set in a function must be mapped to some element of the co-domain set.
answered by Veteran (59.4k points)
selected by
It should be m^n..Please clarify

Let set A contains m element and set B contains n elements and we have to map from A to B. Then for every elements of A we have n choices to map to, and think recursively that 1st element we have n choice,  again for the 2nd element of A we have n choice and if we continue like this then every element of A has n choices. So n*n*n*n*n*n*..........upto m times will generate n^m. Like we write 2*2*2*2 = 2^4. i hope this clear your doubt.

+3 votes
ans(c)  m which is domain and n which is co-domain

so number of functions = $co-domain^{domain }$

so $n^{m}$
answered by Loyal (8k points)
edited by
–1 vote

ans: C
answered by Loyal (7.8k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
47,881 questions
52,233 answers
67,653 users