SlideShare a Scribd company logo
A TuringMachine is an acceptingdevice whichacceptsthe languages(recursivelyenumerable set)
generatedbytype 0 grammars.It was inventedin1936 by AlanTuring.
Definition
A TuringMachine (TM) is a mathematical model whichconsistsof aninfinite lengthtape dividedinto
cellsonwhichinputisgiven.Itconsistsof a headwhichreadsthe inputtape.A state registerstores
the state of the Turing machine.Afterreadinganinputsymbol,itisreplacedwithanothersymbol,
itsinternal state ischanged,andit movesfromone cell tothe right or left.If the TM reachesthe
final state,the inputstringisaccepted,otherwise rejected.
A TM can be formallydescribedasa7-tuple (Q,X,∑, δ, q0, B, F) where −
Q is a finite setof states
X isthe tape alphabet
∑ is the inputalphabet
δ isa transitionfunction;δ:Q × X → Q × X × {Left_shift,Right_shift}.
q0 is the initial state
B is the blanksymbol
F isthe setof final states
Comparisonwiththe previousautomaton
The followingtable shows acomparisonof how a Turingmachine differsfromFiniteAutomatonand
PushdownAutomaton.
Machine Stack Data Structure Deterministic?
Finite Automaton N.A Yes
PushdownAutomaton Last In FirstOut(LIFO) No
TuringMachine Infinite tape Yes
Example of Turingmachine
Turingmachine M = (Q,X, ∑, δ, q0, B, F) with
Q = {q0, q1, q2, qf}
X = {a,b}
∑ = {1}
q0 = {q0}
B = blanksymbol
F = {qf }
δ isgivenby−
Tape alphabetsymbol PresentState ‘q0’ PresentState ‘q1’ PresentState ‘q2’
a 1Rq1 1Lq0 1Lqf
b 1Lq2 1Rq1 1Rqf
Here the transition1Rq1 impliesthatthe write symbol is1,the tape movesright,and the nextstate
isq1. Similarly,the transition1Lq2 impliesthatthe write symbol is1,the tape movesleft,andthe
nextstate isq2.
Time and Space Complexityof aTuringMachine
For a Turing machine,the time complexityreferstothe measure of the numberof timesthe tape
moveswhenthe machine isinitializedforsome inputsymbolsandthe space complexityisthe
numberof cellsof the tape written.
Time complexityall reasonable functions−
T(n) = O(nlogn)
TM's space complexity−
S(n) = O(n)
AutomataTutorial
AutomataTutorialTheoryof AutomataFinite AutomataTransitionDiagramTransition
TableDFAExamplesof DFANFAExamplesof NFAEliminatingε TransitionsConversionfromNFA to
DFAConversionfromNFA withεto DFAMinimizationof DFA
RegularExpression
RegularExpressionExamplesof RegularExpressionConversionof REto FAArden'sTheoremMoore
MachineMealyMachineConversionfromMealymachine toMoore machineConversionfromMoore
machine toMealy machine
CFG
Context-free GrammarDerivationDerivationTreeAmbiguityinGrammarUnambiguous
GrammarSimplificationof CFGChomsky'sNormal Form(CNF)GreibachNormal Form(GNF)
PDA
PushdownAutomataPDA AcceptanceNon-deterministicPushdownAutomataCFGtoPDA Conversion
TuringMachine
AutomataTuringMachine openlinkBasicModel of TuringmachineLanguage acceptedbyTuring
machineExample of TMIntroductiontoUndecidabilityUndecidable ProblemaboutTMPost
Correspondence ProblemChomskyHierarchyJavaTpoint
Next→← Prev
TuringMachine
Turingmachine wasinventedin1936 byAlanTuring.It is an acceptingdevice whichaccepts
Recursive Enumerable Language generatedbytype 0grammar.
There are variousfeaturesof the Turingmachine:
It has an external memorywhichremembersarbitrarylongsequence of input.
It has unlimitedmemorycapability.
The model hasa facilitybywhichthe inputatleftor righton the tape can be readeasily.
The machine can produce a certainoutputbasedon itsinput.Sometimesitmaybe requiredthatthe
same inputhas to be usedto generate the output.Sointhismachine,the distinctionbetweeninput
and outputhas beenremoved.Thusacommon setof alphabetscanbe usedforthe Turing machine.
Formal definitionof Turingmachine
A Turingmachine can be definedasacollectionof 7 components:
Q: the finite setof states
∑: the finite setof inputsymbols
T: the tape symbol
q0: the initial state
F: a set of final states
B: a blanksymbol usedasa endmarkerfor input
δ: a transitionormappingfunction.
The mappingfunctionshowsthe mappingfromstatesof finite automataandinputsymbol onthe
tape to the nextstates,external symbolsandthe directionformovingthe tape head.Thisisknown
as a triple or a program forturingmachine.
(q0, a) → (q1, A,R)
That meansinq0 state,if we readsymbol 'a' thenit will goto state q1, replaceda byX and move
aheadright(Rstandsfor right).
Example:
ConstructTM for the language L ={0n1n} where n>=1.
Solution:
We have alreadysolvedthisproblembyPDA.InPDA,we have a stack to rememberthe previous
symbol.The mainadvantage of the Turingmachine iswe have a tape headwhichcan be moved
forwardor backward,and the inputtape can be scanned.
The simple logicwhichwe will applyisreadouteach '0' mark itby A and thenmove aheadalong
withthe inputtape and findout1 convertitto B. Now,repeatthisprocessforall a's andb's.
Nowwe will see howthisturingmachine workfor0011.
The simulationfor0011 can be shownas below:
or 0011 can be shownas below:
TuringMachine
Now,we will see howthisturingmachine will worksfor0011. Initially,state isq0and headpointsto
0 as:
TuringMachine
The move will be δ(q0,0) = δ(q1,A,R) whichmeansitwill goto state q1, replaced0 by A andhead
will move tothe rightas:
TuringMachine
The move will be δ(q1,0) = δ(q1,0, R) whichmeansitwill notchange any symbol,remaininthe
same state and move to the rightas:
TuringMachine
The move will be δ(q1,1) = δ(q2,B, L) whichmeansitwill goto state q2, replaced1 by B and head
will move toleftas:
TuringMachine
Nowmove will be δ(q2,0) = δ(q2,0, L) whichmeansitwill notchange anysymbol,remaininthe
same state and move to leftas:
TuringMachine
The move will be δ(q2,A) = δ(q0,A,R), itmeanswill goto state q0, replacedA by A andheadwill
move to the rightas:
TuringMachine
The move will be δ(q0,0) = δ(q1,A,R) whichmeansitwill goto state q1, replaced0 by A,and head
will move torightas:
TuringMachine
The move will be δ(q1,B) = δ(q1,B, R) whichmeansitwill notchange any symbol,remaininthe
same state and move to rightas:
TuringMachine
The move will be δ(q1,1) = δ(q2,B, L) whichmeansitwill goto state q2, replaced1 by B and head
will move toleftas:
TuringMachine
The move δ(q2,B) = (q2,B, L) whichmeansit will notchange anysymbol,remaininthe same state
and move toleftas:
TuringMachine
Nowimmediatelybefore BisA that meansall the 0?s are marketby A. Sowe will move rightto
ensure thatno 1 ispresent.The move will be δ(q2,A) =(q0, A,R) whichmeansitwill goto state q0,
will notchange anysymbol,andmove to rightas:
TuringMachine
The move δ(q0,B) = (q3,B, R) whichmeansitwill goto state q3, will notchange any symbol,and
move to rightas:
TuringMachine
The move δ(q3,B) = (q3,B, R) whichmeansitwill notchange any symbol,remaininthe same state
and move toright as:
TuringMachine
The move δ(q3,Δ) = (q4, Δ, R) whichmeansitwill goto state q4 whichis the HALT state and HALT
state is alwaysanaccept state for any TM.
TuringMachine
The same TM can be representedbyTransitionDiagram:

