\documentclass[11pt]{article}
\usepackage{times}                               % LaTeX 2e
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{epsfig}
\setlength{\oddsidemargin}{0in}
\setlength{\topmargin}{-0.9 in}
\setlength{\textwidth}{6.5 in}
\setlength{\textheight}{9.00 in}
\setlength{\headsep}{0.75 in}
\setlength{\parindent}{0 in}
\setlength{\parskip}{0.1 in}

%%%% Special dimensions etc. %%%%
\addtolength{\textheight}{1.0truein}
\addtolength{\voffset}{-0.5truein}
\pagestyle{empty}
%%%% End Special dimensions  %%%%

\newcommand{\rset}{{\mathbb R}}
\newcommand{\zset}{{\mathbb Z}}
\def\zm{\zset_m}
\def\R{{\cal R}}
\def\Astr{A_{\rm st}}
\def\Anai{A_{\rm nv}}
\def\bigo{{\rm O}}
\def\optprob#1#2{{\narrower
   \par\noindent{\sc Input}:\quad#1%
   \par\nobreak\noindent{\sc Output}:\quad#2
\par}}
\newcommand{\ignore}[1]{}
\newcounter{sparectr}
%\renewcommand{\thesparectr}{\roman{sparectr}}
\newenvironment{qunlist}{\begin{list}{{\bf\arabic{sparectr}.}}%
                                       {\usecounter{sparectr}
                                        \setlength{\leftmargin}{0pt}}}%
                          {\end{list}}          

\renewcommand{\labelenumi}{(\alph{enumi})}

%%%% Begin Specials %%%%
\def\Lbar{{\overline L}}
\def\Var{{\mathrm{Var}}}
\def\opt{{\hbox{\sc{opt}}}}
\def\select{{\mathrm{select}}}
\def\size{{\mathrm{size}}}
\def\element{{\mathrm{element}}}
\def\lowest{{\mathrm{lowest}}}
%%%% End Specials   %%%%

\begin{document}
\begin{flushleft}
{\it CS--174 Combinatorics \& Discrete Probability, Spring 2023}
\end{flushleft}
\begin{center}
{\Large\bf Homework 8}
\end{center}
\par\vspace{-0.4in}\par
\begin{flushright}
{Out: 7 Apr. Due: 14 Apr.}
\end{flushright}
\par\vspace{-0.1in}\par
%\bigskip\noindent
{\it Submit your solutions in pdf format on Gradescope
by {\bf 5pm on Friday, April 14}.  Solutions may be written either in \LaTeX\ 
(with either machine-drawn or hand-drawn diagrams) or 
{\bf legibly} by hand.  (The \LaTeX\ source for this homework is provided in case you
want to use it as a template.)  Please be sure to begin the solution for each problem on a new page,
and to tag each of your solutions to the correct problem!  
Per course policy, no late solutions will be accepted.
Take time to write\/ {\bf clear} and\/ {\bf concise} answers;
confused and long-winded solutions may be penalized.
You are encouraged to form small groups (two to four people) to work through the homework,
but you\/ {\bf must} write up all your solutions on your own.
Depending on grading resources, we reserve the right to grade
a random subset of the problems and check off the rest; so you
are advised to attempt all the problems.}%\par\bigskip\noindent
\begin{qunlist}
\item {} [Variant of MU, Exercise 7.1]  Consider the Markov chain with four states $\{1,2,3,4\}$ and transition matrix $$
    P = \left(\begin{matrix}  0 & 3/10 & 1/10 & 3/5 \\
    1/10 & 1/10 & 7/10 & 1/10\\
    1/10 & 7/10 & 1/10 & 1/10\\
    9/10 & 1/10 & 0 & 0
    \end{matrix}\right)  $$    
Thus $P_{1,4}=3/5$ is the probability of moving from state~1 to state~4.
\begin{enumerate}
\item Find the probability of being in state~4 after 3 steps if the chain begins in state~1.  [{\sc Hint}:
Do this by hand; you can do it {\it without\/} multiplying matrices!]
\item Find the probability of being in state~4 after 3 steps if the chain begins at a state chosen 
u.a.r.\ from all four states.  [{\sc Hint}: Again, do this by hand.]
\item Find the stationary distribution~$\pi$ of this chain.  [{\sc Note}: You will probably need to use a linear
algebra package for this.]
\item Suppose the chain begins in state~1.  What is the smallest value of~$t$ for which the variation
distance $\Vert p_1^t - \pi\Vert$ is less than 0.001?  [{\sc Note}: Recall that $p_x^t$ denotes the 
distribution of the chain after $t$ steps starting from state~$x$.  Again, use the package.]
\end{enumerate}
\par\medskip
\item
This question concerns the ``lollipop'' graph~$L_n$, which consists of a clique
on $\frac{n}{2}$ vertices with a ``tail'' of length~$\frac{n}{2}$ (edges) attached (so
the total number of vertices is~$n$).
The tail is attached to the clique at vertex~$a$, and the end of the tail is 
vertex~$b$ (see Figure).  We assume that $n$ is even and $n\ge 6$.

\begin{figure}[h]
    \centering
    \includegraphics[width=0.5\linewidth]{ex8q2.pdf}
\end{figure}


We also use the following notation
for random walk on any undirected graph $G=(V,E)$:  
\begin{itemize}
\item For any two vertices $u,v\in V$, $H_{uv}$ denotes the expected
hitting time from~$u$ to~$v$ (i.e., the expected number of steps until
the walk, starting at~$u$, reaches~$v$).
\item For any vertex $v\in V$, $C_v(G)$ denotes the cover time from~$v$
(i.e., the expected time for the walk, starting at~$v$, to visit all vertices of~$G$).
\item $C(G) = \max_v C_v(G)$ denotes the cover time of~$G$.
\end{itemize}
\vfill
\begin{flushright}
{\bf [continued on next page]}
\end{flushright}
\newpage
In the following questions, you may assume without proof any results we have
derived in class provided you state them clearly.  Also, remember that a $\Theta(\,\cdot\,)$
expression is {\it both\/} an upper {\it and\/} a lower bound.
\begin{enumerate}
\item Let $K_n$ be the complete graph on $n$ vertices.  Show
that $C_v(K_n)=\Theta(n\log n)$ for all vertices~$v$ of~$K_n$.
\par\smallskip
\item For the lollipop graph~$L_n$, show that $C(L_n) = O(n^3)$.  [{\sc Note}:
You are only asked to show an {\it upper\/} bound in this part.]
\par\smallskip
\item Show that $C_b(L_n) = \Theta(n^2)$.   [{\sc Note}: This is both an upper and a lower bound.]
\par\smallskip
\item For the lollipop graph~$L_n$, show that $H_{a,b}$ satisfies
\[ H_{a,b} \geq \frac{1}{n/2} \Bigl(1-\frac{2}{n}\Bigr) H_{a,b} +
\frac{n/2-1}{n/2} \Bigl(H_{a,b} + \Omega(n)\Bigr).\] 
[{\sc Hint}: What does Gambler's Ruin say about the
probability that random walk on the line 
$\{0,\ldots,n/2\}$, starting from~1, hits~0 before hitting~$n/2$?]
Deduce that $H_{a,b} = \Omega(n^3)$.
\par\smallskip
\item Deduce from parts~(b) and~(d) that $C(L_n)=\Theta(n^3)$.  [{\sc Note}: Again,
both an upper and a lower bound.]
\par\smallskip
\item Prove or disprove the following statement: ``If $G$ is a connected graph and
$G'$ is obtained from~$G$ by adding edges to~$G$, then $C(G)\le C(G')$."
\item Prove or disprove the following statement: ``If $G$ is a connected graph and
$G'$ is obtained from~$G$ by adding edges to~$G$, then $C(G)\ge C(G')$."
\end{enumerate}
\par\medskip
\item
The {\it exclusion process on the directed cycle\/} is a Markov
chain defined as follows.  There are $n$ sites corresponding to the vertices 
of the cycle~$C_n$, and $1<k<n$ indistinguishable particles which 
may occupy the sites, with at most one particle per site.  Thus
there are ${n\choose k}$ allowed configurations of particles.
Transitions from any configuration are specified as follows:
\begin{itemize}
\item pick a particle u.a.r.
\item move the particle one position clockwise round the cycle, 
provided that site is not occupied; else do nothing
\end{itemize}
\begin{enumerate}
\item Explain briefly why the process is irreducible.
\item Explain briefly why the process is aperiodic.
\item What is the stationary distribution?  Justify your answer.
\end{enumerate}
\par\medskip
\item
Recall the ``random transpositions" card shuffle that we defined 
in class.  Here the states, as usual, are all $n!$ permutations of an
$n$-card deck, and at each step the shuffle proceeds as follows:
\begin{itemize}
\item pick two positions, $i,j\in \{1,\ldots,n\}$ independently and u.a.r. (note 
that $i=j$ is possible)
\item swap the cards at positions~$i$ and~$j$
\end{itemize}
As we saw in class, this shuffle converges to the uniform distribution.
(It is irreducible because any permutation can be written as the product
of transpositions; it is aperiodic because there is a self-loop probability
of $1/n$ at each state; and the stationary distribution is uniform because
the transition probabilities are symmetric.)

