SlideShare a Scribd company logo
1 of 51
Download to read offline
Finite Automata
 Question: What is a computer?
               real computers too complex for any theory




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.   – p.1
Finite Automata
 Question: What is a computer?
               real computers too complex for any theory
               need manageable mathematical abstraction




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.   – p.1
Finite Automata
 Question: What is a computer?
               real computers too complex for any theory
               need manageable mathematical abstraction
               idealized models: accurate in some ways, but not
               in all details




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.   – p.1
Finite Automata – Important ideas
               formal definition of finite automata




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.   – p.2
Finite Automata – Important ideas
               formal definition of finite automata
               deterministic vs. non-deterministic finite
               automata




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.   – p.2
Finite Automata – Important ideas
               formal definition of finite automata
               deterministic vs. non-deterministic finite
               automata
               regular languages




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.   – p.2
Finite Automata – Important ideas
               formal definition of finite automata
               deterministic vs. non-deterministic finite
               automata
               regular languages
               operations on regular languages




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.   – p.2
Finite Automata – Important ideas
               formal definition of finite automata
               deterministic vs. non-deterministic finite
               automata
               regular languages
               operations on regular languages
               regular expressions




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.   – p.2
Finite Automata – Important ideas
               formal definition of finite automata
               deterministic vs. non-deterministic finite
               automata
               regular languages
               operations on regular languages
               regular expressions
               pumping lemma




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.   – p.2
Example: An Automatic Door



               front                                                               rear
               pad                                                                 pad




                                                 door
               open when person approaches



Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.   – p.3
Example: An Automatic Door



               front                                                               rear
               pad                                                                 pad




                                                 door
               open when person approaches
               hold open until person clears


Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.   – p.3
Example: An Automatic Door



               front                                                               rear
               pad                                                                 pad




                                                 door
               open when person approaches
               hold open until person clears
               don’t open when someone standing behind door
Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.   – p.3
The Automatic Door as DFA
                         REAR                                           FRONT                         FRONT
                         BOTH                                                                          REAR
                        NEITHER                                                                       BOTH
                                               closed                                          open



                                                                     NEITHER
               States:




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                  – p.4
The Automatic Door as DFA
                         REAR                                           FRONT                         FRONT
                         BOTH                                                                          REAR
                        NEITHER                                                                       BOTH
                                               closed                                          open



                                                                     NEITHER
               States:
                  OPEN




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                  – p.4
The Automatic Door as DFA
                         REAR                                           FRONT                         FRONT
                         BOTH                                                                          REAR
                        NEITHER                                                                       BOTH
                                               closed                                          open



                                                                     NEITHER
               States:
                  OPEN
                  CLOSED




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                  – p.4
The Automatic Door as DFA
                         REAR                                           FRONT                         FRONT
                         BOTH                                                                          REAR
                        NEITHER                                                                       BOTH
                                               closed                                          open



                                                                     NEITHER
               States:
                  OPEN
                  CLOSED
               Sensor:




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                  – p.4
The Automatic Door as DFA
                         REAR                                           FRONT                         FRONT
                         BOTH                                                                          REAR
                        NEITHER                                                                       BOTH
                                               closed                                          open



                                                                     NEITHER
               States:
                  OPEN
                  CLOSED
               Sensor:
                  FRONT: someone on rear pad



Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                  – p.4
The Automatic Door as DFA
                         REAR                                           FRONT                         FRONT
                         BOTH                                                                          REAR
                        NEITHER                                                                       BOTH
                                               closed                                          open



                                                                     NEITHER
               States:
                  OPEN
                  CLOSED
               Sensor:
                  FRONT: someone on rear pad
                  REAR: someone on rear pad

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                  – p.4
The Automatic Door as DFA
                         REAR                                           FRONT                         FRONT
                         BOTH                                                                          REAR
                        NEITHER                                                                       BOTH
                                               closed                                          open



                                                                     NEITHER
               States:
                  OPEN
                  CLOSED
               Sensor:
                  FRONT: someone on rear pad
                  REAR: someone on rear pad
                  BOTH: someone on both pads
Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                  – p.4
The Automatic Door as DFA
                         REAR                                           FRONT                         FRONT
                         BOTH                                                                          REAR
                        NEITHER                                                                       BOTH
                                               closed                                          open



                                                                     NEITHER
               States:
                  OPEN
                  CLOSED
               Sensor:
                  FRONT: someone on rear pad
                  REAR: someone on rear pad
                  BOTH: someone on both pads
                  NEITHER no one on either pad.
Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                  – p.4
The Automatic Door as DFA
  DFA is Deterministic Finite Automata




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.   – p.5
The Automatic Door as DFA
  DFA is Deterministic Finite Automata

                         REAR                                           FRONT                         FRONT
                         BOTH                                                                          REAR
                        NEITHER                                                                       BOTH
                                               closed                                          open



                                                                     NEITHER




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                  – p.5
The Automatic Door as DFA
  DFA is Deterministic Finite Automata

                         REAR                                           FRONT                         FRONT
                         BOTH                                                                          REAR
                        NEITHER                                                                       BOTH
                                               closed                                          open



                                                                     NEITHER


            neither front rear both
     closed closed open closed closed
     open closed open open open

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                  – p.5
DFA: Informal Definition
                         0                                      1
                                      1                                      0

                   q1                                    q                                     q3
                                                          2

                                                                             0,1


  The machine                                     :

                                              
      states:                                     , and                .
                                  ¡

                                             ¥¡




                                                                  ¥¡
                                      £ 

                                           ¤




                                                                ¦
                                    ¢




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.        – p.6
DFA: Informal Definition
                         0                                      1
                                      1                                      0

                   q1                                    q                                     q3
                                                          2

                                                                             0,1


  The machine      :

                                              
      states:      , and .
                                  ¡

                                             ¥¡




                                                                  ¥¡
                                      £ 

                                           ¤




                                                                ¦
                                    ¢



      start state: (arrow from “outside”).
                                             ¡
                                                   




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.        – p.6
DFA: Informal Definition
                         0                                      1
                                      1                                      0

                   q1                                    q                                     q3
                                                          2

                                                                             0,1


  The machine      :

                                              
      states:      , and .
                                  ¡

                                             ¥¡




                                                                  ¥¡
                                      £ 

                                           ¤




                                                                ¦
                                    ¢



      start state: (arrow from “outside”).
                                             ¡
                                                   


      accept state: (double circle).
                                                   ¤¡




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.        – p.6
DFA: Informal Definition
                         0                                      1
                                      1                                      0

                   q1                                    q                                     q3
                                                          2

                                                                             0,1


  The machine       :

                                              
      states:       , and .
                                  ¡

                                             ¥¡




                                                                  ¥¡
                                      £ 

                                           ¤




                                                                ¦
                                    ¢



      start state: (arrow from “outside”).
                                             ¡
                                                   


      accept state: (double circle).
                                                   ¤¡




      state transitions: arrows.



Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.        – p.6
DFA: Informal Definition (cont.)
                         0                                      1
                                      1                                      0

                   q1                                    q                                     q3
                                                          2

                                                                             0,1



               On an input string




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.        – p.7
DFA: Informal Definition (cont.)
                         0                                      1
                                      1                                      0

                   q1                                    q                                     q3
                                                          2

                                                                             0,1



               On an input string
                  DFA begins in start state




                                                                                               ¡
                                                                                                
Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.        – p.7
DFA: Informal Definition (cont.)
                         0                                      1
                                      1                                      0

                   q1                                    q                                     q3
                                                          2

                                                                             0,1



               On an input string
                  DFA begins in start state




                                                                                               ¡
                                                                                                
                  after reading each symbol, DFA makes
                  state transition with matching label.




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.        – p.7
DFA: Informal Definition (cont.)
                         0                                      1
                                      1                                      0

                   q1                                    q                                     q3
                                                          2

                                                                             0,1



               On an input string
                  DFA begins in start state




                                                                                               ¡
                                                                                                
                  after reading each symbol, DFA makes
                  state transition with matching label.
               After reading last symbol, DFA produces output:



Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.        – p.7
DFA: Informal Definition (cont.)
                         0                                      1
                                      1                                      0

                   q1                                    q                                     q3
                                                          2

                                                                             0,1



               On an input string
                  DFA begins in start state




                                                                                               ¡
                                                                                                
                  after reading each symbol, DFA makes
                  state transition with matching label.
               After reading last symbol, DFA produces output:
                  accept if DFA is an accepting state.


Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.        – p.7
DFA: Informal Definition (cont.)
                         0                                      1
                                      1                                      0

                   q1                                    q                                     q3
                                                          2

                                                                             0,1



               On an input string
                  DFA begins in start state




                                                                                               ¡
                                                                                                
                  after reading each symbol, DFA makes
                  state transition with matching label.
               After reading last symbol, DFA produces output:
                  accept if DFA is an accepting state.
                  reject otherwise.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.        – p.7
Informal Definition - Example
                                  0                                                 1
                                                   1                                           0

                             q                                              q                        q3
                              1                                              2

                                                                                               0,1

  What happens on input strings
                  




                      




                         ¡




                               




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.              – p.8
Informal Definition - Example
                                                  0                                 1
                                                      1                                        0

                                         q                                  q                        q3
                                          1                                  2

                                                                                               0,1

  What happens on input strings
                  




                          




                                     ¡




                                           
                     ¡




                             ¡




                                  




                                              ¡




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.              – p.8
Informal Definition - Example
                                                      0                             1
                                                          1                                    0

                                         q                                  q                        q3
                                          1                                  2

                                                                                               0,1

  What happens on input strings
                  




                          




                                     ¡




                                           
                     ¡




                             ¡




                                  




                                              ¡
                     ¡




                          




                                  




                                              ¡




                                                  ¡




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.              – p.8
Informal Definition
                                 0                                                  1
                                                   1                                           0

                        q                                                   q                        q3
                         1                                                   2

                                                                                               0,1

  This DFA accepts
      all input strings that end with a 1
      all input strings that contain at least one 1, and
      end with an even number of 0’s
      no other strings


Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.              – p.9
Languages and Alphabets
  An alphabet                                 is a finite set of letters.



                              £¡




                                                                 ¨
                                       ¤
                                                         – the English alphabet.


                            ¢


                                              ¢¦ ¥




                                                              §
                       

                                ¢
                                       ¢

                                               ¦
                                                  ¦
                                                         ¢
                              £¡




                                                                    ¨
                                                                 
                                                                           – the Greek alphabet.
                            ©



                                                ¢¦ 
                       

                                 ¢

                                        ¢


                                                  ¦
                                                       ¦
                                                            ¢
                            ¡


                                         ¨
                                                – the binary alphabet.
                                   ¡




                                           
                       

                                ¢
                            ¡




                                                            ¨
                                                                  – the digital alphabet.
                                   ¡




                                           




                                                         
                       

                                ¢

                                       ¢¦
                                        ¦
                                              ¦
                                                     ¢




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.       – p.10
Languages and Alphabets
  An alphabet                                 is a finite set of letters.



                              £¡




                                                                 ¨
                                       ¤
                                                         – the English alphabet.


                            ¢


                                              ¢¦ ¥




                                                              §
                       

                                ¢
                                       ¢

                                               ¦
                                                  ¦
                                                         ¢
                              £¡




                                                                    ¨
                                                                 
                                                                           – the Greek alphabet.
                            ©



                                                ¢¦ 
                       

                                 ¢

                                        ¢


                                                  ¦
                                                       ¦
                                                            ¢
                            ¡


                                         ¨
                                                – the binary alphabet.
                                   ¡




                                           
                       

                                ¢
                            ¡




                                                            ¨
                                                                  – the digital alphabet.
                                   ¡




                                           




                                                         
                       

                                ¢

                                       ¢¦
                                        ¦
                                              ¦
                                                     ¢




                                                                                                                
  The collection of all strings over                                                           is denoted by       .




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                       – p.10
Languages and Alphabets
  An alphabet                                         is a finite set of letters.



                                   £¡




                                                                       ¨
                                                 ¤
                                                                 – the English alphabet.


                                 ¢


                                                      ¢¦ ¥




                                                                     §
                              

                                     ¢
                                                 ¢

                                                       ¦
                                                          ¦
                                                                 ¢
                                   £¡




                                                                         ¨
                                                                       
                                                                             – the Greek alphabet.
                                 ©



                                                        ¢¦ 
                              

                                         ¢

                                                  ¢


                                                          ¦
                                                               ¦
                                                                   ¢
                                 ¡


                                                  ¨
                                                        – the binary alphabet.
                                         ¡




                                                   
                              

                                     ¢
                                 ¡




                                                                   ¨
                                                                       – the digital alphabet.
                                         ¡




                                                   




                                                                 
                              

                                     ¢

                                                 ¢¦
                                                  ¦
                                                      ¦
                                                             ¢




                                                                                                                                                
  The collection of all strings over                                                                   is denoted by                               .
  For the binary alphabet, ,                                                                           ,       ,                                             ,



                                                                                                    




                                                                                                           ¡




                                                                                                                   ¡




                                                                                                                       ¡




                                                                                                                           ¡




                                                                                                                               ¡




                                                                                                                                   ¡




                                                                                                                                       ¡




                                                                                                                                           ¡




                                                                                                                                                   ¡




                                                                                                                                                         ¡
                                                                                          




                                                                                                
            are all members of                                                                     .
      




          




              




                  




                      




                          




                              




                                 ¡




                                     ¡




                                             ¡




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                                                           – p.10
Languages and Examples




                                                                                                
  A language over                                       is a subset                                . For example




                                                                                            
               Modern English.




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                       – p.11
Languages and Examples




                                                                                                
  A language over                                       is a subset                                . For example




                                                                                            
               Modern English.
               Ancient Greek.




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                       – p.11
Languages and Examples




                                                                                                
  A language over                                       is a subset                                . For example




                                                                                            
               Modern English.
               Ancient Greek.
               All prime numbers, writen using digits.




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                       – p.11
Languages and Examples




                                                                                                
  A language over                                       is a subset                                . For example




                                                                                            
               Modern English.
               Ancient Greek.
               All prime numbers, writen using digits.
                            ¡
                                         ¡




                                                                                                     ¨
                          has at most seventeen 0’s
                                      




                                              
                        




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                       – p.11
Languages and Examples




                                                                                                
  A language over                                                       is a subset                . For example




                                                                                            
               Modern English.
               Ancient Greek.
               All prime numbers, writen using digits.
                            ¡
                                            ¡




                                                                                                     ¨
                          has at most seventeen 0’s
                                         




                                                         
                        
                            ¡


                                                                ¡




                                                                          ¨
                                                 




                                                             
                                    ¡




                                                     




                                                                           ¡
                                                                    ¡
                        




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                       – p.11
Languages and Examples




                                                                                                       
  A language over                                                                   is a subset           . For example




                                                                                                   
               Modern English.
               Ancient Greek.
               All prime numbers, writen using digits.
                            ¡
                                                ¡




                                                                                                            ¨
                          has at most seventeen 0’s
                                         




                                                                 
                        
                            ¡


                                                                            ¡




                                                                                      ¨
                                                         




                                                                         
                                    ¡




                                                             




                                                                                       ¡
                                                                                ¡
                        
                            ¡
                                                    ¡




                                                                                                                     ¨
                                                                            has an equal number of 0’s and 1’s
                                             




                                                                     
                        




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                              – p.11
Languages and DFA




                                            




                                                    ¡
  Definition:                                         , the language of a DFA , is the




                                        




                                                                                                    




                                                                                                       ¡
  set of strings                                   that     accepts,        .




                                                




                                                                                                




                                                                                                                
                                                                                                            
Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                       – p.12
Languages and DFA




                                            




                                                    ¡
  Definition:                                         , the language of a DFA , is the




                                        




                                                                                                    




                                                                                                       ¡
  set of strings                                   that     accepts,        .




                                                




                                                                                                




                                                                                                                
                                                                                                            
  Note that
         may accept many strings, but
         accepts only one language




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                       – p.12
Languages and DFA




                                            




                                                    ¡
  Definition:                                         , the language of a DFA , is the




                                        




                                                                                                    




                                                                                                       ¡
  set of strings                                   that     accepts,        .




                                                




                                                                                                




                                                                                                                
                                                                                                            
  Note that
         may accept many strings, but
         accepts only one language

  What language does                                                 accept if it accepts no strings?




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                       – p.12
Languages and DFA




                                            




                                                    ¡
  Definition:                                         , the language of a DFA , is the




                                        




                                                                                                    




                                                                                                       ¡
  set of strings                                   that     accepts,        .




                                                




                                                                                                




                                                                                                                
                                                                                                            
  Note that
         may accept many strings, but
         accepts only one language

  What language does                                                 accept if it accepts no strings?

  A language is called regular if some deterministic finite
  automaton accepts it.


Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.                       – p.12
Formal Definitions
  A deterministic finite automaton (DFA) is a 5-tuple
      




                                           ¡
                        
                 , where


                               ¡
                               ¡ ¢
         ¢

               ¢
                       ¢

                                ¢
                       is a finite set called the states,
                       is a finite set called the alphabet,
                  ¤ 




                                       is the transition function,
                                     ¥
                £




                             is the start state, and
                           ¦
               ¡¡




                             is the set of accept states.




Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University.   – p.13

