1 / 15

CSCI 2670 Introduction to Theory of Computing

CSCI 2670 Introduction to Theory of Computing. August 30, 2005. Announcements. Homework due next Tues, Sept 6 1.7b, 1.8a, 1.10a, 1.15, 1.17a&b, 1.31, 1.32 Old Text 1.5b, 1.6a, 1.8a, 1.24, 1.25 (1.15 & 1.17 are not in old text) Office hours with TA Ryan Foster Monday 2:30 – 3:30

susanreese
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 August 30, 2005

  2. Announcements • Homework due next Tues, Sept 6 • 1.7b, 1.8a, 1.10a, 1.15, 1.17a&b, 1.31, 1.32 • Old Text 1.5b, 1.6a, 1.8a, 1.24, 1.25 (1.15 & 1.17 are not in old text) • Office hours with TA Ryan Foster • Monday 2:30 – 3:30 • Friday 10:00 – 11:00 • Room 301 B (knock if locked) • Change in syllabus • First midterm exam Tues, September 27

  3. Agenda • Last class • Combined regular languages • Introduced non-determinism • This week • Section 1.2 • Start Section 1.3

  4. 0,1 0 0 0 0 1 q1’ q1’ q2’ q2’ q3’ q3’ q1 q2 q3 1 1 0 0 0 0 1 1 1 1 1 M1 M2 0,1 1 q1 q2 q3 0 0 ε 1 Example Find M such that L(M) = L(M1)  L(M2) Can jump to q1’ non-deterministically

  5. NFA vs. DFA

  6. Computing on an NFA • For each symbol of the string, keep track of all possible transitions in parallel • When input ends, there may be several possible ending states • If at least one of the possibilities is an accepting state, then the NFA accepts the string

  7. q1, q3 Yes Example 0,1 • Does this NFA accept the string 001? 0 1 q1 q2 ε q3 0 1 1

  8. 0,1 1 1 ε 0 1 0,1 Example Any string containing two 1’s separated by at most one 0

  9. Example   b a a Zero or more concatenations of the strings aba and ab

  10. a, b, c ε a, b, d ε ε a, c, d ε b, c, d Example Strings of any length containing at most three of the symbols in  = {a, b, c, d}

  11. a, c a, b a, b, c b ε c c a, b a a ε a, c b a ε c a b a b,c b, c c c c b b DFA NFA The power of non-determinism Strings of any length containing at most two of the symbols in  = {a, b, c}

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

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

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

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

More Related