In this problem you will show that $O(n^2)$ shuffles are enough to mix
up the deck.

Here is a coupling $(X_t,Y_t)$ for this process.  At each step,
we choose a position~$i\in\{1,\ldots,n\}$ and a card~$c$ u.a.r.  Then
in both copies $X_t,Y_t$ we swap card~$c$ with the card in position~$i$.
(Note that this is a valid coupling, because both copies, viewed
separately, are in fact swapping the cards in two randomly chosen positions,
as specified in the original process.)
\vfill
\begin{flushright}
{\bf [continued on next page]}
\end{flushright}
\newpage
To analyze this coupling, let $d_t=d(X_t,Y_t)$ be the {\it distance\/} between
the two copies after $t$ steps, i.e., the number of cards whose positions differ
in~$X_t$ and~$Y_t$.  
\begin{enumerate}
\item Explain {\it carefully\/} why $d_t$ never increases with~$t$.
\item Show that $d_t$ decreases by at least~1 with 
probability~$\left(\frac{d_t}{n}\right)^2$.
\item Deduce that, for any choice of initial states $X_0,Y_0$, the expected
number of steps~$T$ until $X_T=Y_T$ is at most $cn^2$ for some constant~$c$.
[{\sc Hint}: Recall the expected value of a geometric r.v.  Recall also that
$\sum_{i=1}^\infty\frac{1}{i^2} = \frac{\pi^2}{6}$.]
\item Finally, deduce that the mixing time satisfies $\tau(\varepsilon)\le \frac{cn^2}{\varepsilon}$.
[{\sc Hint}: Use Markov's inequality and the coupling lemma.  In fact, the mixing
time for this process satisfies $\tau(\varepsilon)\le cn^2\log(\frac{1}{\varepsilon})$, but
you are not required to prove this.]
\end{enumerate}
\par\medskip
\item {\bf [Optional extra: No credit]}
Here is an unusual card trick.  I take a shuffled deck and turn
up the cards one by one.  I ask you to select one of the first ten
cards, without telling me which one; let $c_1\in\{1,2,\ldots,13\}$ be the numerical 
value of your card.  You then count $c_1$ cards from the one you selected,
and note that card; call its value~$c_2$.  You then count a further
$c_2$ cards and note that card, and so on until the deck is exhausted.
At that point, I am able to identify the last card you noted (at least
most of the time).

Describe how I perform this amazing feat, and give a qualitative
explanation for why it works.  [{\sc Hint}: think
about coupling.  You are not expected to perform any calculations
to justify why the method works.  You are encouraged to try it
on a friend a few times and estimate the success probability---it
should certainly be enough to win comfortably in a gambling situation.
Or if you are really interested you could simulate the trick with a program
and get a much better estimate of the success probability.]
\end{qunlist}
\end{document}