1 / 15

CSCI 2670 Introduction to Theory of Computing

This introduction to the theory of computing covers the topics of non-deterministic finite automaton (NFA), equivalence of DFA and NFA, and closure of regular languages under regular operators. The lecture includes examples and exercises for better understanding.

bonniedavis
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 1, 2004

  2. Agenda • Last class • Discussed non-determinism • Lots of excellent questions! • Today • Further exploration of NFA’s • Equivalence of DFA’s and NFA’s • Tomorrow • Closure of regular languages under regular operators

  3. Announcement • Quiz tomorrow (9/2) • DFA’s (informal description, formal definition, creation of, combining) • NFA’s (inform description, formal definition)

  4. Non-deterministic finite automaton A non-deterministic finite automaton is a 5-tuple (Q,,,q0,F), where • Q is a finite set of states •  is a (finite) alphabet •  : Q × ε  P(Q) is the transition function •  maps to sets of states • q0 is the start state, and • F  Q is the set of accept states

  5. q2 a, b q1 q3 ε ε a, c q4 ε b, c Example • Q = {q1, q2, q3, q4} • = {a, b, c} q0 = q1 F = {q2, q3, q4}

  6. a, b ε ε a, c ε q2 b, c q1 q3 q4 Example (cont.)

  7. Group project • For each NFA • Informally describe the behavior of the NFA • Try to construct a DFA accepting the same language

  8. Group 1 0 0 1 1 ε ε 0 0 1 1 All strings containing an even number of 0’s or an even number of 1’s

  9. Group 2 0,ε 0,ε 0,ε 0,ε 0 1 1 0 All prefixes of the string 0110 Proper prefixes may be followed by a 0

  10. Group 3 1 1 0 0 ε 1 0 ε 0 0 1 1 All strings with a zero count divisible by 0 or 1

  11. Group 4 0,1 1 0,1 0,1 All strings of length at least three whose third to last symbol is a 1

  12. Group 5 1 0 1 0 All strings with alternating 0’s and 1’s that start with a 0

  13. Group 6 0 0 1 ε 1 1 0 All strings containing either zero 1’s or three or more 1’s

  14. 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

  15. 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)

More Related