SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Downloaden Sie, um offline zu lesen
PRESENTATION ON
TURING MACHINE
PREPARED BY:
DEEPJYOTI KALITA
CS-16 (3RD SEM)
MSC COMPUTER SCIENCE
GAUHATI UNIVERSITY,ASSAM
Email: deepjyoti111@gmail.com
Introduced by Alan Turing in 1936.
A simple mathematical model of a
computer.
Models the computing capability of a
computer.
INTRODUCING TURING MACHINES
DEFINATION
 A Turing machine (TM) is a finite-state machine with
an infinite tape and a tape head that can read or
write one tape cell and move left or right.
 It normally accepts the input string, or completes its
computation, by entering a final or accepting state.
 Tape is use for input and working storage.
Turing Machine is represented by-
M=(Q,, Γ,δ,q0,B,F) ,
Where
Q is the finite state of states
 a set of τ not including B, is the set of input symbols,
τ is the finite state of allowable tape symbols,
δ is the next move function, a mapping from Q × Γ to
Q × Γ ×{L,R}
Q0 in Q is the start state,
B a symbol of Γ is the blank,
F is the set of final states.
Representation of Turing Machine
THE TURING MACHINE MODEL
X1 X2 … Xi … Xn
B B …
Finite Control
R/W Head
B
Tape divided into
cells and of infinite
length
Input & Output Tape Symbols
TRANSITION FUNCTION
 One move (denoted by |---) in a TM does the
following:
δ(q , X) = (p ,Y ,R/L)
 q is the current state
 X is the current tape symbol pointed by tape head
 State changes from q to p
TURING MACHINE AS LANGUAGE ACCEPTORS
 A Turing machine halts when it no longer has available
moves.
 If it halts in a final state, it accepts its input, otherwise it
rejects its input.
For language accepted by M ,we define
L(M)={ w ε ∑+ : q0w |– x1qfx2 for some qf ε F , x1 ,x2ε Γ *}
TURING MACHINE AS TRANSDUCERS
 To use a Turing machine as a transducer, treat the
entire nonblank portion of the initial tape as input
 Treat the entire nonblank portion of the tape when
the machine halts as output.
A Turing machine defines a function y = f (x) for
strings x, y ε ∑* if
q0x |*– qf y
 A function index is “Turing computable” if there
exists a Turing machine that can perform the above
task.
ID OF A TM
 Instantaneous Description or ID :
 X1 X2…Xi-1 q Xi Xi+1 …Xn
Means:
q is the current state
Tape head is pointing to Xi
X1X2…Xi-1XiXi+1… Xn are the current tape symbols
 δ (q , Xi ) = (p ,Y , R ) is same as:
X1 X2…Xi-1 q Xi Xi+1 …Xn |---- X1 X2…Xi-1 Y p Xi+1…Xn
 δ (q Xi) = (p Y L) same as:
X1 X2…Xi-1 q Xi Xi+1 …Xn |---- X1 X2…pXi-1Y Xi+1 …Xn
TECHNIQUES FOR TM CONSTRUCTION
 Storage in the finite control
 Using multiple tracks
 Using Check off symbols
 Shifting over
 Implementing Subroutine
VARIATIONS OF TURING MACHINES
Multitape Turing Machines
Non deterministic Turing machines
Multihead Turing Machines
Off-line Turing machines
Multidimensional Turing machines
MULTITAPE TURING MACHINES
 A Turing Machine with several tapes
 Every Tape’s have their Controlled own R/W Head
 For N- tape TM M=(Q,, Γ,δ,q0,B,F)
we define δ : Q X ΓN Q X ΓN X { L , R} N
For e.g., if n=2 , with the current
configuration
δ( qO ,a ,e) =(q1, x ,y, L, R)
qO
a b c d e f
Tape 1 Tape 2
q1
d y f
Tape 1 Tape 2
x b c
SIMULATION
 Standard TM simulated by Multitape TM.
 Multitape TM simulated by Standard TM
