Applied Computer Science II Chapter 3 : Turing Machines

Similar documents
Turing Machines: An Introduction

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

3515ICT Theory of Computation Turing Machines

CSE 135: Introduction to Theory of Computation Decidability and Recognizability

CS 3719 (Theory of Computation and Algorithms) Lecture 4

Chapter 7 Uncomputability

Computability Theory

The Halting Problem is Undecidable

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

24 Uses of Turing Machines

Turing Machines, Part I

Computational Models Lecture 8, Spring 2009

Theory of Computation Chapter 2: Turing Machines

Lecture 2: Universality

Automata and Computability. Solutions to Exercises

Algebraic Computation Models. Algebraic Computation Models

Theoretical Computer Science (Bridging Course) Complexity

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

THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER

Notes on Complexity Theory Last updated: August, Lecture 1

CAs and Turing Machines. The Basis for Universal Computation

The Classes P and NP. mohamed@elwakil.net

Quantum and Non-deterministic computers facing NP-completeness

1 Definition of a Turing machine

Introduction to Turing Machines

Simulation-Based Security with Inexhaustible Interactive Turing Machines

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

How To Understand The Theory Of Computer Science

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

Complexity Classes P and NP

Implementation of Recursively Enumerable Languages using Universal Turing Machine in JFLAP

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

CS 301 Course Information

Reading 13 : Finite State Automata and Regular Expressions

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge,

Computational complexity theory

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

The Classes P and NP

Introduction to Automata Theory. Reading: Chapter 1

Properties of Stabilizing Computations

Hilberts Entscheidungsproblem, the 10th Problem and Turing Machines

Introduction to computer science

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

Chapter 1. Computation theory

4.6 The Primitive Recursive Functions

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

UNIVERSIDADE DE SÃO PAULO

Integer factorization is in P

Scheduling Shop Scheduling. Tim Nieberg

CHAPTER 7 GENERAL PROOF SYSTEMS

Universality in the theory of algorithms and computer science

Factoring & Primality

Computability Classes for Enforcement Mechanisms*

How To Compare A Markov Algorithm To A Turing Machine

Regular Expressions and Automata using Haskell

3 Monomial orders and the division algorithm

Master of Arts in Mathematics

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

Analysis of Algorithms I: Binary Search Trees

Determination of the normalization level of database schemas through equivalence classes of attributes

The P versus NP Solution

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

Introduction to Logic in Computer Science: Autumn 2006

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

NP-Completeness and Cook s Theorem

ONLINE DEGREE-BOUNDED STEINER NETWORK DESIGN. Sina Dehghani Saeed Seddighin Ali Shafahi Fall 2015

PROCESS AND TRUTH-TABLE CHARACTERISATIONS OF RANDOMNESS

6.852: Distributed Algorithms Fall, Class 2

OHJ-2306 Introduction to Theoretical Computer Science, Fall

Lecture 1: Oracle Turing Machines

C H A P T E R Regular Expressions regular expression

The Optimum One-Pass Strategy for Juliet

Full and Complete Binary Trees

Notes on NP Completeness

Lecture summary for Theory of Computation

Turing Machines and Understanding Computational Complexity

Diversity Coloring for Distributed Data Storage in Networks 1

Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy

Hypercomputation: computing more than the Turing machine

An example of a computable

Two-dimensional Languages

HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)!

Finite Automata. Reading: Chapter 2

Informatique Fondamentale IMA S8

Reinforcement Learning

NP-complete? NP-hard? Some Foundations of Complexity. Prof. Sven Hartmann Clausthal University of Technology Department of Informatics

5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1

A Graph-Theoretic Network Security Game

How To Solve The Line Connectivity Problem In Polynomatix

A NOTE ON ACCELERATED TURING MACHINES

On String Languages Generated by Spiking Neural P Systems

Reinforcement Learning

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

Universal Turing Machine: A Model for all Computational Problems

Lecture 7: NP-Complete Problems

Fabio Patrizi DIS Sapienza - University of Rome

Approximation Algorithms

Institut für Informatik Lehrstuhl Theoretische Informatik I / Komplexitätstheorie. An Iterative Compression Algorithm for Vertex Cover

Semantics and Verification of Software

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

Transcription:

Applied Computer Science II Chapter 3 : Turing Machines Prof. Dr. Luc De Raedt Institut für Informatik Albert-Ludwigs Universität Freiburg Germany

Overview Turing machines Variants of Turing machines Multi-tape Non-deterministic The definition of algorithm The Church-Turing Thesis

Turing Machine Infinite tape Both read and write from tape Move left and right Special accept and reject state take immediate effect Machine can accept, reject or loop

