\documentclass[12pt,letterpaper]{article}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{upquote}
\usepackage[margin=1.4in]{geometry}

\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 8}
\author{Randomized Algorithms}
\date{Due Friday, October 25}
\begin{document}
\maketitle

\begin{enumerate}
\item Let $S$ be an unknown set of $n$ items (with $n$ known).
  Suppose that you receive a sample $T$ of $k$ items chosen from $S$
  uniformly at random \emph{without replacement}.  Show how to
  construct a sample $T'$ of $k$ items from $S$, whose distribution is
  identical to a uniform sample of $k$ items from $S$ drawn \emph{with
    replacement}.
\item Consider the example given in class for how online bipartite
  matching using random edges achieves a competitive ratio of $R =
  1/2$: each arriving vertex $x_i$ has an edge to $y_i$ as well as all
  of $y_{n/2}, \dotsc, y_n$.  Show that the algorithm that the
  algorithm given in class, which randomly ranks the right vertices
  $y_i$, has $R \leq 3/4$ on this example.
\item{} [Moshkovitz] Suppose that you have a giant
  (i.e., infinite) bag of coins.  You know that 90\% of the coins are
  highly biased, and come up heads 90\% of the time.  The other 10\%
  of coins are unbiased, and come up heads 50\% of the time.  You do
  not know which coins are which, and you would like to find \emph{one} of
  the biased coins.

  You are allowed to flip coins $n$ times -- each coin you flip can be
  either a fresh random coin from the bag, or a coin that you have
  flipped before.  At the end of $n$ coin flips, you must output a
  coin.  You succeed if the coin is biased, and fail if the coin is
  unbiased.  What is the minimum probability of failure, and how can
  you achieve this?

  \begin{enumerate}
  \item Show that the failure probability must be at
    least $\exp(-O(n))$.
  \item Suppose that the biased coins were actually $100\%$ biased.
    Show how to achieve $\exp(-\Omega(n))$ failure probability.
  \item  Show how to achieve $\exp(-\Omega(n))$ failure
    probability in the setting described, where the biased coins are $90\%$ biased.

    \textbf{Hint (rot13):} Gur nytbevguz vf fvzvyne gb gur bar sbe ebohfg ovanel frnepu ba ceboyrz frg 2.

%   \item{} [Optional; this is an open research question.]  Suppose that
%     of the other $10\%$ of coins, some may have arbitrary bias. You
%     still only fail if the coin you output is completely unbiased.
%     Show how to achieve $\exp(-\Omega(n))$ failure probability, or
%     show that this is impossible.
   \end{enumerate}
\end{enumerate}

\end{document}
