Fundamentals of Computer Science

Similar documents
Introduction to Turing Machines

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

CS21 Decidability and Tractability

Chapter 3: The Church-Turing Thesis

Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are all finite

1 Unrestricted Computation

ECS 120 Lesson 15 Turing Machines, Pt. 1

Turing Machines (TM) Deterministic Turing Machine (DTM) Nondeterministic Turing Machine (NDTM)

Turing Machines (TM) The Turing machine is the ultimate model of computation.

Lecture 13: Turing Machine

CSE 105 Theory of Computation

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,

CS 301. Lecture 17 Church Turing thesis. Stephen Checkoway. March 19, 2018

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

CSE 105 THEORY OF COMPUTATION

Turing Machines Part II

Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage?

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

Computability Theory. CS215, Lecture 6,

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.

CSCE 551: Chin-Tser Huang. University of South Carolina

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 16 : Turing Machines

CS4026 Formal Models of Computation

The Church-Turing Thesis

Decidable Languages - relationship with other classes.

Most General computer?

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 14 : Turing Machines

CSCC63 Worksheet Turing Machines

Computability and Complexity

Harvard CS 121 and CSCI E-121 Lecture 14: Turing Machines and the Church Turing Thesis

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

Introduction to Turing Machines. Reading: Chapters 8 & 9

Turing Machines. 22c:135 Theory of Computation. Tape of a Turing Machine (TM) TM versus FA, PDA

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta


COMPARATIVE ANALYSIS ON TURING MACHINE AND QUANTUM TURING MACHINE

Turing machines COMS Ashley Montanaro 21 March Department of Computer Science, University of Bristol Bristol, UK

Theory of Computation

CSci 311, Models of Computation Chapter 9 Turing Machines

Before We Start. Turing Machines. Languages. Now our picture looks like. Theory Hall of Fame. The Turing Machine. Any questions? The $64,000 Question

The Turing machine model of computation

jflap demo Regular expressions Pumping lemma Turing Machines Sections 12.4 and 12.5 in the text

UNIT 1 TURING MACHINE

CSE 105 THEORY OF COMPUTATION

IV. Turing Machine. Yuxi Fu. BASICS, Shanghai Jiao Tong University

Lecture 14: Recursive Languages

An example of a decidable language that is not a CFL Implementation-level description of a TM State diagram of TM

Part I: Definitions and Properties

Theory of Computation (IX) Yijia Chen Fudan University

Theory of Computation Turing Machine and Pushdown Automata

The Power of One-State Turing Machines

CAPES MI. Turing Machines and decidable problems. Laure Gonnord

Computation Histories

Computational Models - Lecture 6

Theory of Computer Science

Variants of Turing Machine (intro)

UNRESTRICTED GRAMMARS

Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death

Turing Machines. Lecture 8

Lecture 12: Mapping Reductions

Exam Computability and Complexity

Automata Theory (2A) Young Won Lim 5/31/18

Automata Theory. Definition. Computational Complexity Theory. Computability Theory

Turing Machine Variants

Let us first give some intuitive idea about a state of a system and state transitions before describing finite automata.

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama

The Turing Machine. Computability. The Church-Turing Thesis (1936) Theory Hall of Fame. Theory Hall of Fame. Undecidability

CS151 Complexity Theory. Lecture 1 April 3, 2017

Turing Machines. The Language Hierarchy. Context-Free Languages. Regular Languages. Courtesy Costas Busch - RPI 1

Testing Emptiness of a CFL. Testing Finiteness of a CFL. Testing Membership in a CFL. CYK Algorithm

CS187 - Science Gateway Seminar for CS and Math

Turing Machines Decidability

Equivalence of TMs and Multitape TMs. Theorem 3.13 and Corollary 3.15 By: Joseph Lauman

An example of a decidable language that is not a CFL Implementation-level description of a TM State diagram of TM

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2016, face-to-face day section Prof. Marvin K. Nakayama

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

Turing Machines. Fall The Chinese University of Hong Kong. CSCI 3130: Formal languages and automata theory

The decision problem (entscheidungsproblem), halting problem, & Turing machines. CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/

Automata Theory - Quiz II (Solutions)

Theory of Computation

ENEE 459E/CMSC 498R In-class exercise February 10, 2015

Turing Machines. Our most powerful model of a computer is the Turing Machine. This is an FA with an infinite tape for storage.

Turing machines and linear bounded automata

HIS LEGACY. 100 Years Turing celebration. Gordana Dodig Crnkovic, IDT Open Seminar. Computer Science and Network Department Mälardalen University

7.2 Turing Machines as Language Acceptors 7.3 Turing Machines that Compute Partial Functions

Theory of Computation - Module 4

Decidability: Church-Turing Thesis

Models. Models of Computation, Turing Machines, and the Limits of Turing Computation. Effective Calculability. Motivation for Models of Computation

