\documentclass[12pt,letterpaper]{article}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{upquote}
\usepackage[margin=1in]{geometry}
\newcommand{\eps}{\epsilon}
\DeclareMathOperator{\E}{E}
\DeclareMathOperator{\poly}{poly}
\author{Randomized Algorithms}

\title{Problem Set 2}
\date{Due Thursday, September 12}
\begin{document}
\maketitle

\begin{enumerate}

\item Consider an optimization problem $\texttt{Opt}(x): \mathcal{X}
  \to \{0,1,\dotsc, n-1\}$ that associates inputs from some domain with
  outputs (e.g., min cut is such a problem).

  Suppose that we have a BPP algorithm $\mathcal{A}$ that takes $T$
  time to answer binary queries of whether $\texttt{Opt}(x)$ is less
  than some threshold.  That is, it answers queries of the form
  $\texttt{Less}(x, k) := (\texttt{Opt}(x) < k)$, with error
  probability at most $1/4$.

  We saw in class that we can then solve $\texttt{Opt}(x)$ in $O(T
  \log n \log \log n)$ time with $3/4$ probability, by amplifying the
  probability and doing binary search.  The goal of this problem is
  to improve this.
  \begin{enumerate}
  \item Consider the function $\texttt{RobustBisect}(x, L, H)$ that
    has three outputs:
    \begin{itemize}
    \item LOW if $L \leq \texttt{Opt}(x) < \frac{L+H}{2}$.
    \item HIGH if $\frac{L+H}{2} \leq \texttt{Opt}(x) < H$.
    \item OUTOFRANGE if $\texttt{Opt}(x) \notin [L, H)$.
    \end{itemize}
    Use $\mathcal{A}$ to construct a randomized algorithm
    $\mathcal{B}$ to solve $\texttt{RobustBisect}$ with $3/4$
    probability and $O(T)$ time.
  \item Now consider how to use $\mathcal{B}$ as a subroutine in
    binary search, to determine $\texttt{Opt}(x)$.  Construct a
    strategy such that, once $\mathcal{B}$ has been correct at least
    $\log n$ more times than it has been incorrect, you can output
    $\texttt{Opt}(x)$ exactly and correctly.
  \item Conclude that one can solve $\texttt{Opt}(x)$ in $O(T \log n)$
    time with high probability (which means $1 - 1/n^c$ probability
    for an arbitrarily large constant $c$).
  \end{enumerate}

\item{} [MR 2.3]. Consider a uniform rooted tree of height $h$ (every
  leaf is at distance $h$ from the root). The root, as well as any
  internal node, has 3 children. Each leaf has a boolean value
  associated with it. Each internal node returns the value returned by
  the majority of its children. The evaluation problem consists of
  determining the value of the root; at each step, an algorithm can
  choose one leaf whose value it wishes to read.

\begin{enumerate}
\item Show that for any deterministic algorithm, there is an instance
  (a set of boolean values for the leaves) that forces it to read all
  $n = 3^h$ leaves.
\item Show that there is a nondeterministic algorithm can determine
  the value of the tree by reading at most $n^{\log_3 2}$ leaves. In
  other words, prove that one can present a set of this many leaves
  from which the tree value can be determined.
\item Consider the recursive randomized algorithm that evaluates two
  subtrees of the root chosen at random. If the values returned
  disagree, it proceeds to evaluate the third sub-tree. Show the
  expected number of leaves read by the algorithm on any instance is
  at most $n^{0.9}$.
\end{enumerate}


\end{enumerate}

\end{document}
