Share on Facebook Share on Twitter Email
Answers.com

Myhill–Nerode theorem

 
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. It is almost exclusively used in order to prove that a given language is not regular.

The theorem is named for John Myhill and Anil Nerode, who proved it at the University of Chicago in 1958.[1]

Contents

Statement of theorem

Given a language L, define a relation RL on strings by the rule x RL y if there is no distinguishing extension z with the property that exactly one of the strings xz and yz is in L. 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 the number of states in the smallest deterministic finite automaton (DFA) accepting 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.

Use and consequences

A consequence of the Myhill–Nerode theorem is that a language L is regular if and only if the number of equivalence classes of RL is finite.

For example, the language consisting of binary numbers which can be divided by 3 is regular. Given the empty string, 00/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 the equivalence classes.

The immediate corollary 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 non-regular.

See also

Notes

  1. ^ A. Nerode, "Linear automaton transformations", Proceedings of the AMS, 9 (1958) pp 541-544.

References


Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
 
 

 

Copyrights:

Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "Myhill–Nerode theorem" Read more