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

233
views
1 answers
1 votes
Bikram asked May 14, 2017
233 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 )+ b^{\ast }\left ( c+d \right )$
424
views
1 answers
2 votes
Bikram asked May 14, 2017
424 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^*x ( x+y)^*$( x+y)^* x$( x+y)^* xy^*$
524
views
0 answers
2 votes
Bikram asked May 14, 2017
524 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) ... during the computation $C_i.$III onlyI and III onlyII and III onlyI, II, and III
755
views
1 answers
4 votes
Bikram asked May 14, 2017
755 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 $\}.$ ... $B$ is context-free. II only II and III I and III only I, II and III