Turing Machines. COMP2600 Formal Methods for Software Engineering. Katya Lebedeva. Australian National University Semester 2, 2014

Automata Theory CS S-12 Turing Machine Modifications

Griffith University 3130CIT Theory of Computation (Based on slides by Harald Søndergaard of The University of Melbourne) Turing Machines 9-0

CMP 309: Automata Theory, Computability and Formal Languages. Adapted from the work of Andrej Bogdanov

Equivalent Variations of Turing Machines

Computation. Some history...

Further discussion of Turing machines

SCHEME FOR INTERNAL ASSESSMENT TEST 3

Busch Complexity Lectures: Turing Machines. Prof. Busch - LSU 1

CSE 105 THEORY OF COMPUTATION

Undecidable Problems and Reducibility

Transcription:

Fundamentals of Computer Science Chapter 8: Turing machines Henrik Björklund Umeå University February 17, 2014

The power of automata Finite automata have only finite memory. They recognize the regular languages.

The power of automata Finite automata have only finite memory. They recognize the regular languages. Pushdown automata have infinite memory, but it is restricted to stack access. They recognize the context-free languages.

The power of automata Finite automata have only finite memory. They recognize the regular languages. Pushdown automata have infinite memory, but it is restricted to stack access. They recognize the context-free languages. What is a reasonable extension of these automata that capture all algorithmic computation? This is the question that Alan Turing asked.

Alan Turing Alan Turing (1912-1954) was a British mathematician, cryptoanalyst, and computer scientist. After undergraduate studies in Cambridge, he went to Princeton, where he studied under Alonzo Church and recieved his PhD. Turing is one of the most influential persons in the history of computer science.

Turing machines The model Turing came up with has come to be known as the Turing machines (TM). This invention was acknowledged by John von Neumann as the central notion leading to the development of the modern computer.

Turing machines The model Turing came up with has come to be known as the Turing machines (TM). This invention was acknowledged by John von Neumann as the central notion leading to the development of the modern computer. A Turing machine, like a PDA, has unlimited memory. The difference is that it is not limited to stack discipline, but can move freely along its storage, which is usually referred to as a tape.

1 0 1 1 1 # 1 1 0 0 0

1 0 1 1 1 # 1 1 0 0 0

1 0 1 1 1 # 1 1 0 0 0

1 0 1 1 1 # 1 1 0 0 0

1 0 1 1 1 # 1 1 0 0 0

1 0 1 1 1 # 1 1 0 0 0

1 0 1 1 1 # 1 1 0 0 0

1 0 1 1 1 # 1 1 0 0 0

1 0 1 1 1 # 1 1 0 0 0

1 0 1 1 1 # 1 1 0 0 0

1 0 1 1 1 # 1 1 0 0 0

1 0 1 1 1 # 1 1 0 0 0

1 0 1 1 1 # 1 1 0 0 0

1 0 1 1 1 # 1 1 0 0 $

1 0 1 1 1 # 1 1 0 0 $

1 0 1 1 1 # 1 1 0 0 $

1 0 1 1 1 # 1 1 0 0 $

1 0 1 1 1 # 1 1 0 0 $

1 0 1 1 1 # 1 1 0 0 $

1 0 1 1 $ # 1 1 0 0 $

1 0 1 1 $ # 1 1 0 0 $

1 0 1 1 $ # 1 1 0 0 $

1 0 1 1 $ # 1 1 0 0 $

1 0 1 1 $ # 1 1 0 0 $

1 0 1 1 $ # 1 1 0 0 $

1 0 1 1 $ # 1 1 0 0 $

1 0 1 1 $ # 1 1 0 $ $

1 0 1 1 $ # 1 1 0 $ $

1 0 1 1 $ # 1 1 0 $ $

1 0 1 1 $ # 1 1 0 $ $

1 0 1 1 $ # 1 1 0 $ $

1 0 1 1 $ # 1 1 0 $ $

1 0 1 $ $ # 1 1 0 $ $

1 0 1 $ $ # 1 1 0 $ $

1 0 1 $ $ # 1 1 0 $ $

1 0 1 $ $ # 1 1 0 $ $

1 0 1 $ $ # 1 1 0 $ $

1 0 1 $ $ # 1 1 0 $ $

1 0 1 $ $ # 1 1 0 $ $

1 0 1 $ $ # 1 1 $ $ $

1 0 1 $ $ # 1 1 $ $ $

1 0 1 $ $ # 1 1 $ $ $

1 0 1 $ $ # 1 1 $ $ $

1 0 1 $ $ # 1 1 $ $ $

1 0 1 $ $ # 1 1 $ $ $

1 0 $ $ $ # 1 1 $ $ $

1 0 $ $ $ # 1 1 $ $ $

1 0 $ $ $ # 1 1 $ $ $

1 0 $ $ $ # 1 1 $ $ $

1 0 $ $ $ # 1 1 $ $ $

1 0 $ $ $ # 1 1 $ $ $

