Outline. Outline. Semantics of TM. Language Hierarchy

Similar documents
3515ICT Theory of Computation Turing Machines

CSE 135: Introduction to Theory of Computation Decidability and Recognizability

CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move.

Automata and Computability. Solutions to Exercises

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.

Turing Machines: An Introduction

The Halting Problem is Undecidable

Computational Models Lecture 8, Spring 2009

CS 3719 (Theory of Computation and Algorithms) Lecture 4

Chapter 7 Uncomputability

Turing Machines, Part I

Lecture 2: Universality

Theory of Computation Chapter 2: Turing Machines

1 Definition of a Turing machine

Honors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, School of Informatics University of Edinburgh als@inf.ed.ac.

Computability Theory

Implementation of Recursively Enumerable Languages using Universal Turing Machine in JFLAP

24 Uses of Turing Machines

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile

Introduction to Turing Machines

Prime Numbers. Difficulties in Factoring a Number: from the Perspective of Computation. Computation Theory. Turing Machine 電 腦 安 全

Notes on Complexity Theory Last updated: August, Lecture 1

Diagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach.

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 4 Nancy Lynch

CS 301 Course Information

CAs and Turing Machines. The Basis for Universal Computation

Algebraic Computation Models. Algebraic Computation Models

Introduction to Automata Theory. Reading: Chapter 1

Complexity Classes P and NP

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

6.080/6.089 GITCS Feb 12, Lecture 3

THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER

Model 2.4 Faculty member + student

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

MATHEMATICS: CONCEPTS, AND FOUNDATIONS Vol. III - Logic and Computer Science - Phokion G. Kolaitis

Welcome to... Problem Analysis and Complexity Theory , 3 VU

THE SEARCH FOR NATURAL DEFINABILITY IN THE TURING DEGREES

Overview of E0222: Automata and Computability

How To Understand The Theory Of Computer Science

Finite Automata. Reading: Chapter 2

Introduction to Theory of Computation

The Classes P and NP

Automata on Infinite Words and Trees

Properties of Stabilizing Computations

Lecture summary for Theory of Computation

Theoretical Computer Science (Bridging Course) Complexity

SRM UNIVERSITY FACULTY OF ENGINEERING & TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF SOFTWARE ENGINEERING COURSE PLAN

Introduction to NP-Completeness Written and copyright c by Jie Wang 1

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)

Composability of Infinite-State Activity Automata*

Regular Languages and Finite State Machines

Notes on Complexity Theory Last updated: August, Lecture 1

The Classes P and NP. mohamed@elwakil.net

Universality in the theory of algorithms and computer science

How To Compare A Markov Algorithm To A Turing Machine

ω-automata Automata that accept (or reject) words of infinite length. Languages of infinite words appear:

Two-dimensional Languages

Computability Classes for Enforcement Mechanisms*

Cardinality. The set of all finite strings over the alphabet of lowercase letters is countable. The set of real numbers R is an uncountable set.

Algorithmic Software Verification

Two Way F finite Automata and Three Ways to Solve Them

Regular Expressions and Automata using Haskell

Complexity of Algorithms

4.6 The Primitive Recursive Functions

Notes on NP Completeness

Increasing Interaction and Support in the Formal Languages and Automata Theory Course

Quantum and Non-deterministic computers facing NP-completeness

Chapter 1. Computation theory

GENERIC COMPUTABILITY, TURING DEGREES, AND ASYMPTOTIC DENSITY

Outline 2. 1 Turing Machines. 2 Coding and Universality. 3 The Busy Beaver Problem. 4 Wolfram Prize. 5 Church-Turing Thesis.

Models of Sequential Computation

CS5236 Advanced Automata Theory

Reminder: Complexity (1) Parallel Complexity Theory. Reminder: Complexity (2) Complexity-new

Reminder: Complexity (1) Parallel Complexity Theory. Reminder: Complexity (2) Complexity-new GAP (2) Graph Accessibility Problem (GAP) (1)

Introduction to Logic in Computer Science: Autumn 2006

NP-Completeness and Cook s Theorem

On the Structure of Turing Universe: The Non-Linear Ordering of Turing Degrees

Formal Grammars and Languages

Increasing Interaction and Support in the Formal Languages and Automata Theory Course

Finite Automata. Reading: Chapter 2

CPSC 211 Data Structures & Implementations (c) Texas A&M University [ 313]

Computer Architecture Syllabus of Qualifying Examination

Universal Turing Machine: A Model for all Computational Problems

Course Manual Automata & Complexity 2015

Complexity Theory. Jörg Kreiker. Summer term Chair for Theoretical Computer Science Prof. Esparza TU München

Philadelphia University Faculty of Information Technology Department of Computer Science First Semester, 2007/2008.

Lecture 36: Turing Machines [Fa 14]

Omega Automata: Minimization and Learning 1

Hypercomputation: computing more than the Turing machine

Informatique Fondamentale IMA S8

Deterministic Finite Automata

CHAPTER 7 GENERAL PROOF SYSTEMS

Compiler Construction


FINITE STATE AND TURING MACHINES

Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy

Super Turing-Machines

Simulation-Based Security with Inexhaustible Interactive Turing Machines

Fast nondeterministic recognition of context-free languages using two queues

Transcription:

Outline Language Hierarchy Definition of Turing Machine TM Variants and Equivalence Decidability Reducibility Outline Language Hierarchy Definition of Turing Machine TM Variants and Equivalence Decidability Reducibility Language Hierarchy Semantics of TM Regular: finite memory CFG/PDA: infinite memory but in stack space TM: infinite and unrestricted memory TM Decidable/Recursive TM Recognizable/Recursively Enumerable Not a real machine, but a model of computation Components: 1-way infinite tape: unlimited memory Store input, output, and intermediate results Infinite cells Each cell has a symbol from a finite alphabet Tape head: Point to one cell Read or write a symbol to that cell move left or right

States of a TM Initial state: Head on leftmost cell input on the tape Blank everywhere else Accept state Reject state Loop Accept or reject immediately Formal Definition Example of transition function: The tape changing: An Example Configuration A configuration of TM: Current state Symbols on tape Head of location A formal specification of a configuration: ex: 1011 q 7 01111

