SathyanandamSathyana
4 views
10 slides
Feb 28, 2025
Slide 1 of 10
1
2
3
4
5
6
7
8
9
10
About This Presentation
theory of computation finite auto mata
Size: 790.18 KB
Language: en
Added: Feb 28, 2025
Slides: 10 pages
Slide Content
Finite Automata
Input: finite string Output: Accept or Reject Computation process: Begin at start state, read input symbols, follow corresponding transitions, Accept if end with accept state, Reject if not. Examples: 01101 → Accept 00101 → Reject accepts exactly those strings in where contains substring Let’s begin: Finite Automata 1 0,1 1 States: Transitions: Start state: Accept states: 1 Say that is the language of and that recognizes and that . 6
Finite Automata – Formal Definition Defn: A finite automaton is a 5-tuple finite set of states finite set of alphabet symbols transition function start state set of accept states means a 1 0,1 1 1 1 Example: 7
Finite Automata – Computation Strings and languages A string is a finite sequence of symbols in A language is a set of strings (finite or infinite) The empty string ε is the string of length 0 The empty language is the set with no strings Defn : accepts string each if there is a sequence of states where: - - for - Recognizing languages is the language of recognizes Defn : A language is regular if some finite automaton recognizes it. 8
Regular Languages – Examples Therefore is regular More examples: Let has an even number of 1s is regular (make automaton for practice). Let has equal numbers of 0s and 1s is not regular (we will prove). 1 0,1 1 Goal: Understand the regular languages 9
Regular Expressions Regular operations. Let be languages: Union : or Concatenation: and Star: each for Note: always Example. Let good, bad and boy, girl . {good, bad, boy, girl} { goodboy , goodgirl , badboy , badgirl } { , good, bad, goodgood , goodbad , badgood , badbad , goodgoodgood , goodgoodbad , … } Regular expressions Built from , members [Atomic] By using [Composite] Examples: gives all strings over gives all strings that end with 1 all strings that contain 11 Goal: Show finite automata equivalent to regular expressions 10
Closure Properties for Regular Languages Theorem: If are regular languages, so is (closure under ) Proof: Let recognize recognize Construct recognizing should accept input if either or accept . Components of : and NO! [gives intersection] Check-in 1.1 ? Check-in 1.1 In the proof, if and are finite automata where has states and has states Then how many states does have? (a) (b) (c) 11
Closure Properties continued Theorem: If are regular languages, so is (closure under ) Proof: Let recognize recognize Construct recognizing should accept input if where accepts and accepts . Doesn’t work: Where to split ? 12
Quick review of today Introduction, outline, mechanics, expectations Finite Automata, formal definition, regular languages Regular Operations and Regular Expressions Proved: Class of regular languages is closed under Started: Closure under , to be continued… 13