This preview shows pages 1–7. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Harvard CS 121 and CSCI E207 Lecture 20: NP Harry Lewis November 19, 2009 Reading: Sipser 7.3. Harvard CS 121 & CSCI E27 November 19, 2009 Another way of looking at P Multiplicative increases in time or computing power yield multiplicative increases in the size of problems that can be solved If L is in P, then there is a constant factor k such that If you can solve problems of size s within a given amount of time and you are given a computer that runs twice as fast, then you can solve problems of size k s on the new machine in the same amount of time. E.g. if L is decidable in O ( n d ) time, then with twice as much time you can solve problems 2 1 d as large 1 Harvard CS 121 & CSCI E27 November 19, 2009 Exponential time E = c> TIME ( c n ) For problems in E, a multiplicative increase in computing power yields only an additive increase in the size of problems that can be solved. If L is in E, then there is a constant k such that If you can solve problems of size s within a given amount of time and you are given a computer that runs twice as fast, then you can solve problems only of size k + s on the new machine using the same amount of time. 2 Harvard CS 121 & CSCI E27 November 19, 2009 Nondeterministic Time We say that a nondeterministic TM M decides a language L iff for every w * , 1. Every computation by M on input w halts (in state q accept or state q reject ); 2. w L iff there exists at least one accepting computation by M on w . 3. w / L iff every computation by M on w rejects. M decides L in nondeterministic time t ( ) iff for every w , every computation by M on w is of length at most t (  w  ) 3 Harvard CS 121 & CSCI E27 November 19, 2009 More on Nondeterministic Time 1. Linear speedup holds. 2. Polynomial equivalence holds among nondeterministic models e.g. L decided in time T by a nondeterministic multitape TM L decided in time O ( T 2 ) by a nondeterministic 1tape TM Definition: NTIME ( t ( n )) = { L : L is decided in time t ( n ) by some nondet. multitape TM } NP = S polynomial p NTIME ( p ) = S k NTIME ( n k ) . 4 Harvard CS 121 & CSCI E27 November 19, 2009 P vs. NP Clearly P NP. But there are problems in NP that are not obviously in P ( 6 = obviously not) TSP = T RAVELLING S ALESMAN P ROBLEM . Let m > be the number of cities , D : { 1 ,...,m } 2 N give the distance D ( i,j ) between city i and city j , and B be a distance bound Then TSP = {h m,D,B i : tour of all cities of length B } ....
View
Full
Document
This document was uploaded on 12/24/2011.
 Fall '09

Click to edit the document details