- 70 Views
- Uploaded on

Download Presentation
## PowerPoint Slideshow about ' Time Complexity' - francesca-roberts

**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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

### Time Complexity

Costas Busch - RPI

For any string the computation of

terminates in a finite amount of transitions

Initial

state

Accept

or Reject

Costas Busch - RPI

Consider now all strings of length

= maximum time required to decide

any string of length

Costas Busch - RPI

All Languages decidable by a deterministic Turing Machine

in time

Costas Busch - RPI

Other example problems in the same class

Costas Busch - RPI

Costas Busch - RPI

constant

Represents tractable algorithms:

for small we can decide

the result fast

Costas Busch - RPI

Costas Busch - RPI

Represents:

- polynomial time algorithms

- “tractable” problems

Costas Busch - RPI

Represent intractable algorithms:

Some problem instances

may take centuries to solve

Costas Busch - RPI

Example: the Hamiltonian Path Problem

s

t

Question: is there a Hamiltonian path

from s to t?

Costas Busch - RPI

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

Costas Busch - RPI

Example: The Satisfiability Problem

Boolean expressions in

Conjunctive Normal Form:

clauses

Variables

Question: is the expression satisfiable?

Costas Busch - RPI

Algorithm:

search exhaustively all the possible

binary values of the variables

Costas Busch - RPI

Non-Determinism

Language class:

A Non-Deterministic Turing Machine

decides each string of length

in time

Costas Busch - RPI

Non-Deterministic Polynomial time algorithms:

Costas Busch - RPI

Example:

Non-Deterministic algorithm:

- Guess an assignment of the variables

- Check if this is a satisfying assignment

Costas Busch - RPI

- Guess an assignment of the variables

- Check if this is a satisfying assignment

Total time:

Costas Busch - RPI

The satisfiability problem is an - Problem

Costas Busch - RPI

Example: Does the Satisfiability problem

have a polynomial time

deterministic algorithm?

WE DO NOT KNOW THE ANSWER

Costas Busch - RPI

Download Presentation

Connecting to Server..