Myhill–Nerode theorem

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 1958 (Nerode 1958).

Statement of the theorem

Given a language L, and a pair of strings x and y, define a distinguishing extension to be a string z such that exactly one of the two strings xz and yz belongs to L. Define a relation RL on strings by the rule that x RL y if there is no distinguishing extension for x and y. It is easy to show that RL is an equivalence relation on strings, and thus it divides the set of all finite strings into equivalence classes.

The Myhill–Nerode Theorem states that L is regular if and only if RL has a finite number of equivalence classes, and moreover that the number of states in the smallest deterministic finite automaton (DFA) recognizing L is equal to the number of equivalence classes in RL. In particular, this implies that there is a unique canonical DFA with minimum number of states.

The intuition is that if one starts with such a minimal automaton, then any strings x and y that drive it to the same state will be in the same equivalence class; and if one starts with a partition into equivalence classes, one can easily construct an automaton that uses its state to keep track of the equivalence class containing the part of the string seen so far.

Proof. First, suppose $ A^\ast/\mathcal{N}_L=\{q_0=[\lambda]_{\mathcal{N}_L},\ldots,q_{k-1}\}=Q, $ where is the empty word on A . Construct a DFA =QAq0F (called the Nerode automaton for L ) with :QAQ defined by (1) (qa)=[wa]Lwq and (2) F=qQwLwq Then is well defined because w1Lw2 implies w1uLw2u . It is also straightforward that recognizes L .

On the other hand, let =QAq0F be a DFA that recognizes L . Extend to QA by putting (q)=q and (qaw)=((qa)w) for every qQ , aA , wA . Define f:QAL as $\displaystyle f(q) = \left\{\begin{array}{ll} [w]_{\mathcal{N}_L} & \mathrm{if}... ...ptyset & \mathrm{if}\;\delta(q_0,w)\neq q\forall w\in A^\ast \end{array}\right.$ (1)

Then f is well defined. In fact, suppose q1=q2=q : then either f(q1)=f(q2)= , or there are w1w2A such that (q0w1)=(q0w2)=q . But in the latter case, (q0w1u)=(q0w2u)=(qu) for any uA , hence w1Lw2 since recognizes L . Finally, for any wA we have $ [w]_{\mathcal{N}_L}=f\left(\delta(q_0,w)\right), $ so every class of L has a preimage according to f ; consequently, QAL . $ \Box$==Use and consequences== The Myhill–Nerode theorem may be used to show that a language L is regular by proving that the number of equivalence classes of RL 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 numbers which can be divided by 3 is regular. Given the empty string, 00 (or 11), 01 and 10 are distinguished 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 distinguished 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 a language defines an infinite set of equivalence classes, it is not regular. It is this corollary that is frequently used to prove that a language is not regular.

See also

  • Pumping lemma, an alternative method for proving that a language is not regular

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • John Myhill — John R. Myhill (Senior) was a mathematician. He received his Ph.D. from Harvard University under Willard Van Orman Quine in 1949. He was professor at SUNY Buffalo from 1966 until his death in 1987. He also taught at several other universities.In… …   Wikipedia

  • Anil Nerode — is a U.S. mathematician. He received his Ph.D. in mathematics from the University of Chicago under Saunders Mac Lane and is, at present, Goldwin Smith Professor of Mathematics at Cornell University.His interests are in mathematical logic, the… …   Wikipedia

  • Uvw-Theorem — Das Pumping Lemma bzw. Pumplemma beschreibt in der theoretischen Informatik eine Eigenschaft bestimmter Klassen formaler Sprachen. In vielen Fällen lässt sich anhand des Lemmas nachweisen, dass eine formale Sprache nicht regulär bzw. nicht… …   Deutsch Wikipedia

  • Langage rationnel — Les langages rationnels ou langages réguliers ou encore langages reconnaissables peuvent être décrits de plusieurs façons équivalentes: ce sont les langages décrits par les expressions régulières ou rationnelles,d où le nom de langages réguliers; …   Wikipédia en Français

  • Tree automaton — A tree automaton is a type of state machine. Tree automata deal with tree structures, rather than the strings of more conventional state machines. The following article deals with branching tree automata, which correspond to regular languages of… …   Wikipedia

  • DFA minimization — In computer science, more specifically in the branch of automata theory, DFA minimization is the task of transforming a given deterministic finite automaton (DFA) into an equivalent DFA that has minimum number of states. Here, two DFAs are called …   Wikipedia

  • List of mathematics articles (M) — NOTOC M M estimator M group M matrix M separation M set M. C. Escher s legacy M. Riesz extension theorem M/M/1 model Maass wave form Mac Lane s planarity criterion Macaulay brackets Macbeath surface MacCormack method Macdonald polynomial Machin… …   Wikipedia

  • Теорема Майхилла — В теории формальных языков теорема Майхилла  Нероуда определяет необходимое и достаточное условия регулярности языка. Данная теорема также позволяет доказать, что данный язык не регулярен. Теорема названа в честь Джона… …   Википедия

  • List of Indian Americans — This is a list of Indian Americans who are famous, have made significant contributions to the American culture or society politically, artistically or scientifically, or have appeared in the news numerous times:ListAcademic* Shreeram Shankar… …   Wikipedia

  • List of theorems — This is a list of theorems, by Wikipedia page. See also *list of fundamental theorems *list of lemmas *list of conjectures *list of inequalities *list of mathematical proofs *list of misnamed theorems *Existence theorem *Classification of finite… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”