Search code examples
regular-languagefinite-automataautomataformal-languagesautomata-theory

Finiteness of Regular Language


We all know that (a + b)* is a regular language for containing only symbols a and b. But (a + b)* is a string of infinite length and it is regular as we can build a finite automata, so it should be finite.

Can anyone please explain this?


Solution

  • Finite automaton can be constructed for any regular language, and regular language can be a finite or an infinite set. Of-course there are infinite sets those are not regular sets. Check the Venn diagram below:

    See venn-diagram
    Notes:
         1. every finite set is a regular set.
         2. any dfa for an infinite set will always contains loop (or dfa without loop is not possible for infinite set).
         3. every non-regular language is an infinite set.

    The word "finite" in finite automata significance the presence of 'finite amount of memory' in automata for the class of regular languages, hence only 'finite' (or says bounded) amount of information can be stored at any instance of time while processing a string of language.

    In finite automata, memory is present in the form of states only (whereas in the other class of automata like Pda, Turing Machines external memory are used to store unbounded information). You can think a finite automata as a CPU without explicit memory; that can only store recent results in its registers.

    So, we can define "regular language" as — a class of languages for which only bounded (finite) information is required to stored at any instance of time while processing language strings.

    Further read (for infinite languages):