The.Algorithm.Design.Manual.Springer-Verlag.1998
The.Algorithm.Design.Manual.Springer-Verlag.1998 The.Algorithm.Design.Manual.Springer-Verlag.1998
Lecture 23 - approximation algorithms and Cook's theorem What we can do is prove that it is at least as hard as any problem in NP. A problem in NP for which a polynomial time algorithm would imply all languages in NP are in P is called NP-complete. Turing Machines and Cook's Theorem Cook's Theorem proves that satisfiability is NP-complete by reducing all non-deterministic Turing machines to SAT. Each Turing machine has access to a two-way infinite tape (read/write) and a finite state control, which serves as the program. A program for a non-deterministic TM is: 1. Space on the tape for guessing a solution and certificate to permit verification. 2. A finite set of tape symbols 3. A finite set of states for the machine, including the start state and final states 4. A transition function, which takes the current machine state, and current tape symbol and returns the new state, symbol, and head position. We know a problem is in NP if we have a NDTM program to solve it in worst-case time p[n], where p is a polynomial and n is the size of the input. Cook's Theorem - Satisfiability is NP-complete! Proof: We must show that any problem in NP is at least as hard as SAT. Any problem in NP has a nondeterministic TM program which solves it in polynomial time, specifically P(n). We will take this program and create from it an instance of satisfiability such that it is satisfiable if and only if the input string was in the language. file:///E|/LEC/LECTUR16/NODE23.HTM (7 of 11) [19/1/2003 1:35:35]
Lecture 23 - approximation algorithms and Cook's theorem If a polynomial time transform exists, then SAT must be NP-complete, since a polynomial solution to SAT gives a polynomial time algorithm to anything in NP. Our transformation will use boolean variables to maintain the state of the TM: Variable Range Intended meaning Q[i, j] At time i, M is in state H[i,j] At time i, the read-write head is scanning tape square j S[i,j,k] At time i, the contents of tape square j is symbol Note that there are literals, a polynomial number if p(n) is polynomial. We will now have to add clauses to ensure that these variables takes or the values as in the TM computation. The group 6 clauses enforce the transition function of the machine. If the read-write head is not on tape square j at time i, it doesn't change .... There are literals and clauses in all, so the transformation is done in polynomial time! Polynomial Time Reductions A decision problem is NP-hard if the time complexity on a deterministic machine is within a polynomial factor of the complexity of any problem in NP. file:///E|/LEC/LECTUR16/NODE23.HTM (8 of 11) [19/1/2003 1:35:35]
- Page 989 and 990: Lecture 17 - minimum spanning trees
- Page 991 and 992: Lecture 17 - minimum spanning trees
- Page 993 and 994: Lecture 17 - minimum spanning trees
- Page 995 and 996: Lecture 17 - minimum spanning trees
- Page 997 and 998: Lecture 17 - minimum spanning trees
- Page 999 and 1000: Lecture 18 - shortest path algorthm
- Page 1001 and 1002: Lecture 18 - shortest path algorthm
- Page 1003 and 1004: Lecture 18 - shortest path algorthm
- Page 1005 and 1006: Lecture 18 - shortest path algorthm
- Page 1007 and 1008: Lecture 18 - shortest path algorthm
- Page 1009 and 1010: Lecture 19 - satisfiability Next: L
- Page 1011 and 1012: Lecture 19 - satisfiability Why? Th
- Page 1013 and 1014: Lecture 19 - satisfiability between
- Page 1015 and 1016: Lecture 19 - satisfiability Note th
- Page 1017 and 1018: Lecture 20 - integer programming Ex
- Page 1019 and 1020: Lecture 20 - integer programming Ne
- Page 1021 and 1022: Lecture 21 - vertex cover Proof: VC
- Page 1023 and 1024: Lecture 21 - vertex cover Question:
- Page 1025 and 1026: Lecture 21 - vertex cover seen to d
- Page 1027 and 1028: Lecture 22 - techniques for proving
- Page 1029 and 1030: Lecture 22 - techniques for proving
- Page 1031 and 1032: Lecture 22 - techniques for proving
- Page 1033 and 1034: Lecture 22 - techniques for proving
- Page 1035 and 1036: Lecture 23 - approximation algorith
- Page 1037 and 1038: Lecture 23 - approximation algorith
- Page 1039: Lecture 23 - approximation algorith
- Page 1043 and 1044: Lecture 23 - approximation algorith
- Page 1045 and 1046: About this document ... Up: No Titl
- Page 1047 and 1048: 1.1.6 Kd-Trees ● Point Location
- Page 1049 and 1050: 1.1.3 Suffix Trees and Arrays Send
- Page 1051 and 1052: 1.5.1 Clique ● Vertex Cover Go to
- Page 1053 and 1054: 1.6.2 Convex Hull Related Problems
- Page 1055 and 1056: Visual Links Index file:///E|/WEBSI
- Page 1057 and 1058: Visual Links Index file:///E|/WEBSI
- Page 1059 and 1060: Visual Links Index file:///E|/WEBSI
- Page 1061 and 1062: Visual Links Index file:///E|/WEBSI
- Page 1063 and 1064: Visual Links Index file:///E|/WEBSI
- Page 1065 and 1066: Visual Links Index file:///E|/WEBSI
- Page 1067 and 1068: Visual Links Index file:///E|/WEBSI
- Page 1069 and 1070: Visual Links Index file:///E|/WEBSI
- Page 1071 and 1072: Visual Links Index file:///E|/WEBSI
- Page 1073 and 1074: Visual Links Index file:///E|/WEBSI
- Page 1075 and 1076: Visual Links Index file:///E|/WEBSI
- Page 1077 and 1078: Visual Links Index file:///E|/WEBSI
- Page 1079 and 1080: Visual Links Index file:///E|/WEBSI
- Page 1081 and 1082: Visual Links Index file:///E|/WEBSI
- Page 1083 and 1084: About the Ratings About the Ratings
- Page 1085 and 1086: 1.2 Numerical Problems 1.2 Numerica
- Page 1087 and 1088: 1.4 Graph Problems -- polynomial-ti
- Page 1089 and 1090: 1.6 Computational Geometry 1.6 Comp
Lecture 23 - approximation algorithms and Cook's theorem<br />
What we can do is prove that it is at least as hard as any problem in NP. A problem in NP for which a<br />
polynomial time algorithm would imply all languages in NP are in P is called NP-complete.<br />
Turing Machines and Cook's <strong>The</strong>orem<br />
Cook's <strong>The</strong>orem proves that satisfiability is NP-complete by reducing all non-deterministic Turing<br />
machines to SAT.<br />
Each Turing machine has access to a two-way infinite tape (read/write) and a finite state control, which<br />
serves as the program.<br />
A program for a non-deterministic TM is:<br />
1. Space on the tape for guessing a solution and certificate to permit verification.<br />
2. A finite set of tape symbols<br />
3. A finite set of states for the machine, including the start state and final states<br />
4. A transition function, which takes the current machine state, and current tape symbol and returns<br />
the new state, symbol, and head position.<br />
We know a problem is in NP if we have a NDTM program to solve it in worst-case time p[n], where p is a<br />
polynomial and n is the size of the input.<br />
Cook's <strong>The</strong>orem - Satisfiability is NP-complete!<br />
Proof: We must show that any problem in NP is at least as hard as SAT. Any problem in NP has a nondeterministic<br />
TM program which solves it in polynomial time, specifically P(n).<br />
We will take this program and create from it an instance of satisfiability such that it is satisfiable if and<br />
only if the input string was in the language.<br />
file:///E|/LEC/LECTUR16/NODE23.HTM (7 of 11) [19/1/2003 1:35:35]