1 0 $ $ $ # 1 1 $ $ $

1 0 $ $ $ # 1 $ $ $ $

1 0 $ $ $ # 1 $ $ $ $

1 0 $ $ $ # 1 $ $ $ $

1 0 $ $ $ # 1 $ $ $ $

1 0 $ $ $ # 1 $ $ $ $

1 0 $ $ $ # 1 $ $ $ $

1 $ $ $ $ # 1 $ $ $ $

1 $ $ $ $ # 1 $ $ $ $

1 $ $ $ $ # 1 $ $ $ $

1 $ $ $ $ # 1 $ $ $ $

1 $ $ $ $ # 1 $ $ $ $

1 $ $ $ $ # 1 $ $ $ $

1 $ $ $ $ # 1 $ $ $ $

1 $ $ $ $ # $ $ $ $ $

1 $ $ $ $ # $ $ $ $ $

1 $ $ $ $ # $ $ $ $ $

1 $ $ $ $ # $ $ $ $ $

1 $ $ $ $ # $ $ $ $ $

1 $ $ $ $ # $ $ $ $ $

$ $ $ $ $ # $ $ $ $ $

Formal definition A Turing machine is a tuple where Q is a finite set of states, Σ is the input alphabet, Γ Σ is the tape alphabet, M = (Q, Σ, Γ, δ, q 0,, F), δ : Q Γ Q Γ {L, R} is the transition function, q 0 Q is the initial state, (Γ \ Σ) is the blank tape symbol, and F Q is the set of accepting states. The machine halts when it cannot perform a transition. In particular, we assume that there are no transitions from states in F.

Turing machines In the definition we use here, the following features are noteworthy: The tape is unbounded in both directions. The machine is deterministic, i.e., given the current state and the current symbol under the read/write head, there is only one possible action. There is no special input source. The input is assumed to be written on the tape before the computation starts. The read/write head is assumed to point to the leftmost symbol of the input. The input is assumed to be preceeded and followed by infinite sequences of symbols.

Configurations A configuration of a TM must specify the current state, the current tape content, and the current position of the read/write head. If the machine is in state q, the non-blank part of the tape has the sequence a 1 a 2 a k 1 a k a k+1 a n of symbols, and the read/write head points at the tape cell with symbol a k, we write this as a 1 a 2 a k 1 qa k a k+1 a n.

Changing configuration We write C 1 C 2 if the machine can go from configuration C 1 to configuration C 2 with one transition. For example, if δ(q 1, a) = (q 2, b, R), then abqabb abbqbb.

Changing configuration We write C 1 C 2 if the machine can go from configuration C 1 to configuration C 2 with one transition. For example, if δ(q 1, a) = (q 2, b, R), then abqabb abbqbb. We write C 1 C 2 if the machine can go from C 1 to C 2 in zero or more steps.

Defining lanugages We can now use a TM M to define a language L(M) as follows: L(M) = {w Σ q 0 w uq f v with q f F u, v Γ }.

Defining lanugages We can now use a TM M to define a language L(M) as follows: L(M) = {w Σ q 0 w uq f v with q f F u, v Γ }. Note: If the input w does not belong to L(M), one of two things can happen: 1. The machines halts in a non-accpting state. 2. The machine enters an infinite loop.

TMs as transducers In general, a transducer is a device that transforms and input word into an output word.

TMs as transducers In general, a transducer is a device that transforms and input word into an output word. We can view a TM as a transducer that defines a function f : Σ Γ as follows: f (w) = w if and only if for some q f F. q 0 w q f w

Computable functions A function f with domain D is called Turing computable or just computable if there is a TM M such that for some q f F for all w D. q 0 w M q f f (w)

TMs as algorithms In Turing s day, the English word computer meant a human being who performed calculations with pen and paper.

TMs as algorithms In Turing s day, the English word computer meant a human being who performed calculations with pen and paper. Turing realized that such computers used algorithms, e.g., for multiplication, division, etc.

TMs as algorithms In Turing s day, the English word computer meant a human being who performed calculations with pen and paper. Turing realized that such computers used algorithms, e.g., for multiplication, division, etc. The Turing machine model was intended to capture the nature of such algorithms, i.e., for every such algorithm, there should be a TM that implemented it.

The Church-Turing thesis One possible statement: For every algorithm, there is a Turing machine that implements it.

The Church-Turing thesis One possible statement: For every algorithm, there is a Turing machine that implements it. Another possibility: Whatever can be computed by purely mechanical means can be computed by some Turing machine.

Alonzo Church Alonzo Church (1903-1995) was an American mathematician who contributed greatly to the foundations of computer science. He recieved his PhD at Princeton. He is most well known as the inventor of the λ-calculus, proving that Hilbert s Entscheidungsproblem is undecidable, and the Church-Turing thesis. His doctoral students include Alan Turing, Michael O. Rabin, Dana Scott, and Stephen Kleene.