SlideShare a Scribd company logo
3
Most read
4
Most read
12
Most read
Turing Machine
Subject: TOC
CE-B
 Maulik Togadiya
Introduction
 Alan Turing is father of this model.
 It is a machine (automaton) capable of enumerating some
arbitrary subset of valid strings of an alphabet.
 A Turing machine is a general example of a CPU that controls all
data manipulation done by a computer.
Turing machine
 The Turing machine is a collection of following components.
 Q is finite set of states.
 Γ is finite, non-empty set of tape alphabet symbol.
 Δ or b ∈ Γ is blank symbol majorly used as end marker for
inputs.
 ∑ is finite set of input symbol.
 δ is a transition or a mapping function.
Description
 The Turing machine mathematically models a machine that
mechanically operates on a tape. On this tape there are symbols,
which the machine can read and write, one at a time, using a tape
head.
 The head is always over a particular square of the tape; only a
finite stretch of squares is shown. The instruction to be performed
(q4) is shown over the scanned square
Description
 A tape divided into cells, one next to the other. Each cell contains a
symbol from some finite alphabet.
 A head that can read and write symbols on the tape and move the tape left
and right one (and only one) cell at a time. In some models the head
moves and the tape is stationary.
 There is a state control, which can be in any one of a finite number states.
The finite set of states is denoted by Q. The set Q contains three special
states: a start state, an accept state, and a reject state.
 The tape alphabet contains the blank symbol . If a cell contains , then
this means that the cell is actually empty.
Turing machine-TOC
Instantaneous Description
 Let M = {Q,∑,Γ,δ, b,F,q0} be TM then the instantaneous
Description(ID) of TM can be given by a triplet or a program
which is as given below-
(q0,a) (q1,A,L)
That means currently we are reading the input Symbol ‘a’
and we are in q0 state then we can go to q1 state by
replacing or printing ‘a’ by A and then we must move in
left direction.
Example:
Construct a TM which accept the language of ‘aba’ over ∑={a,b}.
 we will assume that on the input tape the string ‘aba’ is placed like this
 The tape head will read out the sequence up to the character Δ if ‘aba’ is
readout TM will halt after reading Δ.
a b a Δ ……………
TM for ‘aba’
(a,a,R) (b,b,R) (a,a,R)
(Δ, Δ,S)
triplet along the edge:(input read,output to be printed,direction)
q0 q1 q2 q3
HALT
 Consider the transition
between start state and q1
which is (a,a,R) that is the
current symbol read from the
tape is a then output it as a
and move the tape head to the
right.
 And then after transition
between q1 to q2..
 The TM will accept the language when it reaches to halt state
a b a Δ …..
a b a Δ ……
 TM can also be represented by transition table:
 In the given transition table ,we write a triplet in each raw as:
(next state , output to be printed , direction)
a b Δ
start (q1,a,R) - -
q1 - (q2,b,R) -
q2 (q3,a,R) - -
q3 - - (HALT, Δ,S)
HALT - - -
Example:
Construct a TM for checking the palindrome of the string of even
length.
 Logic:
