Number of Permutations with Repetition

Theorem
Set $S$ be a set of $n$ elements.

Let $\sequence T_m$ be a sequence of $m$ terms of $S$.

Then there are $n^m$ different instances of $\sequence T_m$.

Proof
Let $N_m$ denote the set $\set {1, 2, \ldots, m}$.

Let $f: N_m \to S$ be the mapping defined as:
 * $\forall k \in N_m: \map f t = t_m$

By definition, $f$ corresponds to one of the specific instances of $\sequence T_m$.

Hence the number of different instances of $\sequence T_m$ is found from Cardinality of Set of All Mappings:


 * $\card S^{\card {N_m} }$

The result follows.