Find the Number of Functions from \(A\) to \(B\)
Question:
Let \(A\) and \(B\) be two sets such that
\[ n(A)=p \]
and
\[ n(B)=q. \]
Write the number of functions from \(A\) to \(B\).
Solution:
Each element of set \(A\) can be mapped to any one of the \(q\) elements of set \(B\).
Since there are \(p\) elements in \(A\),
total number of functions
\[ =q\times q\times q \cdots (\text{p times}) \]
\[ =q^p \]
Therefore,
\[ \boxed{q^p} \]