Computation, Computers, and ProgramsCourse Introduction - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

Computation, Computers, and ProgramsCourse Introduction

Description:

If NFA has states Q, construct a DFA with 2Q states. E-NFA - DFA ... Using the pumping lemma, construct a new string s' that is not in the language ... – PowerPoint PPT presentation

Number of Views:61
Avg rating:3.0/5.0
Slides: 33
Provided by: csCal
Category:

less

Transcript and Presenter's Notes

Title: Computation, Computers, and ProgramsCourse Introduction


1
Outline
  • Finish off Regex -gt e-NFA -gt NFA -gt DFA -gt Regex
  • Minimization/equivalence (Myhill-Nerode theorem)

2
Summary
  • NFA -gt DFA
  • If NFA has states Q, construct a DFA with 2Q
    states
  • E-NFA -gt DFA
  • Change the transition relation to include
    epsilon-edges
  • Regex -gt e-NFA
  • Construct e-NFA for each regex by structural
    induction
  • DFA -gt regex
  • Thats next

3
DFA -gt Regex
4
DFA -gt Regex
5
Defining Rkij
6
Constructing the regex
7
Constructing the regex
8
Minimizing FA
  • Can we prove equivalence of regexs (or their FA)?
  • One method
  • If each FA can be reduced to a unique minimal
    form, we can compare the minimal FA

9
Right-invariance
10
Right-invariance
11
Equivalence classes of RM
12
Myhill-Nerode
13
1-gt2
14
2-gt3
15
3-gt1 (part 1)
16
3-gt1 (part 2)
17
3-gt1 DFA construction
18
Minimization
  • The minimum automaton accepting a language L is
    unique (up to renaming of states), and is given
    by the construction in the Myhill-Nerode theorem.

19
Minimization
  • The minimum automaton accepting a language L is
    unique (up to renaming of states), and is given
    by the construction in the Myhill-Nerode theorem.
  • An algorithm is a procedure that always
    terminates (with the right answer)

20
Minimization algorithm
21
Pseudo-code
22
Finishing up
23
Minimization proof
24
Minimization proof
25
Summary
  • FAs/regex are equivalent
  • For each FA there is a unique minimal FA
  • Equivalence of FA is computable
  • To test of FA1FA2, minimize both and test for
    equality
  • Remember that the states may have different
    names, so this may take some time
  • Next what languages are regular?

26
What languages are not regular?
  • Intuition since a FA has only finite state, it
    can remember only a finite number of things
  • Some things we would expect are not regular
  • Balanced parentheses (have to remember an
    arbitrary nesting depth)
  • Prime numbers
  • Why are multiples of 3 regular?
  • Addition (strings ijk)

27
Regular languages
  • Intuition if a FA accepts a string that is long
    enough, it must repeat a state
  • But it cant remember that the state was repeated
  • So it can be forced to repeat the state over and
    over

28
Pumping lemma
29
Proving that a language is not regular
  • Let L be the proposed regular language
  • There is some n, by the pumping lemma
  • Choose a string s, longer than n symbols, in the
    language L
  • Using the pumping lemma, construct a new string
    s that is not in the language

30
Balanced parentheses
31
Unions
32
Executions
Write a Comment
User Comments (0)
About PowerShow.com