The logic is that we will compare first symbol form left and
then we compare it with first symbol from right to check
whether it is same.
Again we compare second symbol from left with second
symbol from right. We repeat this process for all the symbol. If
we found any symbol not matching, we cannot lead the
machine to HALT state.
ababbaba Δ we will mark it * and move to right end in search of a.
*babbaba Δ Move right.
*babbaba Δ Move right upto Δ.
*babbaba Δ Move left and check if it is a
*babbab ΔΔ If it is replace it by Δ
*babbab Δ Move left upto *
*babbaba Δ Move right,read it
*babbaba Δ Convert it to * and move right
**abbab Δ Move right upto Δ in seach of b.
**abbab Δ Move left ,if left symbol is b convert it to Δ
**abba Δ Move left till *.
**abbaΔ goto right
**abba Δ replace a by * and move right,upto Δ
***bba Δ we will move left and check if it is a,then replace it Δ
***bba Δ it is a so replace by Δ
***bb Δ Move to left till *
***bbΔ Move right
***bb Δ Replace it by *
****b Δ Move right upto Δ
****bΔ Move left to see if it is b,if so then replace it by Δ
****Δ Move left till *
****Δ Move right and check whether it is Δ ,if so
**** Δ Goto HALT
TM for it
(a,a,R)(b,b,R)
(a,*,R) (Δ ,Δ,L) (a, Δ ,L) (b,b,L)
(a,a,L)
(*,*,R)
start (Δ ,Δ ,L)
(*,*,R)
(a,a,L)
(b.b.L)
(b,*,R)
(Δ ,Δ,L) (b, Δ ,L)
(a,a,R)
(b,b,R)
q0
q1 q2 q3
q6q5q4
HALT
Turing machine-TOC

More Related Content

What's hot (20)

PPTX
Turing machine by_deep
Deepjyoti Kalita
 
PPT
Multi Head, Multi Tape Turing Machine
Radhakrishnan Chinnusamy
 
PPTX
Turing machine - theory of computation
Rubaya Mim
 
PPTX
Introduction TO Finite Automata
Ratnakar Mikkili
 
PPTX
Pushdown Automata Theory
Saifur Rahman
 
PPT
Turing Machine
Rahul Narang
 
PPTX
Turing machine
Kanis Fatema Shanta
 
PPT
Variants of Turing Machine
Rajendran
 
PPTX
Turing Machine
arwa wshyar
 
PPT
Finite automata
Bipul Roy Bpl
 
PDF
Turing machines
surekamurali
 
PDF
Turing machine Introduction
Aram Rafeq
 
PDF
Deterministic Finite Automata (DFA)
Animesh Chaturvedi
 
PPTX
Turing machine
Aafaqueahmad Khan
 
PPT
Turing Machine
AyAn KhAn
 
PPTX
Peephole Optimization
United International University
 
PPTX
Church Turing Thesis
Hemant Sharma
 
PPTX
NFA & DFA
Akhil Kaushik
 
PPTX
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Mohammad Ilyas Malik
 
PPTX
closure properties of regular language.pptx
Thirumoorthy64
 
Turing machine by_deep
Deepjyoti Kalita
 
Multi Head, Multi Tape Turing Machine
Radhakrishnan Chinnusamy
 
Turing machine - theory of computation
Rubaya Mim
 
Introduction TO Finite Automata
Ratnakar Mikkili
 
Pushdown Automata Theory
Saifur Rahman
 
Turing Machine
Rahul Narang
 
Turing machine
Kanis Fatema Shanta
 
Variants of Turing Machine
Rajendran
 
Turing Machine
arwa wshyar
 
Finite automata
Bipul Roy Bpl
 
Turing machines
surekamurali
 
Turing machine Introduction
Aram Rafeq
 
Deterministic Finite Automata (DFA)
Animesh Chaturvedi
 
Turing machine
Aafaqueahmad Khan
 
Turing Machine
AyAn KhAn
 
Peephole Optimization
United International University
 
Church Turing Thesis
Hemant Sharma
 
NFA & DFA
Akhil Kaushik
 
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Mohammad Ilyas Malik
 
closure properties of regular language.pptx
Thirumoorthy64
 

Viewers also liked (20)

PPT
Ip sec
shifanabasheer
 
PPTX
Java history, versions, types of errors and exception, quiz
SAurabh PRajapati
 
PPTX
remote sensor
SAurabh PRajapati
 
PPTX
Data mining
Maulik Togadiya
 
PDF
6. The grid-COMPUTING OGSA and WSRF
Dr Sandeep Kumar Poonia
 
PPTX
Distributed file system
Anamika Singh
 
PDF
Distributed Operating System_2
Dr Sandeep Kumar Poonia
 
