Some decision properties of Regular Languages
Print this page
First   |   Last   |   Prev   |   Next
              

                

So, clearly, starting at , than following the cycle infinitely many times, the DFA can accept infinitely many strings.

Hence, L(M) is infinite.

It is a well-known fact that there exists efficient algorithm to detect a cycle in directed graph. From the above, we have the following efficient algorithm to decide infiniteness of L(M).

  • Delete all states not reachable from the start state and delete all states that cannot lead to an accept state ( DFS can be used for this).
  • If there is a cycle, then L(M) is infinite. Otherwise, L(M) is finite.
First   |   Last   |   Prev   |   Next