Computer Science Fundamentals - Turing Machines

J
Computer
Science
Foundations
Turing Machine Edition


Jason Dew
Geezeo / Catamorphic Labs
Alan
Turing
Entscheidungsproblem




             David
            Hilbert
Alphabet
any set of symbols

examples:
● {a, b, c, d, ..., z}

● {0, 1, 2, 3, ..., 9}

● {0, 1}
String
sequence of symbols from the alphabet

examples:
● foobar

● 0101001

● (empty string)
Formal Language
any set of strings over an alphabet

examples:
● {foo, bar, baz}

● {00, 01, 10, 11}

● {b, ab, aab, aaab, aaaab, ... }
Deterministic
Finite Automata




    http://15mmvsf.bagofmice.com/vsf/prev_robot.htm
Formal Definition
● an alphabet

● a set of states
   ○ one denoted as a "starting state"
   ○ one or more denoted as "accepting states"

● a transition function
   ○ takes a symbol and a state and returns a new state
DFA accepting
multiples of 3
Nondeterministic
Finite Automata
Formal Definition
● an alphabet

● a set of states
   ○ one denoted as a "starting state"
   ○ one or more denoted as "accepting states"

● a transition function
  ○ takes a symbol and a state and returns
      zero or more states
Example NFA
Theorem


 Any NFA can be converted
  into an equivalent DFA.
Regular Language


    Any language which
   can be recognized by
  some finite automaton.
Regular Expressions
Theorem


  A language is regular
       if and only if
 some regular expression
       describes it.
Turing machines
Formal Definition                      (slightly simplified)



● two alphabets
  ○ one for reading, the input alphabet
  ○ one for writing, the output (or tape) alphabet

● a set of states
   ○ one starting state
   ○ one accepting state
   ○ one rejecting state

● a transition function
     takes a symbol and a state and returns
       a new state, a symbol to write, and Left or Right
Example TM
Let's call it M

It accepts strings whose length is a power of 2

Accepted strings: "0", "00", "0000"

Rejected strings: "", "000", "000000"
A description of M




                     Attribution: Sipser, Figure 3.8
Running on "00"
                  tape   state

                  .00_   q1

                  _.0_   q2

                  _x._   q3

                  _.x_   q5

                  ._x_   q5

                  _.x_   q2

                  _x._   q2

                  _x_.   qaccept
Running on "0000"
tape     state

.0000_   q1      tape     state

_.000_   q2      _.x0x_   q2

_x.00_   q3      _x.0x_   q2

_x0.0_   q4      _xx.x_   q3
                                  tape     state
_x0x._   q3      _xxx._   q3      _.xxx_   q2

_x0.x_   q5      _xx.x_   q5      _x.xx_   q2

_x.0x_   q5      _x.xx_   q5      _xx.x_   q2

_.x0x_   q5      _.xxx_   q5      _xxx._   q2

._x0x_   q5      ._xxx_   q5      _xxx_.   qaccept
Wrapping up


Why do we care about
 Turing machines?
References
Deterministic finite automaton. (2012, March 11). Retrieved from http://en.wikipedia.
org/wiki/Deterministic_finite_automaton

Nondeterministic finite automaton. (2012, April 20). Retrieved from http://en.
wikipedia.org/wiki/Nondeterministic_finite_automaton

Petzold, C. (2008). The annotated turing. Indianapolis: Wiley Publishing, Inc.

Sipser, M. (2006). Introduction to the theory of computation. (2nd ed.). Boston:
Thompson Course Technology.

Turing machine. (2012, April 17). Retrieved from http://en.wikipedia.
org/wiki/Turing_machine
Come work with me!
1 of 25

Recommended

BEC- 26 control systems_unit-II by
BEC- 26 control systems_unit-IIBEC- 26 control systems_unit-II
BEC- 26 control systems_unit-IIShadab Siddiqui
304 views59 slides
LCE-UNIT 2 PPT.pdf by
LCE-UNIT 2 PPT.pdfLCE-UNIT 2 PPT.pdf
LCE-UNIT 2 PPT.pdfHODECE21
84 views141 slides
Topic 3 Digital Technique Flip flop by
Topic 3 Digital Technique Flip flopTopic 3 Digital Technique Flip flop
Topic 3 Digital Technique Flip flopBai Haqi
4.3K views41 slides
Modern Control - Lec 05 - Analysis and Design of Control Systems using Freque... by
Modern Control - Lec 05 - Analysis and Design of Control Systems using Freque...Modern Control - Lec 05 - Analysis and Design of Control Systems using Freque...
Modern Control - Lec 05 - Analysis and Design of Control Systems using Freque...Amr E. Mohamed
4.2K views33 slides
20210824 Pico session at CEDEC2021(旧) by
20210824 Pico session at CEDEC2021(旧)20210824 Pico session at CEDEC2021(旧)
20210824 Pico session at CEDEC2021(旧)Miyu Nishikawa
339 views70 slides

More Related Content

Similar to Computer Science Fundamentals - Turing Machines

