Neeldhara
  • About
  • Research
    • Overview
    • People
    • Publications
    • Surveys
  • Teaching
    • Courses
    • Materials
  • Lists
    • Puzzles
    • Bookmarks
  • Exposition
    • Talks
    • Videos
  • Events
  • Blog

CS614. Advanced Algorithms. L07 Quiz.

CS614. Advanced Algorithms.

L07 Solutions

Back to the course page

Acknowledgement

The questions in this problem set are adapted from the textbook on Parameterized Algorithms by Marek Cygan, Fedor V. Fomin, Łukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michał Pilipczuk, and Saket Saurabh.

Problem 1. Cluster Vertex Deletion

In the Cluster Vertex Deletion problem, we want to know if a simple undirected graph GGG has a subset SSS of at most kkk vertices such that G∖SG \setminus SG∖S is a disjoint union of cliques.

Problem 1.1 A Branching Algorithm

Design a 3k⋅nO(1)3^k \cdot n^{\mathcal{O}(1)}3k⋅nO(1) algorithm for Cluster Vertex Deletion.

Problem 1.2 Decreasing the threshold

Design a 333-approximation algorithm for Cluster Vertex Deletion.

Solution

As discussed in class, the induced path on three vertices is a forbidden substructure for a cluster graph. We state and prove this fact here for completeness.


Claim. A graph GGG is a disjoint union of cliques if and only if it does not contain a path on three vertices as an induced subgraph.

Proof (sketch). Suppose GGG is a disjoint union of cliques, and for the sake of contradiction, suppose it has an induced path on vertices x,y,zx,y,zx,y,z with the edges being between xxx and yyy, and yyy and zzz. Note that since this is an induced path, there is no edge between xxx and zzz. Since every component of GGG is a clique, we know that xxx and zzz must be in different components. However, there is a path from xxx to zzz via yyy, which is a contradiction.

Suppose GGG does not contain a path on three vertices as an induced subgraph. Again, for the sake of contradiction, suppose GGG has a connected component that is not a clique. Let (u,v)(u,v)(u,v) be a non-edge in this component. Let PPP be a shortest path between uuu and vvv consisting of the vertices:

P:={u,w1,…,wt,…v}.P := \{u, w_1, \ldots, w_t, \ldots v\}.P:={u,w1​,…,wt​,…v}.

Notice that t⩾1t \geqslant 1t⩾1, otherwise (u,v)(u,v)(u,v) is an edge. Further, notice that u,w1,w2u, w_1, w_2u,w1​,w2​ forms an induced path of length three1 (if (u,w2)(u,w_2)(u,w2​) was an edge then we have a shorter path by omitting w1w_1w1​, contradicting our assumption that PPP is a shortest path between uuu and vvv). This contradicts our assumption.


Based on this, we have the following algorithm:

CVD(G,k):
    If k <= 0 and G has an induced P3 - RETURN NO
    If k >= 0 and G is a cluster graph - RETURN YES

    Let a,b,c be vertices such that ab and bc are edges and ac is not an edge.

    Return (CVD(G-a,k-1) OR CVD(G-b,k-1) OR (G-c,k-1))

One can obtain a 333-approximation by enumerating a maximal collection of disjoint induced P3P_3P3​’s and including all vertices from the collection in the solution. If the collection has size ttt, we know that any solution (and in particular, the optimal one) must contain at least ttt vertices and the output has at most 3t3t3t vertices. The algorithm is summarized below:

CVD-3-Approx(G):
    Init S = emptyset

    While there is an induced P3 = (x,y,z) in G:
        include (x,y,z) in S
        G = G - (x,y,z)

    return S
Problem 2. Don’t Satisfy Too Much!

In the MIN-2-SAT problem, we are given a 2-CNF formula ϕ\phiϕ and an integer kkk, and the objective is to decide whether there exists an assignment for ϕ\phiϕ that satisfies at most kkk clauses.

Show that MIN-2-SAT can be solved in time 2knO(1)2^k n^{\mathcal{O}(1)}2knO(1).

Solution

If there is a variable xxx that occurs only positively in ϕ\phiϕ, we claim that there exists an optimal assignment that sets it to 000. Indeed, let τ\tauτ be an assignment that sets xxx to 111. Let τx\tau_xτx​ be the assignment obtained from τ\tauτ by flipping the value of xxx from 111 to 000. Note that the clauses that do not contain the variable xxx are either satisfied or falsified in both τ\tauτ and τx\tau_xτx​. For clauses that contain xxx, it is possible that they are satisfied by τ\tauτ but not by τx\tau_xτx​, but not vice versa. Therefore, τx\tau_xτx​ falsifies at least as many clauses as τ\tauτ, and we are done.

Based on this, our algorithm proceeds as follows:

if there is a variable x that occurs only as a positive literal:
    set x to 0
if there is a variable x that occurs only as a negated literal:
    set x to 1

The argument for the negated occurrences is symmetric to the one we have for positive literals.

Once we perform this preprocessing, assuming that have clauses remaining, we have the following guarantee:

Every variable has at least one positive and one negated occurrence.

Now we can branch exhuastively on the settings of variables; with the promise that either setting of the variable reduces our budget by at least one. The overall algorithm is summarized in the following pseudocode:

MINSAT(phi,k):
    if there is a variable x that occurs only as a positive literal:
        set x to 0
    if there is a variable x that occurs only as a negated literal:
        set x to 1

    if phi is empty:
        return YES
    if phi is not empty and k <= 0:
        return NO

    Let x be any variable that occurs in phi.
    return MINSAT(phi|[x = TRUE],k-1) OR MINSAT(phi|[x = FALSE],k-1)

Footnotes

  1. Note that it is possible that w2=vw_2 = vw2​=v.↩︎


© 2022 • Neeldhara Misra • Credits •

 

Corrections? Please leave a comment here or a PR in this repository, thanks!

I’d rather be a failure at something I love than a success at something I hate.

George Burns

You live and you learn — at any rate, you live.

Douglas Adams

A problem worthy of attack proves its worth by fighting back.

Paul Erdos

×