1 / 12

CSCI 2670 Introduction to Theory of Computing

This text provides announcements, information on DFA design, and details about office hours for the Introduction to Theory of Computing course.

scarrie
Télécharger la présentation

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 August 31, 2005

  2. Announcements • Quiz tomorrow • Definition of DFA’s and designing DFA’s • Office hours with TA Ryan Foster • Monday 2:30 – 3:30 (Rm. 323) • Friday 10:00 – 11:00 (Rm. 524) • Change in homework policy • I give your homework to the TA at 11:00 the day after it’s due • I will accept it until that time

  3. Agenda • Last class • Discussed non-determinism • Equivalence of DFA’s and NFA’s • Today • Further exploration of equivalence of DFA’s and NFA’s • Tomorrow • Closure of regular languages under regular operators • Another method for describing regular languages

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

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

  7. (r,a) is the set of state reached from r when a is processed R is a set of states from the NFA r is one of the states in R (i.e., a state in the NFA a is a symbol in the alphabet Defining M2 (ignoring  jumps) • 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)

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

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

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

  11. {q2,q3} 0 0 1 1 q2 0 0 q1 {q1} 1 0 q3 1 1  0,1 Example

  12. 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} • Are we done? No! What if there are  jumps from q0? q0’ = E({q0})

More Related