q
a b c d e f
Tape 1 Tape 2
a b C
1 B B
d e f
B 1 B
q
NON DETERMINISTIC TURING MACHINES
 It is similar to DTM except that for any input symbol and current
state it has a number of choices
A string is accepted by a NDTM if there is a sequence of moves
that leads to a final state
The transaction function δ : Q X Γ 2 Q X Γ X { L , R}
Simulation:
 A DTM simulated by NDTM
In straight forward way .
 A NDTM simulated by DTM
A NDTM can be seen as one that has the ability to replicate
whenever is necessary
MULTIHEAD TURING MACHINE
 Multihead TM has a number of heads instead of one.
 Each head indepently read/ write symbols and move left / right or
keep stationery.
a b c d e f g t
Control unit
SIMULATION
 Standard TM simulated by Multihead TM.
- Making on head active and ignore remaining head
 Multihead TM simulated by standard TM.
- For k heads Using (k+1) tracks if there is..
.. . a b c d e f g h ….
Control Unit
…. 1 B B B B B B B ..
…. B B 1 B B B B B ..
.. B B B B 1 B B B ..
.. B B B B B B 1 B .
.. a b c d e f g h .
Head 1 Head 2 Head 3 Head 4
Multihead
TM
Multi track
TM
1st track
2nd track
3rd track
4th track
5th track
OFF- LINE TURING MACHINE
 An Offline Turing Machine has two tapes
1. One tape is read-only and contains the input
2. The other is read-write and is initially blank.
a b c d
Control
unit
f g h i
Read- Only input
file’s tape
W/R tape
SIMULATION
 A Standard TM simulated by Off-line TM
An Off- line TM simulated by Standard TM
a b c d
B B 1 B
f g h i
B 1 B B
Control
Unit M’
a b c d
Control
Unit M
f g h i
Read- Only input
W/R tape
MULTIDIMENSIONAL TURING MACHINE
A Multidimensional TM has a multidimensional tape.
For example, a two-dimensional Turing machine would read
and write on an infinite plane divided into squares, like a
checkerboard.
 For a two- Dimensional Turing Machine transaction function
define as:
δ : Q X Γ Q X Γ X { L , R,U,D}
1,-1 1,1 1,2
-1,1 -1,2
Control Unit
2-Dimensional address
shame
SIMULATION
 Standard TM simulated by Multidimensional TM
 Multidimensional TM simulated by Standard TM.
1,-1 1,1 1,2
-1,1 -1,2
Control Unit
2-Dimensional address
shame
.. a b ….
.. 1 # 1 # 1 # 2 # …
…
Control Unit
TURING MACHINE WITH SEMI- INFINITE TAPE
 A Turing machine may have a “semi-infinite tape”, the nonblank
input is at the extreme left end of the tape.
 Turing machines with semi-infinite tape are equivalent to
Standard Turing machines.
SIMULATION
 Semi – infinite tape simulated by two way infinite tape
$ a b c
Control Unit
 Two way infinite tape simulated by semi -infinite tape
a b c d e f g h
$ d c b a
e f g h
Control Unit
TURING MACHINE WITH STATIONARY HEAD
 Here TM head has one another choice of movement is
stay option , S.
 we define new transaction function,
δ : Q X Γ Q X Γ X { L , R, S}
SIMULATION
 TM with stay option can simulate a TM without stay option
by not using the stay option.
 TM with stay option can simulate by a TM without stay
option by not using the stay option.
In TM with stay option: δ(q, X)= ( p , Y, S )
In TM without stay option : δ’(q, X)= ( qr , Y, R )
δ’( qr, A)= ( p , A, L ) ¥ AεΓ’
RECURSIVE AND RECURSIVELY ENUMERABLE
LANGUAGE
The Turing machine may
1. Halt and accept the input
2. Halt and reject the input, or
3. Never halt /loop.
Recursively Enumerable Language:
There is a TM for a language which accept every string
otherwise not..
Recursive Language:
There is a TM for a language which halt on every
string.
UNIVERSAL LANGUAGE AND TURING MACHINE
 The universal language Lu is the set of binary strings
