0
$\begingroup$

Say we have the set $A: \{1,2,3,4,5\}$

The cardinality of set $A$ is $5$. Does this mean that the number of functions to map set $A$ to set $A$ would be $5^5$?

If not, how would I go about figuring out how many functions exist for this situtation?

$\endgroup$
0
$\begingroup$

You are correct. In fact, this can be generalized. Suppose that $A$ and $B$ are finite sets with cardinality $n$ and $m$. Then let the elements of the set be $a_1,a_2,\dots,a_n$ and the elements of $B$ be $b_1,b_2,\dots,b_m$. Now suppose $f$ is some function from $A$ to $B$. Then $f(a_1)$ can be any of $m$ options ($b_1$ through $b_m$. The same is true of $f(a_2)$ through $f(a_n)$. As such, we have $n$ different elements ($a_1$ through $a_n$), each of which can map to $m$ different things ($b_1$ through $b_m$) for a total of $m^n$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.