Time Complexity Costas Busch - LSU.

Slides:



Advertisements
Similar presentations
Fall 2006Costas Busch - RPI1 Time Complexity. Fall 2006Costas Busch - RPI2 Consider a deterministic Turing Machine which decides a language.
Advertisements

Complexity Classes: P and NP
Time Complexity P vs NP.
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
P and NP Sipser (pages ). CS 311 Fall Polynomial time P = ∪ k TIME(n k ) … P = ∪ k TIME(n k ) … TIME(n 3 ) TIME(n 2 ) TIME(n)
Complexity Theory CSE 331 Section 2 James Daly. Reminders Project 4 is out Due Friday Dynamic programming project Homework 6 is out Due next week (on.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
The Theory of NP-Completeness
NP-Complete Problems Problems in Computer Science are classified into
1 Other Models of Computation. 2 Models of computation: Turing Machines Recursive Functions Post Systems Rewriting Systems.
Fall 2003Costas Busch - RPI1 Decidable Problems of Regular Languages.
Analysis of Algorithms CS 477/677
Chapter 11: Limitations of Algorithmic Power
Fall 2004COMP 3351 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.
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
Prof. Busch - RPI1 Decidable Problems of Regular Languages.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
Introduction to the Theory of Computation
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
P Vs NP Turing Machine. Definitions - Turing Machine Turing Machine M has a tape of squares Each Square is capable of storing a symbol from set Γ (including.
Costas Busch - LSU1 Time Complexity. Costas Busch - LSU2 Consider a deterministic Turing Machine which decides a language.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
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.
Young CS 331 D&A of Algo. NP-Completeness1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and.
NP-complete Languages
Prof. Busch - LSU1 Time Complexity. Prof. Busch - LSU2 Consider a deterministic Turing Machine which decides a language.
Computability Examples. Reducibility. NP completeness. Homework: Find other examples of NP complete problems.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Consider problems with answer YES or NO Examples: Does Machine have three states ? Is string a binary.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
The Theory of NP-Completeness
NP-Completeness A problem is NP-complete if: It is in NP
The NP class. NP-completeness
Chapter 10 NP-Complete Problems.
Turing’s Thesis Costas Busch - LSU.
Formal Foundations-II [Theory of Automata]
Advanced Algorithms Analysis and Design
Introduction to the Theory of Computation
Busch Complexity Lectures: Reductions
Linear Bounded Automata LBAs
Undecidable Problems Costas Busch - LSU.
Reductions Costas Busch - LSU.
Other Models of Computation
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
Turing acceptable languages and Enumerators
ICS 353: Design and Analysis of Algorithms
How Hard Can It Be?.
Computational Complexity
Decidable Languages Costas Busch - LSU.
Space Complexity Costas Busch - LSU.
Parsing Costas Busch - LSU.
Time Complexity We use a multitape Turing machine
Decidable Problems of Regular Languages
Turing acceptable languages and Enumerators
CLASSES P AND NP.
Chapter 11 Limitations of Algorithm Power
NP-Complete Problems.
CS154, Lecture 13: P vs NP.
NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, 1979.
The Theory of NP-Completeness
NP-Completeness Lecture for CS 302.
CSE 589 Applied Algorithms Spring 1999
Instructor: Aaron Roth
Algorithms CSCI 235, Spring 2019 Lecture 36 P vs
The Chomsky Hierarchy Costas Busch - LSU.
Presentation transcript:

Time Complexity Costas Busch - LSU

Consider a deterministic Turing Machine which decides a language Costas Busch - LSU

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

Decision Time = #transitions Initial state Accept or Reject Costas Busch - LSU

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

Max time to decide string of length STRING LENGTH Max time to decide string of length Costas Busch - LSU

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

This can be decided in time Example: This can be decided in time Costas Busch - LSU

Other example problems in the same class Costas Busch - LSU

Examples in class: Costas Busch - LSU

Matrix multiplication Examples in class: CYK algorithm Matrix multiplication Costas Busch - LSU

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

It can be shown: Costas Busch - LSU

The Time Complexity Class Represents: polynomial time algorithms “tractable” problems Costas Busch - LSU

Matrix multiplication Class CYK-algorithm Matrix multiplication Costas Busch - LSU

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

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

s t YES! Costas Busch - LSU

A solution: search exhaustively all paths   Exponential time Intractable problem Costas Busch - LSU

Does there exist a clique of size k? The clique problem Does there exist a clique of size k? Costas Busch - LSU

Does there exist a clique of size k? The clique problem   Does there exist a clique of size k? Costas Busch - LSU

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

Example: Satisfiable: Costas Busch - LSU

Example: Not satisfiable Costas Busch - LSU

search exhaustively all possible binary values of the variables exponential Algorithm: search exhaustively all possible binary values of the variables Costas Busch - LSU

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

All computations of on string … … depth … … (deepest leaf) accept reject accept (deepest leaf) reject Costas Busch - LSU

Non-Deterministic Polynomial time algorithms: Costas Busch - LSU

Non-Deterministic Polynomial time The class Non-Deterministic Polynomial time Costas Busch - LSU

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

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

The satisfiability problem is a - Problem Costas Busch - LSU

Observation: Deterministic Non-Deterministic Polynomial Polynomial Costas Busch - LSU

WE DO NOT KNOW THE ANSWER Open Problem: WE DO NOT KNOW THE ANSWER Costas Busch - LSU

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