GATE 1995
February 3, 2024
Question 10087 –
February 3, 2024
GATE 1995
February 3, 2024
Question 10087 –
February 3, 2024

Question 10086 –

Consider the grammar

   S → bSe
   S → PQR
   P → bPc
   P → ε
   Q → cQd
   Q → ε
   R → dRe
   R → ε  

where S,P,Q,R are non-terminal symbols with S being the start symbol; b,c,d,e are terminal symbols and ‘ε’ is the empty string. This grammar generates strings of the form bi, cj, dk, em for some i,j,k,m ≥ 0.
(a) What is the condition on the values of i,j,k,m?

(b) Find the smallest string that has two parse trees.

Correct Answer: A

A
Theory Explanation.

Leave a Reply

Your email address will not be published. Required fields are marked *