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

Once again, we observe that the algorithm is highly inefficient (i.e. experimental)

But, efficient algorithms exists to decide these problem. We know that a DFA can be represented by a directed graph and for a DFA to accept a string there must exist a path from the start state to any final state. Using this fact, we have the following efficient algorithm to decide emptiness. (Assume, DFA M is given as a directed graph)

  • Do DFA from the start state q0
  • If any of the final state is reachable from the start state q0 , than L(M) is nonempty. Otherwise, L(M) is empty

We now consider an efficient algorithm to determine whether L(M) is infinite.

We know that all the states which are not reachable from q0 can be detected (along with the associated transition) without changing the accepted language.

Similarly, the accepted language does not change if all the states that cannot lead to an accepting state (also called ‘trap' states) are detected.

First   |   Last   |   Prev   |   Next