edited by
588 views
2 votes
2 votes

Identify the Regular Expression among the following which denotes ALL strings of $a$'s and $b$'s, where each string contains at least $2$ $b$'s:

  1. $(a+b)^*ba^*b$
  2. $(a+b)^*ba^*ba$
  3. $(a+b)^*ba^*b(a+b)^*$
  4. $(a+b)^*ab^*ab$
edited by

2 Answers

Best answer
2 votes
2 votes

(C) is correct answer because it can generate required language, every string which belongs to (a+b)* and contains at least 2 b's.

selected by
2 votes
2 votes

Contain at least 2b

option(A):All string must end with b.

option(B) :All string must end with a.

option(D) :All string must end with b.

But our condition is that it must contain at least 2b which may end with a or b.So a,b,d eliminated.

at least 2b i.e may start with a or b i.e (a+b)*

then our condition two bb and it may contain a in between so (a+b)*ba*b

and it may end with a or b that lead to (a+b)*ba*b(a+b)*

So Option C is answer.

edited by
Answer:

Related questions

6 votes
6 votes
2 answers
1
Bikram asked Nov 26, 2016
1,262 views
Given a regular grammar $G_1$ and a context free grammar $G_2$, the problem of deciding if $L(G_1)$ is a proper subset of $L(G_2)$ is:DecidableUndecidable but semi-decida...
0 votes
0 votes
1 answer
2
Bikram asked Nov 26, 2016
318 views
$G1$ and $G2$ are regular grammars and the language generated by any grammar $G$ is represented by $L(G)$. In this case, $L(G1) \cap L(G2) = \phi$ is a/an:Decidable prob...
0 votes
0 votes
1 answer
3
Bikram asked Nov 26, 2016
229 views
Recursive Enumerable Languages are NOT closed under :UnionIntersectionComplementHomomorphism
0 votes
0 votes
1 answer
4