edited by
14,980 views
45 45 votes

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?

  1. Set of all strings that do not end with $ab$
  2. Set of all strings that begin with either an $a$ or $a \ b$
  3. Set of all strings that do not contain the substring $ab$,
  4. The set described by the regular expression $b^*aa^*(ba)^*b^*$

5 Answers

Best answer
52 52 votes

Above DFA is for regular expression $(a+b)^*ab$. All strings end with $ab$. 

Complement of DFA accepts all strings does not end with $ab$. 

DFA(L') is:

B. String begin with either $a$ or $b$.

$ab$ (string start with $a$) doesn't accept in it reach to nonfinal state $q_2$.

$bab$ (string start with $b$) doesn't accept in it reach to nonfinal state $q_2$.

C. Set of strings that do not contain the substring $ab$ 

$aba$ (have substring $ab$) does accept in it reach to final state $q1$.

D. The set described by the regular expression $b^*aa^*(ba)^*b^*$

$b$ is string accepted by DFA(L') but above regular expression cannot derive it.

Option A is correct.

DFA (L') accepts all strings that doesn't end with $ab$. 

edited by
1 1 vote

 


Option B: abab is not accepted by given RE.
Option C: aba is accepted by given RE.
Option D: ab is not accepetd by RE and it belongs to b*aa*(ba)*b*.

0 0 votes
Complementing DFA gives the complement of a language shown by a DFA. So directly complementing a DFA gives the complement of the language.

Whereas complementing NFA does not mean we get the language complement as NFA moves are not deterministic a single move can be defined for more than 1 state. So for NFA complementation first understood the language shown by it and then complement the language or convert it to DFA and then say the complement directly.

 

Here the state automata is given as DFA which means complementing it would directly give the complement of the language.

So the given DFA accepts every string that ends with ab. Complement is every string acceptance that do not end with ab.
Answer:
Position:
Show:

Related questions

69 69 votes
8 answers 8 answers
22.8k
22.8k views
Ishrat Jahan asked Oct 28, 2014
22,786 views
Consider the following two finite automata. $M_1$ accepts $L_1$ and $M_2$ accepts $L_2$.$M_1$$M_2$ Which one of the following is TRUE?$L_1 = L_2$$L_1 \subset L_2$$L_1 \ca...
40 40 votes
5 answers 5 answers
16.6k
16.6k views
Ishrat Jahan asked Oct 27, 2014
16,566 views
Let $N$ be an NFA with $n$ states and let $M$ be the minimized DFA with m states recogniz­ing the same language. Which of the following in NECESSARILY true?$m \leq 2^n$$n...
36 36 votes
5 answers 5 answers
13.4k
13.4k views
Ishrat Jahan asked Oct 28, 2014
13,413 views
Which of the following languages is (are) non-regular?$L_1 = \{0^m1^n \mid 0 \leq m \leq n \leq 10000\}$$L_2 = \{w \mid w $ reads the same forward and backward$\}$$L_3 = ...
58 58 votes
7 answers 7 answers
22.4k
22.4k views
Ishrat Jahan asked Oct 28, 2014
22,444 views
Consider a CFG with the following productions.$S \to AA \mid B$$A \to 0A \mid A0 \mid 1$$B \to 0B00 \mid 1$$S$ is the start symbol, $A$ and $B$ are non-terminals and 0 an...