retagged by
2,372 views
2 votes
2 votes

Which of the following regular expressions denotes a language comprising all possible strings over the alphabet $\{a,b\}$?

  1. $a^*b^*$
  2. $(a\mid b)^*$
  3. $(ab)^+$
  4. $(a\mid b^*)$
retagged by

2 Answers

3 votes
3 votes
(A) does not generate strings like $bbabab,bababa,baaab$ etc. which are also possible strings of the given alphabet

(B)- is the answer, it generates all possible strings over the given alphabet.

(C)-does not generate epsilon.

(D)-does not generate strings like $aa,aaaa,aabb$  etc. which are also possible strings of the given alphabet.
0 votes
0 votes
As we look for the options we can easily guess that the answer will be all combinations of a and b hence the answer is (a|b)*
Answer:

Related questions

1 votes
1 votes
2 answers
1
admin asked Mar 31, 2020
1,706 views
If there is in NP-Complete language L whose complement is in NP, then complement of any language in NP is inPNPboth (A) and (B)None of these
2 votes
2 votes
4 answers
3
admin asked Mar 31, 2020
935 views
If $L_1$ and $L_2$ are context free language and $R$ a regular set, then which one of the languages below is not necessarily a context free language?$L_1L_2$$L_1\cap L_2$...
4 votes
4 votes
4 answers
4