Solution (source code)

= Solution

There are $n(n-1)\cdots(n-k+1)$ ordered selections without replacement. Each unordered $k$-element <subset> occurs in exactly $k!$ orders, so the <binomial coefficient> is
$$
\boxed{\binom nk=\frac{n!}{k!(n-k)!}.}
$$
One precise specification of its <domain>, <codomain>, and map is
$$
\boxed{C:D\longrightarrow\mathbb N_0,\qquad
D=\{(n,k)\in\mathbb N_0^2:0\le k\le n\},\qquad
(n,k)\longmapsto\frac{n!}{k!(n-k)!}.}
$$
Here $\mathbb N_0=\{0,1,2,\ldots\}$, and $0!=1$ includes the single empty selection. The actual values on $D$ are positive, so $\mathbb N_+$ is also a valid <codomain>. For fixed $n$, one can instead use the <function> $C_n:\{0,\ldots,n\}\to\mathbb N_+$ with $C_n(k)=\binom nk$.