To find the total number of functions \( f: A \to B \) where every element in \( B \) is mapped to by at least one element from \( A \), we are looking for surjective functions.
We are given:
We need to find the number of surjective functions from a set of 6 elements to a set of 3 elements.
The formula for the number of surjective functions from a set of \( m \) elements to a set of \( n \) elements is:
\[ n! \times \left\{ \!\! \begin{array}{c} m \\ n \end{array} \!\! \right\} \]
Here, \(\left\{ \!\! \begin{array}{c} m \\ n \end{array} \!\! \right\}\) is the Stirling number of the second kind, which counts the ways to partition a set of \( m \) elements into \( n \) non-empty subsets.
Let's apply this to our problem:
(i) Calculate \( 3! \):
\[ 3! = 6 \]
(ii) Find the Stirling number of the second kind \( \left\{ \!\! \begin{array}{c} 6 \\ 3 \end{array} \!\! \right\} \):
The value is \( \left\{ \!\! \begin{array}{c} 6 \\ 3 \end{array} \!\! \right\} = 90 \).
(iii) Calculate the total number of surjective functions:
\[ 6 \times 90 = 540 \]
Therefore, there are 540 surjective functions.