Open In App
Related Articles

GATE | GATE MOCK 2017 | Question 55

Improve Article
Save Article
Like Article

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

Last Updated : 28 Jun, 2021
Like Article
Save Article
Similar Reads