sol9 - Massachusetts Institute of Technology Handout 20...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Massachusetts Institute of Technology Handout 20 6.854J/18.415J: Advanced Algorithms Monday, November 23, 2009 David Karger Problem Set 9 Solutions Monday, November 23, 2009 Collaboration policy: collaboration is strongly encouraged . However, remember that 1. You must write up your own solutions, independently. 2. You must record the name of every collaborator. 3. You must actually participate in solving all the problems. This is difficult in very large groups, so you should keep your collaboration groups limited to 3 or 4 people in a given week. 4. No bibles. This includes solutions posted to problems in previous years. Problem 1. (a) MAX-SAT is fixed-parameter tractable with respect to treewidth in the same way that SAT is. Use the same elimination ordering of variables and combine truth tables. Instead of keeping track of whether a particular assignment results in a satisfying assignment, keep track of how many clauses can be made true. As truth tables are combined, add these values appropriately. In the final truth table, we simply search for the entry with the most clauses satisfied. As with SAT, we construct a truth table with at most k · 2 k entries per vertex eliminated, and since there are n vertices, this yields a total running time of O ( nk · 2 k ). (b) There are a few possible answers. First, note that we can represent the vertex cover as a 2-CNF formula. Each ver- tex corresponds to a variable, and each edge in the graph corresponds to a clause containing exactly its two endpoints. Assigning a vertex to true corresponds to putting it into the vertex cover. The problem is now to find a satisfying as- signment while minimizing the number of variables assigned to true . This can again be done using the elimination ordering and the combination of truth tables. This time, for every assignment in a truth table, we have to keep track of the minimum number of variables that have to be set to true for the clause to be satisfiable, using ∞ to denote unsatisfiability. At the end, we find the assignment that involves the least number of variables set to true while still making the CNF formula satisfiable. The runtime is the same as before. You can also solve this problem by reducing it to MAX-SAT, where in addition to the clauses for each edge, there is a one variable clause of ¬ x for every x ∈ V . Here, the problem will be to always satisfy all of the edge clauses while maximizing the number of variables not set to true. To ensure that all of the 2 Handout 20: Problem Set 9 Solutions edge clauses are satisfied, we make an edge clause count as two clauses each when counting the clauses satisfied. Suppose the optimal solution had an edge clause that was not satisfied. That would mean its two endpoints were both set to false. Setting one of them to true will make the edge clause (of weight 2) true and will make the variable clause false, for a net increase of 1 satisfied clause....
View Full Document

This note was uploaded on 11/24/2009 for the course CS 6.854/18.4 taught by Professor Davidkarger during the Fall '09 term at MIT.

Page1 / 7

sol9 - Massachusetts Institute of Technology Handout 20...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online