Welcome!!
Siraj Munir – CS@DSU
Introduction To Turing Machine
Siraj Munir – CS@DSU
Tip of The Day
discourager.ignore();
(Courtesy: Syed Hammad Ahmed – CS@DSU)
Background
Siraj Munir – CS@DSU
Background
• Finite Automata accepts regular languages only.
For example: {anbn : n = 0, 1, …} is not regular, but
it is context free language.
• Pushdown Automata accepts context-free languages only.
For example: {anbncn : w *} is not context-free.
What to do??
Siraj Munir – CS@DSU
Turing Machines
About:
• Introduced by Alan Turing in 1936.
• A simple mathematical model of a computer.
• Models the computing capability of a computer.
Siraj Munir – CS@DSU
Informal Description
Control
head
a1 a2 ….
Tape
The head:
•Reads the symbol from the cell it is pointing to, and
•Either:
•Writes a new symbol in the cell, or
•Moves one cell to the left or right.
Siraj Munir – CS@DSU
Informal Description (II)
• New cells can be added to the right of the tape as needed (similar to
RAM memory)
• These new cells contain the blank symbol, ♢
• The tape is bounded to the left.
Siraj Munir – CS@DSU
Formal Description
• Transitions can be described by (Case I):
If the machine is in state s and the current cell has an a
((s,a),(q;b;R)) then jump to state q and write b in the current cell and
moves head to right.
• Transitions can be described by (Case II):
If the machine is in state s and the current cell has an a
((s,a),(q;b;L)) then jump to state q and write b in the current cell and
moves head to left.
Siraj Munir – CS@DSU
Formal Definition
A TM can be formally described as a 7-tuple
(Q, X, ∑, δ, q0, ♢, F) where,
Q is a finite set of states
X is the tape alphabet
∑ is the input alphabet
δ is a transition function; δ : Q × X → Q × X ×
{Left_shift, Right_shift}.
q0 is the initial state
♢ is the blank symbol
F is the set of final states
Comparison with Previous Models
Siraj Munir – CS@DSU
Machine Data Structure Deterministic?
Finite Automata N.A Yes
Pushdown Automata
Turing Machine
Siraj Munir – CS@DSU
Machine Data Structure Deterministic?
Finite Automata N.A Yes
Pushdown Automata Stack (LIFO) No
Turing Machine
Siraj Munir – CS@DSU
Machine Data Structure Deterministic?
Finite Automata N.A Yes
Pushdown Automata Stack (LIFO) No
Turing Machine Infinite Tape Yes
Siraj Munir – CS@DSU
Comparison with Previous Models
Device Type of Grammar String/Language
Finite Automata Regular an
Siraj Munir – CS@DSU
Comparison with Previous Models
Device Type of Grammar String/Language
Finite Automata Regular an
Push Down Automata Context Free an b n
Siraj Munir – CS@DSU
Comparison with Previous Models
Device Type of Grammar String/Language
Finite Automata Regular an
Push Down Automata Context Free anbn
Turing Machine Unrestricted anbncn
Siraj Munir – CS@DSU
Questions??
Siraj Munir – CS@DSU
Reference:
https://en.wikipedia.org/wiki/Turing_machine
http://www.slideshare.net/dkalita3/turing-machine-bydeep
http://www.slideshare.net/abhishiv77/push-down-automata-
vs-turing-machine
http://www.slideshare.net/lavishka_anuj/turing-machines-
12176328
http://www.slideshare.net/AyAnKhAn5/turing-machine-
34338253
Siraj Munir – CS@DSU
Thankyou!
Siraj Munir – CS@DSU