E N D
10. NP Complete Problem: hardest problem in NP
Intuitively, L is harder than L if L is polynomial reducible to L.
NP Complete Problem: If such a problem has an efficient algorithm (in P), then every other problem also has efficient algorithm.
13. NP-Complete Problems
3SAT
k-Clique
Vertex Cover
Independent Set
14. 3SAT Problem: Given a CNF where each clause has 3 variables, decide whether it is satisfiable or not.
(x1 ? x1 ? x2) ? (?x1 ? ?x2 ? ?x2) ? (?x1 ? x2 ? x2)
17. How to prove? We can convert (in polynomial time) a given SAT instance S into a 3SAT instance S such that
If S is satisfiable, then S is satisfiable.
If S is satisfiable, then S is satisfiable.
19. Polynomial Time Reduction Clause in SAT x1
x1 ? ? x2
x1 ? x2 ? x3
x1 ? x2 ? x3 ? x4
x1 ? x2 ? x3 ? x4 ? x5
Clauses in 3SAT x1 ? x1 ? x1
x1 ? x1 ? ? x2
x1 ? x2 ? x3
(x1 ? x2 ? z1)? ( ? z1 ? x3 ? x4)
(x1 ? x2 ? z1)? ( ? z1 ? x3 ? z2)?
(? z2 ? x4 ? z3)? (? z3? x4 ? x5)
20. Finding cliques is a useful operation in social networks, computing protein similarity, finding error correcting codes, there are all kinds of applications.
For example, this graph here has a 5-clique
Now it would seem that this problem may not be all that hard. After all, it certainly LOOKS easy!Finding cliques is a useful operation in social networks, computing protein similarity, finding error correcting codes, there are all kinds of applications.
For example, this graph here has a 5-clique
Now it would seem that this problem may not be all that hard. After all, it certainly LOOKS easy!
22. Why is (1) true?
(1) is easy: if (G,k) in CLIQUE, then we can just give the k-clique to a verifier, and a verifier can check that all pairs of nodes in the k-clique have an edge.Why is (1) true?
(1) is easy: if (G,k) in CLIQUE, then we can just give the k-clique to a verifier, and a verifier can check that all pairs of nodes in the k-clique have an edge.
25. not contradictory: that is, one of the nodes is labeled x, and the other node is labeled not(x).not contradictory: that is, one of the nodes is labeled x, and the other node is labeled not(x).
26. Now when we find a 3-clique, what are we doing? Were picking out a literal in each of the clauses so that, taken as a whole, no pair of literals are contradictory. This corresponds to a satisfying assignment!Now when we find a 3-clique, what are we doing? Were picking out a literal in each of the clauses so that, taken as a whole, no pair of literals are contradictory. This corresponds to a satisfying assignment!
29. Independent Set
31. Key Observation For a graph G, vertex set S is an independent set if and only if S is clique in G*.
33. In the vertex cover problem, we want to find a set of nodes such that every edge is covered by the nodes. That is, at least one endpoint of the edge is in the set.
Whats a vertex cover for this graph? (The set of all nodes!) Whats a minimum size vertex cover?
In the vertex cover problem, we want to find a set of nodes such that every edge is covered by the nodes. That is, at least one endpoint of the edge is in the set.
Whats a vertex cover for this graph? (The set of all nodes!) Whats a minimum size vertex cover?
34. Vertex Cover is NP Complete Given a Graph G(V,E), decide if there is k vertex such that every edge is covered by one of them?
35. K-Indep Set ?P Vertex Cover
36. Key Observation For a graph G(V,E), S is a independent set if and only if V-S is a vertex cover.
37. Other NP-Complete Problems Travelling Salesman Problem
Hamiltonian Path
Max Cut
Subset Sum
Integer Programming
.
38. Other Problems in NP Graph Isomorphism
Factoring Number
We dont know if they are NP Complete or not.