PDF
Lecture28 tsp
Dr Sandeep Kumar Poonia
 
PPT
Multiple Access in wireless communication
Maulik Togadiya
 
PPTX
optimization of DFA
Maulik Togadiya
 
PPTX
Ccleaner presentation
SAurabh PRajapati
 
PPTX
Distributed shred memory architecture
Maulik Togadiya
 
PDF
Distributed computing
Deepak John
 
PDF
Soft computing
Dr Sandeep Kumar Poonia
 
PPTX
IDS n IPS
SAurabh PRajapati
 
PPTX
Synchronization - Election Algorithms
OsaMa Hasan
 
PDF
5. Distributed Operating Systems
Dr Sandeep Kumar Poonia
 
PPT
Light emitting Diode
SAurabh PRajapati
 
PPT
Information and Network Security
Maulik Togadiya
 
Java history, versions, types of errors and exception, quiz
SAurabh PRajapati
 
remote sensor
SAurabh PRajapati
 
Data mining
Maulik Togadiya
 
6. The grid-COMPUTING OGSA and WSRF
Dr Sandeep Kumar Poonia
 
Distributed file system
Anamika Singh
 
Distributed Operating System_2
Dr Sandeep Kumar Poonia
 
Multiple Access in wireless communication
Maulik Togadiya
 
optimization of DFA
Maulik Togadiya
 
Ccleaner presentation
SAurabh PRajapati
 
Distributed shred memory architecture
Maulik Togadiya
 
Distributed computing
Deepak John
 
Soft computing
Dr Sandeep Kumar Poonia
 
Synchronization - Election Algorithms
OsaMa Hasan
 
5. Distributed Operating Systems
Dr Sandeep Kumar Poonia
 
Light emitting Diode
SAurabh PRajapati
 
Information and Network Security
Maulik Togadiya
 
Ad

Similar to Turing machine-TOC (20)

PDF
TuringMachines.pdf
viswanath kani
 
PDF
Lec14_TuringMachines 2PDA (1).pdf thooooo
rehmanateequr501
 
PPTX
Turing Machine
azmizryk
 
PPTX
souraj Toc.pptx
Lifo4
 
PPT
1LECTURE 9TuringMachines.ppt
Marvin886766
 
PPTX
Automata Theory - Turing machine
Akila Krishnamoorthy
 
PDF
Theory of computation complete 5th module
friendname12345
 
PPTX
TuringMachines-myppt.pptx
SanchayKedia2
 
PPTX
Formal Languages of Automata theory: Turing Machines
bhaskar810658
 
PPT
Unit-3_TOC theory of computation subj.ppt
bhaimodel20
 
PPTX
AUTOMATA AUTOMATA AUTOMATAAutomata9Chapter8.pptx
ArjayBalberan1
 
PPTX
Turing Machine.pptx
SnigdhaSaha28
 
PPTX
Winter 8 Tutorial TM.pptx
HarisPrince
 
PDF
CS.15.Turing.pdf
YasirAli74993
 
PPT
TuringMachineS FOUNDATION OF DATA SCIENCE
gokikayal1998
 
PPT
THEORY OF COMPUTATION PROCESS AND MECHANISUMS
gokikayal1998
 
PPT
TuringMachineS FOUNDATION OF DATA SCIENCE
gokikayal1998
 
PPT
THEORY OF COMPUTATION PROCESS AND MECHANISUMS
gokikayal1998
 
PPT
TuringMachines and its introduction for computer science studetns
22f3002173
 
PDF
TuringMachines.pdf
Kavitha Chandramohan
 
TuringMachines.pdf
viswanath kani
 
Lec14_TuringMachines 2PDA (1).pdf thooooo
rehmanateequr501
 
Turing Machine
azmizryk
 
souraj Toc.pptx
Lifo4
 
1LECTURE 9TuringMachines.ppt
Marvin886766
 