F = { w# w w {0,1}} *

F = { w# w w {0,1}} *

Turing Machines

Configurations ua q bv yields u q acv if δ ( q, b) = ( q, c, L) i j i j ua q bv yields uac q v if δ ( q, b) = ( q, c, R) i j i j cannot go beyond left border! start configuration accepting configuration - state is rejecting configuration - state is 1 qw 1 0 accept reject A Turing Machine accepts input w if a sequence of configurations C,..., C exists where 1. C is start configuration 2. Each Cyields C i i+ 1 3. C is an accepting state k k q q

Languages The collection of strings that M accepts is the language of M, L(M) A language is Turing-recognizable (recursively enumerable) if some Turing machine accepts it Deciders halt on every input (i.e. they do not loop) A language is Turing-decidable (recursive) if some Turing machine decides it

F = w w w * { # {0,1}}

Variants of Turing Machines Most of them turn out to be equivalent to original model E.g. consider movements of head on tape {L,R,S} where S denotes same Equivalent to original model (represent S transition by first R and then L, or vice versa)

Multi-tape Turing Machines The input appears on Tape 1; others start off blank Transition function becomes δ : Q Γ Q Γ { L, R} k k k δ ( q, a,..., a ) = ( q, b,..., b, L, R,..., R) i 1 k j 1 k

Theorem Every multitape Turing machine has an equivalent single tape Turing machine. Proof idea See p. 137

Corollary A language is Turing recognizable if and only if some multitape TM recognizes it.

Non-deterministic TMs Transition function becomes δ : Q Γ Ρ ( Q Γ { L, R}) δ ( qa, ) = {( q, b, L),...,( q, b, R)} 1 1 Same idea/method as for NFAs k k Theorem Every non-deterministc Turing machine has an equivalent deterministic Turing machine. Proof idea Numbering the computation. Work with three tapes : 1.input tape (unchanged) 2.simulator tape 3.index for computation path in the tree - alphabet Σ = {1,..., b} b

Insert p 139

Theorem A language is Turing-recognizable if and only if some non-deterministic TM recognizes it. Corollary A language is decidable if and only if some non-deterministic TM decides it.

Enumerators Turing recognizable = Recursively enumerable Therefore, alternative model of TM, enumerator Works with input tape (initially empty) and output tape

Insert theorem 3.13

Equivalence with other models Many variants of TMs (and related constructs) exist. All of them turn out to be equivalent in power (under reasonable assumptions, such as finite amount of work in single step) Programming languages : Lisp, Haskell, Pascal, Java, C, The class of algorithms described is natural and identical for all these constructs. For a given task, one type of construct may be more elegant.

The definition of an David Hilbert algorithm Paris, 1900, Intern. Congress of Maths. 23 mathematical problems formulated 10 th problem to devise an algorithm that tests whether a polynomial has an integral root Algorithm = a process according to which it can be determined by a finite number of operations

Integral roots of 3 2 3 6xyz+ 3xy x 10 polynomials root = assignment of values to variables so that value of polynomial equals 0 integral root = all values in assignment are integers Church Turing Thesis There is no algorithm that solves this task. A formal Intuitive notion notion of algorithm of algorithm is necessary. Alonso Church : λ-calculus (cf. functional programming) = Allen Turing : Turing machines Turing machine algorithms

1 1 Integral roots of polynomials D= { p pis a polynomial with an integral root} Hilbert's 10th problem : is D decidable? D is not decidable, but Turing recognizable Consider D = { p pis a polynomial over x with an integral root} Define M : "the input is a polynomial over x 1. Evaluate p wrt xset to 0,1,-1,2,-2,... There If at any is point no p evaluates algorithm to 0, accept" that solves this task. A formal notion D of algorithm is necessary. 1 but not a decider Alonso Church : λ-calculus (cf. functional cmax can be converted into a decider using the bounds ± k for x programming) c1 Allen Turing 1 : Turing machines max This is a recognizer for M 1 k: number of terms; c : coefficient highest order term; c : largest absol. value coef Extension of M exist to D but remains a recognizer 1

Turing machines Three levels of description Formal description Implementation level High-level description The algorithm is described From now on, we use this level of description O : describes object O O,..., O : describes objects O,..., O 1 k 1 Encodings can be done in multiple manners; often not relevant because one encoding (and therefore TM can be transformed into another one) k

Connected graphs A= { G Gis a connected undirected graph} connected = every node can be reached from every other node

Overview Turing machines Variants of Turing machines Multi-tape Non-deterministic The definition of algorithm The Church-Turing Thesis