Presentation is loading. Please wait.

Presentation is loading. Please wait.

Prof. Busch - LSU1 Time Complexity. Prof. Busch - LSU2 Consider a deterministic Turing Machine which decides a language.

Similar presentations


Presentation on theme: "Prof. Busch - LSU1 Time Complexity. Prof. Busch - LSU2 Consider a deterministic Turing Machine which decides a language."— Presentation transcript:

1 Prof. Busch - LSU1 Time Complexity

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

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

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

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

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

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

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

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

10 Prof. Busch - LSU10 Examples in class:

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

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

13 Prof. Busch - LSU13 It can be shown:

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

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

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

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

18 Prof. Busch - LSU18 s t YES!

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

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

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

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

23 Prof. Busch - LSU23 Satisfiable: Example:

24 Prof. Busch - LSU24 Not satisfiable Example:

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

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

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

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

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

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

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

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

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

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


Download ppt "Prof. Busch - LSU1 Time Complexity. Prof. Busch - LSU2 Consider a deterministic Turing Machine which decides a language."

Similar presentations


Ads by Google