Myhill–Nerode Theorem
   HOME

TheInfoList



OR:

In the theory of
formal language In logic, mathematics, computer science, and linguistics, a formal language is a set of strings whose symbols are taken from a set called "alphabet". The alphabet of a formal language consists of symbols that concatenate into strings (also c ...
s, the Myhill–Nerode theorem provides a
necessary and sufficient condition In logic and mathematics, necessity and sufficiency are terms used to describe a conditional or implicational relationship between two statements. For example, in the conditional statement: "If then ", is necessary for , because the truth of ...
for a language to be regular. The theorem is named for John Myhill and
Anil Nerode Anil Nerode (born 1932) is an American mathematician, known for his work in mathematical logic and for his many-decades tenure as a professor at Cornell University. He received his undergraduate education and a Ph.D. in mathematics from the Uni ...
, who proved it at the
University of Chicago The University of Chicago (UChicago, Chicago, or UChi) is a Private university, private research university in Chicago, Illinois, United States. Its main campus is in the Hyde Park, Chicago, Hyde Park neighborhood on Chicago's South Side, Chic ...
in 1957 .


Statement

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 \sim_L on strings as x\; \sim_L\ y if there is no distinguishing extension for x and y. It is easy to show that \sim_L is an
equivalence relation In mathematics, an equivalence relation is a binary relation that is reflexive, symmetric, and transitive. The equipollence relation between line segments in geometry is a common example of an equivalence relation. A simpler example is equ ...
on strings, and thus it divides the set of all strings into
equivalence class In mathematics, when the elements of some set S have a notion of equivalence (formalized as an equivalence relation), then one may naturally split the set S into equivalence classes. These equivalence classes are constructed so that elements ...
es. The Myhill–Nerode theorem states that a language L is regular if and only if \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 In the theory of computation, a branch of theoretical computer science, a deterministic finite automaton (DFA)—also known as deterministic finite acceptor (DFA), deterministic finite-state machine (DFSM), or deterministic finite-state auto ...
(DFA) accepting L. Furthermore, every minimal DFA for the language is isomorphic to the canonical one . 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 \sim_L relation as Nerode congruence, in honor of
Anil Nerode Anil Nerode (born 1932) is an American mathematician, known for his work in mathematical logic and for his many-decades tenure as a professor at Cornell University. He received his undergraduate education and a Ph.D. in mathematics from the Uni ...
.


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 \sim_L is finite. This may be done by an exhaustive case analysis in which, beginning from the
empty string In formal language theory, the empty string, or empty word, is the unique String (computer science), string of length zero. Formal theory Formally, a string is a finite, ordered sequence of character (symbol), characters such as letters, digits ...
, 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 two binary strings x, y, extending them by one digit gives 2x + b, 2y + b, so 2x + b \equiv 2y + b \mod 3 iff x \equiv y \mod 3 . Thus, 00 (or 11), 01, and 10 are the only distinguishing extensions, resulting in the 3 classes. The minimal automaton accepting our language would have three states corresponding to these three equivalence classes. Another immediate
corollary In mathematics and logic, a corollary ( , ) is a theorem of less importance which can be readily deduced from a previous, more notable statement. A corollary could, for instance, be a proposition which is incidentally proved while proving another ...
of the theorem is that if for a language L the relation \sim_L has infinitely many equivalence classes, it is 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. Here: Sect. 1.5, p.35-36.


See also

*
Pumping lemma for regular languages In the theory of formal languages, the pumping lemma for regular languages is a Lemma (mathematics), lemma that describes an essential property of all regular languages. Informally, it says that all sufficiently long string (computer science), st ...
, 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 In mathematics and computer science, the syntactic monoid M(L) of a formal language L is the minimal monoid that recognizes the language L. By the Myhill–Nerode theorem, the syntactic monoid is unique up to unique isomorphism. Syntactic quot ...


References

*. *. *. ASTIA Document No. AD 155741. *.


Further reading

* {{DEFAULTSORT:Myhill-Nerode theorem Formal languages Theorems in discrete mathematics Finite-state machines