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 A problem is NP-complete if it is NP-hard and in NP. Cook's theorem proved SATISFIABILITY was NPhard by using a polynomial time reduction translating each problem in NP into an instance of SAT: Since a polynomial time algorithm for SAT would imply a polynomial time algorithm for everything in NP, SAT is NP-hard. Since we can guess a solution to SAT, it is in NP and thus NP-complete. The proof of Cook's Theorem, while quite clever, was certainly difficult and complicated. We had to show that all problems in NP could be reduced to SAT to make sure we didn't miss a hard one. But now that we have a known NP-complete problem in SAT. For any other problem, we can prove it NPhard by polynomially transforming SAT to it! Since the composition of two polynomial time reductions can be done in polynomial time, all we need show is that SAT, ie. any instance of SAT can be translated to an instance of x in polynomial time. Listen To Part 27-7 Finding the Optimal Spouse 1. There are up to n possible candidates we will see over our lifetime, one at a time. 2. We seek to maximize our probability of getting the single best possible spouse. file:///E|/LEC/LECTUR16/NODE23.HTM (9 of 11) [19/1/2003 1:35:35]
Lecture 23 - approximation algorithms and Cook's theorem 3. Our assessment of each candidate is relative to what we have seen before. 4. We must decided either to marry or reject each candidate as we see them. There is no going back once we reject someone. 5. Each candidate is ranked from 1 to n, and all permutations are equally likely. Listen To Part 27-8 For example, if the input permutation is we see (3,1,2) after three candidates. Picking the first or last candidate gives us a probability of 1/n of getting the best. Since we seek maximize our chances of getting the best, it never pays to pick someone who is not the best we have seen. The optimal strategy is clearly to sample some fraction of the candidates, then pick the first one who is better than the best we have seen. But what is the fraction? Listen To Part 27-9 For a given fraction 1/f, what is the probability of finding the best? Suppose i+1 is the highest ranked person in the first n/f candidates. We win whenever the best candidate occurs before any number from 2 to i in the last n (1- 1/f) / f candidates. There is a 1/i probability of that, so, In fact, the optimal is obtained by sampling the first n/e candidates. Next: Index Up: No Title Previous: Lecture 22 - techniques file:///E|/LEC/LECTUR16/NODE23.HTM (10 of 11) [19/1/2003 1:35:35]
- 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 and 1040: Lecture 23 - approximation algorith
- Page 1041: 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
- Page 1091 and 1092: C++ Language Implementations Algori
Lecture 23 - approximation algorithms and Cook's theorem<br />
A problem is NP-complete if it is NP-hard and in NP. Cook's theorem proved SATISFIABILITY was NPhard<br />
by using a polynomial time reduction translating each problem in NP into an instance of SAT:<br />
Since a polynomial time algorithm for SAT would imply a polynomial time algorithm for everything in<br />
NP, SAT is NP-hard. Since we can guess a solution to SAT, it is in NP and thus NP-complete.<br />
<strong>The</strong> proof of Cook's <strong>The</strong>orem, while quite clever, was certainly difficult and complicated. We had to<br />
show that all problems in NP could be reduced to SAT to make sure we didn't miss a hard one.<br />
But now that we have a known NP-complete problem in SAT. For any other problem, we can prove it NPhard<br />
by polynomially transforming SAT to it!<br />
Since the composition of two polynomial time reductions can be done in polynomial time, all we need<br />
show is that SAT, ie. any instance of SAT can be translated to an instance of x in polynomial time.<br />
Listen To Part 27-7<br />
Finding the Optimal Spouse<br />
1. <strong>The</strong>re are up to n possible candidates we will see over our lifetime, one at a time.<br />
2. We seek to maximize our probability of getting the single best possible spouse.<br />
file:///E|/LEC/LECTUR16/NODE23.HTM (9 of 11) [19/1/2003 1:35:35]