fbpx
Wikipedia

Myhill–Nerode theorem

In the theory of formal languages, the Myhill–Nerode theorem provides a necessary and sufficient condition for a language to be regular. The theorem is named for John Myhill and Anil Nerode, who proved it at the University of Chicago in 1957 (Nerode & Sauer 1957, p. ii).

Statement

Given a language  , and a pair of strings   and  , define a distinguishing extension to be a string   such that exactly one of the two strings   and   belongs to  . Define a relation   on strings as   if there is no distinguishing extension for   and  . It is easy to show that   is an equivalence relation on strings, and thus it divides the set of all strings into equivalence classes.

The Myhill–Nerode theorem states that a language   is regular if and only if   has a finite number of equivalence classes, and moreover, that this number is equal to the number of states in the minimal deterministic finite automaton (DFA) accepting  . Furthermore, every minimal DFA for the language is isomorphic to the canonical one (Hopcroft & Ullman 1979).

Myhill, Nerode (1957) — (1)   is regular if and only if   has a finite number of equivalence classes.

(2) This number is equal to the number of states in the minimal deterministic finite automaton (DFA) accepting  .

(3) Any minimal DFA acceptor for the language is isomorphic to the following one:

Let each equivalence class   correspond to a state, and let state transitions be   for each  . Let the starting state be  , and the accepting states be   where  .

Generally, for any language, the constructed automaton is a state automaton acceptor. However, it does not necessarily have finitely many states. The Myhill–Nerode theorem shows that finiteness is necessary and sufficient for language regularity.

Some authors refer to the   relation as Nerode congruence,[1][2] in honor of Anil Nerode.

Proof

(1) If   is regular. construct a minimal DFA to accept it. Clearly, if   end up in the same state after running through the DFA, then  , thus the number of equivalence classes of   is at most the number of DFA states, which must be finite.

Conversely, if   has a finite number of equivalence classes, then the state automaton constructed in the theorem is a DFA acceptor, thus the language is regular.

(2) By the construction in (1).

(3) Given a minimal DFA acceptor  , we construct an isomorphism to the canonical one.

Construct the following equivalence relation:   if and only if   end up on the same state when running through  .

Since   is an acceptor, if   then  . Thus each   equivalence class is a union of one or more equivalence classes of  . Further, since   is minimal, the number of states of   is equal to the number of equivalence classes of   by part (2). Thus  .

Now this gives us a bijection between states of   and the states of the canonical acceptor. It is clear that this bijection also preserves the transition rules, thus it is an isomorphism of DFA.

Use and consequences

The Myhill–Nerode theorem may be used to show that a language   is regular by proving that the number of equivalence classes of   is finite. This may be done by an exhaustive case analysis in which, beginning from the empty string, distinguishing extensions are used to find additional equivalence classes until no more can be found. For example, the language consisting of binary representations of numbers that can be divided by 3 is regular. Given the empty string,   (or  ),  , and   are distinguishing extensions resulting in the three classes (corresponding to numbers that give remainders 0, 1 and 2 when divided by 3), but after this step there is no distinguishing extension anymore. The minimal automaton accepting our language would have three states corresponding to these three equivalence classes.

Another immediate corollary of the theorem is that if for a language   the relation   has infinitely many equivalence classes, it is not regular. It is this corollary that is frequently used to prove that a language is not regular.

Generalizations

The Myhill–Nerode theorem can be generalized to tree automata.[3]

See also

References

  1. ^ Brzozowski, Janusz; Szykuła, Marek; Ye, Yuli (2018), "Syntactic Complexity of Regular Ideals", Theory of Computing Systems, 62 (5): 1175–1202, doi:10.1007/s00224-017-9803-8, hdl:10012/12499, S2CID 2238325
  2. ^ Crochemore, Maxime; et al. (2009), "From Nerode's congruence to suffix automata with mismatches", Theoretical Computer Science, 410 (37): 3471–3480, doi:10.1016/j.tcs.2009.03.011, S2CID 14277204
  3. ^ Hubert Comon; Max Dauchet; Rémi Gilleron; Florent Jacquemard; Denis Lugiez; Christoph Löding; Sophie Tison; Marc Tommasi (Oct 2021). Tree Automata Techniques and Applications (TATA). Here: Sect. 1.5, p.35-36.

Further reading

myhill, nerode, theorem, theory, formal, languages, provides, necessary, sufficient, condition, language, regular, theorem, named, john, myhill, anil, nerode, proved, university, chicago, 1957, nerode, sauer, 1957, contents, statement, consequences, generaliza. In the theory of formal languages the Myhill Nerode theorem provides a necessary and sufficient condition for a language to be regular The theorem is named for John Myhill and Anil Nerode who proved it at the University of Chicago in 1957 Nerode amp Sauer 1957 p ii Contents 1 Statement 2 Use and consequences 3 Generalizations 4 See also 5 References 6 Further readingStatement EditGiven a language L displaystyle L and a pair of strings x displaystyle x and y displaystyle y define a distinguishing extension to be a string z displaystyle z such that exactly one of the two strings x z displaystyle xz and y z displaystyle yz belongs to L displaystyle L Define a relation L displaystyle sim L on strings as x L y displaystyle x sim L y if there is no distinguishing extension for x displaystyle x and y displaystyle y It is easy to show that L displaystyle sim L is an equivalence relation on strings and thus it divides the set of all strings into equivalence classes The Myhill Nerode theorem states that a language L displaystyle L is regular if and only if L displaystyle sim L has a finite number of equivalence classes and moreover that this number is equal to the number of states in the minimal deterministic finite automaton DFA accepting L displaystyle L Furthermore every minimal DFA for the language is isomorphic to the canonical one Hopcroft amp Ullman 1979 Myhill Nerode 1957 1 L displaystyle L is regular if and only if L displaystyle sim L has a finite number of equivalence classes 2 This number is equal to the number of states in the minimal deterministic finite automaton DFA accepting L displaystyle L 3 Any minimal DFA acceptor for the language is isomorphic to the following one Let each equivalence class x displaystyle x correspond to a state and let state transitions be a x x a displaystyle a x to xa for each a S displaystyle a in Sigma Let the starting state be ϵ displaystyle epsilon and the accepting states be x displaystyle x where x L displaystyle x in L Generally for any language the constructed automaton is a state automaton acceptor However it does not necessarily have finitely many states The Myhill Nerode theorem shows that finiteness is necessary and sufficient for language regularity Some authors refer to the L displaystyle sim L relation as Nerode congruence 1 2 in honor of Anil Nerode Proof 1 If L displaystyle L is regular construct a minimal DFA to accept it Clearly if x y displaystyle x y end up in the same state after running through the DFA then x L y displaystyle x sim L y thus the number of equivalence classes of L displaystyle sim L is at most the number of DFA states which must be finite Conversely if L displaystyle sim L has a finite number of equivalence classes then the state automaton constructed in the theorem is a DFA acceptor thus the language is regular 2 By the construction in 1 3 Given a minimal DFA acceptor A displaystyle A we construct an isomorphism to the canonical one Construct the following equivalence relation x A y displaystyle x sim A y if and only if x y displaystyle x y end up on the same state when running through A displaystyle A Since A displaystyle A is an acceptor if x A y displaystyle x sim A y then x L y displaystyle x sim L y Thus each L displaystyle sim L equivalence class is a union of one or more equivalence classes of A displaystyle sim A Further since A displaystyle A is minimal the number of states of A displaystyle A is equal to the number of equivalence classes of L displaystyle sim L by part 2 Thus A L displaystyle sim A sim L Now this gives us a bijection between states of A displaystyle A and the states of the canonical acceptor It is clear that this bijection also preserves the transition rules thus it is an isomorphism of DFA Use and consequences EditThe Myhill Nerode theorem may be used to show that a language L displaystyle L is regular by proving that the number of equivalence classes of L displaystyle sim L is finite This may be done by an exhaustive case analysis in which beginning from the empty string distinguishing extensions are used to find additional equivalence classes until no more can be found For example the language consisting of binary representations of numbers that can be divided by 3 is regular Given the empty string 00 displaystyle 00 or 11 displaystyle 11 01 displaystyle 01 and 10 displaystyle 10 are distinguishing extensions resulting in the three classes corresponding to numbers that give remainders 0 1 and 2 when divided by 3 but after this step there is no distinguishing extension anymore The minimal automaton accepting our language would have three states corresponding to these three equivalence classes Another immediate corollary of the theorem is that if for a language L displaystyle L the relation L displaystyle sim L has infinitely many equivalence classes it is not regular It is this corollary that is frequently used to prove that a language is not regular Generalizations EditThe Myhill Nerode theorem can be generalized to tree automata 3 See also EditPumping lemma for regular languages an alternative method for proving that a language is not regular The pumping lemma may not always be able to prove that a language is not regular Syntactic monoidReferences Edit Brzozowski Janusz Szykula Marek Ye Yuli 2018 Syntactic Complexity of Regular Ideals Theory of Computing Systems 62 5 1175 1202 doi 10 1007 s00224 017 9803 8 hdl 10012 12499 S2CID 2238325 Crochemore Maxime et al 2009 From Nerode s congruence to suffix automata with mismatches Theoretical Computer Science 410 37 3471 3480 doi 10 1016 j tcs 2009 03 011 S2CID 14277204 Hubert Comon Max Dauchet Remi Gilleron Florent Jacquemard Denis Lugiez Christoph Loding Sophie Tison Marc Tommasi Oct 2021 Tree Automata Techniques and Applications TATA Here Sect 1 5 p 35 36 Hopcroft John E Ullman Jeffrey D 1979 Chapter 3 4 Introduction to Automata Theory Languages and Computation Reading Massachusetts Addison Wesley Publishing ISBN 0 201 02988 X Nerode Anil 1958 Linear Automaton Transformations Proceedings of the American Mathematical Society 9 4 541 544 doi 10 1090 S0002 9939 1958 0135681 9 JSTOR 2033204 Nerode Anil Sauer Burton P Nov 1957 Fundamental Concepts in the Theory of Systems WADC Technical Report Wright Air Development Center ASTIA Document No AD 155741 Regan Kenneth 2007 Notes on the Myhill Nerode Theorem PDF retrieved 2016 03 22 Further reading EditBakhadyr Khoussainov Anil Nerode 6 December 2012 Automata Theory and its Applications Springer Science amp Business Media ISBN 978 1 4612 0171 7 Retrieved from https en wikipedia org w index php title Myhill Nerode theorem amp oldid 1164299407, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.