# Myhill–Nerode theorem Myhill–Nerode theorem This article needs additional citations for verification. Aidez-nous à améliorer cet article en ajoutant des citations à des sources fiables. Le matériel non sourcé peut être contesté et supprimé. Trouver des sources: "Myhill–Nerode theorem" – actualités · journaux · livres · universitaires · JSTOR (Septembre 2020) (Découvrez comment et quand supprimer ce modèle de message) 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 1958 (Nerode 1958).

Contenu 1 Déclaration 2 Preuve 3 Use and consequences 4 Généralisations 5 Voir également 6 Références 7 Further reading Statement Given a language {displaystyle L} , and a pair of strings {style d'affichage x} et {style d'affichage y} , define a distinguishing extension to be a string {style d'affichage avec} such that exactly one of the two strings {displaystyle xz} et {displaystyle yz} belongs to {displaystyle L} . Define a relation {style d'affichage {}_{L}{sim }} on strings as {style d'affichage x;{}_{L}{sim } y} iff there is no distinguishing extension for {style d'affichage x} et {style d'affichage y} . It is easy to show that {style d'affichage {}_{L}{sim }} 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 {displaystyle L} is regular if and only if {style d'affichage {}_{L}{sim }} 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) recognizing {displaystyle L} . En particulier, this implies that there is a unique minimal DFA for each regular language (Hopcroft & Ullman 1979).

Some authors refer to the {style d'affichage {}_{L}{sim }} relation as Nerode congruence, in honor of Anil Nerode.

Proof If {displaystyle L} is a regular language, then by definition there is a DFA {style d'affichage A} that recognizes it, with only finitely many states. If there are {displaystyle n} states, then partition the set of all finite strings into {displaystyle n} subsets, where subset {style d'affichage S_{je}} is the set of strings that, when given as input to automaton {style d'affichage A} , cause it to end in state {style d'affichage i} . For every two strings {style d'affichage x} et {style d'affichage y} that belong to the same subset, and for every choice of a third string {style d'affichage avec} , automaton {style d'affichage A} reaches the same state on input {displaystyle xz} as it reaches on input {displaystyle yz} , and therefore must either accept both of the inputs {displaystyle xz} et {displaystyle yz} or reject both of them. Par conséquent, no string {style d'affichage avec} can be a distinguishing extension for {style d'affichage x} et {style d'affichage y} , so they must be related by {style d'affichage {}_{L}{sim }} . Ainsi, {style d'affichage S_{je}} is a subset of an equivalence class of {style d'affichage {}_{L}{sim }} . Combining this fact with the fact that every member of one of these equivalence classes belongs to one of the sets {style d'affichage S_{je}} , this gives a many-to-one relation from states of {style d'affichage A} to equivalence classes, implying that the number of equivalence classes is finite and at most {displaystyle n} .

In the other direction, supposer que {style d'affichage {}_{L}{sim }} has finitely many equivalence classes. Dans ce cas, it is possible to design a deterministic finite automaton that has one state for each equivalence class. The start state of the automaton corresponds to the equivalence class containing the empty string, and the transition function from a state {style d'affichage X} on input symbol {style d'affichage y} takes the automaton to a new state, the state corresponding to the equivalence class containing string {displaystyle xy} , où {style d'affichage x} is an arbitrarily chosen string in the equivalence class for {style d'affichage X} . The definition of the Myhill–Nerode relation implies that the transition function is well-defined: no matter which representative string {style d'affichage x} is chosen for state {style d'affichage X} , the same transition function value will result. A state of this automaton is accepting if the corresponding equivalence class contains a string in {displaystyle L} ; dans ce cas, encore, the definition of the relation implies that all strings in the same equivalence class must also belong to {displaystyle L} , for otherwise the empty string would be a distinguishing string for some pairs of strings in the class.

Ainsi, the existence of a finite automaton recognizing {displaystyle L} implies that the Myhill–Nerode relation has a finite number of equivalence classes, at most equal to the number of states of the automaton, and the existence of a finite number of equivalence classes implies the existence of an automaton with that many states.

Use and consequences The Myhill–Nerode theorem may be used to show that a language {displaystyle L} is regular by proving that the number of equivalence classes of {style d'affichage {}_{L}{sim }} est fini. 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. Par exemple, the language consisting of binary representations of numbers that can be divided by 3 is regular. Given the empty string, {style d'affichage 00} (ou {style d'affichage 11} ), {style d'affichage 01} et {style d'affichage 10} are distinguishing extensions resulting in the three classes (corresponding to numbers that give remainders 0, 1 et 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 {displaystyle L} the relation {style d'affichage {}_{L}{sim }} 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.

See also Pumping 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 monoid References ^ Brzozowski, Janusz; Szykuła, marek; vous, Yuli (2018), "Syntactic Complexity of Regular Ideals", Theory of Computing Systems, 62 (5): 1175–1202, est ce que je: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, est ce que je:10.1016/j.tcs.2009.03.011 Hopcroft, John E.; Ullman, Jeffrey D. (1979), "Chapitre 3", Introduction to Automata Theory, Languages, and Computation, En lisant, Massachusetts: Addison-Wesley Publishing, ISBN 0-201-02988-X. Nerode, Anil (1958), "Linear Automaton Transformations", Proceedings of the AMS, 9 (4): 541–544, est ce que je:10.1090/S0002-9939-1958-0135681-9, JSTOR 2033204. Regan, Kenneth (2007), Notes on the Myhill-Nerode Theorem (PDF), récupéré 2016-03-22. Further reading Bakhadyr Khoussainov; Anil Nerode (6 Décembre 2012). Automata Theory and its Applications. Springer Science & Business Media. ISBN 978-1-4612-0171-7. Catégories: Formal languagesTheorems in discrete mathematicsFinite automata

Si vous voulez connaître d'autres articles similaires à Myhill–Nerode theorem vous pouvez visiter la catégorie Finite automata.

Monter

Nous utilisons nos propres cookies et ceux de tiers pour améliorer l'expérience utilisateur Plus d'informations