Skip to content
Related Articles
Open in App
Not now

Related Articles

GATE | GATE-CS-2005 | Question 59

Improve Article
Save Article
  • Difficulty Level : Easy
  • Last Updated : 15 Sep, 2021
Improve Article
Save Article

Consider the grammar

E → E + n | E × n | n 

For a sentence n + n × n, the handles in the right-sentential form of the reduction are
(A) n, E + n and E + n × n
(B) n, E + n and E + E × n
(C) n, n + n and n + n × n
(D) n, E + n and E × n


Answer: (D)

Explanation:

E → E * n       {Applying E → E * n } 
  → E + n * n   {Applying E → E + n } 
  → n + n * n   {Applying E → n } 

Hence, the handles in right sentential form is n, E + n and E × n.



Quiz of this Question

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!