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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
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

Post by answerhappygod »

 1
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 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]
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply