SlideServe
Menu
Préférences
© SlideServe · v2026

Time Complexity

leotal avatar
33 diapositives · 383 Views · Jan 05, 2020

Explore polynomial and exponential time complexity in deterministic and non-deterministic Turing machines. Delve into tractable and intractable problems like the membership and satisfiability problem. Discover open questions in computational complexity theory.

Time Complexity - slide 1
01 / 33Time Complexity
1 / 17

Télécharger la présentation

Time Complexity
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Time Complexity • We use a multitape Turing machine • We count the number of steps until • a string is accepted • We use the O(k) notation

  2. Example: Algorithm to accept a string : • Use a two-tape Turing machine • Copy the on the second tape • Compare the and

  3. Time needed: • Copy the on the second tape • Compare the and Total time:

  4. For string of length time needed for acceptance:

  5. Language class: A Deterministic Turing Machine accepts each string of length in time

  6. In a similar way we define the class for any time function: Examples:

  7. Example: The membership problem for context free languages (CYK - algorithm) Polynomial time

  8. Theorem:

  9. Polynomial time algorithms: Represent tractable algorithms: For small we can compute the result fast

  10. The class for all • Polynomial time • All tractable problems

  11. CYK-algorithm

  12. Exponential time algorithms: Represent intractable algorithms: Some problem instances may take centuries to solve

  13. Example: the Hamiltonian Problem s t Question: is there a Hamiltonian path from s to t?

  14. s t YES!

  15. 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

  16. Example: The Satisfiability Problem Boolean expressions in Conjunctive Normal Form: Variables Question: is expression satisfiable?

  17. Example: Satisfiable:

  18. Example: Not satisfiable

  19. For variables: exponential Algorithm: search exhaustively all the possible binary values of the variables

  20. Non-Determinism Language class: A Non-Deterministic Turing Machine accepts each string of length in time

  21. Example: Non-Deterministic Algorithm to accept a string : • Use a two-tape Turing machine • Guess the middle of the string • and copy on the second tape • Compare the two tapes

  22. Time needed: • Use a two-tape Turing machine • Guess the middle of the string • and copy on the second tape • Compare the two tapes Total time:

  23. In a similar way we define the class for any time function: Examples:

  24. Non-Deterministic Polynomial time algorithms:

  25. The class for all Non-Deterministic Polynomial time

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

  27. Time for variables: • Guess an assignment of the variables • Check if this is a satisfying assignment Total time:

  28. The satisfiability problem is an - Problem

  29. Observation: Deterministic Polynomial Non-Deterministic Polynomial

  30. Open Problem: WE DO NOT KNOW THE ANSWER

  31. Open Problem: Example: Does the Satisfiability problem have a polynomial time deterministic algorithm? WE DO NOT KNOW THE ANSWER