The Number of Words in A Regular Language
Let denote the number of words of length in . The ordinary generating function for L is the formal power series
The generating function of a language L is a rational function if and only if L is regular. Hence for any infinite regular language there exist constants and polynomials such that for every the number of words of length in satisfies the equation .
Thus, non-regularity of certain infinite languages can be proved by counting the words of a given length in . Consider, for example, the Dyck language of strings of balanced parentheses. The number of words of length in the Dyck language is equal to the Catalan number, which is not of the form, witnessing the non-regularity of the Dyck language.
The zeta function of a language L is
The zeta function of a regular language is not in general rational, but that of a cyclic language is.
Read more about this topic: Regular Language
Famous quotes containing the words number, words, regular and/or language:
“I happen to feel that the degree of a persons intelligence is directly reflected by the number of conflicting attitudes she can bring to bear on the same topic.”
—Lisa Alther (b. 1944)
“Nor for my words shall ye forget your tears,
Or hope again for aught that I can say,
The idle singer of an empty day.”
—William Morris (18341896)
“[I]n our country economy, letter writing is an hors doeuvre. It is no part of the regular routine of the day.”
—Thomas Jefferson (17431826)
“Upon my tongues continual slanders ride,
The which in every language I pronounce,
Stuffing the ears of men with false reports.”
—William Shakespeare (15641616)