What is the regular expression for the following grammar. S→aAb | bAa A→ aAa |…

What is the regular expression for the following grammar.

S→aAb | bAa

A→ aAa | aAb | bAb | bAa | 𝜀

  1. A.

    a((a+b)(a+b))*b + b((a+b)(a+b))*a

  2. B.

    a(aa+bb)*b + b(ab+ba)*a

  3. C.

    a(a+b)*b + b(a+b)*a

  4. D.

    (a + b)*

Attempted by 100 students.

Sign up free to check your answer

Sign up free

Explore the full course: Theory Of Computation

Loading lesson…