1 / 34

Time Complexity

Time Complexity. Consider a deterministic Turing Machine which decides a language . For any string the computation of terminates in a finite amount of transitions. Initial state. Accept or Reject. Decision Time = #transitions. Initial state. Accept or Reject.

topper
Download Presentation

Time Complexity

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Time Complexity Prof. Busch - LSU

  2. Consider a deterministic Turing Machine which decides a language Prof. Busch - LSU

  3. For any string the computation of terminates in a finite amount of transitions Initial state Accept or Reject Prof. Busch - LSU

  4. Decision Time = #transitions Initial state Accept or Reject Prof. Busch - LSU

  5. Consider now all strings of length = maximum time required to decide any string of length Prof. Busch - LSU

  6. TIME STRING LENGTH Max time to accept a string of length Prof. Busch - LSU

  7. Time Complexity Class: All Languages decidable by a deterministic Turing Machine in time Prof. Busch - LSU

  8. Example: This can be decided in time Prof. Busch - LSU

  9. Other example problems in the same class Prof. Busch - LSU

  10. Examples in class: Prof. Busch - LSU

  11. Examples in class: CYK algorithm Matrix multiplication Prof. Busch - LSU

  12. Polynomial time algorithms: constant Represents tractable algorithms: for small we can decide the result fast Prof. Busch - LSU

  13. It can be shown: Prof. Busch - LSU

  14. The Time Complexity Class Represents: • polynomial time algorithms • “tractable” problems Prof. Busch - LSU

  15. Class CYK-algorithm Matrix multiplication Prof. Busch - LSU

  16. Exponential time algorithms: Represent intractable algorithms: Some problem instances may take centuries to solve Prof. Busch - LSU

  17. Example: the Hamiltonian Path Problem s t Question: is there a Hamiltonian path from s to t? Prof. Busch - LSU

  18. s t YES! Prof. Busch - LSU

  19. A solution: search exhaustively all paths L = {<G,s,t>: there is a Hamiltonian path in G from s to t} Exponential time Intractable problem Prof. Busch - LSU

  20. The clique problem Does there exist a clique of size 5? Prof. Busch - LSU

  21. The clique problem Does there exist a clique of size 5? Prof. Busch - LSU

  22. Example: The Satisfiability Problem Boolean expressions in Conjunctive Normal Form: clauses Variables Question: is the expression satisfiable? Prof. Busch - LSU

  23. Example: Satisfiable: Prof. Busch - LSU

  24. Example: Not satisfiable Prof. Busch - LSU

  25. exponential Algorithm: search exhaustively all the possible binary values of the variables Prof. Busch - LSU

  26. Non-Determinism Language class: A Non-Deterministic Turing Machine decides each string of length in time Prof. Busch - LSU

  27. Non-Deterministic Polynomial time algorithms: Prof. Busch - LSU

  28. The class Non-Deterministic Polynomial time Prof. Busch - LSU

  29. The satisfiability problem Example: Non-Deterministic algorithm: • Guess an assignment of the variables • Check if this is a satisfying assignment Prof. Busch - LSU

  30. Time for variables: • Guess an assignment of the variables • Check if this is a satisfying assignment Total time: Prof. Busch - LSU

  31. The satisfiability problem is an - Problem Prof. Busch - LSU

  32. Observation: Deterministic Polynomial Non-Deterministic Polynomial Prof. Busch - LSU

  33. Open Problem: WE DO NOT KNOW THE ANSWER Prof. Busch - LSU

  34. Open Problem: Example: Does the Satisfiability problem have a polynomial time deterministic algorithm? WE DO NOT KNOW THE ANSWER Prof. Busch - LSU

More Related