Q41: Yet another DFA

Question #41: What is the language of the DFA below?

DFA2

 

Options:

  1. L = {w | w has an even number of b’s and each a is followed by at least one b}
  2. L = {w | w has an even number of a’s and each b is followed by at least one a}
  3. L = {w | w has an even number of b’s and each b is followed by at least one a}
  4. L = {w | w has an even number of a’s and each a is followed by at least one b}

Solution:

1C and 2C are dead states because once we go them, we can never reach final state. After every transaction of a, we have at least one transition of b, hence each a is followed by at least one b. Also, we have even number of a’s to reach to final state. Hence, the correct answer is option 4.

Leave a comment