edited by
359 views
0 votes
0 votes

Which of the following languages over the alphabet set $\{ a, b \}$ is described by the regular expression

$a^\ast b$(aa)$^\ast b$ ?

  1. The set of all strings containing exactly two $b’s$.
  2. The set of all strings having even number of $a's$ between exactly two $b’s$ and ending with $‘b’$.
  3. The set of all strings ending with $‘b’$.
  4. The set of all strings having sub sequence $bb$.
edited by

1 Answer

Best answer
3 votes
3 votes

$a$*$b$$\left ( aa \right )$*$b$  

Best statement that says about this regular expression is the set of all strings having an even number of a's between exactly two b’s and ending with ‘b’.

option A: The set of all strings containing exactly two $b’s$.(False)

for eg: $\left \{ abb, abbbb, ababab..... \right \}$ these all strings are not accepted by given a regular expression

option C:  The set of all strings ending with ‘$b$’. (False)

for eg: $\left \{ abb, abbbb, ababab..... \right \}$ these all strings are not accepted by given regular expression

option D: The set of all strings having sub sequence $bb$.(False)

for Eg: $\left \{ abab, abbaaaa, aaaabaaaab..... \right \}$ these all strings having subsequence bb but not taken as granted by given regular expression...

option $B$ is answer...

edited by
Answer:

Related questions

2 votes
2 votes
1 answer
2
Bikram asked May 14, 2017
366 views
If $L$ is the set of all strings over $\{ x,y\}$ containing at least one $x$, then which of the following regular expressions does not generate $L$?$(x+y)^* x(y+y)^*$$y^...