Multiple choice

Consider the grammar: G1=({S,S1,S2},{a,b},S,P), with the following productions: P:S → S1bc,S1→ S1bc|S2,S2 →b Give the regular language for the above.

  1. L(((bc*)c))

  2. L((bc(b+bc)*(c+cc))

  3. L(bbc(bc)*)

  4. L(b+bc*c)bc*c(c+b)

  5. L(bcb*(b+c)bcc*)

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Replacing the first production with S1→ S1bc, and we can keep doing this again and again. after some repetitive steps will get S→S2bcbcbcbc Finally will replace S2 with S2 →b; and will get bbc(bc)*