\documentclass[11pt]{article}
\input{math_macros}
\usepackage{amssymb}
\usepackage[margin=1in]{geometry}
\begin{document}
\begin{flushleft}
\fbox{
\begin{minipage}{\textwidth}
{\bf CS 174: Combinatorics and Discrete Probability} \hfill Fall 2012 \bigskip \\
\centering{\Large Homework 1} \medskip \\
\centering{Due: Thursday, September 6, 2012 by {\bf 9:30am}}
\end{minipage}
} \bigskip \\
\end{flushleft}
\noindent{\it \textbf{Instructions}}: {\it You should upload your homework
solutions on bspace. You are strongly encouraged to type out your solutions
using \LaTeX . You may also want to consider using mathematical mode typing in
some office suite if you are not familiar with \LaTeX . If you must handwrite
your homeworks, please write clearly and legibly. We will not grade homeworks
that are unreadable. You are encouraged to work in groups of 2-4, but you {\bf
must} write solutions on your own. Please review the homework policy carefully
on the class homepage.} \medskip \\
\noindent {\bf Note}: You \emph{must} justify all your answers. In particular, you will get
no credit if you simply write the final answer without any explanation. \medskip
\\
\noindent {\bf Problem 1}. {\it (Exercise 1.1 from MU)} We flip a fair coin ten times. Find
the probability of the following events.
\begin{enumerate}
\item[(a)] The number of heads and the number of tails are equal.
\item[(b)] There are more heads than tails.
\item[(c)] The $i\th$ flip and the $(11-i)\th$ flip are the same for $i = 1,
\ldots, 5$.
\item[(d)] We flip at least four consecutive heads.
\end{enumerate} \medskip
\noindent {\bf Problem 2}. {\it (Exercise 1.6 from MU)} Consider the following
balls-and-bin game. We start with one black ball and one white ball in a bin. We
repeatedly do the following: choose one ball from the bin uniformly at random,
and then put the ball back in the bin with another ball of the same colour. We
repeat until there are $n$ balls in the bin. Show that the number of white balls
is equally likely to be any number between $1$ and $n-1$. \medskip \\
\noindent {\bf Problem 3}. {\it (Exercise 1.8 from MU)} Suppose you choose an integer
uniformly at random from the range $[1, 1,000,000]$. Using the
inclusion-exclusion principle, determine the probability that the number chosen
is divisible by one or more of $4$, $6$, and $9$. \medskip \\
\noindent {\bf Problem 4}. Suppose 3 coins are tossed. Each coin has an equal probability
of head or tail, but are \emph{not} independent.
\begin{enumerate}
\item[(a)] What are the minimum and maximum values of the probability of three
heads?
\item[(b)] Now assume that all \emph{pairs} of coins are mutually independent.
What are the minimum and maximum values of the probability of three heads?
\end{enumerate} \medskip
\noindent {\bf Problem 5}. {\it (Exercise 1.13 from MU)} A medical company touts its new
test for a certain genetic disorder. The false negative rate is small: if you
have the disorder, the probability that the test returns a positive result is
$0.999$. The false positive rate is also small: if you do not have the disorder,
the probability that the test returns a positive result is only $0.005$. Assume
that $2\%$ of the population has the disorder. If a person chosen uniformly at
random from the population is tested and the result comes back positive, what is
the probability that the person has the disorder? \medskip \\
\noindent {\bf Problem 6}. {\it (Exercise 1.18 from MU)} We have a function $F : \{0,
\ldots, n-1\} \rightarrow \{0, \ldots, m-1\}$. We know that, for $0 \leq x, y
\leq n-1$, $F((x+y)~\mmod~n) = (F(x) + F(y))~\mmod~m$. The only way we have for
evaluating $F$ is to use a lookup table that stores the values of $F$.
Unfortunately, an Evil Adversary has changed the value of $1/5$ of the table
entries when were were not looking.
Describe a simple randomized algorithm that, given an input $z$, outputs a value
that equals $F(z)$ with probability at least $1/2$. Your algorithm should work
for every value of $z$, regardless of what values the Adversary changed. Your
algorithm should use as
few lookups and as little computation as possible.
Suppose you are allowed to repeat your initial algorithm three times. What
should you do in this case, and what is the probability that your enhanced
algorithm returns the correct answer?
\end{document}