More Related Content

Similar to TOA.docx

souraj Toc.pptx
souraj Toc.pptxsouraj Toc.pptx
souraj Toc.pptx
Lifo4
 
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
 
Automata based programming
Automata based programmingAutomata based programming
Automata based programming
VisnuDharsini
 
03-FiniteAutomata.pptx
03-FiniteAutomata.pptx03-FiniteAutomata.pptx
03-FiniteAutomata.pptx
ssuser47f7f2
 
Turing machine
Turing machineTuring machine
Turing machine
Kanis Fatema Shanta
 
Turing machine
Turing machineTuring machine
Turing machine
HimanshuSirohi6
 
Turing machine - theory of computation
Turing machine - theory of computationTuring machine - theory of computation
Turing machine - theory of computation
Rubaya Mim
 
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
FariyaTasneem1
 
Ch2 finite automaton
Ch2 finite automatonCh2 finite automaton
Ch2 finite automaton
meresie tesfay
 
Turing machine
Turing machineTuring machine
Turing machine
MuhammadSamranTanvee
 
Winter 8 TM.pptx
Winter 8 TM.pptxWinter 8 TM.pptx
Winter 8 TM.pptx
HarisPrince
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
Prof. Dr. K. Adisesha
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
Prof. Dr. K. Adisesha
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
AyAn KhAn
 
