- 1 (20.78 KiB) Viewed 40 times
Consider the following context-free grammar G on the alphabet Σ = {a, b} ⇒S XX XaXa | bXb | a | b | e (a) Show that the
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Consider the following context-free grammar G on the alphabet Σ = {a, b} ⇒S XX XaXa | bXb | a | b | e (a) Show that the
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]