Other Models of Computation

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.
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?
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Recap CS605: The Mathematics and Theory of Computer Science.
Complexity 25-1 Complexity Andrei Bulatov #P-Completeness.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Complexity 11-1 Complexity Andrei Bulatov Space Complexity.
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)
Fall 2004COMP 3351 Recursively Enumerable and Recursive Languages.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Read sections 7.1 – 7.3 of the book for next time.
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
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.
Linear Bounded Automata LBAs
1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input.
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.
Final Exam Review Cummulative Chapters 0, 1, 2, 3, 4, 5 and 7.
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.
Complexity theory and combinatorial optimization Class #2 – 17 th of March …. where we deal with decision problems, finite automata, Turing machines pink.
Complexity Non-determinism. NP complete problems. Does P=NP? Origami. Homework: continue on postings.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
CS 3813: Introduction to Formal Languages and Automata Chapter 13 Other Models of Computation These class notes are based on material from our textbook,
1 Other Models of Computation Costas Busch - LSU.
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.
NPC.
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.
Chapter 15 P, NP, and Cook’s Theorem. 2 Computability Theory n Establishes whether decision problems are (only) theoretically decidable, i.e., decides.
Recursively Enumerable and Recursive Languages
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
1 The Chomsky Hierarchy. 2 Unrestricted Grammars: Productions String of variables and terminals String of variables and terminals.
Prof. Busch - LSU1 Time Complexity. Prof. Busch - LSU2 Consider a deterministic Turing Machine which decides a language.
1 Recursively Enumerable and Recursive Languages.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
MA/CSSE 474 Theory of Computation Universal Turing Machine Church-Turing Thesis Delayed due dates for HWs See updated schedule page. No class meeting.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
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.
Francisco Antonio Doria
Recursively Enumerable and Recursive Languages
Computability and Complexity
Time Complexity Costas Busch - LSU.
Linear Bounded Automata LBAs
PDAs Accept Context-Free Languages
Great Ideas in Computing Complexity Theory
CSE322 The Chomsky Hierarchy
ICS 353: Design and Analysis of Algorithms
Complexity 6-1 The Class P Complexity Andrei Bulatov.
Intro to NP Completeness
Computational Complexity
Time Complexity We use a multitape Turing machine
CLASSES P AND NP.
NP-Complete Problems.
Formal Languages, Automata and Models of Computation
CS21 Decidability and Tractability
Time Complexity Classes
NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, 1979.
NP-Completeness Lecture for CS 302.
Decidability continued….
Applications of Regular Closure
Algorithms CSCI 235, Spring 2019 Lecture 36 P vs
Presentation transcript:

Other Models of Computation

Models of computation: Turing Machines Recursive Functions Post Systems Rewriting Systems

Church’s Thesis: All models of computation are equivalent Turing’s Thesis: A computation is mechanical if and only if it can be performed by a Turing Machine

Church’s and Turing’s Thesis are similar: Church-Turing Thesis

Recursive Functions An example function: Domain Range

We need a way to define functions We need a set of basic functions

Basic Primitive Recursive Functions Zero function: Successor function: Projection functions:

Building complicated functions: Composition: Primitive Recursion:

Any function built from the basic primitive recursive functions is called: Primitive Recursive Function

A Primitive Recursive Function: (projection) (successor function)

Another Primitive Recursive Function:

Theorem: The set of primitive recursive functions is countable Proof: Each primitive recursive function can be encoded as a string Enumerate all strings in proper order Check if a string is a function

Theorem there is a function that is not primitive recursive Proof: Enumerate the primitive recursive functions

is not primitive recursive Define function differs from every is not primitive recursive END OF PROOF

A specific function that is not Primitive Recursive: Ackermann’s function: Grows very fast, faster than any primitive recursive function

Recursive Functions Accerman’s function is a Recursive Function

Recursive Functions Primitive recursive functions

Post Systems Have Axioms Have Productions Very similar with unrestricted grammars

Example: Unary Addition Axiom: Productions:

A production:

Post systems are good for proving mathematical statements from a set of Axioms

Theorem: A language is recursively enumerable if and only if a Post system generates it

Rewriting Systems They convert one string to another Matrix Grammars Markov Algorithms Lindenmayer-Systems Very similar to unrestricted grammars

Matrix Grammars Example: Derivation: A set of productions is applied simultaneously

Theorem: A language is recursively enumerable if and only if a Matrix grammar generates it

Markov Algorithms Grammars that produce Example: Derivation:

In general: Theorem: A language is recursively enumerable if and only if a Markov algorithm generates it

Lindenmayer-Systems They are parallel rewriting systems Example: Derivation:

Lindenmayer-Systems are not general As recursively enumerable languages Extended Lindenmayer-Systems: context Theorem: A language is recursively enumerable if and only if an Extended Lindenmayer-System generates it

Computational Complexity

Time Complexity: The number of steps during a computation Space Complexity: Space used during a computation

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

Example: Algorithm to accept a string : Use a two-tape Turing machine Copy the on the second tape Compare the and

Time needed: Copy the on the second tape Compare the and Total time:

For string of length time needed for acceptance:

Language class: A Deterministic Turing Machine accepts each string of length in time

In a similar way we define the class for any time function: Examples:

Example: The membership problem for context free languages (CYK - algorithm) Polynomial time

Theorem:

Polynomial time algorithms: Represent tractable algorithms: For small we can compute the result fast

The class for all Polynomial time All tractable problems

CYK-algorithm

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

Example: the Traveling Salesperson Problem 5 3 1 2 4 2 6 10 8 3 Question: what is the shortest route that connects all cities?

Question: what is the shortest route that connects all cities? 5 3 1 2 4 2 6 10 8 3 Question: what is the shortest route that connects all cities?

A solution: search exhuastively all hamiltonian paths L = {shortest hamiltonian paths} Exponential time Intractable problem

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

Example: Satisfiable:

Example: Not satisfiable

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

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

Example: Non-Deterministic Algorithm to accept a string : Use a two-tape Turing machine Guess the middle of the string and copy on the second tape Compare the two tapes

Time needed: Use a two-tape Turing machine Guess the middle of the string and copy on the second tape Compare the two tapes Total time:

In a similar way we define the class for any time function: Examples:

Non-Deterministic Polynomial time algorithms:

The class for all Non-Deterministic Polynomial time

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

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

The satisfiability problem is an - Problem

Observation: Deterministic Polynomial Non-Deterministic Polynomial

Open Problem: WE DO NOT KNOW THE ANSWER

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

NP-Completeness A problem is NP-complete if: It is in NP Every NP problem is reduced to it (in polynomial time)

Observation: If we can solve any NP-complete problem in Deterministic Polynomial Time (P time) then we know:

Observation: If we prove that we cannot solve an NP-complete problem in Deterministic Polynomial Time (P time) then we know:

Cook’s Theorem: The satisfiability problem is NP-complete Proof: Convert a Non-Deterministic Turing Machine to a Boolean expression in conjunctive normal form

Other NP-Complete Problems: The Traveling Salesperson Problem Vertex cover Hamiltonian Path All the above are reduced to the satisfiability problem

Observations: It is unlikely that NP-complete problems are in P The NP-complete problems have exponential time algorithms Approximations of these problems are in P