Skip to content
Related Articles

Related Articles

Improve Article
GATE | GATE-CS-2005 | Question 59
  • Difficulty Level : Easy
  • Last Updated : 23 Dec, 2019

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

Attention reader! Don’t stop learning now. Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :