l4 - Lecture 4: Equivalence of Regular Expressions and...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 4: Equivalence of Regular Expressions and Finite Automata David Dill Department of Computer Science 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Outline Converting Regular Expressions to ǫ -NFAs Converting NFAs to regular expressions. 2
Background image of page 2
From Regular Expressions to Finite Automata Theorem: For every regular expression R , there is an ǫ -NFA E such that L ( R ) = L ( E ) . It is easier to prove a stronger theorem: Theorem: For every regular expression R , there is an ǫ -NFA E with these properties: L ( E ) = L ( R ) . There is a single final state. No transitions enter the start state. No transitions leave the final state. The theorem is proved by induction on the structure of regular expressions. (A fully detailed proof would have a lot of tedious manipulation of ˆ δ s) 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Proof of R ǫ -NFA The proof is by induction on the structure of regular expressions. When R = , the NFA is: a See figure in text. A All four properties are obviously met. When R = ǫ , the NFA is a See figure in text. A All four properties are obviously met. 4
Background image of page 4
Proof of R ǫ -NFA, cont. When R = a , the NFA is a See figure in text. A All four properties are obviously met. When R = R 1 + R 2 , the NFA is: a See figure in text. A Assuming the induction hypothesis for R 1 and R 2 , all four conditions are obviously met. 5
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Proof of R ǫ -NFA, cont. R 1 R 2 a See figure in text. A Assuming the induction hypothesis for R 1 and R 2 , all four conditions are obviously met. R a See figure in text. A 6
Background image of page 6
Example: Regular expression to ǫ -NFA Example: ( 0 + 11 ) 0 7
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Implications We already know that ǫ -NFAs, NFAs, and DFAs have equal expressive power. The latest theorem shows that FA are at least as expressive as regular
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 19

l4 - Lecture 4: Equivalence of Regular Expressions and...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online