Transparency No. 10-1 Formal Language and Automata Theory Chapter 10 The Myhill-Nerode Theorem (lecture 15,16 and B)

Slides:



Advertisements
Similar presentations
Theory of Computing Lecture 23 MAS 714 Hartmut Klauck.
Advertisements

Lecture 24 MAS 714 Hartmut Klauck
Finite Automata CPSC 388 Ellen Walker Hiram College.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Summary Showing regular Showing non-regular construct DFA, NFA
Basic Properties of Relations
CSCI 2670 Introduction to Theory of Computing September 13, 2005.
CS21 Decidability and Tractability
Chapter 7 Relations : the second time around
Introduction to Computability Theory
Finite Automata Great Theoretical Ideas In Computer Science Anupam Gupta Danny Sleator CS Fall 2010 Lecture 20Oct 28, 2010Carnegie Mellon University.
1 Introduction to Computability Theory Lecture2: Non Deterministic Finite Automata Prof. Amos Israeli.
Introduction to Computability Theory
Transparency No. 2-1 Formal Language and Automata Theory Chapter 2 Deterministic Finite Automata (DFA) (include Lecture 3 and 4)
1 Introduction to Computability Theory Lecture2: Non Deterministic Finite Automata (cont.) Prof. Amos Israeli.
Transparency No. P2C3-1 Formal Language and Automata Theory Chapter 3 Pushdown Automata and Context-Free Languages.
Transparency No. 4-1 Formal Language and Automata Theory Chapter 4 Patterns, Regular Expressions and Finite Automata (include lecture 7,8,9) Transparency.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
Regular Expression (EXTRA)
1 Single Final State for NFAs and DFAs. 2 Observation Any Finite Automaton (NFA or DFA) can be converted to an equivalent NFA with a single final state.
1 NFAs accept the Regular Languages. 2 Equivalence of Machines Definition: Machine is equivalent to machine if.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
Transparency No. 3-1 Formal Language and Automata Theory Chapter 3 Nondeterministic Finite Automata (NFA) (include lecture 5 and 6)
Transparency No Formal Language and Automata Theory Chapter 10 The Myhill-Nerode Theorem (lecture 15,16 and B)
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
Transparency No. ?-0 Formal Language and Automata Theory Chapter 6 Homomorphisms (lecture 10) Transparency No. 6-1.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
1 Non-Deterministic Automata Regular Expressions.
Theory of Computing Lecture 22 MAS 714 Hartmut Klauck.
Fall 2004COMP 3351 Another NFA Example. Fall 2004COMP 3352 Language accepted (redundant state)
Costas Busch - LSU1 Non-Deterministic Finite Automata.
1 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY For next time: Read 2.1 & 2.2.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
1 A Single Final State for Finite Accepters. 2 Observation Any Finite Accepter (NFA or DFA) can be converted to an equivalent NFA with a single final.
Transparency No. 8-1 Formal Language and Automata Theory Chapter 8 DFA state minimization (lecture 13, 14)
CSE 311: Foundations of Computing Fall 2014 Lecture 23: State Minimization, NFAs.
Relations Chapter 9.
Formal Language Finite set of alphabets Σ: e.g., {0, 1}, {a, b, c}, { ‘{‘, ‘}’ } Language L is a subset of strings on Σ, e.g., {00, 110, 01} a finite language,
Transparency No. 3-1 Formal Language and Automata Theory Chapter 3 Nondeterministic Finite Automata (NFA)
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
MYHILL NERODE THEOREM By Anusha Tilkam. Myhill Nerode Theorem: The following three statements are equivalent 1.The set L є ∑* is accepted by a FSA 2.L.
Introduction to CS Theory
Decidable Questions About Regular languages 1)Membership problem: “Given a specification of known type and a string w, is w in the language specified?”
Prof. Busch - LSU1 NFAs accept the Regular Languages.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
1 Recap lecture 27 Pumping lemma version II, proof, examples, Myhill Nerode theorem, examples.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
CSCI 2670 Introduction to Theory of Computing September 13.
CS 203: Introduction to Formal Languages and Automata
MA/CSSE 474 Theory of Computation Minimizing DFSMs.
Transparency No. 4-1 Formal Language and Automata Theory Chapter 4 Patterns, Regular Expressions and Finite Automata (include lecture 7,8,9) Transparency.
Transparency No. 2-1 Formal Language and Automata Theory Homework 2.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA.
Algorithms for hard problems Automata and tree automata Juris Viksna, 2015.
Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and B = {a,b} {( 0, a), (
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Regular Languages Chapter 1 Giorgi Japaridze Theory of Computability.
Complexity and Computability Theory I Lecture #5 Rina Zviel-Girshin Leah Epstein Winter
Finite Automata A simple model of computation. 2 Finite Automata2 Outline Deterministic finite automata (DFA) –How a DFA works.
1/29/02CSE460 - MSU1 Nondeterminism-NFA Section 4.1 of Martin Textbook CSE460 – Computability & Formal Language Theory Comp. Science & Engineering Michigan.
Regular Expression (EXTRA)
Relations Chapter 9 Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
Unit-III Algebraic Structures
Hierarchy of languages
CS 154, Lecture 4: Limitations on DFAs (I),
Minimal DFA Among the many DFAs accepting the same regular language L, there is exactly one (up to renaming of states) which has the smallest possible.
Chapter 1 Regular Language - 02
Chapter 1 Introduction to the Theory of Computation
Finite-State Machines with No Output
Presentation transcript:

Transparency No Formal Language and Automata Theory Chapter 10 The Myhill-Nerode Theorem (lecture 15,16 and B)

The Myhill-Nerode theorem Transparency No Isomorphism of DFAs M = (Q M, ,  M,s M,F M ), N = (Q N,S,  N,s N,F N ): two DFAs M and N are said to be isomorphic if there is a bijection f:Q M -> Q N s.t. f(s M ) = s N f(  M (p,a)) =  N (f(p),a) for all p  Q M, a   p  F M iff f(p)  F N. I.e., M and N are essentially the same machine up to renaming of states. facts: 1. Isomorphic DFAs accept the same set. 2. if M and N are any two DFAs w/o inaccessible states accepting the same set, then the quotient automata M/  and N/  are isomorphic 3. The DFA obtained by the collapsing algorithm (lec. 14) is the minimal DFA for the set it accepts, and this DFA is unique up to isomorphism.

The Myhill-Nerode theorem Transparency No Myhill-Nerode Relations R: a regular set, M=(Q, , ,s,F): a DFA for R w/o inaccessible states. M induces an equivalence relation  M on  * defined by x  M y iff  (s,x) =  (s,y). i.e., two strings x and y are equivalent iff it is indistinguishable by running M (i.e., by running x and y, respectively, from the initial state of M.) Properties of  M : 0.  M is an equivalence relation on  *. (cf:  is an equivalence relation on states) 1.  M is a right congruence relation on  *: i.e., for any x,y   * and a  , x  M y => xa  M ya. pf: if x  M y =>  (s,xa) =  (  (s,x),a) =  (  (s,y),a) =  (s, ya) => xa  M ya.

The Myhill-Nerode theorem Transparency No Properties of the Myhill-Nerode relations Properties of  M : 2.  M refines R. I.e., for any x,y   *, x  M y => x  R iff y  R pf: x  R iff  (s,x)  F iff  (s,y)  F iff y  R. Property 3 means that every  M -class has either all its elements in R or none of its elements in R. Hence R is a union of some  M -classes. 3. It is of finite index, i.e., it has only finitely many equivalence classes. (i.e., the set { [x]  M | x   *} is finite. pf: x  M y iff  (s,x) =  (s,y) = q for some q  Q. Since there are only |Q| states, hence  * has |Q|  M -classes  R  M - classes

The Myhill-Nerode theorem Transparency No Definition of the Myhill-Nerode relation  : an equivalence relation on  *, R: a [regular] language over  .  is called an Myhill-Nerode relation for R if it satisfies property 1~3. i.e., it is a right congruence of finite index refining R. Facts: 0. R is regular iff it has a Myhill-Nerode relation. (to be proved later) 1. For any DFA M accepting R,  M is a Myhill-Nerode relation for R. 2. If  is a Myhill-Nerode relation for R then there is a DFA M  accepting R s.t.  M  = . 3. The constructions M   M and   M  are inverse up to isomorphism of automata. (i.e.  =  M  and M = M  M )

The Myhill-Nerode theorem Transparency No From  to M  R: a language over ,  : a Myhill-Nerode relation for R; the  -class of the string x is [x]  = def {y | x  y}. Note: Although there are infinitely many strings, there are only finitely many  -classes. (by property of finite index) Define DFA M  = (Q, , ,s,F) where Q = {[x] | x   *}, s = [  ], F = {[x] | x  R },  ([x],a) = [xa]. Notes: 0: M  has |Q| states, each corresponding to an  -class of . Hence the more classes  has, the more states M  has. 1. By right congruence of ,  is well-defined, since, if y,z  [x] => y  z  x => ya  za  xa => ya, za  [xa] 2. x  R iff [x]  F. pf: =>: by definition of M  ;  y s.t. y  R and x  y => x  R. (property 2)

The Myhill-Nerode theorem Transparency No M   M and   M  are inverses Lemma 15.1:  ([x],y) = [xy] pf: Induction on |y|. Basis:  ([x],  ) = [x] =[x  ]. Ind. step:  ([x],ya) =  (  ([x],y),a) =  ([xy],a) = [xya]. QED Theorem 15.2: L(M  ) = R. pf: x  L(M  ) iff  ([  ],x)  F iff [x]  F iff x  R. QED Lemma 15.3:  : a Myhill-Nerode relation for R, M: a DFA for R w/o inaccessible states, then 1. if we apply the construction   M  to  and then apply M   M to the result, the resulting relation  M  is identical to . 2. if we apply the construction M   M to M and then apply   M  to the result, the resulting relation M  M is identical to M.

The Myhill-Nerode theorem Transparency No M   M and   M  are inverses (cont’d) Pf: (of lemma 15.3) (1) Let M  =(Q, , ,s,F) be the DFA constructed as described above. then for any x,y in  *, x  M  y iff  ([  ], x) =  ([  ],y) iff [x] = [y] iff x  y. (2) Let M = (Q, , ,s,F) and let M  M = (Q’, ,  ’,s’,F’). Recall that [x] = {y | y  M x} = {y |  (s,y) =  (s,x) } Q’ = {[x] | x   *}, s’ = [  ], F’ = {[x] | x  R}  ’([x], a) = [xa]. Now let f:Q’-> Q be defined by f([x]) =  (s,x). 1. By def., [x] = [y] iff  (s,x) =  (s,y), so f is well-defined and 1-1. Since M has no inaccessible state, f is onto. 2. f(s’) = f([  ]) =  (s,  ) = s 3. [x]  F’ x  R  (s,x)  F f([x])  F. 4. f(  ’([x],a)) = f([xa])  (s,xa) =  (  (s,x),a) =  (f([x]), a) By 1~4, f is an isomorphism from M  M to M. QED

The Myhill-Nerode theorem Transparency No Relations b/t DFAs and Myhill-Nerode relations Theorem 15.4: R: a regular set over . Then up to isomorphism of FAs, there is a 1-1 correspondence b/t DFAs w/o inaccessible states accepting R and Myhill-Nerode relations for R. I.e., Different DFAs accepting R correspond to different Myhill-Nerode relations for R, and vice versa. We now show that there exists a coarsest Myhill-Neorde relation  R for any R, which corresponds to the unique minimal DFA for R. Def 16.1:  1,  2 : two relations. If  1   2 (i.e., for all x,y, x  1 y => x  2 y) we say  1 refines  2. Note:1. If  1 and  2 are equivalence relations, then  1 refines  2 iff every  1 -class is included in a  2 -class. 2. The refinement relation on equivalence relations is a partial order. (since  is ref, transitive and antisymmetric).

The Myhill-Nerode theorem Transparency No The refinement relation Note: 3. If,  1   2,we say  1 is the finer and  2 is the coarser of the two relations. 4. The finest equivalence relation on a set U is the identity relation I U = {(x,x) | x  U} 5. The coarsest equivalence relation on a set U is universal relation U 2 = {(x,y) | x, y  U} Def. 16.1: R: a language over  (possibly not regular). Define a relation  R over  * by x  R y iff for all z   * (xz  R yz  R) i.e., x and y are related iff whenever appending the same string to both of them, the resulting two strings are either both in R or both not in R.

The Myhill-Nerode theorem Transparency No Properties of  R Lemma 16.2: Properties of  R : 0.  R is an equivalence relation over  *. 1.  R is right congruent 2.  R refines R. 3.  R the coarsest of all relations satisfying 0,1 and 2. [4. If R is regular =>  R is of finite index. ] Pf: (0) : trivial; (4) immediate from (3) and theorem (1) x  R y => for all z   * (xz  R yz  R) =>  a  w (xaw  R yaw  R) =>  a (xa  R ya) (2) x  R y => (x  R y  R) (3) Let  be any relation satisfying 0~2. Then x  y =>  z xz  yz --- by ind. on |z| using property (1) =>  z (xz  R yz  R) --- by (2) => x  R y.

The Myhill-Nerode theorem Transparency No Myhill-Nerode theorem Thorem16.3: Let R be any language over . Then the following statements are equivalent: (a) R is regular; (b) There exists a Myhill-Nerode relation for R; (c) the relation  R is of finite index. pf: (a) =>(b) : Let M be any DFA for R. The construction M   M produces a Myhill-Nerode relation for R. (b) => (c): By lemma 16.2, any Myhill-Nerode relation for R is of finite index and refines R =>  R is of finite index. (c)=>(a): If  R is of finite index, by lemma 16.2, it is a Myhill- Nerode relation for R, and the construction   M  produce a DFA for R.

The Myhill-Nerode theorem Transparency No Relations b/t  R and collapsed machine Note: 1. Since  R is the coarsest Myhill-Nerode relation for a regular set R, it corresponds to the DFA for R with the fewest states among all DFAs for R. (i.e., let M = (Q,...) be any DFA for R and M = (Q’,…) the DFA induced by  R, where Q’ = the set of all  R -classes ==> |Q| = | the set of  M -classes | >= | the set of  R -classes | = |Q’|. Fact: M=(Q,S,s,d,F): a DFA for R that has been collapsed (i.e., M = M/  ). Then  R =  M (hence M is the unique DFA for R with the fewest states). pf: x  R y iff  z   * (xz  R yz  R) iff  z   * (  (s,xz)  F  (s,yz)  F) iff  z   * (  (  (s,x),z)  F  (  s,y),z)  F) iff  (s,x)   (s,y) iff  (s,x) =  (s,y) -- since M is collapsed iff x  M y Q.E.D.

The Myhill-Nerode theorem Transparency No An application of the Myhill-Nerode relation Can be used to determine whether the set R is regular by determining the number of  R -classes. Ex: Let A = {a n b n | n  0 }. If k  m => a k not  A a m, since a k b k  A but a m b k  A. Hence  A is not of finite index => A is not regular. In fact  A has the following  A -classes: G k = {a k }, k  0 H k = {a n+k b n | n  1 }, k  0 E =  * - U k  0 (G k U H k ) =  * - {a m b n | m  n  0 }

The Myhill-Nerode theorem Transparency No Uniqueness of Minimal NFAs Problem: Does the conclusion that minimal DFA accepting a language is unique apply to NFA as well ? Ans : ?

The Myhill-Nerode theorem Transparency No Minimal NFAs are not unique up to isomorphism Example: let L = { x1 | x ∈ {0,1} }* 1.What is the minimum number k of states of all FAs accepting L ? Analysis : k ≠ 1. Why ? 2. Both of the following two 2-states FAs accept L. p q 0,1 1 t s

The Myhill-Nerode theorem Transparency No Collapsing NFAs Minimal NFAs are not unique up to isomorphism Part of the Myhill-Nerode theorem generalize to NFAs based on the notion of bisimulation. Bisimulation: Def: M=(Q M, ,  M,S M,F M ), N=(Q N, ,  N,S N,F N ): two NFAs,  : a binary relation from Q M to Q N. For B  Q N, define C  (B) = {p  Q M |  q  B p  q } For A  Q M, define C  (A) = {q  Q N |  P  A p  q } Extend  to subsets of Q M and Q N as follows: A  B def A  C  (B) and B  C  (A) iff  p  A  q  B s.t. p  q and  q  B  p  A s.t. p  q

The Myhill-Nerode theorem Transparency No QMQM QNQN AC  (A)  C  (C  (A)) q p

The Myhill-Nerode theorem Transparency No Bisimulation Def B.1: The relation  is called a bisimulation if 1. S M  S N 2. if p  q then  a  ,  M (p,a)   N (q,a) 3. if p  q then p  F M iff q  F N. M and N are bisimilar if there exists a bisimulation between them. For each NFA M, the bisimilar class of M is the family of all NFAs that are bisimilar to M. Properties of bisimulaions: 1.Bisimulation is symmetric: if is a bisimulation b/t M and N, then its reverse {(q,p) | p  q} is a bisimulation b.t N and M. 2.Bisimulation is transitive: M  1 N and N  2 P => M  1  2 P 3.The union of any nonempty family of bisimulation b/t M and N is a bisimulation b/t M and N.

The Myhill-Nerode theorem Transparency No Properties of bisimulations Pf: 1,2: direct from the definition. (3): Let {  i | i  I } be a nonempty indexed set of bisimulations b/t M and N. Define  = def U i  I  i. Thus p  q means  i  I p  i q. 1. Since I is not empty, S M  i S N for some i  I, hence S M  S N 2. If p  q =>  i  I p  i q =>  M (p,a)  i  N (q,a) =>  M (p,a)   N (q,a) 3. If p  q => p  i q for some i => (p  F M q  F N ) Hence  is a bisimulation b/t M and N. Lem B.3:  : a bisimulation b/t M and N. If A  B, then for all x in  *,  (A,x)   (B,x). pf: by induction on |x|. Basis: 1. x =   (A,  ) = A   x = a : since A  C  (B), if p  A =>  q  B with p  q. =>  M (p,a)  C  (  N (q,a))  C  (  N (B,a)). =>  M  (A,a) = U p  A  M  (p,a)  C  (  N (B,a)). By a symmetric argument,  N (B,a)  C  (  M (A,a)). So  M  (A,a)   N (B,a)).

The Myhill-Nerode theorem Transparency No Bisimilar automata accept the same set. 3. Ind. case: assume  M (A,x)   N (B,x). Then  M (A,xa) =  M (  M (A,x), a)   N (  N (B,x),a) =  N (B,xa). Q.E.D. Theorem B.4: Bisimilar automata accept the same set. Pf: assume  : a bisimulation b/t two NFAs M and N. Since S M  S N =>  M  (S M,x)   N  (S N,x) for all x. Hence for all x, x  L(M)  M (S M, x)  F M  {}  N (S N,x)  F N  {} x  L(N). Q.E.D. Def:  : a bisimulation b/t two NFAs M and N The support of  in M is the states of M related by  to some state of N, i.e., {p  Q M | p  q for some q  Q N } = C  (Q N ).

The Myhill-Nerode theorem Transparency No Autobisimulation Lem B.5: A state of M is in the support of all bisimulations involving M iff it is accessible. Pf: Let  be any bisimulation b/t M and another FA. By def B.1(1), every start state of M is in the support of . By B.1(2), if p is in the support of , then every state in  (p,a) is in the support of . It follows by induction that every accessible state is in the support of . Conversely, since the relation B.3 = {(p,p) | p is accessible} is a bisimulation from M to M and all inaccessible states of M are not in the support of B.3. It follows that no inaccessible state is in the support of all bisimulations. Q.E.D. Def. B.6: An autobisimulation is a bisimlation b/t an automaton and itself.

The Myhill-Nerode theorem Transparency No Property of autobisimulations Theorem B.7: Every NFA M has a coarsest autobisimulation  M, which is an equivalence relation. Pf: let B be the set of all autobisimulations on M. B is not empty since the identity relation I M = {(p,p) | p in Q } is an autobisimulation. 1. let  M be the union of all bisimualtions in B. By Lem B.2(3),  M is also a bisimualtion on M and belongs to B. So  M is the largest (i.e., coarsest) of all relations in B. 2.  M is ref. since for all state p (p,p)  I M   M. 3.  M is sym. and tran. by Lem B.2(1,2). 4. By 2,3,  M is an equivalence relation on Q.

The Myhill-Nerode theorem Transparency No Find minimal NFA bisimilar to a NFA M = (Q, , ,S,F) : a NFA. Since accessible subautomaton of M is bisimilar to M under the bisimulation B.3, we can assume wlog that M has no inaccessible states. Let  be  M, the maximal autobisimulation on M. for p in Q, let [p] = {q | p  q } be the  -class of p, and let « be the relation relating p to its  -class [p], i.e., «  Qx2 Q = def {(p,[p]) | p in Q } for each set of states A  Q, define [A] = {[p] | p in A }. Then Lem B.8: For all A,B  Q, 1. A  C  (B) iff [A]  [B], 2. A  B iff [A] = [B], 3. A « [A] pf:1. A  C  (B)  p in A  q in B s.t. p  q [A]  [B] 2. Direct from 1 and the fact that A  B iff A  C  (B) and B  C  (A) 3. p  A => p  [p]  [A], B  [A] =>  p  A with p « [p] = B.

The Myhill-Nerode theorem Transparency No Minimal NFA bisimilar to an NFA (cont’d) Now define M’ = {Q’, S, d’, S’,F’} = M/  where Q’ = [Q] = {[p] | p  Q}, S’ = [S] = {[p] | p  S}, F’ = [F ] = {[p] | p  F} and  ’([p],a) = [  (p,a)], Note that  ’ is well-defined since [p] = [q] => p  q =>  (p,a)   (q,a) => [  (p,a)] = [  (q,a)] =>  ‘([p],a) =  ‘([q],a) Lem B.9: The relation « is a bisimulation b/t M and M’. pf: 1. By B.8(3): S  [S] = S’. 2. If p « [q] => p  q =>  (p,a)   (q,a) => [  (p,a)] = [  (q,a)] =>  (p,a) « [  (p,a)] = [  (q,a)]. 3. if p  F => [p]  [F] = F’ and if [p]  F’= [F] =>  q  F with [q] = [p] => p  q => p  F. By theorem B.4, M and M’ accept the same set.

The Myhill-Nerode theorem Transparency No Autobisimulation Lem B.10: The only autobisimulation on M’ is the identity relation =. Pf: Let ~ be an autobisimulation of M’. By Lem B.2(1,2), the relation « ~ » is a bisimulation from M to itself. 1. Now if there are [p]  [q] (hence not p  q ) with [p] ~ [q] => p « [p] ~ [q] » q => p « ~ » q => « ~ »  , a contradiction !. On the other hand, if [p] not~ [p] for some [p] => for any [q], [p] not~ [q] (by 1. and the premise) => p not (« ~ » ) q for any q (p « [p] [q] » q ) => p is not in the support of « ~ » => p is not accessible, a contradiction.

The Myhill-Nerode theorem Transparency No Quotient automata are minimal FAs Theorem B11: M: an NFA w/t inaccessible states,  : maximal autobisimulation on M. Then M’ = M /  is the minimal automata bisimilar to to M and is unique up to isomorphism. pf: N: any NFA bisimilar to M w/t inaccessible states. N’ = N/  N where  N is the maximal autobisimulation on N. => M’ bisimiar to M bisimilar to N bisimiar to N’. Let  be any bisimulation b/t M’ and N’. Under , every state p of M’ has at least on state q of N’ with p  q and every state q of N’ has exactly one state p of M’ with p  q. O/w p  q  -1 p’  p =>   -1 is a non-identity autobisimulation on M, a contradiciton!. Hence  is 1-1. Similarly,  -1 is 1-1 =>  is 1-1 and onto and hence is an isomorphism b/t M’ and N’. Q.E.D.

The Myhill-Nerode theorem Transparency No Algorithm for computing maximal bisimulation a generalization of that of Lec 14 for finding equivalent states of DFAs The algorithm: Find maximal bisimulation of two NFAs M and N 1. write down a table of all pairs (p,q) of states, initially unmarked 2. mark (p,q) if p  F M and q  F N or vice versa. 3. repeat until no more change occur: if (p,q) is unmarked and if for some a  , either  p’   M (p,a) s.t.  q’   N (q,a), (p’,q’) is marked, or  q’   N (q,a) s.t.  p’   M (p,a), (p’,q’) is marked, then mark (p,q). 4. define p  q iff (p,q) are never marked. 5. If S M  S N =>  is the maximal bisimulation o/w M and N has no bisimulation.