edited by
407 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

225
views
1 answers
1 votes
Bikram asked May 14, 2017
225 views
Which of the following regular expressions describes the same set of strings as $\left ( a^*+b \right )^*$ $\left ( c+d \right )$? $a^{\ast }\left ( c+d \right )^{\ast...
411
views
1 answers
2 votes
Bikram asked May 14, 2017
411 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^...
509
views
0 answers
2 votes
Bikram asked May 14, 2017
509 views
Let $DM$ be a single-tape, Deterministic Turing machine with tape alphabet $\left \{ blank,0,1 \right \}$, and let $C_i$ denote the (possibly infinite) computation of $DM...
729
views
1 answers
4 votes
Bikram asked May 14, 2017
729 views
Consider the languages $A$ and $B$, each over the alphabet set $\left \{ a,b \right \}$.Here, $B=\{ w \mid w$ contains some $x \in A$ as a sub-string $\}.$Which of the f...