\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\parindent=0pt
\begin{document}

{\bf Question} Represent a perfect shuffle of a pack of 52 cards
by the function $f:\ K \longrightarrow K$ where $K=\{
0,1,2,3,\cdots 51\}$ and $f$ is given by

$$\left.\begin{array} {rclc} f(n) & = & 2n & (0 \leq n \leq 25)\\
{} & = & 2n-51 & (26 \leq n \leq 51) \end{array}\right\}. $$

Show that every card returns to its original position after 8
shuffles.  What would be the effect of introducing 2 jokers to the
pack?
\medskip

{\bf Answer} Since $2^8=256=5 \times 51+1$ it follows that $f:\ K
\longrightarrow K$ (which we can describe as $f(n)=2n$ mod 51)
satisfies $f^8(n) \equiv n$ mod 51 for every $n$.  In fact there
are two fixed points 0, 51 and a 2-cycle \{17,34\} which every
other $n$ has period 8 (i.e. six 8-cycles).  With 54 cards we find
that, apart from the fixed points 0, 53, every $n$ has period 52:
there is one 52-cycle.
\end{document}
