Computational complexity
Warm-upHumanWhich of these is the definition of the class NP?
Which of these is the definition of the class NP?
Which of these problems are known to be in P? (Select all that apply.)
Karp's reduction from 3-SAT to INDEPENDENT SET is applied to a 3-CNF formula with clauses on variables. How many vertices does the graph have?
In the reduction from SAT to 3-SAT, a clause with literals is replaced by a chain of 3-literal clauses using fresh variables . How many 3-literal clauses does it become?
You want to prove that a new problem is NP-complete. Which is enough?
In the proof of Theorem 5 ( direction) we said: an independent set of size in contains exactly one vertex from each clause. Why?
Which of these statements are known theorems (not conjectures)? (Select all that apply.)
The Lean file proves bruteForce_correct : bruteForce φ = true ↔ Satisfiable φ and length_allAssignments : (allAssignments n).length = 2 ^ n. Which conclusion do these two theorems justify?
Implement Karp's reduction. A 3-CNF formula is a list of clauses, each a tuple of three nonzero integers ( for , for ). Number the vertices for the -th literal () of clause . Write karp_graph(formula) returning the set of edges as pairs (p, q) with p < q: the three edges inside each clause, and an edge between every two vertices whose literals are complementary.