in Theory of Computation retagged by
1,880 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^*)$
in Theory of Computation retagged by
by
1.9k views

3 Comments

B is the correct answer.
0
0
B is correct
0
0
B is the correct one
0
0

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