Prabhas Chongstitvatana NP-complete proofs The circuit satisfiability proof of NP-completeness relies on a direct proof that L p CIRCUIT-SAT for every L NP. Lemma 36.8 If L is a language such that L’ p L for some L’ NPC, then L is NP-hard. Moreover, if L NP, then L NPC. Prabhas Chongstitvatana
Prabhas Chongstitvatana Prove L NP Select a known NP-complete language L’ Descrive an algorithm that compute f mapping every instance of L’ to an instance of L. Prove f satisfies x L’ iff f(x) L x {0,1}* Prove that the algorithm computing f runs in polynomial time. Prabhas Chongstitvatana
Prabhas Chongstitvatana NP-complete problems SAT = { <Phi> | Phi is a satisfiable boolean formula } Theorem 36.9 SAT NP-complete Proof : SAT NP (show a certificate can be verified in polynomial time), CIRCUIT-SAT p SAT Prabhas Chongstitvatana
Prabhas Chongstitvatana 3-CNF-SAT CNF conjunctive normal form (AND of Ored-clauses) to simplify reduction algorithm 3-CNF-SAT NP, SAT p 3-CNF-SAT CLIQUE = { <G,K> | G is a graph with a clique of size k } A clique in an undirected graph G = (V,E) is a subset V’ V of vertices each pair of which is connected by an edge in E (a clique is a complete subgraph of G). Prabhas Chongstitvatana
Prabhas Chongstitvatana u w x v y z CLIQUE NP; 3-CNF-SAT p CLIQUE Prabhas Chongstitvatana
Prabhas Chongstitvatana VERTEX-COVER = { <G,k> | graph G has vertex cover of size k } A vertex cover of an undirected graph G = (V,E) is a subset V’ V such that if (u,v) E, then u V’ or v V’ (or both). VERTEX-COVER NP; CLIQUE p VERTEX-COVER Prabhas Chongstitvatana
Prabhas Chongstitvatana SUBSET-SUM = { <S, t> | there exists a subset S’ S such that t = Example : if S = {1, 4, 16, 64, 256, 1040, 1041, 1093, 1284, 1344} and t = 3754. The subset S’ = {1, 6, 64, 256, 1040, 1093, 1284 } is a solution. SUBSET-SUM NP; VERTEX-COVER p SUBSET-SUM Prabhas Chongstitvatana
Prabhas Chongstitvatana HAM-CYCLE = {<G> | G is a hamitonian graph } HAM-CYLE NP; 3-CNF-SAT p HAM-CYCLE TSP = {<G,c,k> | G = (V,E) is a complete graph, c is a function from V V Z, k Z, and G has a traveling-saleman tour with cost at most k } An integer cost c(i,j) to travel from city i to city j. A tour is a hamiltonian cycle. TSP NP; HAM-CYCLE p TSP Prabhas Chongstitvatana
Prabhas Chongstitvatana CIRCUIT-SAT 3-CNF-SAT SAT TSP HAM-CYCLE CLIQUE VERTEX-COVER SUBSET-SUM Prabhas Chongstitvatana
Prabhas Chongstitvatana Unsolvable A set with as many elements as the integers is called countably infinite. Not every infinite set is countable. Let’s show that there are computationally unsolvable problems. The subset of problems can be described by boolean functions on the integers; f such that f(n) is 0/1. Prabhas Chongstitvatana
Prabhas Chongstitvatana Suppose the set of all such functions is countably infinite. There is a correspondence between each function and each integer. 0 1 1 0 0 1 1 . . . . . f i n f i ( n ) By diagonalization, we can show that at least one boolean function cannot be in this list. Prabhas Chongstitvatana
Prabhas Chongstitvatana If every program is a finite string of symbols, each chosen from a single finite alphabet, then it is possible to show that the set of all programs is countably infinite. So there is more problems than there are programs to solve them. Thus, at least one function is not describable as the output of any program, so it is computationally unsolvable. Prabhas Chongstitvatana
Prabhas Chongstitvatana Example : A simple system such as Presburger arithmetic, is a formal system of the positive integers together with addition and equality alone. Deciding whether a statement in this system is true is in the length of the statement. Prabhas Chongstitvatana
Prabhas Chongstitvatana Unsolvable relativized unsolvable (oracle machines) Solvable provably infeasible (Presburger arithmetic) probably infeasible (satisfiability) feasible hard (normal optimization problems) easy (normal computer science problems) randomized easy (primality testing) really easy (sorting) Prabhas Chongstitvatana
Prabhas Chongstitvatana Solving hard problems Relax the problem -- use approx. algo. Relax the method -- use probabilistic algo and give up total correctness Relax the architecture -- use parallel Relax the machine -- use analog computer ? Prabhas Chongstitvatana