Automata Theory - Turing machine
Akila Krishnamoorthy
 
Theory of computation complete 5th module
friendname12345
 
TuringMachines-myppt.pptx
SanchayKedia2
 
Formal Languages of Automata theory: Turing Machines
bhaskar810658
 
Unit-3_TOC theory of computation subj.ppt
bhaimodel20
 
AUTOMATA AUTOMATA AUTOMATAAutomata9Chapter8.pptx
ArjayBalberan1
 
Turing Machine.pptx
SnigdhaSaha28
 
Winter 8 Tutorial TM.pptx
HarisPrince
 
CS.15.Turing.pdf
YasirAli74993
 
TuringMachineS FOUNDATION OF DATA SCIENCE
gokikayal1998
 
THEORY OF COMPUTATION PROCESS AND MECHANISUMS
gokikayal1998
 
TuringMachineS FOUNDATION OF DATA SCIENCE
gokikayal1998
 
THEORY OF COMPUTATION PROCESS AND MECHANISUMS
gokikayal1998
 
TuringMachines and its introduction for computer science studetns
22f3002173
 
TuringMachines.pdf
Kavitha Chandramohan
 
Ad

Recently uploaded (20)

PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PPTX
How to Create Rental Orders in Odoo 18 Rental
Celine George
 
PPTX
How to Configure Access Rights of Manufacturing Orders in Odoo 18 Manufacturing
Celine George
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PDF
BÀI TẬP BỔ TRỢ THEO LESSON TIẾNG ANH - I-LEARN SMART WORLD 7 - CẢ NĂM - CÓ ĐÁ...
Nguyen Thanh Tu Collection
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PDF
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
PPTX
BANDHA (BANDAGES) PPT.pptx ayurveda shalya tantra
rakhan78619
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PDF
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
PDF
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
PDF
1, 2, 3… E MAIS UM CICLO CHEGA AO FIM!.pdf
Colégio Santa Teresinha
 
PDF
CHILD RIGHTS AND PROTECTION QUESTION BANK
Dr Raja Mohammed T
 
PPTX
How to Configure Prepayments in Odoo 18 Sales
Celine George
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PDF
'' IMPORTANCE OF EXCLUSIVE BREAST FEEDING ''
SHAHEEN SHAIKH
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
How to Create Rental Orders in Odoo 18 Rental
Celine George
 
How to Configure Access Rights of Manufacturing Orders in Odoo 18 Manufacturing
Celine George
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
BÀI TẬP BỔ TRỢ THEO LESSON TIẾNG ANH - I-LEARN SMART WORLD 7 - CẢ NĂM - CÓ ĐÁ...
Nguyen Thanh Tu Collection
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
BANDHA (BANDAGES) PPT.pptx ayurveda shalya tantra
rakhan78619
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
1, 2, 3… E MAIS UM CICLO CHEGA AO FIM!.pdf
Colégio Santa Teresinha
 
CHILD RIGHTS AND PROTECTION QUESTION BANK
Dr Raja Mohammed T
 
How to Configure Prepayments in Odoo 18 Sales
Celine George
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
'' IMPORTANCE OF EXCLUSIVE BREAST FEEDING ''
SHAHEEN SHAIKH
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 

