\documentclass[12pt,letterpaper]{article}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{upquote}

\newcommand{\eps}{\epsilon}
\newcommand{\wh}{\widehat}
\newcommand{\R}{\mathbb{R}}
\newcommand{\norm}[1]{\|#1\|}
\newcommand{\abs}[1]{|#1|}
\DeclareMathOperator{\E}{\mathbb{E}}
\DeclareMathOperator{\poly}{poly}
\DeclareMathOperator*{\mean}{mean}
\DeclareMathOperator*{\median}{median}

\title{Problem Set 4}
\author{Randomized Algorithms}
\date{Due Friday, September 27}
\begin{document}
\maketitle

\begin{enumerate}
\item {} In class we proved that the two-choices approach improves the  maximum load to $O(\log \log n)$. A generalization is that choosing
  the least loaded of $d$ choices reduces the maximum load to
  $O(\log_d \log n)$. Explain what changes to the proof are needed to
  derive this result. Give only the diffs; do not bother writing a
  complete proof.
\item Probability practice.
  \begin{enumerate}
  \item You flip an unbiased coin until you get two heads in a row.
    What is the expected number of coin flips you make? 

  \item You flip an unbiased coin $m$ times.  During this process, we
    say that the state is ``balanced'' if you have observed equally
    many heads and tails.  Up to constant factors, how many times in
    expectation will the state be balanced?

  \end{enumerate}
\item Consider the following iterative balls-in-bins process.  We have
  $n$ bins.  At the start of the first iteration, we have $n/2$ balls.
  At a general iteration, we throw each of the remaining balls
  independently and uniformly at random into the bins.  We then remove
  every ball that is alone in its bin.  The remaining balls survive to
  the next iteration.  The process stops when there are no balls
  remaining.  How many rounds does this take in expectation, up to
  constant factors?

% \item{} In class, we showed that cuckoo hashing achieves worst case
%   constant time lookups and expected constant time insertion/deletion,
%   with $O(n)$ space to store $n$ items.  Show how to get the same
%   guarantees, but using only $(1 + \eps) n$ space for a small constant
%   $\eps$.  For this problem, assume that you have access to a
%   perfectly random hash function. \textbf{Hint:} Use the following
%   ideas:
%   \begin{itemize}
%   \item Probing more than twice in a table increases the chances of finding an empty cell.
%   \item If after some probes you fail to find an empty cell, move the
%     failed item into an ``overflow'' table that uses cuckoo hashing.
%   \end{itemize}

\end{enumerate}

\end{document}
