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

Slides:



Advertisements
Similar presentations
Fall 2006Costas Busch - RPI1 Reductions. Fall 2006Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
Advertisements

Fall 2006Costas Busch - RPI1 A Universal Turing Machine.
Fall 2006Costas Busch - RPI1 Turing Machines. Fall 2006Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Linear Bounded Automata LBAs
Fall 2003Costas Busch - RPI1 Properties of Context-Free languages.
Fall 2006Costas Buch - RPI1 Simplifications of Context-Free Grammars.
Context-Free Languages
Fall 2006Costas Busch - RPI1 Decidable Languages.
Complexity Classes: P and NP
Time Complexity P vs NP.
NP-Completeness Lecture for CS 302. Traveling Salesperson Problem You have to visit n cities You want to make the shortest trip How could you do this?
The Theory of NP-Completeness
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.
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
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
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
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.
Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
Fall 2006Costas Busch - RPI1 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.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
NP Complexity By Mussie Araya. What is NP Complexity? Formal Definition: NP is the set of decision problems solvable in polynomial time by a non- deterministic.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
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.
Lecture 12 P and NP Introduction to intractability Class P and NP Class NPC (NP-complete)
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.
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
NP-complete Languages
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
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.
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.
Introduction to the Theory of Computation
Time Complexity Costas Busch - LSU.
Other Models of Computation
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
How Hard Can It Be?.
Computational Complexity
Decidable Languages Costas Busch - LSU.
Space Complexity Costas Busch - LSU.
Time Complexity We use a multitape Turing machine
Decidable Problems of Regular Languages
CLASSES P AND 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.
Instructor: Aaron Roth
The Chomsky Hierarchy Costas Busch - LSU.
Presentation transcript:

Fall 2006Costas Busch - RPI1 Time Complexity

Fall 2006Costas Busch - RPI2 Consider a deterministic Turing Machine which decides a language

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

Fall 2006Costas Busch - RPI4 Accept or Reject Decision Time = #transitions Initial state

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

Fall 2006Costas Busch - RPI6 Max time to accept a string of length STRING LENGTH TIME

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

Fall 2006Costas Busch - RPI8 Example: This can be decided in time

Fall 2006Costas Busch - RPI9 Other example problems in the same class

Fall 2006Costas Busch - RPI10 Examples in class:

Fall 2006Costas Busch - RPI11 Examples in class: CYK algorithm Matrix multiplication

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

Fall 2006Costas Busch - RPI13 It can be shown:

Fall 2006Costas Busch - RPI14 The Time Complexity Class tractable problems polynomial time algorithms Represents:

Fall 2006Costas Busch - RPI15 CYK-algorithm Class Matrix multiplication

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

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

Fall 2006Costas Busch - RPI18 s t YES!

Fall 2006Costas Busch - RPI19 Exponential time Intractable problem A solution: search exhaustively all paths L = { : there is a Hamiltonian path in G from s to t}

Fall 2006Costas Busch - RPI20 The clique problem Does there exist a clique of size 5?

Fall 2006Costas Busch - RPI21 The clique problem Does there exist a clique of size 5?

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

Fall 2006Costas Busch - RPI23 Satisfiable: Example:

Fall 2006Costas Busch - RPI24 Not satisfiable Example:

Fall 2006Costas Busch - RPI25 Algorithm: search exhaustively all the possible binary values of the variables exponential

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

Fall 2006Costas Busch - RPI27 Non-Deterministic Polynomial time algorithms:

Fall 2006Costas Busch - RPI28 The class Non-Deterministic Polynomial time

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

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

Fall 2006Costas Busch - RPI31 The satisfiability problem is an - Problem

Fall 2006Costas Busch - RPI32 Observation: Deterministic Polynomial Non-Deterministic Polynomial

Fall 2006Costas Busch - RPI33 Open Problem: WE DO NOT KNOW THE ANSWER

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