Moore and mealy machines
Moore and mealy machinesMoore and mealy machines
Moore and mealy machines
AYESHA JAVED
 
Automata theory introduction
Automata theory introductionAutomata theory introduction
Automata theory introduction
NAMRATA BORKAR
 
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
Abhimanyu Mishra
 
Theory of automata
Theory of automataTheory of automata
Theory of automata
Arslan905905
 
Turing machine implementation
Turing machine implementationTuring machine implementation
Turing machine implementation
SinaRostami7
 

Similar to TOA.docx (20)

souraj Toc.pptx
souraj Toc.pptxsouraj Toc.pptx
souraj Toc.pptx
 
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
 
Automata based programming
Automata based programmingAutomata based programming
Automata based programming
 
03-FiniteAutomata.pptx
03-FiniteAutomata.pptx03-FiniteAutomata.pptx
03-FiniteAutomata.pptx
 
Turing machine
Turing machineTuring machine
Turing machine
 
Turing machine
Turing machineTuring machine
Turing machine
 
Turing machine - theory of computation
Turing machine - theory of computationTuring machine - theory of computation
Turing machine - theory of computation
 
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
 
Ch2 finite automaton
Ch2 finite automatonCh2 finite automaton
Ch2 finite automaton
 
Turing machine
Turing machineTuring machine
Turing machine
 
Winter 8 TM.pptx
Winter 8 TM.pptxWinter 8 TM.pptx
Winter 8 TM.pptx
 
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
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Moore and mealy machines
Moore and mealy machinesMoore and mealy machines
Moore and mealy machines
 
Automata theory introduction
Automata theory introductionAutomata theory introduction
Automata theory introduction
 
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
 
Theory of automata
Theory of automataTheory of automata
Theory of automata
 
Turing machine implementation
Turing machine implementationTuring machine implementation
Turing machine implementation
 

Recently uploaded

insect taxonomy importance systematics and classification
insect taxonomy importance systematics and classificationinsect taxonomy importance systematics and classification
insect taxonomy importance systematics and classification
anitaento25
 
In silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptxIn silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptx
AlaminAfendy1
 
Richard's entangled aventures in wonderland
Richard's entangled aventures in wonderlandRichard's entangled aventures in wonderland
Richard's entangled aventures in wonderland
Richard Gill
 
ESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptxESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptx
muralinath2
 