Turing machine-TOC

  • 2. Introduction  Alan Turing is father of this model.  It is a machine (automaton) capable of enumerating some arbitrary subset of valid strings of an alphabet.  A Turing machine is a general example of a CPU that controls all data manipulation done by a computer.
  • 3. Turing machine  The Turing machine is a collection of following components.  Q is finite set of states.  Γ is finite, non-empty set of tape alphabet symbol.  Δ or b ∈ Γ is blank symbol majorly used as end marker for inputs.  ∑ is finite set of input symbol.  δ is a transition or a mapping function.
  • 4. Description  The Turing machine mathematically models a machine that mechanically operates on a tape. On this tape there are symbols, which the machine can read and write, one at a time, using a tape head.  The head is always over a particular square of the tape; only a finite stretch of squares is shown. The instruction to be performed (q4) is shown over the scanned square
  • 5. Description  A tape divided into cells, one next to the other. Each cell contains a symbol from some finite alphabet.  A head that can read and write symbols on the tape and move the tape left and right one (and only one) cell at a time. In some models the head moves and the tape is stationary.  There is a state control, which can be in any one of a finite number states. The finite set of states is denoted by Q. The set Q contains three special states: a start state, an accept state, and a reject state.  The tape alphabet contains the blank symbol . If a cell contains , then this means that the cell is actually empty.
  • 7. Instantaneous Description  Let M = {Q,∑,Γ,δ, b,F,q0} be TM then the instantaneous Description(ID) of TM can be given by a triplet or a program which is as given below- (q0,a) (q1,A,L) That means currently we are reading the input Symbol ‘a’ and we are in q0 state then we can go to q1 state by replacing or printing ‘a’ by A and then we must move in left direction.
  • 8. Example: Construct a TM which accept the language of ‘aba’ over ∑={a,b}.  we will assume that on the input tape the string ‘aba’ is placed like this  The tape head will read out the sequence up to the character Δ if ‘aba’ is readout TM will halt after reading Δ. a b a Δ ……………
  • 9. TM for ‘aba’ (a,a,R) (b,b,R) (a,a,R) (Δ, Δ,S) triplet along the edge:(input read,output to be printed,direction) q0 q1 q2 q3 HALT
  • 10.  Consider the transition between start state and q1 which is (a,a,R) that is the current symbol read from the tape is a then output it as a and move the tape head to the right.  And then after transition between q1 to q2..  The TM will accept the language when it reaches to halt state a b a Δ ….. a b a Δ ……
  • 11.  TM can also be represented by transition table:  In the given transition table ,we write a triplet in each raw as: (next state , output to be printed , direction) a b Δ start (q1,a,R) - - q1 - (q2,b,R) - q2 (q3,a,R) - - q3 - - (HALT, Δ,S) HALT - - -
  • 12. Example: Construct a TM for checking the palindrome of the string of even length.  Logic: The logic is that we will compare first symbol form left and then we compare it with first symbol from right to check whether it is same. Again we compare second symbol from left with second symbol from right. We repeat this process for all the symbol. If we found any symbol not matching, we cannot lead the machine to HALT state.
  • 13. ababbaba Δ we will mark it * and move to right end in search of a. *babbaba Δ Move right. *babbaba Δ Move right upto Δ. *babbaba Δ Move left and check if it is a *babbab ΔΔ If it is replace it by Δ *babbab Δ Move left upto * *babbaba Δ Move right,read it *babbaba Δ Convert it to * and move right
  • 14. **abbab Δ Move right upto Δ in seach of b. **abbab Δ Move left ,if left symbol is b convert it to Δ **abba Δ Move left till *. **abbaΔ goto right **abba Δ replace a by * and move right,upto Δ ***bba Δ we will move left and check if it is a,then replace it Δ ***bba Δ it is a so replace by Δ ***bb Δ Move to left till *
  • 15. ***bbΔ Move right ***bb Δ Replace it by * ****b Δ Move right upto Δ ****bΔ Move left to see if it is b,if so then replace it by Δ ****Δ Move left till * ****Δ Move right and check whether it is Δ ,if so **** Δ Goto HALT
  • 16. TM for it (a,a,R)(b,b,R) (a,*,R) (Δ ,Δ,L) (a, Δ ,L) (b,b,L) (a,a,L) (*,*,R) start (Δ ,Δ ,L) (*,*,R) (a,a,L) (b.b.L) (b,*,R) (Δ ,Δ,L) (b, Δ ,L) (a,a,R) (b,b,R) q0 q1 q2 q3 q6q5q4 HALT