The twelvefold way gives the number of mappings $f$ from set $N$ of $n$ objects to set $K$ of $k$ objects (putting balls from set $N$ into boxes in set $K$). See Table 26.17.1. In this table ${\left(k\right)}_{n}$ is Pochhammer’s symbol, and $S(n,k)$ and ${p}_{k}\left(n\right)$ are defined in §§26.8(i) and 26.9(i).

Table 26.17.1 is reproduced (in modified form) from Stanley (1997, p. 33). See also Example 3 in §26.18.

elements of $N$ | elements of $K$ | $f$ unrestricted | $f$ one-to-one | $f$ onto |
---|---|---|---|---|

labeled | labeled | ${k}^{n}$ | ${(k-n+1)}_{n}$ | $k!S(n,k)$ |

unlabeled | labeled | $\left({\displaystyle \genfrac{}{}{0pt}{}{k+n-1}{n}}\right)$ | $\left({\displaystyle \genfrac{}{}{0pt}{}{k}{n}}\right)$ | $\left({\displaystyle \genfrac{}{}{0pt}{}{n-1}{n-k}}\right)$ |

labeled | unlabeled | $\begin{array}{c}\hfill S(n,1)+S(n,2)\hfill \\ \hfill +\mathrm{\cdots}+S(n,k)\hfill \end{array}$ | $\{\begin{array}{cc}1\hfill & n\le k\hfill \\ 0\hfill & n>k\hfill \end{array}$ | $S(n,k)$ |

unlabeled | unlabeled | ${p}_{k}\left(n\right)$ | $\{\begin{array}{cc}1\hfill & n\le k\hfill \\ 0\hfill & n>k\hfill \end{array}$ | ${p}_{k}\left(n\right)-{p}_{k-1}\left(n\right)$ |