Deciding Whether A Language Is Regular
To locate the regular languages in the Chomsky hierarchy, one notices that every regular language is context-free. The converse is not true: for example the language consisting of all strings having the same number of a's as b's is context-free but not regular. To prove that a language such as this is regular, one often uses the Myhill–Nerode theorem or the pumping lemma among other methods.
There are two purely algebraic approaches to define regular languages. If:
- Σ is a finite alphabet,
- Σ* denotes the free monoid over Σ consisting of all strings over Σ,
- f : Σ* → M is a monoid homomorphism where M is a finite monoid,
- S is a subset of M
then the set is regular. Every regular language arises in this fashion.
If L is any subset of Σ*, one defines an equivalence relation ~ (called the syntactic relation) on Σ* as follows: u ~ v is defined to mean
- uw ∈ L if and only if vw ∈ L for all w ∈ Σ*
The language L is regular if and only if the number of equivalence classes of ~ is finite (A proof of this is provided in the article on the syntactic monoid). When a language is regular, then the number of equivalence classes is equal to the number of states of the minimal deterministic finite automaton accepting L.
A similar set of statements can be formulated for a monoid . In this case, equivalence over M leads to the concept of a recognizable language.
Read more about this topic: Regular Language
Famous quotes containing the words deciding, language and/or regular:
“If mothers are to be successful in achieving their child-rearing goals, they must have the inner freedom to find their own value system and within that system to find what is acceptable to them and what is not. This means leaving behind the anxiety, but also the security, of simplistic good-bad formulations and deciding for themselves what they want to teach their children.”
—Elaine Heffner (20th century)
“Public speaking is done in the public tongue, the national or tribal language; and the language of our tribe is the mens language. Of course women learn it. Were not dumb. If you can tell Margaret Thatcher from Ronald Reagan, or Indira Gandhi from General Somoza, by anything they say, tell me how. This is a mans world, so it talks a mans language.”
—Ursula K. Le Guin (b. 1929)
“They were regular in being gay, they learned little things that are things in being gay, they learned many little things that are things in being gay, they were gay every day, they were regular, they were gay, they were gay the same length of time every day, they were gay, they were quite regularly gay.”
—Gertrude Stein (18741946)