in Theory of Computation edited by
8,924 views
35 votes
35 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^*$
in Theory of Computation edited by
8.9k views

4 Comments

@Abhrajyoti00 in (a+b)*(a+bb) epsilon will not be generated as epsilon also not end with ab.

0
0

@Abhrajyoti00 your Regex wont accept $e, b$ but it should accept it.

0
0
What is the regular expression for the new DFA ?
0
0

4 Answers

45 votes
45 votes
Best answer

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

4 Comments

 @Praveen Saini option b says begin with ab not b!

1
1

begin with either an a or a b.

1
1
edited by

$DFA$ given in question produces all strings ending with $ab$ 

Regex -  $(a+b)^*ab$.

0
0
1 vote
1 vote
A option
by

3 Comments

i think d
0
0
Option d also accepts string 'a' but the automata in the figure does not.
1
1
ohh yes..:)
0
0
1 vote
1 vote
L={ENDS WITH ab };

L"={ DOES NOT ENDS WITH ab };

THAT MEANS OPTION (A)
1 vote
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*.

Answer:

Related questions