Write the grammar for the regular expression a*b*

Write the grammar for the regular expression a*b*


  1. A.

     S → AB, A → aA | bB | ϵ, B → bB |aA | ϵ


  2. B.

    S→ AB, A → aA | ϵ, B → bB | ϵ


  3. C.

     S → ab | ϵ, A → aA | ϵ, B → bB | ϵ


  4. D.

    None of these

Attempted by 146 students.

Sign up free to check your answer

Sign up free

Explore the full course: Theory Of Computation

Loading lesson…