Download presentation

Presentation is loading. Please wait.

Published byPatricia Curd Modified over 2 years ago

1
Time Complexity P vs NP

2
Consider a deterministic Turing Machine which decides a language

3
For any string the computation of terminates in a finite amount of transitions Accept or Reject Initial state

4
Accept or Reject Decision Time = #transitions Initial state

5
Consider now all strings of length = maximum time required to decide any string of length

6
Max time to accept a string of length STRING LENGTH TIME

7
Time Complexity Class: All Languages decidable by a deterministic Turing Machine in time

8
Example: This can be decided in time

9
Other example problems in the same class

10
Examples in class:

11
CYK algorithm Matrix multiplication

12
Polynomial time algorithms: Represents tractable algorithms: for small we can decide the result fast constant

13
It can be shown:

14
The Time Complexity Class “tractable” problems polynomial time algorithms Represents:

15
CYK-algorithm Class Matrix multiplication

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

17
Example: the Hamiltonian Path Problem Question: is there a Hamiltonian path from s to t? s t

18
s t YES!

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

20
The clique problem Does there exist a clique of size 5?

21
The clique problem Does there exist a clique of size 5?

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

23
Satisfiable: Example:

24
Not satisfiable Example:

25
Algorithm: search exhaustively all the possible binary values of the variables exponential

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

27
Non-Deterministic Polynomial time algorithms:

28
The class Non-Deterministic Polynomial time

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

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

31
The satisfiability problem is an - Problem

32
Observation: Deterministic Polynomial Non-Deterministic Polynomial

33
Open Problem: WE DO NOT KNOW THE ANSWER

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

35
P versus NP P versus NP (polynomial versus nondeterministic polynomial) refers to a theoretical question presented in 1971 by Leonid Levin and Stephen Cook, concerning mathematical problems that are easy to solve (P type) as opposed to problems that are difficult to solve (NP type).

36
Any P type problem can be solved in "polynomial time.“ A P type problem is a polynomial in the number of bits that it takes to describe the instance of the problem at hand. An example of a P type problem is finding the way from point A to point B on a map. An NP type problem requires vastly more time to solve than it takes to describe the problem. An example of an NP type problem is breaking a 128-bit digital cipher.cipher The P versus NP question is important in communications, because it may ultimately determine the effectiveness (or ineffectiveness) of digital encryption methods.

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google