retagged by
3,497 views
0 votes
0 votes

Which regular expression best describes the language accepted by the non-deterministic automaton below?

download (7)

 
(A) (a + b)* a(a + b)b
(B) (abb)*
(C) (a + b)* a(a + b)* b(a + b)*
(D) (a + b)*


Answer: (A) 

DOUBT-  above given DFA can accept string (aaab) but the expression in option A can not accept aab. therefore, A is wrong answer, then what is correct answer?

retagged by

1 Answer

0 votes
0 votes

To approach such answers we have to always find smallest possible string accepted by language

it is aab or abb

Now we have to see state characteristic

so at initial state a string starting with b will remain in initial state if string starts with a then it has two options either go ahead or remain in same state

so (a+b)* a ..1

second state either a comes or b comes it advances to next state

so (a+b)  ...1

at third state string should have b else it will be in dead end so

b  ...1

once reached final state nothing should be accepted or string should terminate

so we but this up we have (a+b)*a(a+b)b

it contains both smallest possible string aab as well as abb

Another approach is eliminating options

in option B smallest possible string is $\epsilon$ which is not accepted so false

in option C smallest possible string is b which is also not accepted so false

in option D smallest possible string is $\epsilon$ which is not accepted so false

First of all its NFA so it has choice at initial step both aaab and aab is generated by option A and accepted by NFA also

Related questions

1 votes
1 votes
0 answers
2
Ashish Roy 1 asked Mar 16, 2019
1,684 views
In the above 4 Statements which would print 123 as output ? Explain also.
3 votes
3 votes
2 answers
3