Page 1 of 1

Consider the following context-free grammar G on the alphabet Σ = {a, b} ⇒S XX XaXa | bXb | a | b | e (a) Show that the

Posted: Mon Jul 11, 2022 9:51 am
by answerhappygod
 1
1 (20.78 KiB) Viewed 41 times
Consider the following context-free grammar G on the alphabet Σ = {a, b} ⇒S XX XaXa | bXb | a | b | e (a) Show that the grammar G is ambiguous. [7 marks] (b) A student is in the process of transforming G into Chomsky Normal Form and has reached the following: ⇒ So S X U V B S XX AU | BV | a | b | e = XA a XB b The student's next step is to remove the rule X = E. Give the grammar that results from this step. [8 marks]