SlideShare una empresa de Scribd logo
1 de 7
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:

Más contenido relacionado

Similar a TOA.docx

souraj Toc.pptx
souraj Toc.pptxsouraj Toc.pptx
souraj Toc.pptxLifo4
 
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 programmingVisnuDharsini
 
03-FiniteAutomata.pptx
03-FiniteAutomata.pptx03-FiniteAutomata.pptx
03-FiniteAutomata.pptxssuser47f7f2
 
Turing machine - theory of computation
Turing machine - theory of computationTuring machine - theory of computation
Turing machine - theory of computationRubaya 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).pdfFariyaTasneem1
 
Winter 8 TM.pptx
Winter 8 TM.pptxWinter 8 TM.pptx
Winter 8 TM.pptxHarisPrince
 
Turing Machine
Turing MachineTuring Machine
Turing MachineAyAn KhAn
 
Moore and mealy machines
Moore and mealy machinesMoore and mealy machines
Moore and mealy machinesAYESHA JAVED
 
Automata theory introduction
Automata theory introductionAutomata theory introduction
Automata theory introductionNAMRATA 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 5Abhimanyu Mishra
 
Theory of automata
Theory of automataTheory of automata
Theory of automataArslan905905
 
Turing machine implementation
Turing machine implementationTuring machine implementation
Turing machine implementationSinaRostami7
 

Similar a 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
 

Último

Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )aarthirajkumar25
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPirithiRaju
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)Areesha Ahmad
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​kaibalyasahoo82800
 
Green chemistry and Sustainable development.pptx
Green chemistry  and Sustainable development.pptxGreen chemistry  and Sustainable development.pptx
Green chemistry and Sustainable development.pptxRajatChauhan518211
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡anilsa9823
 
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 60009654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000Sapana Sha
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksSérgio Sacani
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPirithiRaju
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPirithiRaju
 
Chromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATINChromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATINsankalpkumarsahoo174
 
Chemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfChemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfSumit Kumar yadav
 
GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)Areesha Ahmad
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxAArockiyaNisha
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PPRINCE C P
 
Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfrohankumarsinghrore1
 
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...ssifa0344
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)PraveenaKalaiselvan1
 
Botany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsBotany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsSumit Kumar yadav
 

Último (20)

Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​
 
Green chemistry and Sustainable development.pptx
Green chemistry  and Sustainable development.pptxGreen chemistry  and Sustainable development.pptx
Green chemistry and Sustainable development.pptx
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
 
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 60009654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disks
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
 
Chromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATINChromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATIN
 
Chemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfChemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdf
 
GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C P
 
CELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdfCELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdf
 
Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdf
 
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)
 
Botany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsBotany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questions
 

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: