Exercises Chapter 7 - Time Complexity
Michael Sipser - Third Edition
P vs NP
1. Show that P is closed under union.
2. A triangle in an undirected graph is a 3-clique. Show that TRIANGLE ∈ P, where
TRIANGLE = { ⟨G⟩ | G contains a triangle }. 2
-------------------------------------------------------------
Set Cover
3. (a) Give an example of a set of elements U and a series of 5 subsets of U such
that there exists a minimum set cover of size 2.
(b) An instance of Vertex Cover can be reduced to an instance of Set Cover, i.e.
Vertex Cover ≤P Set Cover. Construct a sample graph G, identify the minumum
vertex cover for G, and then construct the corresponding instance of Set Cover for
the graph G.
3SAT to Vertex Cover
4. Consider the following boolean formula, an example of a problem in 3SAT:
φ = (x1 ∨ x2 ∨ ¬x3) ∧ (¬x1 ∨ ¬x2 ∨ x3) ∧ (x1 ∨ ¬x2 ∨ ¬x3).
Reduce the formula in 3-SAT to Vertex Cover by giving the corresponding graph.
© Copyright 2026 Paperzz