More Related Content

Recently uploaded

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Recently uploaded (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Compute1 dfa

  • 1. Finite Automata Question: What is a computer? real computers too complex for any theory Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.1
  • 2. Finite Automata Question: What is a computer? real computers too complex for any theory need manageable mathematical abstraction Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.1
  • 3. Finite Automata Question: What is a computer? real computers too complex for any theory need manageable mathematical abstraction idealized models: accurate in some ways, but not in all details Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.1
  • 4. Finite Automata – Important ideas formal definition of finite automata Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.2
  • 5. Finite Automata – Important ideas formal definition of finite automata deterministic vs. non-deterministic finite automata Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.2
  • 6. Finite Automata – Important ideas formal definition of finite automata deterministic vs. non-deterministic finite automata regular languages Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.2
  • 7. Finite Automata – Important ideas formal definition of finite automata deterministic vs. non-deterministic finite automata regular languages operations on regular languages Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.2
  • 8. Finite Automata – Important ideas formal definition of finite automata deterministic vs. non-deterministic finite automata regular languages operations on regular languages regular expressions Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.2
  • 9. Finite Automata – Important ideas formal definition of finite automata deterministic vs. non-deterministic finite automata regular languages operations on regular languages regular expressions pumping lemma Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.2
  • 10. Example: An Automatic Door front rear pad pad door open when person approaches Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.3
  • 11. Example: An Automatic Door front rear pad pad door open when person approaches hold open until person clears Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.3
  • 12. Example: An Automatic Door front rear pad pad door open when person approaches hold open until person clears don’t open when someone standing behind door Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.3
  • 13. The Automatic Door as DFA REAR FRONT FRONT BOTH REAR NEITHER BOTH closed open NEITHER States: Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.4
  • 14. The Automatic Door as DFA REAR FRONT FRONT BOTH REAR NEITHER BOTH closed open NEITHER States: OPEN Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.4
  • 15. The Automatic Door as DFA REAR FRONT FRONT BOTH REAR NEITHER BOTH closed open NEITHER States: OPEN CLOSED Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.4
  • 16. The Automatic Door as DFA REAR FRONT FRONT BOTH REAR NEITHER BOTH closed open NEITHER States: OPEN CLOSED Sensor: Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.4
  • 17. The Automatic Door as DFA REAR FRONT FRONT BOTH REAR NEITHER BOTH closed open NEITHER States: OPEN CLOSED Sensor: FRONT: someone on rear pad Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.4
  • 18. The Automatic Door as DFA REAR FRONT FRONT BOTH REAR NEITHER BOTH closed open NEITHER States: OPEN CLOSED Sensor: FRONT: someone on rear pad REAR: someone on rear pad Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.4
  • 19. The Automatic Door as DFA REAR FRONT FRONT BOTH REAR NEITHER BOTH closed open NEITHER States: OPEN CLOSED Sensor: FRONT: someone on rear pad REAR: someone on rear pad BOTH: someone on both pads Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.4
  • 20. The Automatic Door as DFA REAR FRONT FRONT BOTH REAR NEITHER BOTH closed open NEITHER States: OPEN CLOSED Sensor: FRONT: someone on rear pad REAR: someone on rear pad BOTH: someone on both pads NEITHER no one on either pad. Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.4
  • 21. The Automatic Door as DFA DFA is Deterministic Finite Automata Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.5
  • 22. The Automatic Door as DFA DFA is Deterministic Finite Automata REAR FRONT FRONT BOTH REAR NEITHER BOTH closed open NEITHER Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.5
  • 23. The Automatic Door as DFA DFA is Deterministic Finite Automata REAR FRONT FRONT BOTH REAR NEITHER BOTH closed open NEITHER neither front rear both closed closed open closed closed open closed open open open Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.5
  • 24. DFA: Informal Definition 0 1 1 0 q1 q q3 2 0,1 The machine :   states: , and . ¡ ¥¡ ¥¡ £  ¤ ¦ ¢ Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.6
  • 25. DFA: Informal Definition 0 1 1 0 q1 q q3 2 0,1 The machine :   states: , and . ¡ ¥¡ ¥¡ £  ¤ ¦ ¢ start state: (arrow from “outside”). ¡   Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.6
  • 26. DFA: Informal Definition 0 1 1 0 q1 q q3 2 0,1 The machine :   states: , and . ¡ ¥¡ ¥¡ £  ¤ ¦ ¢ start state: (arrow from “outside”). ¡   accept state: (double circle). ¤¡ Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.6
  • 27. DFA: Informal Definition 0 1 1 0 q1 q q3 2 0,1 The machine :   states: , and . ¡ ¥¡ ¥¡ £  ¤ ¦ ¢ start state: (arrow from “outside”). ¡   accept state: (double circle). ¤¡ state transitions: arrows. Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.6
  • 28. DFA: Informal Definition (cont.) 0 1 1 0 q1 q q3 2 0,1 On an input string Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.7
  • 29. DFA: Informal Definition (cont.) 0 1 1 0 q1 q q3 2 0,1 On an input string DFA begins in start state ¡   Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.7
  • 30. DFA: Informal Definition (cont.) 0 1 1 0 q1 q q3 2 0,1 On an input string DFA begins in start state ¡   after reading each symbol, DFA makes state transition with matching label. Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.7
  • 31. DFA: Informal Definition (cont.) 0 1 1 0 q1 q q3 2 0,1 On an input string DFA begins in start state ¡   after reading each symbol, DFA makes state transition with matching label. After reading last symbol, DFA produces output: Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.7
  • 32. DFA: Informal Definition (cont.) 0 1 1 0 q1 q q3 2 0,1 On an input string DFA begins in start state ¡   after reading each symbol, DFA makes state transition with matching label. After reading last symbol, DFA produces output: accept if DFA is an accepting state. Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.7
  • 33. DFA: Informal Definition (cont.) 0 1 1 0 q1 q q3 2 0,1 On an input string DFA begins in start state ¡   after reading each symbol, DFA makes state transition with matching label. After reading last symbol, DFA produces output: accept if DFA is an accepting state. reject otherwise. Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.7
  • 34. Informal Definition - Example 0 1 1 0 q q q3 1 2 0,1 What happens on input strings     ¡   Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.8
  • 35. Informal Definition - Example 0 1 1 0 q q q3 1 2 0,1 What happens on input strings     ¡   ¡ ¡   ¡ Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.8
  • 36. Informal Definition - Example 0 1 1 0 q q q3 1 2 0,1 What happens on input strings     ¡   ¡ ¡   ¡ ¡     ¡ ¡ Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.8
  • 37. Informal Definition 0 1 1 0 q q q3 1 2 0,1 This DFA accepts all input strings that end with a 1 all input strings that contain at least one 1, and end with an even number of 0’s no other strings Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.9
  • 38. Languages and Alphabets An alphabet is a finite set of letters. £¡ ¨ ¤ – the English alphabet. ¢ ¢¦ ¥ §   ¢ ¢ ¦ ¦ ¢ £¡ ¨ – the Greek alphabet. © ¢¦   ¢ ¢ ¦ ¦ ¢ ¡ ¨ – the binary alphabet. ¡     ¢ ¡ ¨ – the digital alphabet. ¡     ¢ ¢¦ ¦ ¦ ¢ Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.10
  • 39. Languages and Alphabets An alphabet is a finite set of letters. £¡ ¨ ¤ – the English alphabet. ¢ ¢¦ ¥ §   ¢ ¢ ¦ ¦ ¢ £¡ ¨ – the Greek alphabet. © ¢¦   ¢ ¢ ¦ ¦ ¢ ¡ ¨ – the binary alphabet. ¡     ¢ ¡ ¨ – the digital alphabet. ¡     ¢ ¢¦ ¦ ¦ ¢   The collection of all strings over is denoted by . Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.10
  • 40. Languages and Alphabets An alphabet is a finite set of letters. £¡ ¨ ¤ – the English alphabet. ¢ ¢¦ ¥ §   ¢ ¢ ¦ ¦ ¢ £¡ ¨ – the Greek alphabet. © ¢¦   ¢ ¢ ¦ ¦ ¢ ¡ ¨ – the binary alphabet. ¡     ¢ ¡ ¨ – the digital alphabet. ¡     ¢ ¢¦ ¦ ¦ ¢   The collection of all strings over is denoted by . For the binary alphabet, , , , ,   ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡     are all members of .               ¡ ¡ ¡ Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.10
  • 41. Languages and Examples   A language over is a subset . For example   Modern English. Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.11
  • 42. Languages and Examples   A language over is a subset . For example   Modern English. Ancient Greek. Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.11
  • 43. Languages and Examples   A language over is a subset . For example   Modern English. Ancient Greek. All prime numbers, writen using digits. Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.11
  • 44. Languages and Examples   A language over is a subset . For example   Modern English. Ancient Greek. All prime numbers, writen using digits. ¡ ¡ ¨ has at most seventeen 0’s       Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.11
  • 45. Languages and Examples   A language over is a subset . For example   Modern English. Ancient Greek. All prime numbers, writen using digits. ¡ ¡ ¨ has at most seventeen 0’s       ¡ ¡ ¨     ¡   ¡ ¡   Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.11
  • 46. Languages and Examples   A language over is a subset . For example   Modern English. Ancient Greek. All prime numbers, writen using digits. ¡ ¡ ¨ has at most seventeen 0’s       ¡ ¡ ¨     ¡   ¡ ¡   ¡ ¡ ¨ has an equal number of 0’s and 1’s       Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.11
  • 47. Languages and DFA   ¡ Definition: , the language of a DFA , is the     ¡ set of strings that accepts, .         Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.12
  • 48. Languages and DFA   ¡ Definition: , the language of a DFA , is the     ¡ set of strings that accepts, .         Note that may accept many strings, but accepts only one language Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.12
  • 49. Languages and DFA   ¡ Definition: , the language of a DFA , is the     ¡ set of strings that accepts, .         Note that may accept many strings, but accepts only one language What language does accept if it accepts no strings? Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.12
  • 50. Languages and DFA   ¡ Definition: , the language of a DFA , is the     ¡ set of strings that accepts, .         Note that may accept many strings, but accepts only one language What language does accept if it accepts no strings? A language is called regular if some deterministic finite automaton accepts it. Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.12
  • 51. Formal Definitions A deterministic finite automaton (DFA) is a 5-tuple   ¡   , where ¡ ¡ ¢ ¢ ¢ ¢ ¢ is a finite set called the states, is a finite set called the alphabet, ¤  is the transition function, ¥ £ is the start state, and ¦ ¡¡ is the set of accept states. Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.13