\include{preamble}
\setcounter{try}{28}
\pagestyle{empty}
\begin{document}
\thispagestyle{empty}
\centerline{\bf Math 365 -- Wednesday 3/12/19 -- 8.1: Applications of recurrence relations}
\vfill
\begin{try}
Draw the tree-diagram that tells you how many ways to form the following results, and count the possible outcomes.
\begin{enumerate}[(a)]
\item Strings of 1's and 0's of length-four with three consecutive 0's.
\item Subsets of the set $\{3,7,9,11,24\}$ whose elements sum to less than 28.
\end{enumerate}
$\quad$\hfill\emph{To check your answers: (a) 3; (b) 17.}
\end{try}
\begin{try}~
\begin{enumerate}[(a)]
\item Permutations.
\begin{enumerate}[(i)]
\item Find a recurrence relation and initial conditions for the number of permutations of a set with $n$ elements.
\item Check your recurrence relation by iteratively calculating the first 5 terms of your sequence, and using the known closed formula for counting permutations.
\end{enumerate}
\item Bit strings.
\begin{enumerate}[(i)]
\item Find a recurrence relation and initial conditions for the number of bit strings of length $n$ that contain a pair of consecutive $0$s.
\item Check your answer for $n=4$ by iteratively using your recurrence relation, and then by listing the possibilities.
\item Check your answer for $n=6$ by iteratively using your recurrence relation, and by counting the number of these sequences by hand using a \emph{decision tree}.
\end{enumerate}
\vfill
\item Climbing stairs.
\begin{enumerate}[(i)]
\item
Find a recurrence relation and initial conditions for the number of ways to climb $n$ stairs if the person climbing the stairs can take one stair or two stairs at a time.
\item Check your answer for $n=4$ by iteratively using your recurrence relation, and by counting the number of these sequences by hand using a decision tree.
\item Calculate the number of ways to climb 8 stairs in this way.
\end{enumerate}
\vfill
\item Tiling boards.
\begin{enumerate}[(i)]
\item Find a recurrence relation and initial conditions for the number of ways to completely cover a $2 \times n$ checkerboard with $1 \times 2$ dominoes. For example, if $n=3$, one solution is
$$
\begin{tikzpicture}[scale=.8]
\node at (1.5,2.5) {$2 \times 3$ checkerboard:};
\foreach \x/\y in {0/0, 1/1, 2/0}{
\filldraw[black!60] (\x,\y) rectangle (\x+1,\y+1);
}
\foreach \x in {0,1,2,3}{\draw (\x,0) to (\x,2);}
\foreach \x in {0,1,2}{\draw (0,\x) to (3,\x);}
\end{tikzpicture}
\qquad\qquad
\begin{tikzpicture}[scale=.8]
\node at (1.5,2.5) {covered with 3 dominoes:};
\foreach \x/\y in {0/0, 1/1, 2/0}{
\filldraw[black!60] (\x,\y) rectangle (\x+1,\y+1);
}
\foreach \x in {0,1,2,3}{\draw (\x,0) to (\x,2);}
\foreach \x in {0,1,2}{\draw (0,\x) to (3,\x);}
\draw[fill=black!20] (.1,.1) rectangle (.9,1.9);
\draw[fill=black!20] (1.1,.1) rectangle (2.9,.9);
\draw[fill=black!20] (1.1,1.1) rectangle (2.9,1.9);\end{tikzpicture}
\qquad\qquad
\begin{tikzpicture}[scale=.8]
\node at (1.5,2.5) {shorthand for same solution:};
%\foreach \x/\y in {0/0, 1/1, 2/0}{
%\filldraw[black!60] (\x,\y) rectangle (\x+1,\y+1);
%}
\foreach \x in {0,1,2,3}{\draw (\x,0) to (\x,2);}
\foreach \x in {0,1,2}{\draw (0,\x) to (3,\x);}
\draw[line width=5pt] (.5,.5) rectangle (.5,1.5);
\draw[line width=5pt] (1.5,.5) rectangle (2.5,.5);
\draw[line width=5pt] (1.5,1.5) rectangle (2.5,1.5);\end{tikzpicture}
$$
{[}Hint: Consider separately the coverings where the position in the top right corner of the checkerboard is covered by a domino positioned horizontally and where it is covered by a domino positioned vertically.{]}
\item Check your answer for $n=4 $ by iteratively using your recurrence relation, and by counting the number of these sequences by hand.
\item How many ways are there to completely cover a $2 \times 6$ checkerboard with $1 \times 2$ dominoes?
\end{enumerate}
\vfill
\item Increasing sequences
\begin{enumerate}[(i)]
\item Find a recurrence relation for the number of strictly increasing sequences of positive integers that have $1$ as their first term and $n$ as their last term, where $n$ is a positive integer. That is, sequences $a_1$, $a_2$, \dots, $a_k$, where $a_1=1$, $a_k=n$, and $a_j