Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCI 2670 Introduction to Theory of Computing

Similar presentations


Presentation on theme: "CSCI 2670 Introduction to Theory of Computing"— Presentation transcript:

1 CSCI 2670 Introduction to Theory of Computing
August 31, 2005

2 Announcements Quiz tomorrow Office hours with TA Ryan Foster
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 Today Tomorrow 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 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) (r,a) is the set of state reached from r when a is processed r is one of the states in R (i.e., a state in the NFA R is a set of states from the NFA a is a symbol in the alphabet

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

9 Example 1 q2 q1 1 q3 q0’={q1}

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

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

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})


Download ppt "CSCI 2670 Introduction to Theory of Computing"

Similar presentations


Ads by Google