\documentclass[11pt]{article}
\usepackage{times}                               % LaTeX 2e
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{epsfig}
\setlength{\oddsidemargin}{0in}
\setlength{\topmargin}{-0.5 in}
\setlength{\textwidth}{6.5 in}
\setlength{\textheight}{8.50 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 5}
\end{center}
\par\vspace{-0.4in}\par
\begin{flushright}
{Out: 17 Feb. Due: 24 Feb.}
\end{flushright}
\par\vspace{-0.1in}\par
%\bigskip\noindent
{\it Submit your solutions in pdf format on Gradescope
by {\bf 5pm on Friday, February 24}.  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
\begin{enumerate}
\item In a company of $n$ people, what is the probability that
exactly $k$ of them have a birthday on Christmas Day?  (Your answer
should contain a binomial coefficient, and should be given as a function
of $n$ and~$k$.  Ignore the detail of leap years.)
\par\smallskip
\item Now suppose $n=400$.  Compute the above probabilities
(accurate to four decimal places) for $k=0,1,2,3$.
\par\smallskip
\item Now use the Poisson approximation to estimate the probabilities
in part~(b), again to four decimal places.  How good is the approximation?
\end{enumerate}

\medskip
\item
Suppose $m$ balls are thrown at random into $n$ bins.
In class we proved that, for any non-negative function~$f$ of the bin loads, $$
   {\rm E}[f(X_1,\ldots,X_n)] \le {\rm e}\sqrt{m}  {\rm E}[f(Y_1,\ldots,Y_n)], $$
where the $X_i$ are the actual bin loads and the $Y_i$ are independent
Poisson loads each with parameter~$m/n$.  (See also MU, Theorem~5.7.)
\par\smallskip
Suppose now that the function~$f$ is {\it monotonically increasing\/} in 
the sense that  ${\rm E}[f(X_1,\ldots,X_n)]$ does not decrease when the number
of balls~$m$ is increased.  We will improve the above statement to $$
   {\rm E}[f(X_1,\ldots,X_n)] \le 2 {\rm E}[f(Y_1,\ldots,Y_n)].  \eqno{(*)} $$
(By a symmetrical argument, the same holds when $f$ is monotonically decreasing.)
\begin{enumerate}
\item When $f$ is monotonically increasing, show that  $$
      {\rm E}[f(Y_1,\ldots,Y_n)] \ge {\rm E}[f(X_1,\ldots,X_n)] \Pr[{\textstyle\sum_i Y_i }\ge m].  $$
[{\sc Note}: Recall that the original bound above relied on the weaker fact that
${\rm E}[f(Y_1,\ldots,Y_n)] \ge {\rm E}[f(X_1,\ldots,X_n)] \Pr[\sum_i Y_i = m]$.]
\par\smallskip
\item For any Poisson r.v.~$Z$ with parameter~$\lambda\ge 1$, show that $\Pr[Z\ge\lambda]\ge 1/2$.  
You may assume for simplicity that $\lambda$ is an integer.  [{\sc Hint}: Show that
$\Pr[Z=\lambda+i] \ge \Pr[Z=\lambda - i - 1]$ for each $0\le i\le\lambda-1$.]
\par\smallskip
\item Deduce the desired bound~$(*)$ from parts~(a) and~(b).
\end{enumerate}
\vfill
\begin{flushright}
{\bf [Turn over for problems 3 \& 4]}
\end{flushright}
\newpage
\item 
Suppose $m=n\ln n + cn$ balls are thrown into $n$ bins, where $c$ is a constant (and
may be positive or negative).    Let $\cal E$ denote
the event that no bin is empty.
\begin{enumerate}
\item Show  that, under the Poisson approximation, the probability of event~$\cal E$ is
$\left( 1 - {{{\rm e}^{-c}}\over n}\right)^n \sim {\rm e}^{-{\rm e}^{-c}}$.
\par\smallskip
\item Deduce that, when $c<0$, the actual probability of event~$\cal E$ is asymptotically 
at most  $2{\rm e}^{-{\rm e}^{-c}}$, and when $c>0$ the probability of event~$\overline{\cal E}$
is asymptotically at most $2(1-{\rm e}^{-{\rm e}^{-c}})$.  [{\sc Hint}: Use the result of the previous 
problem.]
\par\smallskip
\item What does part~(b) imply about the coupon collecting problem?  Be as precise as you can.
\end{enumerate}

\medskip
\item  Mitzenmacher \& Upfal, Ex.~4.26.  [{\sc Notes}: In part~(a), show a lower bound
of $\max\{c,d\})$, which is $\Omega(c+d)$.  In part~(b), you should assume that $\alpha$ is
chosen sufficiently large (as in part~(c)).  In part~(d), your algorithm should succeed
with probability $1-O(1/N)$; also, the "length" of a schedule is just the total time taken
to route all $N$ packets.  
For this part, carefully explain how to replace each time step in the
unconstrained schedule by $O(\log(Nd))$ time steps in the real schedule.]
\end{qunlist}
\end{document}



