COMS 482: unofficial class blog


Lecture 22: Introduction to NP Problems

Posted in Class Notes by Elliott Back on March 14th, 2005. [Del.icio.us]

P, NP, and NP-Complete:

P = {Problems that can be solved in polynomial time}

Definition: An algorithm c(-, -) is a certifier for a problem. c(-, -) means a polynomial algorithm such that c = {s | there exists t(c(s,t)) reports true and |t| <=p p(|s|)}. Algorithm a(-) solves A means A = {s | a(s) reports true}.

NP = {c | c(-, -) is a certifier for c and c(-, -) is in P}
NP: Nondeterministic Polynomial time. The “nondeterminism” allows a program to “guess.” If there is a way to guess right, it always does it.

Independent set is in NP because for a problem instance (G, k) we can use a k-size subset of G as a certificate and check that there is a solution in polynomial time. Vertex cover is also in NP because our certificate is a set of k vertices that we can check in polynomial time. There are problems in NP called NP-Complete. A problem is B is NP-Complete means B is a subset of NP and if x is a program in BP, then x <=p B for all x in NP. So, every NP-Complete problem <=p to every other NP-Complete problem. If you solve one, you have effectively solved them all.

Circuit satisfiability (SAT) <=p 3-SAT <=p Independent Set <=p Vertex Cover <=p Set Cover

Given any NP-Complete problem and Q in NP, find a Q <=p C or C <=p Q, then Q is also NP-Complete.

Set Cover:

Given a collection of elements s1, …, sm and a set U, there are k s1, …, sm subsets whose union is U. We want to show Vertex Cover <=p Set Cover. First, Vertex Cover wants to cover all the edges. A vertex covers all of its own edges. Here is an example:

Vertex Cover

Claim: VC <=p SC. Let U = E, si = {e | e is an edge of vi} This is an instance of SC.

Claim: W <= V is a vertex cover -> {si | vi in W} is a set cover.
Proof: Suppose W is a vertex cover. Then each edge is covered by si that vi covers. Therefore, {si | vi in W} covers U.

Claim: SC is in NP
Proof: Let t be a set of indices for subsets s1, …, sm Then, we can check in polynomial time that each u in U appears at least once in one of A.

This entry was posted on Monday, March 14th, 2005 at 11:17 am and is tagged with , , , , , , , , , , , , , , , , , . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback.

Leave a Reply

Please take time to enjoy the archives: May 2005 (1) April 2005 (11) March 2005 (11) February 2005 (15) January 2005 (7)

Fresh, related resources:

Supplied by Google Blog Search