If the final states and non-final states in the DFA below are interchanged,…

2008

If the final states and non-final states in the DFA below are interchanged, then which of the following languages over the alphabet {a,b} will be accepted by the new DFA?

image.png

  1. A.

    Set of all strings that do not end with ab

  2. B.

    Set of all strings that begin with either an a or a b

  3. C.

    Set of all strings that do not contain the substring ab,

  4. D.

    The set described by the regular expression b*aa*(ba)*b*

Attempted by 46 students.

Show answer & explanation

Correct answer: A

The new DFA, with final and non-final states interchanged, accepts the complement of the original language. The original DFA appears to accept strings that end with 'ab'. Therefore, the new DFA accepts all strings over {a,b} that do not end with 'ab'.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir