Computer Science EngineeringHard

Which regular expression over {a, b} is equivalent to (a+b)*?

  1. A. (a*b*)*
  2. B. a*b*
  3. C. (ab)*
  4. D. a* + b*

Correct answer: A. (a*b*)*

(a*b*)* can generate every string, since any sequence of letters is a sequence of runs of a's and b's.

More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions

Exams that ask this topic