1 / 19

CSCI 2670 Introduction to Theory of Computing

CSCI 2670 Introduction to Theory of Computing. September 2, 2004. Agenda. Last class NFA examples Presented theorem regarding equivalence of DFA’s and NFA’s Today Quiz Prove four theorems Equivalence of DFA’s and NFA’s Union, concatenation, and Kleene star are regular operators.

kirsi
Download Presentation

CSCI 2670 Introduction to Theory of Computing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSCI 2670Introduction to Theory of Computing September 2, 2004

  2. Agenda • Last class • NFA examples • Presented theorem regarding equivalence of DFA’s and NFA’s • Today • Quiz • Prove four theorems • Equivalence of DFA’s and NFA’s • Union, concatenation, and Kleene star are regular operators

  3. Next week • Section 1.3 and part of Section 1.4 • Read pages 63 - 74

  4. Equivalence of DFAs and NFAs Theorem: Every non-deterministic finite automaton has an equivalent deterministic finite automaton • Both FAs accept the same language • Proof method • Construction • Similar to method used for calculating strings • Follow all paths in parallel where states represent parallel paths

  5. Proof idea • Given NFA M1={Q,,,q0,F} construct DFA M2={Q’,,’,q0’,F’} with L(M1)=L(M2) • Intuition • Recall :Q×εP(Q) • Our DFA’s transition function will generate paths within P(Q) • ’: P(Q)×P(Q)

  6. Defining M2 • Determine Q’, q0, and F’ • Q’ = P(Q) • q0’ = {q0} • F’ = {R  Q’ | R  F  } • i.e., R contains at least one of M1’s accept states • Defining ’ (for now ignore ε jumps)

  7. Example 1 • Q’={,{q1}, {q2}, {q3}, {q1,q2}, {q1,q3}, {q2,q3}, {q1,q2,q3}} q2 0 q1 1 0 q3

  8. Example 1 • q0’={q1} q2 0 q1 1 0 q3

  9. Example 1 • F’={{q3}, {q1,q3}, {q2,q3}, {q1,q2,q3}} q2 0 q1 1 0 q3

  10. 1 q2 0 q1 0 q3 Example 1 1

  11. What about ε jumps? • For each R P(Q), define function E(R) E(R) = {q | q can be reach by 0 or more ε jumps from some r  R} • Redefine ’(R,a) to include E(R) ’(R,a) = {q | q  E((r,a)) for some r  R}

  12. Closure of NFA’s under regular operations • Remainder of class • Union • Concatenation • Kleene star

  13. Union is a regular operation Theorem: The class of regular languages is closed under the union operation Proof approach: Assume A1 and A2 are both regular languages with A1=L(M1) and A2=L(M2) and create an NFA M such that L(M) = A1A2 Method: Proof by construction

  14. M1 M2 M Construct M from M1 and M2 ε ε

  15. Concatenation is a regular operation Theorem: The class of regular languages is closed under the concatenation operation Proof approach: Assume A1 and A2 are both regular languages with A1=L(M1) and A2=L(M2) and create an NFA M such that L(M) = A1A2 Method: Proof by construction

  16. M1 M2 M Construct M from M1 and M2 ε ε

  17. Kleene star is a regular operation Theorem: The class of regular languages is closed under the Kleene operation Proof approach: Assume A1 is a regular language with A1=L(M1) and create an NFA M such that L(M) = A1* Method: Proof by construction

  18. ε ε ε M1 M Construct M from M1

  19. Have A Wonderful Labor Day!!!

More Related