Regular Language - The Number of Words in A Regular Language

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:

    Cole’s Hill was the scene of the secret night burials of those who died during the first year of the settlement. Corn was planted over their graves so that the Indians should not know how many of their number had perished.
    —For the State of Massachusetts, U.S. public relief program (1935-1943)

    Of all the words mentioned in language, there is not one that I hate more than the word “right.” Is it your right that your field prospers? That you don’t drop dead this very instant? Are living and breathing your right? As far as I can see, nothing but grace and blessing fill the universe, and these worms talk about right?
    Franz Grillparzer (1791–1872)

    A regular council was held with the Indians, who had come in on their ponies, and speeches were made on both sides through an interpreter, quite in the described mode,—the Indians, as usual, having the advantage in point of truth and earnestness, and therefore of eloquence. The most prominent chief was named Little Crow. They were quite dissatisfied with the white man’s treatment of them, and probably have reason to be so.
    Henry David Thoreau (1817–1862)

    Any language is necessarily a finite system applied with different degrees of creativity to an infinite variety of situations, and most of the words and phrases we use are “prefabricated” in the sense that we don’t coin new ones every time we speak.
    David Lodge (b. 1935)