{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

06 - Lecture 6 The fundamental theorem Let L Then the...

Info icon This preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 6: The fundamental theorem Let L Σ . Then the following three statements are equiv- alent. 1. L is accepted by some DFA. 2. L is accepted by some NFA. 3. L can be represented by a regular expression Proof : We will prove the following: i) 1 2, ii) 2 3. i) 1 2 1 2: A DFA is an NFA, by definition. 1
Image of page 1

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

View Full Document Right Arrow Icon
The fundamental theorem To prove that 2 1 : This is a constructive proof. First, let’s work on a simple NFA that does not contain e -edges. q 0 1 q q 2 b a b a It is possible to go from one state to several states after con- suming one input symbol. Hence, the states now are subsets of K : δ a b { q 0 } { q 1 } { q 1 } { q 0 , q 2 } { q 0 , q 2 } { q 0 , q 1 } { q 0 , q 1 } { q 1 } { q 0 , q 2 } How do we decide the final states? 2
Image of page 2
What if the given NFA has some e edges? Idea: On reading a Σ, the DFA M imitates a move of the NFA M on a , possibly follows a finite number of e -moves. s --> q1 --> q2 --> q3 --> q4 --> q5 -> q6 -> q7 -> q8 e e a e e b e e Initial state is { s, q 1 , q 2 } . δ ( { s, q 1 , q 2 } , a ) = { q 3 , q 4 , q 5 } δ ( { q 3 , q 4 , q 5 } , b ) = { q 6 , q 7 , q 8 } 3
Image of page 3

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

View Full Document Right Arrow Icon
The fundamental theorem Define E ( q ) = the set of states reachable from q , without reading any input symbols = { p K | ( q, e ) M ( p, e ) } Example: 2 3 4 0 1 5 6 7 e e e e e e a b e e 9 10 a 8 b b E (0) = { 0 , 1 , 2 , 4 , 7 } E (1) = { 1 , 2 , 4 } E (2) = { 2 } E (3) = { 3 , 6 , 1 , 2 , 4 , 7 } E (4) = { 4 } E (5) = { 5 , 6 , 7 , 1 , 2 , 4 } E (6) = { 6 , 7 , 1 , 2 , 4 } E (7) = { 7 } E (8) = { 8 } E (9) = { 9 } E (10) = { 10 } 4
Image of page 4
The fundamental theorem Given an NFA M = { K, Σ , Δ , s, F } . We want to construct an equivalent DFA that accepts the same language: M = { K , Σ , δ , s , F } K = 2 K s = E ( s ) F = { Q K | Q F = ∅} for all Q K , σ Σ, δ ( Q, σ ) = q Q { E ( p ) : ( q, σ, p ) Δ } . Note: δ ( Q, σ ) may equals for some Q K , σ Σ. Some Q ’s are unreachable thus are irrelevant, so we start the construction from E ( s ) and only introduce a new state when it is reachable from the start state (equivalently, con- struct the transition table row by row). 5
Image of page 5

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

View Full Document Right Arrow Icon
Refer to the given NFA: a b E (0) = { 0 , 1 , 2 , 4 , 7 } E (3) E (9) = { 3 , 6 , 1 , 2 , 4 , 7 , 9 } E (5) = { 5 , 6 , 7 , 1 , 2 , 4 } { 3 , 6 , 1 , 2 , 4 , 7 , 9 } E (3) E (9) = { 3 , 6 , 1 , 2 , 4 , 7 , 9 } E (5) E (10) = { 5 , 6 , 7 , 1 , 2 , 4 , 10 } { 5 , 6 , 7 , 1 , 2 , 4 } E (9) E (3) = { 3 , 6 , 1 , 2 , 4 , 7 , 9 } E (5) = { 5 , 6 , 7 , 1 , 2 , 4 } { 5 , 6 , 7 , 1 , 2 , 4 , 10 } E (9) E (3) = { 3 , 6 , 1 , 2 , 4 , 7 , 9 } E (5) E (10) = { 5 , 6 , 7 , 1 , 2 , 4 , 8 } { 5 , 6 , 7 , 1 , 2 , 4 , 8 } E (9) E (3) = { 3 , 6 , 1 , 2 , 4 , 7 , 9 } E (5) = { 5 , 6 , 7 , 1 , 2 , 4 } 5, 6, 7, 1, 2, 4 8 5, 6, 7, 1, 2, 4 10 0, 1, 2, 4, 7 a a b a b b a a b 3, 6, 1, 2, 4 5, 6, 7, 1, 2, 4 9 7, 6
Image of page 6
To be rigorous, we should also show that (i) M is deterministic and (ii) L ( M ) = L ( M ). We only sketch the proof here (refer to textbook for details).
Image of page 7

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

View Full Document Right Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern