Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Summary  Showing regular  construct DFA, NFA  construct regular expression  show L is the union, concatenation, intersection (regular operations)

Similar presentations


Presentation on theme: "1 Summary  Showing regular  construct DFA, NFA  construct regular expression  show L is the union, concatenation, intersection (regular operations)"— Presentation transcript:

1 1 Summary  Showing regular  construct DFA, NFA  construct regular expression  show L is the union, concatenation, intersection (regular operations) of regular languages.  Showing non-regular  pumping lemma  assume regular, apply closure properties of regular languages and obtain a known non-regular language.

2 2 Equivalence & Minimization of Automata

3 3 Equivalence of a state in a DFA regular languages Minimization of DFA smallest possible DFA for a given regular language Outline

4 4 Consider the accept states c and g. They are both sinks meaning that any string which ever reaches them is guaranteed to be accepted later. Q: Do we need both states? Equivalent States. Example a b 1 d 0,1 e 1 c g f 0 0 0 0 1 1

5 5 A: No, they can be unified as illustrated below. Q: Can any other states be unified because any subsequent string suffixes produce identical results? Example (cont) a b 1 d 0,1 e 1 cg f 0 00 0 1 1

6 6 A: Yes, b and f. Notice that if you’re in b or f then: if string ends, reject in both cases if next character is 0, forever accept in both cases if next character is 1, forever reject in both cases So unify b with f. Example (cont) a b 1 d 0,1 e 1 cg f 0 00 0 1 1

7 7 Intuitively two states are equivalent if all subsequent behavior from those states is the same. Come up with a formal characterization of state equivalence. Q: Any other ways to simplify the automaton? Example (cont) a 0,1 d e 1 cg bf 0 0 1

8 8 A: Get rid of d. i.e. Getting rid of unreachable useless states doesn’t affect the accepted language. Example (cont) a 0,1 e cg bf 0 1

9 9 Equivalent States. Definition DEF: Two states q and q’ in a DFA M = (Q, Σ, δ, q 0, F ) are said to be equivalent (or indistinguishable) if for all strings u  Σ *, the states on which u ends on when read from q and q’ are both accept, or both non-accept. Equivalent states may be glued together without affecting M’ s behavior.

10 10 DEF: An automaton is irreducible if it contains no useless states, and no two distinct states are equivalent. The goal of minimization algorithm is to create irreducible automata from arbitrary ones. Later: remarkably, the algorithm actually produces smallest possible DFA for the given language, hence the name “minimization”. Minimization Algorithm. Goals

11 11 Minimization of DFA’s Example: The DFA has equivalence classes {{A,E}, {B,H}, {C}, {D,F}, {G}}

12 12 Equivalence Class Transitivity: If p ≡ q and q ≡ r, then p ≡ r Proof: Suppose to the contrary that p ≢ r Then or vice versa. Now is either accepting or not If Otherwise The vice versa case is proved symmetrically

13 13 Minimization of DFA’s (cont)

14 14 Example Can be minimized to

15 15 Cannot apply the TF-algo to NFA’s For Example, to minimize Simply remove state C However, A ≢ C

16 16 Let B be the minimized DFA obtained by applying the TF-Algo to DFA A. We know that L(A) = L(B) What if there existed a DFA C with L(C) = L(B) and fewer states than B? If we run the TF-Algo on B “union” C Also If we could distinguish successors then Minimized DFA Cannot be Beaten

17 17 Claim: For each state p in B there is at least one state q in C, s.t. Proof: There are no inaccessible states, so Now and Since C has fewer states than B, there must be two states r & s of B s.t. For some state t of C. But CONTRADICTION!! Minimized DFA Cannot be Beaten (cont)


Download ppt "1 Summary  Showing regular  construct DFA, NFA  construct regular expression  show L is the union, concatenation, intersection (regular operations)"

Similar presentations


Ads by Google