{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# l12 - Lecture 12 NP-complete graph problems David Dill...

This preview shows pages 1–6. Sign up to view the full content.

Lecture 12: NP-complete graph problems David Dill Department of Computer Science 1

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

View Full Document
Outline NP-complete problems Independent Set (IS) Node Cover (NC) Hamiltonian circuit Directed Hamiltonian Circuit Undirected Hamiltonian Circuit Traveling Salesman Problem 2
Independent Set (IS) Def In an undirected graph, G , a set of nodes I is independent if no two nodes in I are connected by an edge. Input: A graph G and and a bound 1 k ≤ | V | . Output: “Yes” iff there is an independent set of size k . Theorem IS is NP-complete. IS is in NP . Given a graph and I V , examine the edges one at a time to make sure that no edge connects two nodes in I . With any reasonable representation of the graph and I , this would be polynomial time (probably linear in the number of edges on a conventional computer). 3

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

View Full Document
Reducing from CSAT To reduce CSAT (or 3SAT) to another problem, the reduction has to capture two crucial ideas: If a literal is selected, its negation is never selected. At least one literal is selected per clause. These conditions can be satisfied iff there is a satisfying truth assignment for the original CSAT problem. : Start with a truth assignment. There must be at least one true literal per clause. : If we satisfy these conditions, we can build a truth assignment by choosing x i = T if x i literal is selected, x i = F if ¬ x i is selected, and x i = whatever if neither is selected. 4
NP-hardness of IS IS is NP-hard . By reduction from 3SAT. Construction: Let φ be a 3CNF formula with m clauses. Create a node for each occurrence of a literal in each clause. Each node is labelled with the literal, the clause number, and the position of the literal within the clause (e.g. x 3 [1 , 3] represents the occurrence of x 3 , in the third position in the first clause). Main idea: I represents one literal per clause that has to be true. (There may be other true literals as well.) Idea 1: Put negation edges between literals and their negations. That prevents adding x and ¬ x to the IS. Idea 2: Put

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 15

l12 - Lecture 12 NP-complete graph problems David Dill...

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

View Full Document
Ask a homework question - tutors are online