Some decision properties of Regular Languages
Print this page
First   |   Last   |   Prev   |   Next
  • Simulate the DFA on input w
  • If the DFA ends in an accepting state, the answer is “yes”. Otherwise, the answer is “no”.

The algorithm is very efficient and it can easily be verified that it takes linear time on the length of the input w

If L is given as an NFA , we can first convert it to an equivalent DFA and than use the above algorithm to find the answer. This is not efficient, since the conversion algorithm from NFA to DFA (by using subset constructions) is expensive.

Similarly, if L is expressed by using a regular expression, we can first convert it to an NFA and than use the above algorithm. We see that this is also an expensive method.

We will consider some more decision problems related to regular languages as given below.

  • Given a FA M , is L(M) empty?
  • Given a FAM, is L(M) infinite?
  • Given two FA s M1 and M2 , do they accept the same language? That is, whether L(M1)=L(M2)?

The list is not extensive. We will consider decision algorithm for the above mentioned problem only.

First   |   Last   |   Prev   |   Next