CS Master – Introduction to the Theory of Computation
Lecture 5
Turing Machines
Jan Maluszynski, IDA, 2007
http://www.ida.liu.se/~janma
janma @ ida.liu.se
Jan Maluszynski - HT 2007
5.1
CS Master – Introduction to the Theory of Computation
Outline
1.
2.
3.
4.
5.
6.
7.
8.
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
5.2
CS Master – Introduction to the Theory of Computation
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
5.3
CS Master – Introduction to the Theory of Computation
Example TM
Jan Maluszynski - HT 2007
5.4
CS Master – Introduction to the Theory of Computation
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
5.5
CS Master – Introduction to the Theory of Computation
Multitape TM
Example of a two-tape TM
Jan Maluszynski - HT 2007
5.6
CS Master – Introduction to the Theory of Computation
Nondeterministic TM
Example of a non-deterministic TM
Jan Maluszynski - HT 2007
5.7
CS Master – Introduction to the Theory of Computation
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
5.8
CS Master – Introduction to the Theory of Computation
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
5.9
CS Master – Introduction to the Theory of Computation
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
5.10
© Copyright 2026 Paperzz