\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 6} \medskip \\
\centering{Due: Thursday, October 11, 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 5.16 from MU -- 6 points)} Let $G$ be
a random graph generated using the $G_{n, p}$ model. Write the answers for these
questions in the limit as $n \rightarrow \infty$, so you should ignore constant and
lower order terms.
%
\begin{enumerate}
%
\item[(a)] A \emph{clique} of $k$ vertices in a graph is a subset of $k$
vertices such that all $k \choose 2$ edges between these vertices lie in the
graph. For what value of $p$, as a function of $n$, is the expected number of
cliques of five vertices in $G$ equal to $1$?
%
\item[(b)] A $K_{3, 3}$ is a complete bipartite graph with three vertices on
each side. In other words, it is a graph with six vertices and nine edges; the
six distinct vertices are arranged in two groups of three, and the nine edges
connect each of the nine pairs over vertices with one vertex in each group. For
what value of $p$, as a function of $n$, is the expected number of $K_{3, 3}$
subgraphs of $G$ equal to $1$?
%
\item[(c)] For what value of $p$, as a function of $n$, is the expected number
of Hamiltonian cycles in the graph equal to $1$?
\end{enumerate} \medskip
\noindent {\bf Problem 2}. {\it (Exercise 5.21 from MU -- 8 points)} In hashing
with \emph{open addressing}, the hash table is implemented as an array and there
are no linked lists or chaining. Each entry in the array either contains one
hashed item or is empty. The hash function defines, for each key $k$, a
\emph{probe sequence} $h(k, 0), h(k, 1), \ldots$ of table locations. To insert
the key $k$, we first examine the sequence of table locations in the order
defined by the key's probe sequence until we find an empty location; then we
insert the item at that position. When searching for an item in the hash table,
we examine the sequence of table locations in the order defined by the key's
probe sequence until either the item is found or we have found an empty location
in the sequence. If an empty location is found, this means the item is not
present in the table.
An open-address hash table with $2n$ entries is used to store $n$ items. Assume
that the table location $h(k, j)$ is uniform over the $2n$ possible table
locations and that all $h(k, j)$ are independent.
\begin{enumerate}
\item[(a)] Show that, under these conditions, the probability of an insertion
requiring more than $m$ probes is at most $2^{-m}$.
\item[(b)] Show that, for $i = 1, 2, \ldots, n$, the probability that the $i\th$
insertion requires more than $2 \log(n)$ probes is at most $1/n^2$.
\item[(c)] Now, let $X_i$ denote the number of probes required by the $i\th$
insertion. You showed above that $\Pr(X_i \geq 2 \log(n)) \leq 1/n^2$. Let the
random variable $X = \max_{1 \leq i \leq n} X_i$ denote the maximum number of
probes required by any of the $n$ insertions. Show that $\Pr(X > 2 \log(n)) \leq
1/n$.
\item[(d)] Use the above to conclude that the expected length of the longest
probe sequence, $\E[X] = O(\log(n))$.
\end{enumerate} \medskip
\noindent {\bf Problem 3} {\it (Exercise 6.2 from MU -- 8 points)}
\begin{enumerate}
\item[(a)] Prove that, for every integer $n$, there exists a colouring of the
edges of the complete graph, $K_n$, using two colours -- say red and black -- so
that the total number of monochromatic $K_4$ is at most ${n \choose 4} /2^{5}$.
\item[(b)] Give a Las Vegas algorithm for finding such a colouring (one with at
most ${n \choose 4} / 2^5$ monochromatic $K_4$) that runs in expected polynomial
time in $n$. Recall that a Las Vegas algorithm always returns a correct output,
but its worst case running time may be unbounded.
\item[(c)] Show how to construct such a colouring deterministically in
polynomial time using the method of conditional expectations.
\end{enumerate} \medskip
\noindent {\bf Problem 4} {\it (Exercise 6.3 -- 8 points)} Given an $n$-vertex
undirected graph $G = (V, E)$, consider the following method of generating an
independent set. Given a permutation $\sigma$ of the vertices, define a subset
$S(\sigma)$ of the vertices as follows: for each vertex $i$, $ i \in S(\sigma)$
if and only if no neighbour $j$ of $i$ precedes $i$ in the permutation $\sigma$.
\begin{enumerate}
\item[(a)] Show that each $S(\sigma)$ is an independent set in $G$.
\item[(b)] Suggest a natural randomized algorithm to produce $\sigma$ for which
you can show that the expected cardinality of $S(\sigma)$ is
\[ \sum_{i=1}^n \frac{1}{d_i + 1}, \]
where $d_i$ is the degree of vertex $i$.
\item[(c)] Prove that $G$ has an independent set of size at least $\sum_{i=1}^n
1/(d_i + 1)$.
\end{enumerate}
\end{document}