\documentclass[11pt]{article}
\usepackage{jeffe,handout,multicol,tikz,kgm}
\usepackage{graphicx}

\newcommand{\kgmcomment}[1]{}
\renewcommand{\gcd}{\mathrm{gcd}}

\begin{document}
\headers{Math378}{Homework 10}{Due Fri. Apr 4, 2025}

%\makeatletter
%\def\@oddfoot{\hfill \tikz \node[draw] {over} ; }
%\makeatother

%\newcommand{\seq}[1]{\left\langle #1\right\rangle}

\newcommand{\RR}{\mathbb{R}}
\newcommand{\ZZ}{\mathbb{Z}}

\makeatletter
\def\@oddfoot{}
\makeatother

\noindent
\textbf{Directions:} Solve the following problems.  All written work must be your own.  See the course syllabus for detailed rules.

\begin{enumerate}

\item {} How many ways are there to arrange the letters of MISSISSIPPI:
\begin{enumerate}
	\item with no additional restrictions?
	\item {} [4.3.7] if all four S's cannot appear consecutively?
	\item if no two S's can appear consecutively?
\end{enumerate}

\item {} [4.4.2] I want to buy exactly 10 jars of various herbs and spices, and I am only interested in Cinnamon, Curry, Cumin, Caraway, Coriander, and Chervil.  The supermarket has plenty of each.  How many different combinations are possible?

\item {} [4.4.\{8-11\}]  Solutions to equations.
\begin{enumerate}
	\item Count the integral solutions to $x_1 + x_2 + x_3 + x_4 = 30$ with $x_1\ge 2$, $x_2 \ge 0$, $x_3 \ge -5$, and $x_4\ge 8$.
	\item Count the integral solutions to $x_1 + \cdots + x_5 = 47$ with $5\le x_i \le 30$ for each $i$.
	\item How many non-negative integer solutions are there to $x_1 + \cdots + x_8 = 47$, where exactly three of the variables are equal to zero?  What if we wanted at least three variables equal to zero?
	\item Find the number of non-negative integer solutions to $x_1 + \cdots + x_7 \le 47$.
\end{enumerate}

\item {} How many ways are there to form a subset of $[n]$ of size $k$ with the property that each selected number is at distance at least $3$ from every other selected number?  For example, if $n=8$ and $k=3$ there are $4$ ways: $\{1,4,7\}$, $\{1,4,8\}$, $\{1,5,8\}$, and $\{2,5,8\}$.

\item {} Consider a fair die with $t$ sides, labeled $1$ through $t$. 
\begin{enumerate}
	\item What is the probability that in $n$ rolls of the die, the same result does not appear twice consecutively?
	
	\item Let $X$ be the random variable that equals the number of times the die is rolled when we first get consecutive rolls with the same value.  Let $X_j$ be the random variable which equals $1$ if the rolls $1$ through $j$ have no consecutive rolls with the same result, and $0$ otherwise.  Explain why $X=1+\sum_{j\ge 1} X_j$.
	
	\item Compute the average number of times the die must be rolled to see the same result twice in a row.  (Hint: recall the geometric series formula $\sum_{n=0}^{\infty} z^n = \frac{1}{1-z}$ for $|z| < 1$.)
\end{enumerate}


\end{enumerate}
\end{document}
