l5-handout

l5-handout - Outline Converting Regular Expressions to...

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

View Full Document Right Arrow Icon
Lecture 5: Regular Expressions, cont David Dill Department of Computer Science 1 Outline Converting Regular Expressions to ± -NFAs Converting NFAs to regular expressions. 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 Proof of R ± - NF A When R = , the NFA is: h See figure in text. i All four properties are obviously met. When R = ± , the NFA is h See figure in text. i All four properties are obviously met. 4
Background image of page 1

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

View Full DocumentRight Arrow Icon
Proof of R ± - NF A , cont. When R = a , the NFA is h See figure in text. i All four properties are obviously met. When R = R 1 + R 2 , the NFA is: h See figure in text. i Assuming the induction hypothesis for R 1 and R 2 , all four conditions are obviously met. 5 Proof of R ± - NF A , cont. R
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/08/2011 for the course CS 154 taught by Professor Motwani,r during the Winter '08 term at Stanford.

Page1 / 4

l5-handout - Outline Converting Regular Expressions to...

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

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