高级算法 (Fall 2018)/Problem Set 5: Difference between revisions
imported>TCSseminar Created page with " 每道题目的解答都要有<font color="red" >完整的解题过程、分析和证明</font>。中英文不限。 == Problem 1== In the facility location problem, some c..." |
imported>TCSseminar |
||
(6 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
== Problem 2== | == Problem 2== | ||
Assume we have a set <math>V</math> containing <math>n</math> different images. We are also given two multisets <math>E^+</math> and <math>E^-</math>, each of which is a multiset of pairs of images. Each element <math>(i,j)</math> in <math>E^+</math> means some user has marked image <math>i</math> and image <math>j</math> as | Assume we have a set <math>V</math> containing <math>n</math> different images. We are also given two multisets <math>E^+</math> and <math>E^-</math>, each of which is a multiset of pairs of images. Each element <math>(i,j)</math> in <math>E^+</math> means some user has marked image <math>i</math> and image <math>j</math> as ''similar'', while each element <math>(i,j)</math> in <math>E^-</math> means some user has marked image <math>i</math> and image <math>j</math> as ''dissimilar''. Notice, these ratings were generated by different users and may be inconsistent. That is, some image pair <math>(i,j)</math> may appear in both <math>E^+</math> and <math>E^-</math>. Call elements in <math>E^+</math> as <math>+</math>edges, and elements in <math>E^-</math> as <math>-</math>edges. We wish to partition images into clusters <math>S_1,S_2,\cdots</math> so as to maximize: (number of <math>+</math>edges that lie within clusters) <math>+</math> (number of <math>-</math>edges that lie between clusters). | ||
'''(a)''' Argue that the following SDP gives an upper bound of the above objective, where <math>w^+_{(i,j)}</math> and <math>w^-_{(i,j)}</math> denote the number of times image pair <math>(i,j)</math> has appeared in <math>E^+</math> and <math>E^-</math>, respectively. | '''(a)''' Argue that the following SDP gives an upper bound of the above objective, where <math>w^+_{(i,j)}</math> and <math>w^-_{(i,j)}</math> denote the number of times image pair <math>(i,j)</math> has appeared in <math>E^+</math> and <math>E^-</math>, respectively. | ||
Line 18: | Line 18: | ||
:::<math> | :::<math> | ||
\begin{align} | \begin{align} | ||
\text{maximize} | \text{maximize}\quad & \sum_{i\in V, j\in V, i< j}w^+_{(i,j)}\cdot\langle \mathbf{x}_i,\mathbf{x}_j\rangle+w^-_{(i,j)}\cdot\left(1-\langle \mathbf{x}_i,\mathbf{x}_j\rangle\right)\\ | ||
\text{subject to} | \text{subject to} \quad& \lVert \mathbf{x}_i\rVert^2_2= 1,\qquad \forall i\in V,\\ | ||
& \langle \mathbf{x}_i,\mathbf{x}_j\rangle \ge 0,\qquad \forall i\in V,j\in V, i\ne j\\ | |||
& \mathbf{x}_i\in\mathbb{R}^n, \qquad \forall i\in V. | |||
\end{align} | \end{align} | ||
</math> | </math> | ||
Line 28: | Line 28: | ||
== Problem 3== | == Problem 3== | ||
A ''<math>k</math>-uniform hypergraph'' is an ordered pair <math>G=(V,E)</math>, where <math>V</math> denotes the set of vertices and <math>E</math> denotes the set of edges. Moreover, each edge in <math>E</math> now contains <math>k</math> distinct vertices, instead of 2. (So a 2-uniform hypergraph is just what we normally call a graph.) A hypergraph is <math>k</math>-regular if all vertices have degree <math>k</math>; that is, each vertex is contained within <math>k</math> hypergraph edges. | A ''<math>k</math>-uniform hypergraph'' is an ordered pair <math>G=(V,E)</math>, where <math>V</math> denotes the set of vertices and <math>E</math> denotes the set of edges. Moreover, each edge in <math>E</math> now contains <math>k</math> distinct vertices, instead of 2. (So a 2-uniform hypergraph is just what we normally call a graph.) A hypergraph is <math>k</math>-regular if all vertices have degree <math>k</math>; that is, each vertex is exactly contained within <math>k</math> hypergraph edges. | ||
Show that for sufficiently large <math>k</math>, the vertices of a <math>k</math>-uniform, <math>k</math>-regular hypergraph can be 2-colored so that no edge is monochromatic. What’s the smallest value of <math>k</math> you can achieve? | Show that for sufficiently large <math>k</math>, the vertices of a <math>k</math>-uniform, <math>k</math>-regular hypergraph can be 2-colored so that no edge is monochromatic. What’s the smallest value of <math>k</math> you can achieve? | ||
== Programming Assignment | == Programming Assignment== | ||
Finally, you can get your hands dirty and do some coding! You do not need to hand in solutions or source-code or anything for this programming assignment, but you should find some time to actually ''do'' this, so as to better understand the algorithmic Lovász Local Lemma. | Finally, you can get your hands dirty and do some coding! You do not need to hand in solutions or source-code or anything for this programming assignment, but you should find some time to actually ''do'' this, so as to better understand the algorithmic Lovász Local Lemma. | ||
More specifically, you will implement Moser's algorithm introduced in class for the following scenario. Consider a 9-SAT formula where each variable appears in 8 clauses. Set up a formula with 112,500 variables and 100,000 clauses in the following manner: set up 8 copies of each of the 112,500 variables (900,000 total variables), permute them, and use the ordering to assign the variables to the 100,000 clauses. (If a variable appears in a clause multiple times, try to locally correct | More specifically, you will implement Moser's algorithm introduced in class for the following scenario. Consider a 9-SAT formula where each variable appears in 8 clauses. Set up a formula with 112,500 variables and 100,000 clauses in the following manner: set up 8 copies of each of the 112,500 variables (900,000 total variables), permute them, and use the ordering to assign the variables to the 100,000 clauses. (If a variable appears in a clause multiple times, try to locally correct this by swapping one copy to another clause.) Then assign a random "sign" to each variable: with probability 1/2, use <math>\overline{x}</math> instead of <math>x</math>. This gives a formula that satisfies the condition <math>d\leq 2^{k-3}-1</math>. (Try verify this!) | ||
For each execution of your implementation, you should track how many times the local correction procedure (i.e., <math>\texttt{Fix}</math>) is required before termination. Repeat this experiment with 100 (or more) different formulas derived from the process above, and observe the distribution of the number of local corrections required. Note that you may want to take some care to make the local correction step efficient in order to have your program run effectively. | For each execution of your implementation, you should track how many times the local correction procedure (i.e., <math>\texttt{Fix}</math>) is required before termination. Repeat this experiment with 100 (or more) different formulas derived from the process above, and observe the distribution of the number of local corrections required. Note that you may want to take some care to make the local correction step efficient in order to have your program run effectively. |
Latest revision as of 11:42, 11 December 2018
每道题目的解答都要有完整的解题过程、分析和证明。中英文不限。
Problem 1
In the facility location problem, some clients may be far away from all facilities. If we require every client to be connected to at least one open facility, a big portion of the total cost is due to connecting these remote clients. This observation motivates the following variant of the facility location problem: for each client [math]\displaystyle{ j\in C }[/math] we associate a penalty [math]\displaystyle{ p_j\gt 0 }[/math], and we must pay [math]\displaystyle{ p_j }[/math] if client [math]\displaystyle{ j }[/math] is not connected to any open facility. The objective is to minimize the sum of the connection costs, facility open costs, and penalties.
(a) Give the primal integer linear program for this variant of the facility location problem, its LP-relaxation and the dual LP.
(b) Modify the 3-approximation algorithm for the facility location problem to obtain an algorithm for this variant. Describe your modified algorithm.
(c) Prove your modified algorithm is a 3-approximation algorithm for this variant.
Problem 2
Assume we have a set [math]\displaystyle{ V }[/math] containing [math]\displaystyle{ n }[/math] different images. We are also given two multisets [math]\displaystyle{ E^+ }[/math] and [math]\displaystyle{ E^- }[/math], each of which is a multiset of pairs of images. Each element [math]\displaystyle{ (i,j) }[/math] in [math]\displaystyle{ E^+ }[/math] means some user has marked image [math]\displaystyle{ i }[/math] and image [math]\displaystyle{ j }[/math] as similar, while each element [math]\displaystyle{ (i,j) }[/math] in [math]\displaystyle{ E^- }[/math] means some user has marked image [math]\displaystyle{ i }[/math] and image [math]\displaystyle{ j }[/math] as dissimilar. Notice, these ratings were generated by different users and may be inconsistent. That is, some image pair [math]\displaystyle{ (i,j) }[/math] may appear in both [math]\displaystyle{ E^+ }[/math] and [math]\displaystyle{ E^- }[/math]. Call elements in [math]\displaystyle{ E^+ }[/math] as [math]\displaystyle{ + }[/math]edges, and elements in [math]\displaystyle{ E^- }[/math] as [math]\displaystyle{ - }[/math]edges. We wish to partition images into clusters [math]\displaystyle{ S_1,S_2,\cdots }[/math] so as to maximize: (number of [math]\displaystyle{ + }[/math]edges that lie within clusters) [math]\displaystyle{ + }[/math] (number of [math]\displaystyle{ - }[/math]edges that lie between clusters).
(a) Argue that the following SDP gives an upper bound of the above objective, where [math]\displaystyle{ w^+_{(i,j)} }[/math] and [math]\displaystyle{ w^-_{(i,j)} }[/math] denote the number of times image pair [math]\displaystyle{ (i,j) }[/math] has appeared in [math]\displaystyle{ E^+ }[/math] and [math]\displaystyle{ E^- }[/math], respectively.
- [math]\displaystyle{ \begin{align} \text{maximize}\quad & \sum_{i\in V, j\in V, i\lt j}w^+_{(i,j)}\cdot\langle \mathbf{x}_i,\mathbf{x}_j\rangle+w^-_{(i,j)}\cdot\left(1-\langle \mathbf{x}_i,\mathbf{x}_j\rangle\right)\\ \text{subject to} \quad& \lVert \mathbf{x}_i\rVert^2_2= 1,\qquad \forall i\in V,\\ & \langle \mathbf{x}_i,\mathbf{x}_j\rangle \ge 0,\qquad \forall i\in V,j\in V, i\ne j\\ & \mathbf{x}_i\in\mathbb{R}^n, \qquad \forall i\in V. \end{align} }[/math]
(b) Devise a randomized algorithm that partition images into 4 clusters and in expectation achieves an objective value 0.75 times the optimal SDP value. Hint: use Goemans-Williamson style rounding but with two random hyperplanes instead of one.
Problem 3
A [math]\displaystyle{ k }[/math]-uniform hypergraph is an ordered pair [math]\displaystyle{ G=(V,E) }[/math], where [math]\displaystyle{ V }[/math] denotes the set of vertices and [math]\displaystyle{ E }[/math] denotes the set of edges. Moreover, each edge in [math]\displaystyle{ E }[/math] now contains [math]\displaystyle{ k }[/math] distinct vertices, instead of 2. (So a 2-uniform hypergraph is just what we normally call a graph.) A hypergraph is [math]\displaystyle{ k }[/math]-regular if all vertices have degree [math]\displaystyle{ k }[/math]; that is, each vertex is exactly contained within [math]\displaystyle{ k }[/math] hypergraph edges.
Show that for sufficiently large [math]\displaystyle{ k }[/math], the vertices of a [math]\displaystyle{ k }[/math]-uniform, [math]\displaystyle{ k }[/math]-regular hypergraph can be 2-colored so that no edge is monochromatic. What’s the smallest value of [math]\displaystyle{ k }[/math] you can achieve?
Programming Assignment
Finally, you can get your hands dirty and do some coding! You do not need to hand in solutions or source-code or anything for this programming assignment, but you should find some time to actually do this, so as to better understand the algorithmic Lovász Local Lemma.
More specifically, you will implement Moser's algorithm introduced in class for the following scenario. Consider a 9-SAT formula where each variable appears in 8 clauses. Set up a formula with 112,500 variables and 100,000 clauses in the following manner: set up 8 copies of each of the 112,500 variables (900,000 total variables), permute them, and use the ordering to assign the variables to the 100,000 clauses. (If a variable appears in a clause multiple times, try to locally correct this by swapping one copy to another clause.) Then assign a random "sign" to each variable: with probability 1/2, use [math]\displaystyle{ \overline{x} }[/math] instead of [math]\displaystyle{ x }[/math]. This gives a formula that satisfies the condition [math]\displaystyle{ d\leq 2^{k-3}-1 }[/math]. (Try verify this!)
For each execution of your implementation, you should track how many times the local correction procedure (i.e., [math]\displaystyle{ \texttt{Fix} }[/math]) is required before termination. Repeat this experiment with 100 (or more) different formulas derived from the process above, and observe the distribution of the number of local corrections required. Note that you may want to take some care to make the local correction step efficient in order to have your program run effectively.