随机算法 (Spring 2013)/Conditional Probability and 随机算法 (Spring 2013)/Problem Set 1: Difference between pages

From TCS Wiki
(Difference between pages)
Jump to navigation Jump to search
imported>Etone
No edit summary
 
imported>Etone
 
Line 1: Line 1:
<font color=red size=3> This part of the lecture note is still under editting. This notice will be removed once the lecture note has been fully updated.</font>
==Problem 1 ==
* (Due to von Neumann) Suppose that you are given a coin for which the probability of HEADS, say <math>p</math>, is ''unknown''. How can you use this coin to generate unbiased (i.e., <math>\Pr[\mathrm{HEADS}]=\Pr[\mathrm{TAILS}]=1/2</math>) coin-flips? Give a scheme for which the expected number of flips of the biased coin for extracting one unbiased coin-flip is no more than <math>\frac{1}{p(1-p)}</math>.


= Conditional Probability =
* (Due to Knuth and Yao) Supposed you are provided with a source of unbiased random bits. Explain how you will use this to generate uniform random samples from the set <math>[n]=\{0,1,\ldots,n-1\}</math>. Determine the expected number of bits required by your sampling algorithm. What is the ''worst-case'' number of bits required by your sampling algorithm (where the worst-case is taken over all random choices of unbiased random bits)? Consider the case when <math>n</math> is a power of 2, as well as the case when it is not.
In probability theory, the word "condition" is a verb. "Conditioning on the event ..." means that it is assumed that the event occurs.  


{{Theorem
== Problem 2 ==
|Definition (conditional probability)|
We play the following game:  
:The '''conditional probability''' that event <math>\mathcal{E}_1</math> occurs given that event <math>\mathcal{E}_2</math> occurs is
::<math>
\Pr[\mathcal{E}_1\mid \mathcal{E}_2]=\frac{\Pr[\mathcal{E}_1\wedge \mathcal{E}_2]}{\Pr[\mathcal{E}_2]}.
</math>
}}
 
The conditional probability is well-defined only if <math>\Pr[\mathcal{E}_2]\neq0</math>.
 
For independent events <math>\mathcal{E}_1</math> and <math>\mathcal{E}_2</math>, it holds that
:<math>
\Pr[\mathcal{E}_1\mid \mathcal{E}_2]=\frac{\Pr[\mathcal{E}_1\wedge \mathcal{E}_2]}{\Pr[\mathcal{E}_2]}
=\frac{\Pr[\mathcal{E}_1]\cdot\Pr[\mathcal{E}_2]}{\Pr[\mathcal{E}_2]}
=\Pr[\mathcal{E}_1].
</math>
It supports our intuition that for two independent events, whether one of them occurs will not affect the chance of the other.
 
== Law of total probability ==
The following fact is known as the law of total probability. It computes the probability by averaging over all possible cases.
{{Theorem
|Theorem (law of total probability)|
:Let <math>\mathcal{E}_1,\mathcal{E}_2,\ldots,\mathcal{E}_n</math> be mutually disjoint events, and <math>\bigvee_{i=1}^n\mathcal{E}_i=\Omega</math> is the sample space.
:Then for any event <math>\mathcal{E}</math>,
::<math>
\Pr[\mathcal{E}]=\sum_{i=1}^n\Pr[\mathcal{E}\mid\mathcal{E}_i]\cdot\Pr[\mathcal{E}_i].
</math>
}}
{{Proof| Since <math>\mathcal{E}_1,\mathcal{E}_2,\ldots,\mathcal{E}_n</math> are mutually disjoint and <math>\bigvee_{i=1}^n\mathcal{E}_i=\Omega</math>, events <math>\mathcal{E}\wedge\mathcal{E}_1,\mathcal{E}\wedge\mathcal{E}_2,\ldots,\mathcal{E}\wedge\mathcal{E}_n</math> are also mutually disjoint, and <math>\mathcal{E}=\bigvee_{i=1}^n\left(\mathcal{E}\wedge\mathcal{E}_i\right)</math>. Then
:<math>
\Pr[\mathcal{E}]=\sum_{i=1}^n\Pr[\mathcal{E}\wedge\mathcal{E}_i],
</math>
which according to the definition of conditional probability, is <math>\sum_{i=1}^n\Pr[\mathcal{E}\mid\mathcal{E}_i]\cdot\Pr[\mathcal{E}_i]</math>.
}}
 
The law of total probability provides us a standard tool for breaking a probability into sub-cases. Sometimes, it helps the analysis.
 
== A Chain of Conditioning ==
By the definition of conditional probability, <math>\Pr[A\mid B]=\frac{\Pr[A\wedge B]}{\Pr[B]}</math>. Thus, <math>\Pr[A\wedge B] =\Pr[B]\cdot\Pr[A\mid B]</math>. This hints us that we can compute the probability of the AND of events by conditional probabilities. Formally, we have the following theorem:
{{Theorem|Theorem|
:Let <math>\mathcal{E}_1, \mathcal{E}_2, \ldots, \mathcal{E}_n</math>  be any <math>n</math> events. Then
::<math>\begin{align}
\Pr\left[\bigwedge_{i=1}^n\mathcal{E}_i\right]
&=
\prod_{k=1}^n\Pr\left[\mathcal{E}_k \mid \bigwedge_{i<k}\mathcal{E}_i\right].
\end{align}</math>
}}
{{Proof|It holds that <math>\Pr[A\wedge B] =\Pr[B]\cdot\Pr[A\mid B]</math>. Thus, let <math>A=\mathcal{E}_n</math> and <math>B=\mathcal{E}_1\wedge\mathcal{E}_2\wedge\cdots\wedge\mathcal{E}_{n-1}</math>, then
:<math>\begin{align}
\Pr[\mathcal{E}_1\wedge\mathcal{E}_2\wedge\cdots\wedge\mathcal{E}_n]
&=
\Pr[\mathcal{E}_1\wedge\mathcal{E}_2\wedge\cdots\wedge\mathcal{E}_{n-1}]\cdot\Pr\left[\mathcal{E}_n\mid \bigwedge_{i<n}\mathcal{E}_i\right].
\end{align}
</math>
Recursively applying this equation to <math>\Pr[\mathcal{E}_1\wedge\mathcal{E}_2\wedge\cdots\wedge\mathcal{E}_{n-1}]</math> until there is only <math>\mathcal{E}_1</math> left, the theorem is proved.
}}
 
=Polynomial Identity Testing (PIT)=
Consider the following problem of '''Polynomial Identity Testing (PIT)''':
* '''Input:''' two <math>n</math>-variate polynomials <math>P_1, P_2\in\mathbb{F}[x_1,x_2,\ldots,x_n]</math> of degree <math>d</math>.
* '''Output:''' "yes" if <math>P_1\equiv P_2</math>, and "no" if otherwise.
The <math>\mathbb{F}[x_1,x_2,\ldots,x_n]</math> is the [http://en.wikipedia.org/wiki/Polynomial_ring ring of multi-variate polynomials] over field <math>\mathbb{F}</math>.
 
Alternatively, we can consider the following equivalent problem:
* '''Input:''' a polynomial <math>P\in\mathbb{F}[x_1,x_2,\ldots,x_n]</math> of degree <math>d</math>.
* '''Output:''' "yes" if <math>P\equiv 0</math>, and "no" if otherwise.
 
Obviously, if <math>P</math> is written explicitly, the question is trivially answered in linear time just by comparing their coefficients. But in practice they are usually given in very compact form (e.g., as determinants of matrices), so that we can evaluate them efficiently, but expanding them out and looking at their coefficients is out of the question.
 
{{Theorem|Example|
Consider the polynomial
:<math>
P(x_1,\ldots,x_n)=\prod_{\overset{i<j}{i,j\neq 1}}(x_i-x_j)-\prod_{\overset{i<j}{i,j\neq 2}}(x_i-x_j)+\prod_{\overset{i<j}{i,j\neq 3}}(x_i-x_j)-\cdots+(-1)^{n-1}\prod_{\overset{i<j}{i,j\neq n}}(x_i-x_j)
</math>
Show that evaluating <math>P</math> at any given point can be done efficiently, but that expanding out <math>P</math>
to find all its coefficients is computationally infeasible even for moderate values of <math>n</math>.
}}
 
== Schwartz-Zippel Theorem==
Here is a very simple randomized algorithm, due to Schwartz and Zippel. Testing <math>P_1\equiv P_2</math>
is equivalent to testing <math>P\equiv 0</math>, where <math>P = P_1 - P_2</math>.
 
{{Theorem|Algorithm (Schwartz-Zippel)|
*pick <math>r_1, \ldots , r_n</math> independently and uniformly at random from a set <math>S</math>;
*if <math>P_1(r_1, \ldots , r_n) = P_2(r_1, \ldots , r_n)</math> then return “yes” else return “no”;
}}
 
This algorithm requires only the evaluation of <math>P</math> at a single point. And if <math>P\equiv 0</math> it is always correct.
 
In the Theorem below, we’ll see that if <math>P\neq 0</math> then the algorithm is incorrect with probability
at most <math>\frac{d}{|S|}</math>, where <math>d</math> is the maximum degree of the polynomial <math>P</math>.
 
{{Theorem|Theorem (Schwartz-Zippel)|
: Let <math>Q(x_1,\ldots,x_n)</math> be a multivariate polynomial of degree <math>d</math> defined over a field <math>\mathbb{F}</math>. Fix any finite set <math>S\subset\mathbb{F}</math>, and let <math>r_1,\ldots,r_n</math> be chosen independently and uniformly at random from <math>S</math>. Then
::<math>\Pr[Q(r_1,\ldots,r_n)=0\mid Q\not\equiv 0]\le\frac{d}{|S|}.</math>
}}
{{Proof| The theorem holds if <math>Q</math> is a single-variate polynomial, because a single-variate polynomial <math>Q</math> of degree <math>d</math> has at most <math>d</math> roots, i.e. there are at most <math>d</math> many choices of <math>r</math> having <math>Q(r)=0</math>, so the theorem follows immediately.
 
For multi-variate <math>Q</math>, we prove by induction on the number of variables <math>n</math>.
 
Write <math>Q(x_1,\ldots,x_n)</math> as
:<math>
Q(x_1,\ldots,x_n) = \sum_{i=0}^kx_n^kQ_i(x_1,\ldots,x_{n-1})
</math>
where <math>k</math> is the largest exponent of <math>x_n</math> in <math>Q(x_1,\ldots,x_n)</math>. So <math>Q_k(x_1,\ldots,x_{n-1}) \not\equiv 0</math> by our definition of <math>k</math>, and its degree is at most <math>d-k</math>.
 
Thus by the induction hypothesis we have that <math>\Pr[Q_k(r_1,\ldots,r_{n-1})=0]\le\frac{d-k}{|S|}</math>.
 
Conditioning on the event <math>Q_k(r_1,\ldots,r_{n-1})\neq 0</math>, the single-variate polynomial <math>Q'(x_n)=Q(r_1,\ldots,r_{n-1}, x_n)=\sum_{i=0}^kx_n^kQ_i(r_1,\ldots,r_{n-1})</math> has degree <math>k</math> and <math>Q'(x_n)\not\equiv 0</math>, thus
:<math>
\begin{align}
&\quad\,\Pr[Q(r_1,\ldots,r_{n})=0\mid Q_k(r_1,\ldots,r_{n-1})\neq 0]\\
&=
\Pr[Q'(r_{n})=0\mid Q_k(r_1,\ldots,r_{n-1})\neq 0]\\
&\le
\frac{k}{|S|}
\end{align}
</math>.
 
Therefore, due to the law of total probability,
:<math>
\begin{align}
&\quad\,\Pr[Q(r_1,\ldots,r_{n})=0]\\
&=
\Pr[Q(r_1,\ldots,r_{n})=0\mid Q_k(r_1,\ldots,r_{n-1})\neq 0]\Pr[Q_k(r_1,\ldots,r_{n-1})\neq 0]\\
&\quad\,\,+\Pr[Q(r_1,\ldots,r_{n})=0\mid Q_k(r_1,\ldots,r_{n-1})= 0]\Pr[Q_k(r_1,\ldots,r_{n-1})= 0]\\
&\le
\Pr[Q(r_1,\ldots,r_{n})=0\mid Q_k(r_1,\ldots,r_{n-1})\neq 0]+\Pr[Q_k(r_1,\ldots,r_{n-1})= 0]\\
&\le
\frac{k}{|S|}+\frac{d-k}{|S|}\\
&=\frac{d}{|S|}.
\end{align}
</math>
 
}}
 
== Bipartite Perfect Matching==
 
= Min-Cut in a Graph =
Let <math>G(V, E)</math> be a graph. Suppose that we want to partition the vertex set <math>V</math> into two parts <math>S</math> and <math>T</math> such that the number of ''crossing edges'', edges with one endpoint in each part, is as small as possible. This can be described as the following problem: the min-cut problem.
 
For a connected graph <math>G(V, E)</math>, a '''cut''' is a set <math>C\subseteq E</math> of edges, removal of which causes <math>G</math> becomes disconnected. The min-cut problem is to find the cut with minimum cardinality. A canonical deterministic algorithm for this problem is through the [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem max-flow min-cut theorem]. A global minimum cut is the minimum <math>s</math>-<math>t</math> min-cut, which is equal to the minimum <math>s</math>-<math>t</math> max-flow.
 
Do we have to rely on the "advanced" tools like flows? The answer is "no", with a little help of randomness.
 
== Karger's Min-Cut Algorithm ==
We will introduce an extremely simple algorithm discovered by [http://people.csail.mit.edu/karger/ David Karger]. The algorithm works on multigraphs, graphs allowing multiple edges between vertices.
 
We define an operation on multigraphs called ''contraction'':
For a multigraph <math>G(V, E)</math>, for any edge <math>uv\in E</math>, let <math>contract(G,uv)</math> be a new multigraph constructed as follows: <math>u</math> and <math>v</math> in <math>V</math> are replaced by a singe new vertex whose neighbors are all the old neighbors of <math>u</math> and <math>v</math>. In other words, <math>u</math> and <math>v</math> are merged into one vertex. The old edges between <math>u</math> and <math>v</math> are deleted.
 
Karger's min-cut algorithm is described as follows:
 
'''MinCut(multigraph <math>G(V, E)</math>)'''
* while <math>|V|>2</math> do
** choose an edge <math>uv\in E</math> uniformly at random;
** <math>G=contract(G,uv)</math>;
*return the edges between the only two vertices in <math>V</math>;


----
Start with <math>n</math> people, each with 2 hands. None of these hands hold each other.  At each round, uniformly pick 2 free hands and let them hold together. Repeat this until no free hands left.
A better way to understand Karger's min-cut algorithm is to describe it as randomly merging sets of vertices. Initially, each vertex <math>v\in V</math> corresponds to a singleton set <math>\{v\}</math>.  At each step, (1) a crossing edge (edge whose endpoints are in different sets) is chosen uniformly at random from all crossing edges; and (2) the two sets connected by the chosen crossing-edge are merged to one set. Repeat this process until there are only two sets. The crossing edges between the two sets are returned.
----


== Analysis ==
* What is the expected number of cycles made by people holding hands with each other (one person with left hand holding right hand is also counted as a cycle), when the game ends?
For a multigraph <math>G(V, E)</math>, fixed a minimum cut <math>C</math> (there might be more than one minimum cuts), we analyze the probability that <math>C</math> is returned by the MinCut algorithm. <math>C</math> is returned by MinCut if and only if no edge in <math>C</math> is contracted during the execution of MinCut. We will bound this probability
<math>\Pr[\mbox{no edge in }C\mbox{ is contracted}]</math>.
 
{{Theorem
|Lemma 1|
:Let <math>G(V, E)</math> be a multigraph with <math>n</math> vertices, if the size of the minimum cut of <math>G</math> is <math>k</math>, then <math>|E|\ge nk/2</math>.
}}
{{Proof|
:It holds that every vertex has at least <math>k</math> neighbors, because if there exists <math>v</math> with <math><k</math> neighbors, then the <math><k</math> edges adjacent to <math>v</math> disconnect <math>v</math> from the rest of <math>G</math>, forming a cut of size smaller than <math>k</math>. Therefore <math>|E|\ge kn/2</math>. 
}}


{{Theorem
('''Hint''': Consider how to count the number of cycles using indicator random variables.)
|Lemma 2|
:Let <math>G(V, E)</math> be a multigraph with <math>n</math> vertices, and <math>C</math> a minimum cut of <math>G</math>.  If <math>e\not\in C</math>, then <math>C</math> is still a minimum cut of <math>contract(G, e)</math>.
}}
{{Proof|
:We first show that no edge in <math>C</math> is lost during the contraction. Due to the definition of contraction, the only edges removed from <math>G</math> in a contraction <math>contract(G, e)</math> are the parallel-edges sharing both endpoints with <math>e</math>. Since <math>e\not\in C</math>, none of these edges can be in <math>C</math>, or otherwise <math>C</math> cannot be a minimum cut of <math>G</math>. Thus every edge in <math>C</math> remains in <math>G</math>.


:It is then obvious to see that <math>C</math> is a cut of <math>contract(G, e)</math>. All paths in a contracted graph can be revived in the original multigraph by inserting the contracted edges into the path, thus a connected <math>contract(G, e)-C</math> would imply a connected <math>G-C</math>, which contradicts that <math>C</math> is a cut in <math>G</math>.
== Problem 3==
For any <math>\alpha\ge 1</math>, a cut <math>C</math> in an undirected graph <math>G(V,E)</math>is called an <math>\alpha</math>-min-cut if <math>|C|\le\alpha|C^*|</math> where <math>C^*</math> is a min-cut in <math>G</math>.  


:Notice that a cut in a contracted graph must be a cut in the original graph. This can be easily verified by seeing contraction as taking the union of two sets of vertices. Therefore a contraction can never reduce the size of minimum cuts of a multigraph. A minimum cut <math>C</math> must still be a minimum cut in the contracted graph as long as it is still a cut.
Give an analysis to lower bound the probability that a single iteration of Karger's Random Contraction algorithm returns an <math>\alpha</math>-min-cut in a graph <math>G(V,E)</math> of <math>n</math> vertices and <math>m</math> edges.


:Concluding the above arguments, we have that <math>C</math> is a minimum cut of <math>contract(G, e)</math> for any <math>e\not\in C</math>.
== Problem 4 ==
{{Theorem|Freivalds' Theorem|
:Let <math>A</math> be an <math>n\times n</math> matrix such that <math>A\neq\boldsymbol{0}</math>. For a uniformly random <math>r \in\{0, 1\}^n</math>,
::<math>\Pr[Ar = \boldsymbol{0}]\le \frac{1}{2}</math>.
}}
}}


Let <math>G(V, E)</math> be a multigraph, and <math>C</math> a minimum cut of <math>G</math>.
{{Theorem|Schwartz-Zippel Theorem|
 
: Let <math>f\in\mathbb{F}[x_1,x_2,\ldots,x_n]</math> be a multivariate polynomial of degree <math>d</math> over a field <math>\mathbb{F}</math> such that <math>f\not\equiv 0</math>. Fix any finite set <math>S\subset\mathbb{F}</math>, and let <math>r_1,r_2\ldots,r_n</math> be chosen uniformly and independently at random from <math>S</math>. Then
Initially <math>|V|=n</math>.
::<math>\Pr[f(r_1,r_2,\ldots,r_n)=0]\le\frac{d}{|S|}.</math>
After <math>(i-1)</math> contractions, denote the current multigraph as <math>G_i(V_i, E_i)</math>. Suppose that no edge in <math>C</math> has been chosen to be contracted yet. According to Lemma 2, <math>C</math> must be a minimum cut of the <math>G_i</math>. Then due to Lemma 1, the current edge number is <math>|E_i|\ge |V_i||C|/2</math>. Uniformly choosing an edge <math>e\in E_i</math> to contract, the probability that the <math>i</math>th contraction contracts an edge in <math>C</math> is given by:
 
:<math>\begin{align}\Pr_{e\in E_i}[e\in C] &= \frac{|C|}{|E_i|}
&\le |C|\cdot\frac{2}{|V_i||C|}
&= \frac{2}{|V_i|}.\end{align}</math>
 
Therefore, assuming that <math>C</math> is intact after <math>(i-1)</math> contractions, the probability that <math>C</math> survives the <math>i</math>th contraction is at least <math>1-2/|V_i|</math>. Note that <math>|V_i|=n-i+1</math>, because each contraction decrease the vertex number by 1.
 
The probability that no edge in the minimum cut <math>C</math> is ever contracted is:
 
:<math>\begin{align}
&\quad\,\prod_{i=1}^{n-2}\Pr[\,C\mbox{ survives all }(n-2)\mbox{ contractions }]\\
&=
\prod_{i=1}^{n-2}\Pr[\,C\mbox{ survives the }i\mbox{-th contraction}\mid C\mbox{ survives the first }(i-1)\mbox{-th contractions}]\\
&=
\prod_{i=1}^{n-2}\left(1-\frac{2}{|V_i|}\right) \\
&=
\prod_{i=1}^{n-2}\left(1-\frac{2}{n-i+1}\right)\\
&=
\prod_{k=3}^{n}\frac{k-2}{k}\\
&= \frac{2}{n(n-1)}.
\end{align}</math>
 
Therefore, we prove the following theorem,
 
{{Theorem
|Theorem|
: For any multigraph with <math>n</math> vertices, the MinCut algorithm returns a minimum cut with probability at least <math>\frac{2}{n(n-1)}</math>.
}}
}}


Run MinCut independently for <math>n(n-1)/2</math> times and return the smallest cut returned. The probability that this the minimum cut is found is:
Prove that the Freivalds Theorem is a special case of the Schwartz-Zippel Theorem.


:<math>\begin{align}
==Problem 5==
1-\Pr[\mbox{failed every time}] &= 1-\Pr[\mbox{MinCut fails}]^{n(n-1)/2} \\
Consider the following two schemes of throwing <math>m</math> balls into <math>n</math> bins:
&\ge 1- \left(1-\frac{2}{n(n-1)}\right)^{n(n-1)/2} \\
*BiB (balls-into-bins):
&\ge 1-\frac{1}{e}.
for i=1 to m do
\end{align}</math>
  choose r uniformly and independently from [n];
  put ball-i into bin-r;
When <math>m=\Theta(n)</math>, the maximum load is <math>\Theta\left(\frac{\ln n}{\ln\ln n}\right)</math> with high probability.
* P2C (power of two choices):
for i=1 to m do
  choose r1 and r2 uniformly and independently from [n];
  if bin-r1 has fewer balls than bin-r2
      put ball-i into bin-r1;
  else
      put ball-i into bin-r2;
When <math>m=\Theta(n)</math>, the maximum load is <math>\Theta\left(\ln \ln n\right)</math> with high probability.


A constant probability!
Questions: Assume <math>n</math> balls are thrown to <math>n</math> bins on after another.
# If we throw the first <math>\frac{n}{2}</math> balls as BiB and then throw the rest balls as P2C, what is the asymptotic maximum load with high probability?
# If we throw each even numbered ball as BiB and each odd numbered ball as P2C. What is the asymptotic maximum load with high probability?

Revision as of 15:21, 11 March 2013

Problem 1

  • (Due to von Neumann) Suppose that you are given a coin for which the probability of HEADS, say [math]\displaystyle{ p }[/math], is unknown. How can you use this coin to generate unbiased (i.e., [math]\displaystyle{ \Pr[\mathrm{HEADS}]=\Pr[\mathrm{TAILS}]=1/2 }[/math]) coin-flips? Give a scheme for which the expected number of flips of the biased coin for extracting one unbiased coin-flip is no more than [math]\displaystyle{ \frac{1}{p(1-p)} }[/math].
  • (Due to Knuth and Yao) Supposed you are provided with a source of unbiased random bits. Explain how you will use this to generate uniform random samples from the set [math]\displaystyle{ [n]=\{0,1,\ldots,n-1\} }[/math]. Determine the expected number of bits required by your sampling algorithm. What is the worst-case number of bits required by your sampling algorithm (where the worst-case is taken over all random choices of unbiased random bits)? Consider the case when [math]\displaystyle{ n }[/math] is a power of 2, as well as the case when it is not.

Problem 2

We play the following game:

Start with [math]\displaystyle{ n }[/math] people, each with 2 hands. None of these hands hold each other. At each round, uniformly pick 2 free hands and let them hold together. Repeat this until no free hands left.

  • What is the expected number of cycles made by people holding hands with each other (one person with left hand holding right hand is also counted as a cycle), when the game ends?

(Hint: Consider how to count the number of cycles using indicator random variables.)

Problem 3

For any [math]\displaystyle{ \alpha\ge 1 }[/math], a cut [math]\displaystyle{ C }[/math] in an undirected graph [math]\displaystyle{ G(V,E) }[/math]is called an [math]\displaystyle{ \alpha }[/math]-min-cut if [math]\displaystyle{ |C|\le\alpha|C^*| }[/math] where [math]\displaystyle{ C^* }[/math] is a min-cut in [math]\displaystyle{ G }[/math].

Give an analysis to lower bound the probability that a single iteration of Karger's Random Contraction algorithm returns an [math]\displaystyle{ \alpha }[/math]-min-cut in a graph [math]\displaystyle{ G(V,E) }[/math] of [math]\displaystyle{ n }[/math] vertices and [math]\displaystyle{ m }[/math] edges.

Problem 4

Freivalds' Theorem
Let [math]\displaystyle{ A }[/math] be an [math]\displaystyle{ n\times n }[/math] matrix such that [math]\displaystyle{ A\neq\boldsymbol{0} }[/math]. For a uniformly random [math]\displaystyle{ r \in\{0, 1\}^n }[/math],
[math]\displaystyle{ \Pr[Ar = \boldsymbol{0}]\le \frac{1}{2} }[/math].
Schwartz-Zippel Theorem
Let [math]\displaystyle{ f\in\mathbb{F}[x_1,x_2,\ldots,x_n] }[/math] be a multivariate polynomial of degree [math]\displaystyle{ d }[/math] over a field [math]\displaystyle{ \mathbb{F} }[/math] such that [math]\displaystyle{ f\not\equiv 0 }[/math]. Fix any finite set [math]\displaystyle{ S\subset\mathbb{F} }[/math], and let [math]\displaystyle{ r_1,r_2\ldots,r_n }[/math] be chosen uniformly and independently at random from [math]\displaystyle{ S }[/math]. Then
[math]\displaystyle{ \Pr[f(r_1,r_2,\ldots,r_n)=0]\le\frac{d}{|S|}. }[/math]

Prove that the Freivalds Theorem is a special case of the Schwartz-Zippel Theorem.

Problem 5

Consider the following two schemes of throwing [math]\displaystyle{ m }[/math] balls into [math]\displaystyle{ n }[/math] bins:

  • BiB (balls-into-bins):
for i=1 to m do
  choose r uniformly and independently from [n];
  put ball-i into bin-r;

When [math]\displaystyle{ m=\Theta(n) }[/math], the maximum load is [math]\displaystyle{ \Theta\left(\frac{\ln n}{\ln\ln n}\right) }[/math] with high probability.

  • P2C (power of two choices):
for i=1 to m do
  choose r1 and r2 uniformly and independently from [n];
  if bin-r1 has fewer balls than bin-r2
      put ball-i into bin-r1;
  else
      put ball-i into bin-r2;

When [math]\displaystyle{ m=\Theta(n) }[/math], the maximum load is [math]\displaystyle{ \Theta\left(\ln \ln n\right) }[/math] with high probability.

Questions: Assume [math]\displaystyle{ n }[/math] balls are thrown to [math]\displaystyle{ n }[/math] bins on after another.

  1. If we throw the first [math]\displaystyle{ \frac{n}{2} }[/math] balls as BiB and then throw the rest balls as P2C, what is the asymptotic maximum load with high probability?
  2. If we throw each even numbered ball as BiB and each odd numbered ball as P2C. What is the asymptotic maximum load with high probability?