bu cs 332 theory of computation
play

BU CS 332 Theory of Computation Lecture 20: Reading: More on NP - PowerPoint PPT Presentation

BU CS 332 Theory of Computation Lecture 20: Reading: More on NP Sipser Ch 7.3 7.5 P vs. NP Mark Bun April 13, 2020 Goals of complexity theory Ultimate goal: Classify problems according to their feasibility and inherent computational


  1. BU CS 332 – Theory of Computation Lecture 20: Reading: • More on NP Sipser Ch 7.3 ‐ 7.5 • P vs. NP Mark Bun April 13, 2020

  2. Goals of complexity theory Ultimate goal: Classify problems according to their feasibility and inherent computational difficulty Decision problems which can be solved efficiently Can we exhibit general classes of problems which are either in or provably not in ? Some problems provably require exponential time! (Chapter 9) : A fundamental and practically important class of problems which have defied classification, but nevertheless exhibits important structure ( completeness) 4/13/2020 CS332 ‐ Theory of Computation 2

  3. Nondeterministic Time and NP 4/13/2020 CS332 ‐ Theory of Computation 3

  4. Nondeterministic time Let � , A NTM runs in time if on every input halts on within at most steps on every computational branch 4/13/2020 CS332 ‐ Theory of Computation 4

  5. Deterministic vs. nondeterministic time Deterministic Nondeterministic reject 𝒖�𝒐� accept accept reject reject accept or reject 4/13/2020 CS332 ‐ Theory of Computation 5

  6. Deterministic vs. nondeterministic time Theorem: Let be a function. Every NTM running in time has an equivalent single ‐ tape TM running in time ��� � � Proof: Simulate NTM by 3 ‐ tape TM Input 𝑥 to 𝑂 (read ‐ only) 𝑥 � 𝑥 � 𝑥 � 𝑥 � Simulation tape (run 𝑂 on 𝑥 using Finite 𝑥 � ⊔ 𝑥 � 𝑥 � # control nondeterministic choices from tape 3) 1 3 3 7 Address in computation tree 4/13/2020 CS332 ‐ Theory of Computation 6

  7. Deterministic vs. nondeterministic time Theorem: Let be a function. Every NTM running in time has an equivalent single ‐ tape TM running in time ��� � � input Proof: Simulate NTM by 3 ‐ tape TM simulation • # leaves: address • # nodes: Running time: To simulate one root ‐ to ‐ node path: Total time: 4/13/2020 CS332 ‐ Theory of Computation 7

  8. Deterministic vs. nondeterministic time Theorem: Let be a function. Every NTM running in time has an equivalent single ‐ tape TM running in time ��� � � Proof: Simulate NTM by 3 ‐ tape TM in time ��� � � We know that a 3 ‐ tape TM can be simulated by a single ‐ tape TM with quadratic overhead, hence we get running time ��� � � � = � · ��� � � = ��� � � 4/13/2020 CS332 ‐ Theory of Computation 8

  9. Difference in time complexity Extended Church ‐ Turing Thesis: At most polynomial difference in running time between all (reasonable) deterministic models At most exponential difference in running time between deterministic and nondeterministic models 4/13/2020 CS332 ‐ Theory of Computation 9

  10. Nondeterministic time Let � , A NTM runs in time if on every input halts on within at most steps on every computational branch is a class (i.e., set) of languages: A language if there exists an NTM that 1) Decides , and 2) Runs in time 4/13/2020 CS332 ‐ Theory of Computation 10

  11. NTIME explicitly A language if there exists an NTM ∗ such that, on every input 1. Every computational branch of halts in either the accept or reject state within steps 2. iff there exists an accepting computational branch of on input 3. iff every computational branch of rejects on input (or dies with no applicable transitions) 4/13/2020 CS332 ‐ Theory of Computation 11

  12. Complexity class Definition: is the class of languages decidable in polynomial time on a nondeterministic TM � � ��� 4/13/2020 CS332 ‐ Theory of Computation 12

  13. Hamiltonian Path 4/13/2020 CS332 ‐ Theory of Computation 13

  14. The following nondeterministic algorithm accepts in time � . � , where , adjacency matrix encoding On input : (Vertices of are numbers ) 1. Nondeterministically guess a sequence � of numbers � � 2. Check that � � is a permutation: Every � number appears exactly once 3. Check that � , � , and there is an edge from every � to ��� 4. Accept if all checks pass, otherwise, reject. 4/13/2020 CS332 ‐ Theory of Computation 14

  15. An alternative characterization of “Languages with polynomial ‐ time verifiers” A verifier for a language is a deterministic algorithm such that iff there exists a string such that accepts Running time of a verifier is only measured in terms of is a polynomial ‐ time verifier if it runs in time polynomial in on every input (Without loss of generality, is polynomial in , i.e., � for some constant ) 4/13/2020 CS332 ‐ Theory of Computation 15

  16. has a polynomial ‐ time verifier Certificate : Verifier : On input : (Vertices of are numbers ) 1. Check that � � is a permutation: Every � number appears exactly once 2. Check that � , � , and there is an edge from every � to ��� 3. Accept if all checks pass, otherwise, reject. 4/13/2020 CS332 ‐ Theory of Computation 16

  17. NP is the class of languages with polynomial ‐ time verifiers Theorem: A language iff there is a polynomial ‐ time verifier for Proof: 4/13/2020 CS332 ‐ Theory of Computation 17

  18. 4/13/2020 CS332 ‐ Theory of Computation 18

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend