CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Turing Machines.

Slides:



Advertisements
Similar presentations
Turing Machines Memory = an infinitely long tape Persistent storage A read/write tape head that can move around the tape Initially, the tape contains only.
Advertisements

Variants of Turing machines
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Pages COMPUTABILITY THEORY.
Foundations of (Theoretical) Computer Science Chapter 3 Lecture Notes (Section 3.2: Variants of Turing Machines) David Martin With.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Variants.
CS605 – The Mathematics and Theory of Computer Science Turing Machines.
Applied Computer Science II Chapter 3 : Turing Machines Prof. Dr. Luc De Raedt Institut für Informatik Albert-Ludwigs Universität Freiburg Germany.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
Complexity ©D.Moshkovitz 1 Turing Machines. Complexity ©D.Moshkovitz 2 Motivation Our main goal in this course is to analyze problems and categorize them.
CS5371 Theory of Computation Lecture 11: Computability Theory II (TM Variants, Church-Turing Thesis)
CS 310 – Fall 2006 Pacific University CS310 Turing Machines Section 3.1 November 6, 2006.
Lecture 5 Turing Machines
CHAPTER 3 The Church-Turing Thesis
Foundations of (Theoretical) Computer Science
CS5371 Theory of Computation Lecture 10: Computability Theory I (Turing Machine)
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
CS 461 – Nov. 21 Sections 7.1 – 7.2 Measuring complexity Dividing decidable languages into complexity classes. Algorithm complexity depends on what kind.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Section 11.4 Language Classes Based On Randomization
 Computability Theory Turing Machines Professor MSc. Ivan A. Escobar
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Turing Machines.
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong Turing.
CSCI 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Variants.
The Church-Turing Thesis Chapter 3 Giorgi Japaridze Theory of Computability.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
CSCI 3130: Formal languages and automata theory Tutorial 7 Chin.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
 2004 SDU 1 Algorithm Informally speaking, an algorithm is a collection of simple instructions for carrying out a task. Example:  Elementary arithmetic.
Umans Complexity Theory Lectures Lecture 1b: Turing Machines & Halting Problem.
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong Decidable.
The Church-Turing Thesis
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY * Read chapter 4 of the book for next time * Lecture9x.ppt.
Theory of Computational Complexity TA : Junichi Teruyama Iwama lab. D3
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong Polynomial.
The Church-Turing Thesis
More variants of Turing Machines
CSCI 2670 Introduction to Theory of Computing
Time complexity Here we will consider elements of computational complexity theory – an investigation of the time (or other resources) required for solving.
Busch Complexity Lectures: Turing Machines
Turing Machines.
CS21 Decidability and Tractability
Polynomial time The Chinese University of Hong Kong Fall 2010
CSE 105 theory of computation
CSCI 2670 Introduction to Theory of Computing
CSE 105 theory of computation
Reducibility The Chinese University of Hong Kong Fall 2010
Chapter 3: The CHURCH-Turing thesis
فصل سوم The Church-Turing Thesis
Decidable and undecidable languages
CS21 Decidability and Tractability
More undecidable languages
CS21 Decidability and Tractability
The Church-Turing Thesis
Decidability and Tractability
Variants of Turing Machines
CSE 105 theory of computation
More undecidable languages
Variants of Turing machines
Intro to Theory of Computation
CSE 105 theory of computation
Presentation transcript:

CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Turing Machines and Variants Fall 2009

The Church-Turing Thesis Turing Machine quantum computing DNA computing cosmic computing

The Church-Turing Thesis “On Computable Numbers, with an Application to the Entscheidungsproblem” 1936: Section 9. The extent of the computable numbers All arguments [for the CT Thesis] which can be given are bound to be, fundamentally, appeals to intuition, and for this reason rather unsatisfactory mathematically. The arguments which I shall use are of three kinds: 1. A direct appeal to intuition 2. A proof of the equivalence of two definitions (In case the new definition has greater intuitive appeal) 3. Giving examples of large classes of numbers [languages] which are computable.

Looping behavior Something strange can happen in a Turing Machine: Inputs can be divided into three types q0q0 q acc q rej  = {0, 1} input:  ☐/☐R☐/☐R 0/0R 1/1R This machine never halts q acc q rej accept rejectloop forever

Recognizing versus deciding Looping is an undesirable behavior so we say The language recognized by a TM is the set of all inputs that make it reach q acc A TM decides language L if it recognizes L and does not loop on any input acceptrejectloop

Examples of decidable languages L 2 = { $a i b j c k : i  j = k and i, j, k > 0 } L 1 = {w$w: w ∈ { a, b }*} L 3 = { $ x 1 $ x 2... $ x l : x i ∈ {0, 1}* and x i ≠ x j for each i ≠ j} L 4 = { 〈 G 〉 : G is a connected undirected graph} We will describe how these Turing Machines work, but avoid unnecessary implementation detail

Programming Turing Machines L 3 = { $ x 1 $ x 2... $ x l : x i ∈ {0, 1}* and x i ≠ x j for each i ≠ j} $01$0011$1 input: Place a mark on the leftmost $ (i.e. replace $ by $ ) and move right  If current symbol is ☐, accept Otherwise, if it is not $, reject $01$0011$1  Place another mark on the next $ (If there are no more $, accept) 2. $01$0011$1  

Programming Turing Machines L 3 = { $ x 1 $ x 2... $ x l : x i ∈ {0, 1}* and x i ≠ x j for each i ≠ j} current state: Go to stage Move the right $ to the right If not possible, move the left $ to the right and put the right one next to it If not possible, accept $01$0011$1     Compare the two strings to the right of marked $. If there are same, reject 3. $01$0011$1      

Programming Turing Machines L 3 = { $ x 1 $ x 2... $ x l : x i ∈ {0, 1}* and x i ≠ x j for each i ≠ j} Go to stage Move the right $ to the right If not possible, move the left $ to the right and put the right one next to it If not possible, accept $01$0011$1     Compare the two strings to the right of marked $. If there are same, reject 3. $01$0011$1   accept

Programming Turing Machines L 4 = { 〈 G 〉 : G is a connected undirected graph} Q: How do we feed a graph into a Turing Machine? A: We represent it by a string, e.g (1,2,3,4)((1,4),(2,3),(3,4)(4,2)) Convention for describing graphs: ( nodes )( edges ) no node must repeat edges are pairs ( node 1, node 2 )

Programming Turing Machines L 4 = { 〈 G 〉 : G is a connected undirected graph} To check if 〈 G 〉 is in L 4 : 0. Verify that 〈 G 〉 is the description of a graph (no vertex repeats; edges only go between nodes) 1.Mark the first node of G 2.Repeat until no new nodes are marked: For each node, mark it if it is attached to an already marked node 3.If all nodes are marked accept, otherwise reject.

Programming Turing Machines L 4 = { 〈 G 〉 : G is a connected undirected graph} (1,2,3,4)((1,4)(2,3)(3,4)(4,2))               etc (1,2,3,4)((1,4)(2,3)(3,4)(4,2))    

The Church-Turing Thesis “On Computable Numbers, with an Application to the Entscheidungsproblem” 1936: Section 9. The extent of the computable numbers All arguments [for the CT Thesis] which can be given are bound to be, fundamentally, appeals to intuition, and for this reason rather unsatisfactory mathematically. The arguments which I shall use are of three kinds: 1. A direct appeal to intuition 2. A proof of the equivalence of two definitions (In case the new definition has greater intuitive appeal) 3. Giving examples of large classes of numbers [languages] which are computable.

The multitape Turing Machine The transition may depend on the contents of all the cells Different tape heads can be moved independently state control tape 1 … 010 tape 2 … 01 tape 3 … 100

The multitape Turing Machine Multiple tapes are convenient, e.g. one can serve as temporary storage … 010 … 01 … 100 … 110 … 100 q3q3 q7q7 0/1R ☐ /1R 0/0L … 011

The multitape Turing Machine Multitape Turing Machines are equivalent to single-tape Turing Machines M … 010 … 01 … 100  = {0, 1, ☐ } S … 01010##0#10   ’ = {0, 1, ☐, 0, 1, ☐, #}   #

The multitape Turing Machine We show how to simulate a multitape TM on an ordinary (single tape TM) –To be specific, let’s do a 3-tape TM At each point, the tape contents should be like where exactly one of the x s, y s, and z s is dotted #x 1 x 2...x i #y 1 y 2...y j #z 1 z 2...z k #

Simulating a multitape Turing Machine Initialization: Take the input and turn it into w 1 w 2...w n #w 1 w 2...w n # ☐ # ☐ #    … 010###  #  … 010

The multitape Turing Machine Simulating a single move in M Scan the tape from left to right … 01010##0#10  # Remember state of M and symbols under dots in state of S Update according to transition of M 0☐00☐0 q3q3 q3q3 0/1R ☐ /1R 0/0L q7q7 This may require you to “free up” some space … 01010##0#10  #