For two configurations: Configuration Two special cases: the leftmost cell q i bv yields q j cv for δ qi, b) = ( q j q i bv yields cq j v for δ qi, b) = ( q j on the cell with blank symbol (, c, L) (, c, R) Languages Turing-recognizable Languages: * For a L Γ, exists a M such that M recognizes L Recognize means accept, reject, or loop Turing-decidable languages: * For a L Γ, exists a M such that M decides L Decide means halting: either accept or reject Turing-decidable Turing-recognizable Halting Problem is Turing-recognizable, but not decidable. Not all languages are Turing-recognizable There are some languages cannot be recognized by a TM. Complement of Halting problem is Turing-unrecognizable Configuration Initial configuration with input w: q 0 w Accepting configuration: uq accept v Rejecting configuration: uq reject v uq accept v and uq reject v do not yield any other configurations Immediate effect of accepting/rejecting Halting configurations For a TM M, a string w L(M ) if there is a sequence of configurations C 1,C 2, C k such that: C 1 =q 0 w C i yields C i+1 for C k = uq accept v, An example Semantical description: For an input string w: { sweep left to the right along the tape, crossing off every other 0 if tape contains single 0 { return accepted;} elseif tape contains odd number and more than one of 0s { return (rejected);} else go back to leftmost cell; } Formal description:

Outline Language Hierarchy Definition of Turing Machine TM Variants and Equivalence Decidability Reducibility Simple variant They are equivalent in recognizing language: They can be simulated by original the TM The difference is not significant TM Variants Multitape TM Nondeterministic TM Enumerators Equivalence:All have same power Recognize the same class of languages Can be simulated by an ordinary TM Multitape TM A multitape TM is identical to ordinary TM except: k tapes, where k 1 Each tap has its own head

Multitape TM Theorem: each multitape TM has an equivalent single tape TM Put # in a single tape for demarcation of original k tapes. Each movement of M is simulated by a series movement of S on each segment. For a right-move on the rightmost cell of ith tape in M, S write blank symbol in (i+1)th #, and right-shifts all symbols after that one cell. NTM A computation single path and multi-path in a tree: Nondeterministic TM A nondeterministic TM is identical to an ordinary TM except: At any point the head has several possibilities to read/write/move. In deterministic TM, a computation is a single path with sequence of configurations. In nondeterministic TM, a computation is a tree or a directed acyclic graph. A NTM accepts an input string if there exists a path leading to an accept state. If all paths lead to reject state, then this input is rejected. Nodeterminism Is nondeterministic model always equivalent to a deterministic model? Yes, for FA No, for PDA Some CFL cannot be recognized by any DPDA. Yes, for TM!

NTM Theorem: Every NTM has an equivalent DTM. 1 2... 11 12 13 22 21 23 121 122 123 (root) For a computing tree of a NTM N with an input w, simulated with a 3-tape DTM M: 1st tape: input w 2nd tape: tape of a computing path with N 3rd tape: node address (finite) Enumerator Theorem: A language is Turing-recognizable iff some enumerator enumerates it. For a language, if E enumerates it, then construct a TM M works as: Run E. Every time that E outputs a string, compare it with input w. If w appears in the output of E, accept. For a language recognized by a TM M, construct E such that: Run M for i steps on each input, s1, s2,, si. If any computations accept, print out the corresponding sj. Repeat the above two steps with all possible inputs An enumerator can be regarded as a 2-tape TM. Write accepted list on the 2 nd tape. Enumerator Semantically, an enumerator is a TM with an attached printer. Every time the TM wants to add a string to its output list, it sends the string to the printer. The language enumerated by an enumerator E is the collection of all the strings that E eventually prints out. Other Variants Write-twice TM Each cell on tape can only be written twice Write-once TM Each cell on tape can only be written once TM with doubly infinite tape Two-way infinite tape Universal TM A TM that takes input of description of another TM.

Thesis Church-Turing Thesis: Any algorithm can be expressed as a TM Formally defines an algorithm: Extended Church-Turing Thesis: Any polynomial-time algorithm can be expressed as a TM that operates in polynomial time. A polynomial-time algorithm: number of element operations is a polynomial function of input length. A polynomial-time TM: number of state transition is a polynomial function of input length. Outline Language Hierarchy Definition of Turing Machine TM Variants and Equivalence Decidability Reducibility Describing TM Formal description specifying Turing machine s states, transition function, and so on. Implementation description using natural language to describe the way that the Turing machine moves its head and the way that it stores data on its tape. High-level description using natural language describe an algorithm, ignoring the implementation model. Solvability Solvable: an algorithm to solve it, a TM decides it. Unsolvable: not algorithm to solve it no TM can decide it.

Decidable Language Decidable Language Acceptance problem: Whether a particular DFA B accepts a given input string w. Membership problem: Another way to say: whether <B,w> is a member of A DFA. Theorem: A DFA is a decidable language. Theorem: A REX is a decidable language. Decidable Language Decidable Language Theorem: A NFA is a decidable language. Emptiness test problem: Whether the language of a particular DFA is empty. Theorem: E DFA is a decidable language.

Decidable Language Halting Problem Equivalence problem: Test whether two DFAs recognize the same language. Theorem: EQ DFA is a decidable language. Theorem: A TM is Turing-recognizable. U is an example of universal TM. U keeps looping if M neither accepts or rejects. Other Problems A CFG is decidable. E CFG is decidable. EQ CFG is undecidable. CFG is not closed in intersection and complementation. Halting Problem Theorem: A TM is undecidable. Can be proved by recursive theorem. A TM is undecidable. Halting problem E TM is undecidable. EQ TM is undecidable.

Unrecognizable Theorem: There are languages that cannot recognized by any TM. The set of TMs are countable Number of transition functions is countable. The set of languages is uncountable. Diagonalization method to prove this Countable Set of position rational numbers is countable: Countable and Uncountable Two infinite sets A and B are the same size if there is a correspondence from A to B. A correspondence is a one-to-one and onto function: Uncountable Set of real numbers R is uncountable: one-to-one: whenever Onto: A set is countable if either it is finite or it has the same size as N ={1,2,3 }; otherwise it is uncountable.

Uncountable The set of all languages over an alphabet is uncountable. Think that a real number is a string over alphabet of {., 0,1,2,3,4,5,6,7,8,9} Similar diagonalization way to prove with general alphabet Theorem: is not Turing-recognizable If is Turing-recognizable, and A TM is Turing-recognizable, then A TM must be decidable. contradiction! Theorem: A language is decidable iff both it and its complement language are Turing-recognizable. If A is decided by M 1, then : M 2 = on input w: 1. Run M 1 on w. 2. If M 1 rejects, accept; if M 1 accepts, reject. M 2 decides A If A and A are Turing-recognizable: Outline Language Hierarchy Definition of Turing Machine TM Variants and Equivalence Decidability Reducibility

Reducibility Semantics Reduce A TM to HALT TM PCP Problem Mapping Reducibility