FF and Latches.ppt by
FF and Latches.pptFF and Latches.ppt
FF and Latches.pptRockFellerSinghRusse
8 views37 slides
Theory of computation:Finite Automata, Regualr Expression, Pumping Lemma by
Theory of computation:Finite Automata, Regualr Expression, Pumping LemmaTheory of computation:Finite Automata, Regualr Expression, Pumping Lemma
Theory of computation:Finite Automata, Regualr Expression, Pumping LemmaPRAVEENTALARI4
198 views140 slides
13.ppt by
13.ppt13.ppt
13.pptDiptarshiBhowmick1
1 view37 slides
3.pdf by
3.pdf3.pdf
3.pdfDiptarshiBhowmick1
12 views27 slides
TuringMachines.pdf by
TuringMachines.pdfTuringMachines.pdf
TuringMachines.pdfviswanath kani
18 views26 slides
flat unit1 by
flat unit1flat unit1
flat unit1Janhavi Vishwanath
130 views9 slides

Similar to Computer Science Fundamentals - Turing Machines(11)

Recently uploaded

ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...Jasper Oosterveld
27 views49 slides
Evolving the Network Automation Journey from Python to Platforms by
Evolving the Network Automation Journey from Python to PlatformsEvolving the Network Automation Journey from Python to Platforms
Evolving the Network Automation Journey from Python to PlatformsNetwork Automation Forum
17 views21 slides
"Node.js Development in 2024: trends and tools", Nikita Galkin by
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin Fwdays
17 views38 slides
Info Session November 2023.pdf by
Info Session November 2023.pdfInfo Session November 2023.pdf
Info Session November 2023.pdfAleksandraKoprivica4
15 views15 slides
PharoJS - Zürich Smalltalk Group Meetup November 2023 by
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023Noury Bouraqadi
139 views17 slides
Mini-Track: Challenges to Network Automation Adoption by
Mini-Track: Challenges to Network Automation AdoptionMini-Track: Challenges to Network Automation Adoption
Mini-Track: Challenges to Network Automation AdoptionNetwork Automation Forum
17 views27 slides

Recently uploaded(20)

ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by Jasper Oosterveld
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
"Node.js Development in 2024: trends and tools", Nikita Galkin by Fwdays
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin
Fwdays17 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi139 views
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 by IttrainingIttraining
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson126 views
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading... by The Digital Insurer
Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading...
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf by Dr. Jimmy Schwarzkopf
STKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdfSTKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdf
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb14 views
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab23 views
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker48 views

Computer Science Fundamentals - Turing Machines

  • 3. Entscheidungsproblem David Hilbert
  • 4. Alphabet any set of symbols examples: ● {a, b, c, d, ..., z} ● {0, 1, 2, 3, ..., 9} ● {0, 1}
  • 5. String sequence of symbols from the alphabet examples: ● foobar ● 0101001 ● (empty string)
  • 6. Formal Language any set of strings over an alphabet examples: ● {foo, bar, baz} ● {00, 01, 10, 11} ● {b, ab, aab, aaab, aaaab, ... }
  • 7. Deterministic Finite Automata http://15mmvsf.bagofmice.com/vsf/prev_robot.htm
  • 8. Formal Definition ● an alphabet ● a set of states ○ one denoted as a "starting state" ○ one or more denoted as "accepting states" ● a transition function ○ takes a symbol and a state and returns a new state
  • 11. Formal Definition ● an alphabet ● a set of states ○ one denoted as a "starting state" ○ one or more denoted as "accepting states" ● a transition function ○ takes a symbol and a state and returns zero or more states
  • 13. Theorem Any NFA can be converted into an equivalent DFA.
  • 14. Regular Language Any language which can be recognized by some finite automaton.
  • 16. Theorem A language is regular if and only if some regular expression describes it.
  • 18. Formal Definition (slightly simplified) ● two alphabets ○ one for reading, the input alphabet ○ one for writing, the output (or tape) alphabet ● a set of states ○ one starting state ○ one accepting state ○ one rejecting state ● a transition function takes a symbol and a state and returns a new state, a symbol to write, and Left or Right
  • 19. Example TM Let's call it M It accepts strings whose length is a power of 2 Accepted strings: "0", "00", "0000" Rejected strings: "", "000", "000000"
  • 20. A description of M Attribution: Sipser, Figure 3.8
  • 21. Running on "00" tape state .00_ q1 _.0_ q2 _x._ q3 _.x_ q5 ._x_ q5 _.x_ q2 _x._ q2 _x_. qaccept
  • 22. Running on "0000" tape state .0000_ q1 tape state _.000_ q2 _.x0x_ q2 _x.00_ q3 _x.0x_ q2 _x0.0_ q4 _xx.x_ q3 tape state _x0x._ q3 _xxx._ q3 _.xxx_ q2 _x0.x_ q5 _xx.x_ q5 _x.xx_ q2 _x.0x_ q5 _x.xx_ q5 _xx.x_ q2 _.x0x_ q5 _.xxx_ q5 _xxx._ q2 ._x0x_ q5 ._xxx_ q5 _xxx_. qaccept
  • 23. Wrapping up Why do we care about Turing machines?
  • 24. References Deterministic finite automaton. (2012, March 11). Retrieved from http://en.wikipedia. org/wiki/Deterministic_finite_automaton Nondeterministic finite automaton. (2012, April 20). Retrieved from http://en. wikipedia.org/wiki/Nondeterministic_finite_automaton Petzold, C. (2008). The annotated turing. Indianapolis: Wiley Publishing, Inc. Sipser, M. (2006). Introduction to the theory of computation. (2nd ed.). Boston: Thompson Course Technology. Turing machine. (2012, April 17). Retrieved from http://en.wikipedia. org/wiki/Turing_machine