高级算法 (Fall 2019)/Problem Set 1
- 作业电子版于2019/10/8 23:59 之前提交到邮箱 njuadvalg@163.com
- 每道题目的解答都要有完整的解题过程。中英文不限。
Problem 1
Modify the Karger's Contraction algorithm so that it works for the weighted min-cut problem. Prove that the modified algorithm returns a weighted minimum cut with probability at least [math]\displaystyle{ \frac{2}{n(n-1)} }[/math]. The weighted min-cut problem is defined as follows.
- Input: an undirected weighted graph [math]\displaystyle{ G(V, E) }[/math], where every edge [math]\displaystyle{ e \in E }[/math] is associated with a positive real weight [math]\displaystyle{ w_e }[/math];
- Output: a cut [math]\displaystyle{ C }[/math] in [math]\displaystyle{ G }[/math] such that [math]\displaystyle{ \sum_{e \in C} w_e }[/math] is minimized.
Problem 2
Let [math]\displaystyle{ G=(V,E) }[/math] be a graph, where [math]\displaystyle{ n = |V| }[/math] and [math]\displaystyle{ m = |E| }[/math]. In class, we generated a random cut [math]\displaystyle{ \{S,T\} }[/math] by sampling [math]\displaystyle{ X_v \in \{0,1\} }[/math] uniformly and independently for each [math]\displaystyle{ v \in V }[/math] and constructing [math]\displaystyle{ S = \{v \in V \mid X_v = 1 \} }[/math] and [math]\displaystyle{ T = \{v \in V \mid X_v = 0 \} }[/math]. Now, consider an alternative way to generate the random cut [math]\displaystyle{ \{S,T\} }[/math]. Suppose that [math]\displaystyle{ n }[/math] is an even number. Define a collection of subset as
- [math]\displaystyle{ \mathcal{F} = \{H \subseteq V: |H| = n /2 \} }[/math].
We sample a random subset [math]\displaystyle{ S \in \mathcal{F} }[/math] uniformly at random and construct [math]\displaystyle{ T = V \setminus S }[/math].
- Give the expected size [math]\displaystyle{ |E(S,T)| }[/math] of such random cut.
- Let [math]\displaystyle{ \mathcal{R}(\cdot) }[/math] denote such a random source that given any [math]\displaystyle{ 0\leq p\leq 1 }[/math], [math]\displaystyle{ \mathcal{R}(p) }[/math] returns an independent random sample [math]\displaystyle{ X \in \{0,1\} }[/math] such that [math]\displaystyle{ \Pr[X= 1] = p }[/math]. Give an algorithm that uses [math]\displaystyle{ \mathcal{R}(\cdot) }[/math] as a subroutine to generate random subset [math]\displaystyle{ S \in \mathcal{F} }[/math] uniformly at random. Prove the correctness of your algorithm. Analyze the number of times that the random sources is called by the algorithm.
Problem 3
Two rooted trees [math]\displaystyle{ T_1 }[/math] and [math]\displaystyle{ T_2 }[/math] are said to be isomorphic if there exists a bijection [math]\displaystyle{ \phi }[/math] that maps vertices of [math]\displaystyle{ T_1 }[/math] to those of [math]\displaystyle{ T_2 }[/math] satisfying the following condition: for each internal vertex [math]\displaystyle{ v }[/math] of [math]\displaystyle{ T_1 }[/math] with children [math]\displaystyle{ u_1, u_2, ..., u_k }[/math], the set of children of vertex [math]\displaystyle{ \phi(v) }[/math] in [math]\displaystyle{ T_2 }[/math] is precisely [math]\displaystyle{ \{\phi(u_1), \phi(u_2),...,\phi(u_k)\} }[/math], no ordering among children assumed.
Given an efficient randomized algorithm with bounded one-side error (false positive), for testing isomorphism between rooted trees with [math]\displaystyle{ n }[/math] vertices. Analyze your algorithm.
Problem 4
Design a randomized algorithm to decide if an integer sequence [math]\displaystyle{ a_1,...,a_n }[/math] is a permutation of another integer sequence [math]\displaystyle{ b_1,...,b_n }[/math]. Give upper bounds on the time complexity and the error probability.
Problem 5
Let [math]\displaystyle{ X_1,X_2,\ldots,X_n }[/math] be [math]\displaystyle{ n }[/math] random variables, where each [math]\displaystyle{ X_i \in \{0, 1\} }[/math] follows the distribution [math]\displaystyle{ \mu_i }[/math]. For each [math]\displaystyle{ 1\leq i \leq n }[/math], let [math]\displaystyle{ \rho_i = \mathbb{E}[X_i] }[/math] and assume [math]\displaystyle{ \rho_i \geq \frac{1}{2} }[/math]. Consider the problem of estimating the value of
- [math]\displaystyle{ Z = \prod_{i = 1}^n \rho_i }[/math].
For each [math]\displaystyle{ 1\leq i \leq n }[/math], the algorithm draws [math]\displaystyle{ s }[/math] random samples [math]\displaystyle{ X_i^{(1)},X_i^{(2)},\ldots,X_i^{(s)} }[/math] independently from the distribution [math]\displaystyle{ \mu_i }[/math], and computes
- [math]\displaystyle{ \widehat{\rho}_{i}=\frac{1}{s}\sum_{j=1}^s X_i^{(j)} }[/math].
Finally, the algorithm outputs the product of all [math]\displaystyle{ \widehat{Z}_{i} }[/math]:
- [math]\displaystyle{ \widehat{Z}=\prod_{i= 1}^n\widehat{\rho}_i }[/math].
Express [math]\displaystyle{ s }[/math] as a function of [math]\displaystyle{ n,\varepsilon,\delta }[/math] so that the output [math]\displaystyle{ \widehat{Z} }[/math] satisfies
- [math]\displaystyle{ \Pr\left[\mathrm{e}^{-\varepsilon}Z \leq \widehat{Z} \leq \mathrm{e}^{\varepsilon}Z\right] \geq 1- \delta }[/math].
Try to make [math]\displaystyle{ s }[/math] as small as possible.
Problem 6
In Balls-and-Bins model, we throw [math]\displaystyle{ m }[/math] balls independently and uniformly at random into [math]\displaystyle{ n }[/math] bins. We know that the maximum load is [math]\displaystyle{ \Theta\left(\frac{\log n}{\log\log n}\right) }[/math] with high probability when [math]\displaystyle{ m=\Theta(n) }[/math]. The two-choice paradigm is another way to throw [math]\displaystyle{ m }[/math] balls into [math]\displaystyle{ n }[/math] bins: each ball is thrown into the least loaded of two bins chosen independently and uniformly at random(it could be the case that the two chosen bins are exactly the same, and then the ball will be thrown into that bin), and breaks the tie arbitrarily. When [math]\displaystyle{ m=\Theta(n) }[/math], the maximum load of two-choice paradigm is known to be [math]\displaystyle{ \Theta(\log\log n) }[/math] with high probability, which is exponentially less than the maxim load when there is only one random choice. This phenomenon is called the power of two choices.
Here are the questions:
- Consider the following paradigm: we throw [math]\displaystyle{ n }[/math] balls into [math]\displaystyle{ n }[/math] bins. The first [math]\displaystyle{ \frac{n}{2} }[/math] balls are thrown into bins independently and uniformly at random. The remaining [math]\displaystyle{ \frac{n}{2} }[/math] balls are thrown into bins using the two-choice paradigm. What is the maximum load with high probability? You need to give an asymptotically tight bound (in the form of [math]\displaystyle{ \Theta(\cdot) }[/math]).
- Replace the above paradigm to the following: the first [math]\displaystyle{ \frac{n}{2} }[/math] balls are thrown into bins using the two-choice paradigm while the remaining [math]\displaystyle{ \frac{n}{2} }[/math] balls are thrown into bins independently and uniformly at random. What is the maximum load with high probability in this case? You need to give an asymptotically tight bound.
- Replace the above paradigm to the following: assume all [math]\displaystyle{ n }[/math] balls are thrown in a sequence. For every [math]\displaystyle{ 1\le i\le n }[/math], if [math]\displaystyle{ i }[/math] is odd, we throw [math]\displaystyle{ i }[/math]-th ball into bins independently and uniformly at random, otherwise, we throw it into bins using the two-choice paradigm. What is the maximum load with high probability in this case? You need to give an asymptotically tight bound.