Let \(S\) be a set. A function \(f\colon \{1,2,\ldots,r\}\to
S\) is called a sequence in \(S\) of length \(r\text{.}\) A sequence is denoted by an ordered list \((s_1,s_2,\ldots,s_r)\) of elements in \(S\text{,}\) where \(s_k=f(k)\) for \(1\leq k\leq r\text{.}\) The set of all possible sequences in \(S\) of length \(r\) is denoted \(S^r\text{,}\) and is also called the \(r\)-fold Cartesian product of \(S\) with itself.
\begin{equation}
S^r = \underbrace{S\times S \times \cdots \times S}_{r \text{
factors}}=\{(s_1,s_2,\ldots,s_r)\colon s_k\in S\text{ for } 1\leq
k\leq r\}\tag{1.4}
\end{equation}
Elements of \(S^r\) are also called ordered \(r\)-tuples. It is convenient to have a name for the subset of sequences \(f\colon \{1,2,\ldots,r\}\to
S\) that are one-to-one, which is the same as the set of \(n\)-tuples \((s_1,s_2,\ldots,s_r)\) that have no repeated values, that is, for which \(s_i\neq s_j\) for \(i\neq j\text{.}\) These sequences are called permutations of \(r\) elements of \(S\). We write \(P_r(S)\) to denote the set of sequences of length \(r\) in \(S\) that are one-to-one (the letter \(P\) is for permutations).
\begin{equation}
P_r(S) =\{(s_1,s_2,\ldots,s_r)\in S^r\colon s_i\neq
s_j\text{ for }i\neq j\}\tag{1.5}
\end{equation}
The standard notation for the number of permutations of
\(r\) elements from a set of size
\(n\) is
\(P(n,r)\text{.}\) The number
\(P(n,r)\) is also called the
number of permutations of \(n\) items chosen \(r\) at a time. In this notation, the formulas in
PropositionΒ 1.8 and Equation
(1.7), respectively, have the following forms.
\begin{align}
P(n,n) \amp = n!\tag{1.8}\\
P(n,r)\amp = n(n-1)(n-2)\cdots (n-r+1)=\frac{n!}{(n-r)!}\tag{1.9}
\end{align}