Lecture 5 Turing Machines Jan Maluszynski, IDA, 2007 http://www.ida.liu.se/~janma janma @ ida.liu.se Jan Maluszynski - HT 2007
Motivation/Example of TM Formal Definition Multitape Turing Machines Outline Motivation/Example of TM Formal Definition Multitape Turing Machines Nondeterministic Turing Machines Enumerators Turing-computable functions Church-Turing thesis Other models Jan Maluszynski - HT 2007
One head scanning a cell, moving right/left Basic Turing Machine Half-infinite tape One head scanning a cell, moving right/left Content of the scanned cell can be changed while head is moving Finite number of states Moves controlled by the content of the scanned cell and actual state Jan Maluszynski - HT 2007
Example TM Jan Maluszynski - HT 2007
(Q,, , , q0 , qaccept , qreject ) Q set of states Turing Machine (Q,, , , q0 , qaccept , qreject ) Q set of states input alphabet not containing (the blank symbol) tape alphabet including ; : QQ{L,R} transition function q0 the start state qaccept the accepting state qreject the rejecting state Qaccept Qreject No transitions out from accept and reject states Jan Maluszynski - HT 2007
Example of a two-tape TM Multitape TM Example of a two-tape TM Jan Maluszynski - HT 2007
Example of a non-deterministic TM Jan Maluszynski - HT 2007
Variants of TMs are equivalent Every multitape TM has an equivalent single-tape TM Every non-deterministic TM has an equivalent deterministic TM Every TM with doubly infinite tape has an equivalent TM with half-infinite tape. A language is Turing-recognizable iff some TM enumerator enumerates it. Jan Maluszynski - HT 2007
L is Turing decidable if L=L(M) for some TM that halts on every input Uses/kinds of TMs Language recognizer: L is Turing recognizable if L=L(M) for some TM: for some strings M may loop Language decider: L is Turing decidable if L=L(M) for some TM that halts on every input Language enumerator : Starts with empty tape enumerates all strings of L Function computing device: Transforms a given input string to an output string Jan Maluszynski - HT 2007
Intuitive notion of algorithm -> TM algorithm Church-Turing thesis A function is effectively computable iff there is a Turing machine that computes it. Intuitive notion of algorithm -> TM algorithm Other formal models of computations: Lambda-calculus Partial recursive functions Random-Access machines ….. have been proved equivalent to the TM model. Jan Maluszynski - HT 2007