SCHIZOPHRENIA Disorder/ Brain Disorder.pdf
SCHIZOPHRENIA Disorder/ Brain Disorder.pdfSCHIZOPHRENIA Disorder/ Brain Disorder.pdf
SCHIZOPHRENIA Disorder/ Brain Disorder.pdf
SELF-EXPLANATORY
 
Orion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWSOrion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWS
Columbia Weather Systems
 
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptxBody fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
muralinath2
 
erythropoiesis-I_mechanism& clinical significance.pptx
erythropoiesis-I_mechanism& clinical significance.pptxerythropoiesis-I_mechanism& clinical significance.pptx
erythropoiesis-I_mechanism& clinical significance.pptx
muralinath2
 
What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.
moosaasad1975
 
Mammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also FunctionsMammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also Functions
YOGESH DOGRA
 
GBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram StainingGBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram Staining
Areesha Ahmad
 
Richard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlandsRichard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlands
Richard Gill
 
GBSN - Biochemistry (Unit 5) Chemistry of Lipids
GBSN - Biochemistry (Unit 5) Chemistry of LipidsGBSN - Biochemistry (Unit 5) Chemistry of Lipids
GBSN - Biochemistry (Unit 5) Chemistry of Lipids
Areesha Ahmad
 
RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCINGRNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
AADYARAJPANDEY1
 
Leaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdfLeaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdf
RenuJangid3
 
Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.
Nistarini College, Purulia (W.B) India
 
filosofia boliviana introducción jsjdjd.pptx
filosofia boliviana introducción jsjdjd.pptxfilosofia boliviana introducción jsjdjd.pptx
filosofia boliviana introducción jsjdjd.pptx
IvanMallco1
 
Hemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptxHemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptx
muralinath2
 
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
Health Advances
 
Lab report on liquid viscosity of glycerin
Lab report on liquid viscosity of glycerinLab report on liquid viscosity of glycerin
Lab report on liquid viscosity of glycerin
ossaicprecious19
 

Recently uploaded (20)

insect taxonomy importance systematics and classification
insect taxonomy importance systematics and classificationinsect taxonomy importance systematics and classification
insect taxonomy importance systematics and classification
 
In silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptxIn silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptx
 
Richard's entangled aventures in wonderland
Richard's entangled aventures in wonderlandRichard's entangled aventures in wonderland
Richard's entangled aventures in wonderland
 
ESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptxESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptx
 
SCHIZOPHRENIA Disorder/ Brain Disorder.pdf
SCHIZOPHRENIA Disorder/ Brain Disorder.pdfSCHIZOPHRENIA Disorder/ Brain Disorder.pdf
SCHIZOPHRENIA Disorder/ Brain Disorder.pdf
 
Orion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWSOrion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWS
 
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptxBody fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
 
erythropoiesis-I_mechanism& clinical significance.pptx
erythropoiesis-I_mechanism& clinical significance.pptxerythropoiesis-I_mechanism& clinical significance.pptx
erythropoiesis-I_mechanism& clinical significance.pptx
 
What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.
 
Mammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also FunctionsMammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also Functions
 
GBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram StainingGBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram Staining
 
Richard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlandsRichard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlands
 
GBSN - Biochemistry (Unit 5) Chemistry of Lipids
GBSN - Biochemistry (Unit 5) Chemistry of LipidsGBSN - Biochemistry (Unit 5) Chemistry of Lipids
GBSN - Biochemistry (Unit 5) Chemistry of Lipids
 
RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCINGRNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
 
Leaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdfLeaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdf
 
Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.
 
filosofia boliviana introducción jsjdjd.pptx
filosofia boliviana introducción jsjdjd.pptxfilosofia boliviana introducción jsjdjd.pptx
filosofia boliviana introducción jsjdjd.pptx
 
Hemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptxHemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptx
 
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
 
Lab report on liquid viscosity of glycerin
Lab report on liquid viscosity of glycerinLab report on liquid viscosity of glycerin
Lab report on liquid viscosity of glycerin
 

