Nerode relation

from Wikipedia, the free encyclopedia

The Nerode relation (also: Nerode congruence or Nerode legal congruence ) is an equivalence relation on the prefixes of a formal language that is examined in theoretical computer science .

It is named after Anil Nerode .

definition

Given a language above the alphabet . The Nerode relation (also if it becomes clear from the context) is defined by:

With regard to the Nerode relation, two words are equivalent to one another if and only if they are both supplemented by exactly the same suffixes to words of the language .
Colloquially: two words are then rel. the Nerode relation equivalent to each other if they “behave the same way” to arbitrary suffixes to words , d. i.e., both words are in the language or not.

So formally applies to all :

Equivalence class

The equivalence class of a with respect to the Nerode relation is defined as the set of all words which are equivalent to with respect to the Nerode relation . The following applies:

index

The index of a Nerode relation is the number of existing equivalence classes.

example

The language defined by the regular expression is given above the alphabet . This language induces exactly three equivalence classes:

  • , contains all prefixes that consist of sequences of zeros or the empty word (i.e. ).
  • , consists of words that start with 0s or and end with 1s (i.e. )
  • which consists of all illegal prefixes ; these are all words that contain 10 (so ).

Further examples can be found in the article on the Myhill-Nerode theorem .

application

The Nerode relation forms the starting point for the Myhill-Nerode theorem, which can be used to determine whether a language is regular or not. The theorem says that a language is regular if and only if there are finitely many equivalence classes with respect to the Nerode relation.

The relation is also used to construct a minimal deterministic finite automaton for a given regular language , i.e. an automaton that has as few states as possible. The automaton constructed in this way contains exactly states. States can arise that cannot be reached from the start state; after this has been removed, the automaton actually has the minimum number of states.

Individual evidence

  1. Uwe Schöning : Theoretical Computer Science - in brief . 5th edition. Spektrum Akademischer Verlag, Heidelberg 2008, ISBN 978-3-8274-1824-1 , p. 34 .