3/14/2006
CSE 2001, Winter 2006
1
CSE 2001:
Introduction to Theory of Computation
Winter 2006
Suprakash Datta
[email protected]
Office: CSEB 3043
Phone: 4167362100 ext 77875
Course page: http://www.cs.yorku.ca/course/2001
Some of these slides are adapted from Wim van Dam’s slides
(
www.cs.berkeley.edu/~vandam/CS172/
)
3/14/2006
CSE 2001, Winter 2006
2
Outline
Last class:
•
Introduction to Turing machines
•
TMcomputable/recognizable languages
Today:
•
Recall the definition of TMs
•
Variants of TMs
•
ChurchTuring thesis
•
Decidability
3/14/2006
CSE 2001, Winter 2006
3
Turing Machine (Def. 3.3)
A Turing machine M is defined by a 7tuple
(Q,
Σ
,
Γ
,
δ
,q
0
,q
accept
,q
reject
), with
• Q finite set of states
•
Σ
finite input alphabet (without “_”)
•
Γ
finite tape alphabet with { _ }
∪ Σ ⊆ Γ
• q
0
start state
∈
Q
• q
accept
accept state
∈
Q
• q
reject
reject state
∈
Q
•
δ
the transition function
δ
: Q
×
Γ →
Q
×
Γ
×
{L,R}
3/14/2006
CSE 2001, Winter 2006
4
Configuration of a TM
The configuration of a Turing machine consists of
• the current state q
∈
Q
• the current tape contents
∈ Γ
*
• the current head location
∈
{0,1,2,…}
This can be expressed as an element of
Γ
*
×
Q
×Γ
*:
L
_
_
1
#
0
_
1
1
0
1
q
9
becomes “101 q
9
1_0#1”
3/14/2006
CSE 2001, Winter 2006
5
Turing recognizable vs decidable
A language L is
Turingrecognizable
if and only
if there is a TM M such that L=L(M).
Also called: a recursively enumerable
language.
A language L=L(M) is decided
by the TM M if on
every w, the TM finishes in a halting configuration.
(That is: q
accept
for w
∈
L and q
reject
for all w
∉
L.)
A language L is
Turingdecidable
if and only if
there is a TM M that decides L.
Also called: a recursive
language.
3/14/2006
CSE 2001, Winter 2006
6
Describing TM Programs
Three Levels of Describing algorithms:
• formal (state diagrams, CFGs, et cetera)
• implementation (pseudoPascal)
• highlevel (coherent and clear English)
Describing input/output format:
TMs allow only strings
∈Σ
* as input/output.
If our X and Y are of another form (graph, Turing
machine, polynomial), then we use
<
X,Y
>
to
denote ‘some kind of encoding
∈Σ
*’.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
3/14/2006
CSE 2001, Winter 2006
7
Turing machine variants
•
Multitape TMs
•
Nondeterministic TMs
Uses:
•
Proves robustness of the model
•
Extra tools for problem solving
3/14/2006
CSE 2001, Winter 2006
8
Multitape Turing Machines
A ktape Turing machine M has k different
tapes and read/write heads.
It is thus defined
by the 7tuple (Q,
Σ
,
Γ
,
δ
,q
0
,q
accept
,q
reject
), with
•
Q finite set of states
•
Σ
finite input alphabet (without “_”)
•
Γ
finite tape alphabet with { _ }
∪ Σ ⊆ Γ
• q
0
start state
∈
Q
• q
accept
accept state
∈
Q
• q
reject
reject state
∈
Q
•
δ
the transition function
δ
: Q
×
Γ
k
→
Q
×
Γ
k
×
{L,R}
k
3/14/2006
CSE 2001, Winter 2006
9
ktape TMs versus 1tape TMs
Theorem 3.13
: For every multitape TM M, there
is a singletape TM M’ such that L(M)=L(M’).
This is the end of the preview.
Sign up
to
access the rest of the document.
 Winter '10
 n
 Turing Machines

Click to edit the document details