TOA.docx

  • 1. A TuringMachine is an acceptingdevice whichacceptsthe languages(recursivelyenumerable set) generatedbytype 0 grammars.It was inventedin1936 by AlanTuring. Definition A TuringMachine (TM) is a mathematical model whichconsistsof aninfinite lengthtape dividedinto cellsonwhichinputisgiven.Itconsistsof a headwhichreadsthe inputtape.A state registerstores the state of the Turing machine.Afterreadinganinputsymbol,itisreplacedwithanothersymbol, itsinternal state ischanged,andit movesfromone cell tothe right or left.If the TM reachesthe final state,the inputstringisaccepted,otherwise rejected. A TM can be formallydescribedasa7-tuple (Q,X,∑, δ, q0, B, F) where − Q is a finite setof states X isthe tape alphabet ∑ is the inputalphabet δ isa transitionfunction;δ:Q × X → Q × X × {Left_shift,Right_shift}. q0 is the initial state B is the blanksymbol F isthe setof final states Comparisonwiththe previousautomaton The followingtable shows acomparisonof how a Turingmachine differsfromFiniteAutomatonand PushdownAutomaton.
  • 2. Machine Stack Data Structure Deterministic? Finite Automaton N.A Yes PushdownAutomaton Last In FirstOut(LIFO) No TuringMachine Infinite tape Yes Example of Turingmachine Turingmachine M = (Q,X, ∑, δ, q0, B, F) with Q = {q0, q1, q2, qf} X = {a,b} ∑ = {1} q0 = {q0} B = blanksymbol F = {qf } δ isgivenby− Tape alphabetsymbol PresentState ‘q0’ PresentState ‘q1’ PresentState ‘q2’ a 1Rq1 1Lq0 1Lqf b 1Lq2 1Rq1 1Rqf Here the transition1Rq1 impliesthatthe write symbol is1,the tape movesright,and the nextstate isq1. Similarly,the transition1Lq2 impliesthatthe write symbol is1,the tape movesleft,andthe nextstate isq2. Time and Space Complexityof aTuringMachine For a Turing machine,the time complexityreferstothe measure of the numberof timesthe tape moveswhenthe machine isinitializedforsome inputsymbolsandthe space complexityisthe numberof cellsof the tape written. Time complexityall reasonable functions−
  • 3. T(n) = O(nlogn) TM's space complexity− S(n) = O(n) AutomataTutorial AutomataTutorialTheoryof AutomataFinite AutomataTransitionDiagramTransition TableDFAExamplesof DFANFAExamplesof NFAEliminatingε TransitionsConversionfromNFA to DFAConversionfromNFA withεto DFAMinimizationof DFA RegularExpression RegularExpressionExamplesof RegularExpressionConversionof REto FAArden'sTheoremMoore MachineMealyMachineConversionfromMealymachine toMoore machineConversionfromMoore machine toMealy machine CFG Context-free GrammarDerivationDerivationTreeAmbiguityinGrammarUnambiguous GrammarSimplificationof CFGChomsky'sNormal Form(CNF)GreibachNormal Form(GNF) PDA PushdownAutomataPDA AcceptanceNon-deterministicPushdownAutomataCFGtoPDA Conversion TuringMachine AutomataTuringMachine openlinkBasicModel of TuringmachineLanguage acceptedbyTuring machineExample of TMIntroductiontoUndecidabilityUndecidable ProblemaboutTMPost Correspondence ProblemChomskyHierarchyJavaTpoint Next→← Prev TuringMachine
  • 4. Turingmachine wasinventedin1936 byAlanTuring.It is an acceptingdevice whichaccepts Recursive Enumerable Language generatedbytype 0grammar. There are variousfeaturesof the Turingmachine: It has an external memorywhichremembersarbitrarylongsequence of input. It has unlimitedmemorycapability. The model hasa facilitybywhichthe inputatleftor righton the tape can be readeasily. The machine can produce a certainoutputbasedon itsinput.Sometimesitmaybe requiredthatthe same inputhas to be usedto generate the output.Sointhismachine,the distinctionbetweeninput and outputhas beenremoved.Thusacommon setof alphabetscanbe usedforthe Turing machine. Formal definitionof Turingmachine A Turingmachine can be definedasacollectionof 7 components: Q: the finite setof states ∑: the finite setof inputsymbols T: the tape symbol q0: the initial state F: a set of final states B: a blanksymbol usedasa endmarkerfor input δ: a transitionormappingfunction. The mappingfunctionshowsthe mappingfromstatesof finite automataandinputsymbol onthe tape to the nextstates,external symbolsandthe directionformovingthe tape head.Thisisknown as a triple or a program forturingmachine. (q0, a) → (q1, A,R) That meansinq0 state,if we readsymbol 'a' thenit will goto state q1, replaceda byX and move aheadright(Rstandsfor right).
  • 5. Example: ConstructTM for the language L ={0n1n} where n>=1. Solution: We have alreadysolvedthisproblembyPDA.InPDA,we have a stack to rememberthe previous symbol.The mainadvantage of the Turingmachine iswe have a tape headwhichcan be moved forwardor backward,and the inputtape can be scanned. The simple logicwhichwe will applyisreadouteach '0' mark itby A and thenmove aheadalong withthe inputtape and findout1 convertitto B. Now,repeatthisprocessforall a's andb's. Nowwe will see howthisturingmachine workfor0011. The simulationfor0011 can be shownas below: or 0011 can be shownas below: TuringMachine Now,we will see howthisturingmachine will worksfor0011. Initially,state isq0and headpointsto 0 as: TuringMachine The move will be δ(q0,0) = δ(q1,A,R) whichmeansitwill goto state q1, replaced0 by A andhead will move tothe rightas:
  • 6. TuringMachine The move will be δ(q1,0) = δ(q1,0, R) whichmeansitwill notchange any symbol,remaininthe same state and move to the rightas: TuringMachine The move will be δ(q1,1) = δ(q2,B, L) whichmeansitwill goto state q2, replaced1 by B and head will move toleftas: TuringMachine Nowmove will be δ(q2,0) = δ(q2,0, L) whichmeansitwill notchange anysymbol,remaininthe same state and move to leftas: TuringMachine The move will be δ(q2,A) = δ(q0,A,R), itmeanswill goto state q0, replacedA by A andheadwill move to the rightas: TuringMachine The move will be δ(q0,0) = δ(q1,A,R) whichmeansitwill goto state q1, replaced0 by A,and head will move torightas: TuringMachine The move will be δ(q1,B) = δ(q1,B, R) whichmeansitwill notchange any symbol,remaininthe same state and move to rightas: TuringMachine The move will be δ(q1,1) = δ(q2,B, L) whichmeansitwill goto state q2, replaced1 by B and head will move toleftas:
  • 7. TuringMachine The move δ(q2,B) = (q2,B, L) whichmeansit will notchange anysymbol,remaininthe same state and move toleftas: TuringMachine Nowimmediatelybefore BisA that meansall the 0?s are marketby A. Sowe will move rightto ensure thatno 1 ispresent.The move will be δ(q2,A) =(q0, A,R) whichmeansitwill goto state q0, will notchange anysymbol,andmove to rightas: TuringMachine The move δ(q0,B) = (q3,B, R) whichmeansitwill goto state q3, will notchange any symbol,and move to rightas: TuringMachine The move δ(q3,B) = (q3,B, R) whichmeansitwill notchange any symbol,remaininthe same state and move toright as: TuringMachine The move δ(q3,Δ) = (q4, Δ, R) whichmeansitwill goto state q4 whichis the HALT state and HALT state is alwaysanaccept state for any TM. TuringMachine The same TM can be representedbyTransitionDiagram: