Skip to content
Related Articles

Related Articles

GATE | GATE MOCK 2017 | Question 55

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 28 Jun, 2021

Let G be the CFG, l be the number of left most derivations, r be the number of right most derivations and P be the number of parse trees. Assume l , r and P are computed for a particular string. For a given CFG ‘G’ and given string ‘w’, what is the relation between l , P , r ?

(A) l ≤ P ≥ r
(B) l = P = r
(C) l ≥ P ≤ r
(D) none of these

Answer: (B)


For any particular string :
# parse tree = # LMD’s = # RMD’s

Therefore l = P = r.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!