| Some decision properties of Regular Languages | |||
| 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)
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. |
|||