SlideShare una empresa de Scribd logo
1 de 78
Descargar para leer sin conexión
Turing machine
…   ε ε a0 a1       …        an ε ε   …
        RD     Input Tape
        Head




                 Finite
                Control

                  qi
 Create a Turing Machine that takes as input a string
 consists of different parentheses ( ), [ ] or { } and ensure
 if that string is balanced – open parentheses are balanced
 with closed parentheses – and correct – the smaller one
 does not include the bigger –.

 Examples:
 {[[(()())]()]}    Accepted (balanced and correct)
 [(())(){()()}]    Rejected (balanced but wrong)
 {[()}}{[(())]}    Rejected (correct but unbalanced)
 {()([])}[(()]]    Rejected (unbalanced and wrong)
Q = { Start , Find1 , Find2 , Find3 , End , Rejected , Accepted }
States Description :
Start : initial state, that begin to find first symbol ), ] or } then check it with X, Y or Z respectively.

Find1 : moving left to find matched symbol (, then check it with X and return to Start state.

Find2 : moving left to find matched symbol [, then check it with Y and return to Start state.

Find3 : moving left to find matched symbol {, then check it with Z and return to Start state.

End : the string is finished, thus moving left to ensure that all symbols are checked.

Rejected : there are unchecked (unbalanced) symbols or the string is wrong, therefore string is rejected.

Accepted : all symbols are checked (balanced) and the string is correct, therefore string is accepted.
Γ ={(,),[,],{,},X,Y,Z,ε}   (Tape Alphabet)

Σ ={(,),[,],{,}}           (Input Alphabet)

F = { Accepted }           (Finite States)

Initial State: Start


Blank Symbol: ε
δ(q , γ)        (          )           [          ]           {           }      X         Y          Z            ε
 Start        Start       Find1      Start       Find2      Start       Find3   Start    Start      Start        End
→),],}        (,R         X,L        [,R          Y,L       {,R          Z,L    X,R      Y,R        Z,R          ε,L
                                   Rejected               Rejected                      Rejected   Rejected    Rejected
 Find1        Start                                                             Find1
  (           X,R
                            -         [,L          -         {,L          -
                                                                                X,L
                                                                                          Y,L        Z,L         ε ,R
                                    (wrong)                (wrong)                      (wrong)    (wrong)    (unbalanced)

            Rejected                                      Rejected                                 Rejected    Rejected
 Find2                      -
                                     Start                                      Find2    Find2
  [
              (,L
                                     Y,R
                                                   -         {,L          -
                                                                                 X,L      Y,L
                                                                                                     Z,L         ε ,R
           (unbalanced)                                    (wrong)                                 (wrong)    (unbalanced)

            Rejected               Rejected                                                                    Rejected
 Find3                                                      Start               Find3    Find3      Find3
  {
              (,L           -        [,L           -
                                                            Z,R
                                                                          -
                                                                                 X,L      Y,L        Z,L         ε,R
           (unbalanced)           (unbalanced)                                                                (unbalanced)

                                                                                                               Accepted
 End        Rejected               Rejected               Rejected
                                                                                End       End        End         ε,R
              (,L           -        [,L           -        {,L           -
  ε        (unbalanced)           (unbalanced)           (unbalanced)
                                                                                X,L       Y,L        Z,L        (correct)
                                                                                                               (balanced)

Rejected
  Stop          -           -          -           -          -           -       -        -          -            -


Accepted
  Stop          -           -          -           -          -           -       -        -          -            -
X/X,L


                                                         Find
                                                           1
                     Y/Y,L



                                             [/Y,R
           ε/ε,R
                                                         Find
  Accept             End     ε/ε,L   Start                        (/(,L {/{,L Z/Z,L ε/ε,L   Reject
                                                           2
                                             ]/Y,L
                                                          Y/Y,L



                                                         Find
                                                           3
X/Y,D
X : Scanned Symbol
Y : Written Symbol                               [/[,L
D : Move Direction
A. The string: {[()]}


              …   ε     {   [   (   )   ]   }   ε   …




                                Start
A. The string: {[()]}


              …   ε     {   [   (   )   ]   }   ε   …




                                Start
A. The string: {[()]}


              …   ε     {   [   (   )   ]   }   ε   …




                                Start
A. The string: {[()]}


              …   ε     {   [   (   )   ]   }   ε   …




                                Start
A. The string: {[()]}


              …   ε     {   [   ( X     ]   }   ε   …




                                Find1
A. The string: {[()]}


              …   ε     {   [ X X    ]   }   ε   …




                             Start
A. The string: {[()]}


              …   ε     {   [ X X    ]   }   ε   …




                             Start
A. The string: {[()]}


              …   ε     {   [ X X Y   }   ε   …




                             Find2
A. The string: {[()]}


              …   ε     {   [ X X Y   }   ε   …




                             Find2
A. The string: {[()]}


              …   ε     {   [ X X Y   }   ε   …




                             Find2
A. The string: {[()]}


              …   ε     {   Y X X Y   }   ε   …




                             Start
A. The string: {[()]}


              …   ε     {   Y X X Y   }   ε   …




                             Start
A. The string: {[()]}


              …   ε     {   Y X X Y   }   ε   …




                             Start
A. The string: {[()]}


              …   ε     {   Y X X Y   }   ε   …




                             Start
A. The string: {[()]}


              …   ε     {   Y X X Y Z   ε   …




                             Find3
A. The string: {[()]}


              …   ε     {   Y X X Y Z   ε   …




                             Find3
A. The string: {[()]}


              …   ε     {   Y X X Y Z   ε   …




                             Find3
A. The string: {[()]}


              …   ε     {   Y X X Y Z   ε   …




                             Find3
A. The string: {[()]}


              …   ε     {   Y X X Y Z   ε   …




                             Find3
A. The string: {[()]}


              …   ε Z Y X X Y Z   ε   …




                        Start
A. The string: {[()]}


              …   ε Z Y X X Y Z   ε   …




                        Start
A. The string: {[()]}


              …   ε Z Y X X Y Z   ε   …




                        Start
A. The string: {[()]}


              …   ε Z Y X X Y Z   ε   …




                        Start
A. The string: {[()]}


              …   ε Z Y X X Y Z   ε   …




                        Start
A. The string: {[()]}


              …   ε Z Y X X Y Z   ε   …




                        Start
A. The string: {[()]}


              …   ε Z Y X X Y Z   ε   …




                        End
A. The string: {[()]}


              …   ε Z Y X X Y Z   ε   …




                        End
A. The string: {[()]}


              …   ε Z Y X X Y Z   ε   …




                        End
A. The string: {[()]}


              …   ε Z Y X X Y Z   ε   …




                        End
A. The string: {[()]}


              …   ε Z Y X X Y Z   ε   …




                        End
A. The string: {[()]}


              …   ε Z Y X X Y Z   ε   …




                        End
A. The string: {[()]}


              …   ε Z Y X X Y Z   ε   …




                        End
A. The string: {[()]}


              …   ε Z Y X X Y Z    ε   …




                        Accepted
B.   The string: [{()}]

                …   ε     [   {   (   )   }   ]   ε   …




                                  Start
B.   The string: [{()}]

                …   ε     [   {   (   )   }   ]   ε   …




                                  Start
B.   The string: [{()}]

                …   ε     [   {   (   )   }   ]   ε   …




                                  Start
B.   The string: [{()}]

                …   ε     [   {   (   )   }   ]   ε   …




                                  Start
B.   The string: [{()}]

                …   ε     [   {   ( X     }   ]   ε   …




                                  Find1
B.   The string: [{()}]

                …   ε     [   { X X    }   ]   ε   …




                               Start
B.   The string: [{()}]

                …   ε     [   { X X    }   ]   ε   …




                               Start
B.   The string: [{()}]

                …   ε     [   { X X Z   ]   ε   …




                               Find3
B.   The string: [{()}]

                …   ε     [   { X X Z   ]   ε   …




                               Find3
B.   The string: [{()}]

                …   ε     [   { X X Z   ]   ε   …




                               Find3
B.   The string: [{()}]

                …   ε     [   Z X X Z   ]   ε   …




                               Start
B.   The string: [{()}]

                …   ε     [   Z X X Z   ]   ε   …




                               Start
B.   The string: [{()}]

                …   ε     [   Z X X Z   ]   ε   …




                               Start
B.   The string: [{()}]

                …   ε     [   Z X X Z   ]   ε   …




                               Start
B.   The string: [{()}]

                …   ε     [   Z X X Z Y   ε   …




                               Find2
B.   The string: [{()}]

                …   ε     [   Z X X Z Y   ε   …




                               Rejected
                                (wrong)
C. The string: {[[()]


              …   ε     {   [   [   (   )   ]   ε   …




                                Start
C. The string: {[[()]


              …   ε     {   [   [   (   )   ]   ε   …




                                Start
C. The string: {[[()]


              …   ε     {   [   [   (   )   ]   ε   …




                                Start
C. The string: {[[()]


              …   ε     {   [   [   (   )   ]   ε   …




                                Start
C. The string: {[[()]


              …   ε     {   [   [   (   )   ]   ε   …




                                Start
C. The string: {[[()]


              …   ε     {   [   [   (   X ]   ε   …




                                Find1
C. The string: {[[()]


              …   ε     {   [   [ X X ]   ε   …




                                Start
C. The string: {[[()]


              …   ε     {   [   [ X X ]   ε   …




                                Start
C. The string: {[[()]


              …   ε     {   [   [ X X Y   ε   …




                                Find2
C. The string: {[[()]


              …   ε     {   [   [ X X Y   ε   …




                                Find2
C. The string: {[[()]


              …   ε     {   [   [ X X Y   ε   …




                                Find2
C. The string: {[[()]


              …   ε     {   [ Y X X Y   ε   …




                             Start
C. The string: {[[()]


              …   ε     {   [ Y X X Y   ε   …




                             Start
C. The string: {[[()]


              …   ε     {   [ Y X X Y   ε   …




                             Start
C. The string: {[[()]


              …   ε     {   [ Y X X Y   ε   …




                             Start
C. The string: {[[()]


              …   ε     {   [ Y X X Y   ε   …




                              End
C. The string: {[[()]


              …   ε     {   [ Y X X Y   ε   …




                              End
C. The string: {[[()]


              …   ε     {   [ Y X X Y   ε   …




                              End
C. The string: {[[()]


              …   ε     {   [ Y X X Y   ε   …




                              End
C. The string: {[[()]


              …   ε     {   [ Y X X Y   ε   …




                              End
C. The string: {[[()]


              …   ε     {   [ Y X X Y       ε   …




                             Rejected
                             (unbalanced)
Turing machine

Más contenido relacionado

La actualidad más candente

Introduction to Garbage Collection
Introduction to Garbage CollectionIntroduction to Garbage Collection
Introduction to Garbage CollectionArtur Mkrtchyan
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithmMohd Arif
 
Parsing in Compiler Design
Parsing in Compiler DesignParsing in Compiler Design
Parsing in Compiler DesignAkhil Kaushik
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle pptsheetal singh
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process ConceptsMukesh Chinta
 
Code generation errors and recovery
Code generation errors and recoveryCode generation errors and recovery
Code generation errors and recoveryMomina Idrees
 
15 puzzle problem using branch and bound
15 puzzle problem using branch and bound15 puzzle problem using branch and bound
15 puzzle problem using branch and boundAbhishek Singh
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSGayathri Gaayu
 
LINEAR BOUNDED AUTOMATA (LBA).pptx
LINEAR BOUNDED AUTOMATA (LBA).pptxLINEAR BOUNDED AUTOMATA (LBA).pptx
LINEAR BOUNDED AUTOMATA (LBA).pptxAkhilJoseph63
 
Branch and bound
Branch and boundBranch and bound
Branch and boundAcad
 
Instruction Execution Cycle
Instruction Execution CycleInstruction Execution Cycle
Instruction Execution Cycleutsav_shah
 
Top Down Parsing, Predictive Parsing
Top Down Parsing, Predictive ParsingTop Down Parsing, Predictive Parsing
Top Down Parsing, Predictive ParsingTanzeela_Hussain
 
Elements of dynamic programming
Elements of dynamic programmingElements of dynamic programming
Elements of dynamic programmingTafhim Islam
 

La actualidad más candente (20)

Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Introduction to Garbage Collection
Introduction to Garbage CollectionIntroduction to Garbage Collection
Introduction to Garbage Collection
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithm
 
Theta notation
Theta notationTheta notation
Theta notation
 
Tsp is NP-Complete
Tsp is NP-CompleteTsp is NP-Complete
Tsp is NP-Complete
 
Parsing in Compiler Design
Parsing in Compiler DesignParsing in Compiler Design
Parsing in Compiler Design
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle ppt
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
 
NFA to DFA
NFA to DFANFA to DFA
NFA to DFA
 
Asymptotic Notation
Asymptotic NotationAsymptotic Notation
Asymptotic Notation
 
Code generation errors and recovery
Code generation errors and recoveryCode generation errors and recovery
Code generation errors and recovery
 
15 puzzle problem using branch and bound
15 puzzle problem using branch and bound15 puzzle problem using branch and bound
15 puzzle problem using branch and bound
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMS
 
LINEAR BOUNDED AUTOMATA (LBA).pptx
LINEAR BOUNDED AUTOMATA (LBA).pptxLINEAR BOUNDED AUTOMATA (LBA).pptx
LINEAR BOUNDED AUTOMATA (LBA).pptx
 
Input-Buffering
Input-BufferingInput-Buffering
Input-Buffering
 
Branch and bound
Branch and boundBranch and bound
Branch and bound
 
Instruction Execution Cycle
Instruction Execution CycleInstruction Execution Cycle
Instruction Execution Cycle
 
Top Down Parsing, Predictive Parsing
Top Down Parsing, Predictive ParsingTop Down Parsing, Predictive Parsing
Top Down Parsing, Predictive Parsing
 
Elements of dynamic programming
Elements of dynamic programmingElements of dynamic programming
Elements of dynamic programming
 
Top down parsing
Top down parsingTop down parsing
Top down parsing
 

Destacado

Turing machine Introduction
Turing machine IntroductionTuring machine Introduction
Turing machine IntroductionAram Rafeq
 
Turing Machine
Turing MachineTuring Machine
Turing MachineAyAn KhAn
 
Turing Machine
Turing MachineTuring Machine
Turing MachineRajendran
 
Alan turing's work before, during & after bletchley park
Alan turing's work before, during & after bletchley parkAlan turing's work before, during & after bletchley park
Alan turing's work before, during & after bletchley parkDavid Bew
 
The imatatation game
The imatatation gameThe imatatation game
The imatatation gamepheobewebb
 
The trans-Turing Machine
The trans-Turing MachineThe trans-Turing Machine
The trans-Turing MachineGabor Vattay
 
Church Turing Thesis
Church Turing ThesisChurch Turing Thesis
Church Turing ThesisHemant Sharma
 
Working principle of Turing machine
Working principle of Turing machineWorking principle of Turing machine
Working principle of Turing machineKaran Thakkar
 
Cracking the Enigma Machine - Rejewski, Turing and the Math that saved the world
Cracking the Enigma Machine - Rejewski, Turing and the Math that saved the worldCracking the Enigma Machine - Rejewski, Turing and the Math that saved the world
Cracking the Enigma Machine - Rejewski, Turing and the Math that saved the worldBradYoung
 

Destacado (17)

Turing machines
Turing machinesTuring machines
Turing machines
 
Turing machine Introduction
Turing machine IntroductionTuring machine Introduction
Turing machine Introduction
 
Turing machine by_deep
Turing machine by_deepTuring machine by_deep
Turing machine by_deep
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Turing machine
Turing machineTuring machine
Turing machine
 
Alan turing's work before, during & after bletchley park
Alan turing's work before, during & after bletchley parkAlan turing's work before, during & after bletchley park
Alan turing's work before, during & after bletchley park
 
The imatatation game
The imatatation gameThe imatatation game
The imatatation game
 
The trans-Turing Machine
The trans-Turing MachineThe trans-Turing Machine
The trans-Turing Machine
 
Church Turing Thesis
Church Turing ThesisChurch Turing Thesis
Church Turing Thesis
 
Working principle of Turing machine
Working principle of Turing machineWorking principle of Turing machine
Working principle of Turing machine
 
Cracking the Enigma Machine - Rejewski, Turing and the Math that saved the world
Cracking the Enigma Machine - Rejewski, Turing and the Math that saved the worldCracking the Enigma Machine - Rejewski, Turing and the Math that saved the world
Cracking the Enigma Machine - Rejewski, Turing and the Math that saved the world
 
Automata 3
Automata 3Automata 3
Automata 3
 
Automata 6
Automata 6Automata 6
Automata 6
 
Automata 1
Automata 1Automata 1
Automata 1
 
Turing machine
Turing  machine Turing  machine
Turing machine
 

Más de Umar Alharaky

Function Point Counting Practices
Function Point Counting PracticesFunction Point Counting Practices
Function Point Counting PracticesUmar Alharaky
 
CMMI for Development
CMMI for DevelopmentCMMI for Development
CMMI for DevelopmentUmar Alharaky
 
Generalized Stochastic Petri Nets
Generalized Stochastic Petri NetsGeneralized Stochastic Petri Nets
Generalized Stochastic Petri NetsUmar Alharaky
 
Simulation Tracking Object Reference Model (STORM)
Simulation Tracking Object Reference Model (STORM)Simulation Tracking Object Reference Model (STORM)
Simulation Tracking Object Reference Model (STORM)Umar Alharaky
 

Más de Umar Alharaky (6)

Function Point Counting Practices
Function Point Counting PracticesFunction Point Counting Practices
Function Point Counting Practices
 
CMMI for Development
CMMI for DevelopmentCMMI for Development
CMMI for Development
 
Generalized Stochastic Petri Nets
Generalized Stochastic Petri NetsGeneralized Stochastic Petri Nets
Generalized Stochastic Petri Nets
 
Data integration
Data integrationData integration
Data integration
 
Spam Filtering
Spam FilteringSpam Filtering
Spam Filtering
 
Simulation Tracking Object Reference Model (STORM)
Simulation Tracking Object Reference Model (STORM)Simulation Tracking Object Reference Model (STORM)
Simulation Tracking Object Reference Model (STORM)
 

Último

Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Brian Pichman
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXTarek Kalaji
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxUdaiappa Ramachandran
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?IES VE
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDELiveplex
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 

Último (20)

Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )
 
201610817 - edge part1
201610817 - edge part1201610817 - edge part1
201610817 - edge part1
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptx
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 

Turing machine

  • 2. ε ε a0 a1 … an ε ε … RD Input Tape Head Finite Control qi
  • 3.  Create a Turing Machine that takes as input a string consists of different parentheses ( ), [ ] or { } and ensure if that string is balanced – open parentheses are balanced with closed parentheses – and correct – the smaller one does not include the bigger –.  Examples: {[[(()())]()]} Accepted (balanced and correct) [(())(){()()}] Rejected (balanced but wrong) {[()}}{[(())]} Rejected (correct but unbalanced) {()([])}[(()]] Rejected (unbalanced and wrong)
  • 4. Q = { Start , Find1 , Find2 , Find3 , End , Rejected , Accepted } States Description : Start : initial state, that begin to find first symbol ), ] or } then check it with X, Y or Z respectively. Find1 : moving left to find matched symbol (, then check it with X and return to Start state. Find2 : moving left to find matched symbol [, then check it with Y and return to Start state. Find3 : moving left to find matched symbol {, then check it with Z and return to Start state. End : the string is finished, thus moving left to ensure that all symbols are checked. Rejected : there are unchecked (unbalanced) symbols or the string is wrong, therefore string is rejected. Accepted : all symbols are checked (balanced) and the string is correct, therefore string is accepted.
  • 5. Γ ={(,),[,],{,},X,Y,Z,ε} (Tape Alphabet) Σ ={(,),[,],{,}} (Input Alphabet) F = { Accepted } (Finite States) Initial State: Start Blank Symbol: ε
  • 6. δ(q , γ) ( ) [ ] { } X Y Z ε Start Start Find1 Start Find2 Start Find3 Start Start Start End →),],} (,R X,L [,R Y,L {,R Z,L X,R Y,R Z,R ε,L Rejected Rejected Rejected Rejected Rejected Find1 Start Find1 ( X,R - [,L - {,L - X,L Y,L Z,L ε ,R (wrong) (wrong) (wrong) (wrong) (unbalanced) Rejected Rejected Rejected Rejected Find2 - Start Find2 Find2 [ (,L Y,R - {,L - X,L Y,L Z,L ε ,R (unbalanced) (wrong) (wrong) (unbalanced) Rejected Rejected Rejected Find3 Start Find3 Find3 Find3 { (,L - [,L - Z,R - X,L Y,L Z,L ε,R (unbalanced) (unbalanced) (unbalanced) Accepted End Rejected Rejected Rejected End End End ε,R (,L - [,L - {,L - ε (unbalanced) (unbalanced) (unbalanced) X,L Y,L Z,L (correct) (balanced) Rejected Stop - - - - - - - - - - Accepted Stop - - - - - - - - - -
  • 7. X/X,L Find 1 Y/Y,L [/Y,R ε/ε,R Find Accept End ε/ε,L Start (/(,L {/{,L Z/Z,L ε/ε,L Reject 2 ]/Y,L Y/Y,L Find 3 X/Y,D X : Scanned Symbol Y : Written Symbol [/[,L D : Move Direction
  • 8. A. The string: {[()]} … ε { [ ( ) ] } ε … Start
  • 9. A. The string: {[()]} … ε { [ ( ) ] } ε … Start
  • 10. A. The string: {[()]} … ε { [ ( ) ] } ε … Start
  • 11. A. The string: {[()]} … ε { [ ( ) ] } ε … Start
  • 12. A. The string: {[()]} … ε { [ ( X ] } ε … Find1
  • 13. A. The string: {[()]} … ε { [ X X ] } ε … Start
  • 14. A. The string: {[()]} … ε { [ X X ] } ε … Start
  • 15. A. The string: {[()]} … ε { [ X X Y } ε … Find2
  • 16. A. The string: {[()]} … ε { [ X X Y } ε … Find2
  • 17. A. The string: {[()]} … ε { [ X X Y } ε … Find2
  • 18. A. The string: {[()]} … ε { Y X X Y } ε … Start
  • 19. A. The string: {[()]} … ε { Y X X Y } ε … Start
  • 20. A. The string: {[()]} … ε { Y X X Y } ε … Start
  • 21. A. The string: {[()]} … ε { Y X X Y } ε … Start
  • 22. A. The string: {[()]} … ε { Y X X Y Z ε … Find3
  • 23. A. The string: {[()]} … ε { Y X X Y Z ε … Find3
  • 24. A. The string: {[()]} … ε { Y X X Y Z ε … Find3
  • 25. A. The string: {[()]} … ε { Y X X Y Z ε … Find3
  • 26. A. The string: {[()]} … ε { Y X X Y Z ε … Find3
  • 27. A. The string: {[()]} … ε Z Y X X Y Z ε … Start
  • 28. A. The string: {[()]} … ε Z Y X X Y Z ε … Start
  • 29. A. The string: {[()]} … ε Z Y X X Y Z ε … Start
  • 30. A. The string: {[()]} … ε Z Y X X Y Z ε … Start
  • 31. A. The string: {[()]} … ε Z Y X X Y Z ε … Start
  • 32. A. The string: {[()]} … ε Z Y X X Y Z ε … Start
  • 33. A. The string: {[()]} … ε Z Y X X Y Z ε … End
  • 34. A. The string: {[()]} … ε Z Y X X Y Z ε … End
  • 35. A. The string: {[()]} … ε Z Y X X Y Z ε … End
  • 36. A. The string: {[()]} … ε Z Y X X Y Z ε … End
  • 37. A. The string: {[()]} … ε Z Y X X Y Z ε … End
  • 38. A. The string: {[()]} … ε Z Y X X Y Z ε … End
  • 39. A. The string: {[()]} … ε Z Y X X Y Z ε … End
  • 40. A. The string: {[()]} … ε Z Y X X Y Z ε … Accepted
  • 41. B. The string: [{()}] … ε [ { ( ) } ] ε … Start
  • 42. B. The string: [{()}] … ε [ { ( ) } ] ε … Start
  • 43. B. The string: [{()}] … ε [ { ( ) } ] ε … Start
  • 44. B. The string: [{()}] … ε [ { ( ) } ] ε … Start
  • 45. B. The string: [{()}] … ε [ { ( X } ] ε … Find1
  • 46. B. The string: [{()}] … ε [ { X X } ] ε … Start
  • 47. B. The string: [{()}] … ε [ { X X } ] ε … Start
  • 48. B. The string: [{()}] … ε [ { X X Z ] ε … Find3
  • 49. B. The string: [{()}] … ε [ { X X Z ] ε … Find3
  • 50. B. The string: [{()}] … ε [ { X X Z ] ε … Find3
  • 51. B. The string: [{()}] … ε [ Z X X Z ] ε … Start
  • 52. B. The string: [{()}] … ε [ Z X X Z ] ε … Start
  • 53. B. The string: [{()}] … ε [ Z X X Z ] ε … Start
  • 54. B. The string: [{()}] … ε [ Z X X Z ] ε … Start
  • 55. B. The string: [{()}] … ε [ Z X X Z Y ε … Find2
  • 56. B. The string: [{()}] … ε [ Z X X Z Y ε … Rejected (wrong)
  • 57. C. The string: {[[()] … ε { [ [ ( ) ] ε … Start
  • 58. C. The string: {[[()] … ε { [ [ ( ) ] ε … Start
  • 59. C. The string: {[[()] … ε { [ [ ( ) ] ε … Start
  • 60. C. The string: {[[()] … ε { [ [ ( ) ] ε … Start
  • 61. C. The string: {[[()] … ε { [ [ ( ) ] ε … Start
  • 62. C. The string: {[[()] … ε { [ [ ( X ] ε … Find1
  • 63. C. The string: {[[()] … ε { [ [ X X ] ε … Start
  • 64. C. The string: {[[()] … ε { [ [ X X ] ε … Start
  • 65. C. The string: {[[()] … ε { [ [ X X Y ε … Find2
  • 66. C. The string: {[[()] … ε { [ [ X X Y ε … Find2
  • 67. C. The string: {[[()] … ε { [ [ X X Y ε … Find2
  • 68. C. The string: {[[()] … ε { [ Y X X Y ε … Start
  • 69. C. The string: {[[()] … ε { [ Y X X Y ε … Start
  • 70. C. The string: {[[()] … ε { [ Y X X Y ε … Start
  • 71. C. The string: {[[()] … ε { [ Y X X Y ε … Start
  • 72. C. The string: {[[()] … ε { [ Y X X Y ε … End
  • 73. C. The string: {[[()] … ε { [ Y X X Y ε … End
  • 74. C. The string: {[[()] … ε { [ Y X X Y ε … End
  • 75. C. The string: {[[()] … ε { [ Y X X Y ε … End
  • 76. C. The string: {[[()] … ε { [ Y X X Y ε … End
  • 77. C. The string: {[[()] … ε { [ Y X X Y ε … Rejected (unbalanced)