that encode a pair (M , w) where w is accepted by M
 A Universal Turing machine (UTM) is a Turing machine
that can simulate an arbitrary Turing machine on
arbitrary input.
PROPERTIES OF TURING MACHINES
 A Turing machine can recognize a language iff it
can be generated by a phrase-structure grammar.
 The Church-Turing Thesis: A function can be
computed by an algorithm iff it can be computed by
a Turing machine.
THANKS

Weitere ähnliche Inhalte

Was ist angesagt?

Turing Machine
Turing MachineTuring Machine
Turing MachineAyAn KhAn
 
TM - Techniques
TM - TechniquesTM - Techniques
TM - TechniquesRajendran
 
Turing machine - theory of computation
Turing machine - theory of computationTuring machine - theory of computation
Turing machine - theory of computationRubaya Mim
 
Introduction TO Finite Automata
Introduction TO Finite AutomataIntroduction TO Finite Automata
Introduction TO Finite AutomataRatnakar Mikkili
 
Variants of Turing Machine
Variants of Turing MachineVariants of Turing Machine
Variants of Turing MachineRajendran
 
Theory of computing
Theory of computingTheory of computing
Theory of computingRanjan Kumar
 
Church Turing Thesis
Church Turing ThesisChurch Turing Thesis
Church Turing ThesisHemant Sharma
 
Theory of Computation Basic Concepts and Grammar
Theory of Computation Basic Concepts and GrammarTheory of Computation Basic Concepts and Grammar
Theory of Computation Basic Concepts and GrammarRushabh2428
 
Theory of Computation Grammar Concepts and Problems
Theory of Computation Grammar Concepts and ProblemsTheory of Computation Grammar Concepts and Problems
Theory of Computation Grammar Concepts and ProblemsRushabh2428
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automatadeepinderbedi
 

Was ist angesagt? (20)

Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
TM - Techniques
TM - TechniquesTM - Techniques
TM - Techniques
 
Turing machine - theory of computation
Turing machine - theory of computationTuring machine - theory of computation
Turing machine - theory of computation
 
Lecture: Automata
Lecture: AutomataLecture: Automata
Lecture: Automata
 
Introduction TO Finite Automata
Introduction TO Finite AutomataIntroduction TO Finite Automata
Introduction TO Finite Automata
 
Turing machines
Turing machinesTuring machines
Turing machines
 
Variants of Turing Machine
Variants of Turing MachineVariants of Turing Machine
Variants of Turing Machine
 
Turing machine
Turing machineTuring machine
Turing machine
 
Theory of computing
Theory of computingTheory of computing
Theory of computing
 
Multi Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing MachineMulti Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing Machine
 
Church Turing Thesis
Church Turing ThesisChurch Turing Thesis
Church Turing Thesis
 
Theory of Computation Basic Concepts and Grammar
Theory of Computation Basic Concepts and GrammarTheory of Computation Basic Concepts and Grammar
Theory of Computation Basic Concepts and Grammar
 
Automata Theory - Turing machine
Automata Theory - Turing machineAutomata Theory - Turing machine
Automata Theory - Turing machine
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 
Automata theory
Automata theoryAutomata theory
Automata theory
 
Theory of Computation Grammar Concepts and Problems
Theory of Computation Grammar Concepts and ProblemsTheory of Computation Grammar Concepts and Problems
Theory of Computation Grammar Concepts and Problems
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Kleene's theorem
Kleene's theoremKleene's theorem
Kleene's theorem
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
 

Ähnlich wie Turing machine by_deep

Vtu module4automatatheoryandcomplierdesign.pptx
Vtu module4automatatheoryandcomplierdesign.pptxVtu module4automatatheoryandcomplierdesign.pptx
Vtu module4automatatheoryandcomplierdesign.pptxTejashreeSathya
 
Winter 8 TM.pptx
Winter 8 TM.pptxWinter 8 TM.pptx
Winter 8 TM.pptxHarisPrince
 
TuringMachines-myppt.pptx
TuringMachines-myppt.pptxTuringMachines-myppt.pptx
TuringMachines-myppt.pptxSanchayKedia2
 
Turing machine seminar report
Turing machine seminar reportTuring machine seminar report
Turing machine seminar reportYashwant Dagar
 
1LECTURE 9TuringMachines.ppt
1LECTURE 9TuringMachines.ppt1LECTURE 9TuringMachines.ppt
1LECTURE 9TuringMachines.pptMarvin886766
 
Automata theory introduction
Automata theory introductionAutomata theory introduction
Automata theory introductionNAMRATA BORKAR
 
Working principle of Turing machine
Working principle of Turing machineWorking principle of Turing machine
Working principle of Turing machineKaran Thakkar
 
Volume 2-issue-6-2205-2207
Volume 2-issue-6-2205-2207Volume 2-issue-6-2205-2207
Volume 2-issue-6-2205-2207Editor IJARCET
 
Volume 2-issue-6-2205-2207
Volume 2-issue-6-2205-2207Volume 2-issue-6-2205-2207
Volume 2-issue-6-2205-2207Editor IJARCET
 
Theory of Automata and formal languages Unit 5
Theory of Automata and formal languages Unit 5Theory of Automata and formal languages Unit 5
Theory of Automata and formal languages Unit 5Abhimanyu Mishra
 

Ähnlich wie Turing machine by_deep (20)

Turing machine
Turing machineTuring machine
Turing machine
 
Vtu module4automatatheoryandcomplierdesign.pptx
Vtu module4automatatheoryandcomplierdesign.pptxVtu module4automatatheoryandcomplierdesign.pptx
Vtu module4automatatheoryandcomplierdesign.pptx
 
Unit iv
Unit ivUnit iv
Unit iv
 
Turing machine
Turing machineTuring machine
Turing machine
 
TOA.docx
TOA.docxTOA.docx
TOA.docx
 
TOA.docx
TOA.docxTOA.docx
TOA.docx
 
Turing machine
Turing machineTuring machine
Turing machine
 
Winter 8 TM.pptx
Winter 8 TM.pptxWinter 8 TM.pptx
Winter 8 TM.pptx
 
TuringMachines-myppt.pptx
TuringMachines-myppt.pptxTuringMachines-myppt.pptx
TuringMachines-myppt.pptx
 
Turing machine seminar report
Turing machine seminar reportTuring machine seminar report
Turing machine seminar report
 
1LECTURE 9TuringMachines.ppt
1LECTURE 9TuringMachines.ppt1LECTURE 9TuringMachines.ppt
1LECTURE 9TuringMachines.ppt
 
QB104544.pdf
QB104544.pdfQB104544.pdf
QB104544.pdf
 
Automata theory introduction
Automata theory introductionAutomata theory introduction
Automata theory introduction
 
Working principle of Turing machine
Working principle of Turing machineWorking principle of Turing machine
Working principle of Turing machine
 
Volume 2-issue-6-2205-2207
Volume 2-issue-6-2205-2207Volume 2-issue-6-2205-2207
Volume 2-issue-6-2205-2207
 
Volume 2-issue-6-2205-2207
Volume 2-issue-6-2205-2207Volume 2-issue-6-2205-2207
Volume 2-issue-6-2205-2207
 
Automaton
AutomatonAutomaton
Automaton
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
 
Theory of Automata and formal languages Unit 5
Theory of Automata and formal languages Unit 5Theory of Automata and formal languages Unit 5
Theory of Automata and formal languages Unit 5
 

Turing machine by_deep

  • 1. PRESENTATION ON TURING MACHINE PREPARED BY: DEEPJYOTI KALITA CS-16 (3RD SEM) MSC COMPUTER SCIENCE GAUHATI UNIVERSITY,ASSAM Email: deepjyoti111@gmail.com
  • 2. Introduced by Alan Turing in 1936. A simple mathematical model of a computer. Models the computing capability of a computer. INTRODUCING TURING MACHINES
  • 3. DEFINATION  A Turing machine (TM) is a finite-state machine with an infinite tape and a tape head that can read or write one tape cell and move left or right.  It normally accepts the input string, or completes its computation, by entering a final or accepting state.  Tape is use for input and working storage.
  • 4. Turing Machine is represented by- M=(Q,, Γ,δ,q0,B,F) , Where Q is the finite state of states  a set of τ not including B, is the set of input symbols, τ is the finite state of allowable tape symbols, δ is the next move function, a mapping from Q × Γ to Q × Γ ×{L,R} Q0 in Q is the start state, B a symbol of Γ is the blank, F is the set of final states. Representation of Turing Machine
  • 5. THE TURING MACHINE MODEL X1 X2 … Xi … Xn B B … Finite Control R/W Head B Tape divided into cells and of infinite length Input & Output Tape Symbols
  • 6. TRANSITION FUNCTION  One move (denoted by |---) in a TM does the following: δ(q , X) = (p ,Y ,R/L)  q is the current state  X is the current tape symbol pointed by tape head  State changes from q to p
  • 7. TURING MACHINE AS LANGUAGE ACCEPTORS  A Turing machine halts when it no longer has available moves.  If it halts in a final state, it accepts its input, otherwise it rejects its input. For language accepted by M ,we define L(M)={ w ε ∑+ : q0w |– x1qfx2 for some qf ε F , x1 ,x2ε Γ *}
  • 8. TURING MACHINE AS TRANSDUCERS  To use a Turing machine as a transducer, treat the entire nonblank portion of the initial tape as input  Treat the entire nonblank portion of the tape when the machine halts as output. A Turing machine defines a function y = f (x) for strings x, y ε ∑* if q0x |*– qf y  A function index is “Turing computable” if there exists a Turing machine that can perform the above task.
  • 9. ID OF A TM  Instantaneous Description or ID :  X1 X2…Xi-1 q Xi Xi+1 …Xn Means: q is the current state Tape head is pointing to Xi X1X2…Xi-1XiXi+1… Xn are the current tape symbols  δ (q , Xi ) = (p ,Y , R ) is same as: X1 X2…Xi-1 q Xi Xi+1 …Xn |---- X1 X2…Xi-1 Y p Xi+1…Xn  δ (q Xi) = (p Y L) same as: X1 X2…Xi-1 q Xi Xi+1 …Xn |---- X1 X2…pXi-1Y Xi+1 …Xn
  • 10. TECHNIQUES FOR TM CONSTRUCTION  Storage in the finite control  Using multiple tracks  Using Check off symbols  Shifting over  Implementing Subroutine
  • 11. VARIATIONS OF TURING MACHINES Multitape Turing Machines Non deterministic Turing machines Multihead Turing Machines Off-line Turing machines Multidimensional Turing machines
  • 12. MULTITAPE TURING MACHINES  A Turing Machine with several tapes  Every Tape’s have their Controlled own R/W Head  For N- tape TM M=(Q,, Γ,δ,q0,B,F) we define δ : Q X ΓN Q X ΓN X { L , R} N
  • 13. For e.g., if n=2 , with the current configuration δ( qO ,a ,e) =(q1, x ,y, L, R) qO a b c d e f Tape 1 Tape 2 q1 d y f Tape 1 Tape 2 x b c
  • 14. SIMULATION  Standard TM simulated by Multitape TM.  Multitape TM simulated by Standard TM q a b c d e f Tape 1 Tape 2 a b C 1 B B d e f B 1 B q
  • 15. NON DETERMINISTIC TURING MACHINES  It is similar to DTM except that for any input symbol and current state it has a number of choices A string is accepted by a NDTM if there is a sequence of moves that leads to a final state The transaction function δ : Q X Γ 2 Q X Γ X { L , R}
  • 16. Simulation:  A DTM simulated by NDTM In straight forward way .  A NDTM simulated by DTM A NDTM can be seen as one that has the ability to replicate whenever is necessary
  • 17. MULTIHEAD TURING MACHINE  Multihead TM has a number of heads instead of one.  Each head indepently read/ write symbols and move left / right or keep stationery. a b c d e f g t Control unit
  • 18. SIMULATION  Standard TM simulated by Multihead TM. - Making on head active and ignore remaining head  Multihead TM simulated by standard TM. - For k heads Using (k+1) tracks if there is..
  • 19. .. . a b c d e f g h …. Control Unit …. 1 B B B B B B B .. …. B B 1 B B B B B .. .. B B B B 1 B B B .. .. B B B B B B 1 B . .. a b c d e f g h . Head 1 Head 2 Head 3 Head 4 Multihead TM Multi track TM 1st track 2nd track 3rd track 4th track 5th track
  • 20. OFF- LINE TURING MACHINE  An Offline Turing Machine has two tapes 1. One tape is read-only and contains the input 2. The other is read-write and is initially blank. a b c d Control unit f g h i Read- Only input file’s tape W/R tape
  • 21. SIMULATION  A Standard TM simulated by Off-line TM An Off- line TM simulated by Standard TM a b c d B B 1 B f g h i B 1 B B Control Unit M’ a b c d Control Unit M f g h i Read- Only input W/R tape
  • 22. MULTIDIMENSIONAL TURING MACHINE A Multidimensional TM has a multidimensional tape. For example, a two-dimensional Turing machine would read and write on an infinite plane divided into squares, like a checkerboard.  For a two- Dimensional Turing Machine transaction function define as: δ : Q X Γ Q X Γ X { L , R,U,D}
  • 23. 1,-1 1,1 1,2 -1,1 -1,2 Control Unit 2-Dimensional address shame
  • 24. SIMULATION  Standard TM simulated by Multidimensional TM  Multidimensional TM simulated by Standard TM.
  • 25. 1,-1 1,1 1,2 -1,1 -1,2 Control Unit 2-Dimensional address shame .. a b …. .. 1 # 1 # 1 # 2 # … … Control Unit
  • 26. TURING MACHINE WITH SEMI- INFINITE TAPE  A Turing machine may have a “semi-infinite tape”, the nonblank input is at the extreme left end of the tape.  Turing machines with semi-infinite tape are equivalent to Standard Turing machines.
  • 27. SIMULATION  Semi – infinite tape simulated by two way infinite tape $ a b c Control Unit
  • 28.  Two way infinite tape simulated by semi -infinite tape a b c d e f g h $ d c b a e f g h Control Unit
  • 29. TURING MACHINE WITH STATIONARY HEAD  Here TM head has one another choice of movement is stay option , S.  we define new transaction function, δ : Q X Γ Q X Γ X { L , R, S}
  • 30. SIMULATION  TM with stay option can simulate a TM without stay option by not using the stay option.  TM with stay option can simulate by a TM without stay option by not using the stay option. In TM with stay option: δ(q, X)= ( p , Y, S ) In TM without stay option : δ’(q, X)= ( qr , Y, R ) δ’( qr, A)= ( p , A, L ) ¥ AεΓ’
  • 31. RECURSIVE AND RECURSIVELY ENUMERABLE LANGUAGE The Turing machine may 1. Halt and accept the input 2. Halt and reject the input, or 3. Never halt /loop. Recursively Enumerable Language: There is a TM for a language which accept every string otherwise not.. Recursive Language: There is a TM for a language which halt on every string.
  • 32. UNIVERSAL LANGUAGE AND TURING MACHINE  The universal language Lu is the set of binary strings that encode a pair (M , w) where w is accepted by M  A Universal Turing machine (UTM) is a Turing machine that can simulate an arbitrary Turing machine on arbitrary input.
  • 33. PROPERTIES OF TURING MACHINES  A Turing machine can recognize a language iff it can be generated by a phrase-structure grammar.  The Church-Turing Thesis: A function can be computed by an algorithm iff it can be computed by a Turing machine.