This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: G ABCD How short can the final derived terminal string be? Why? 7) (S10) A path in a parse tree has length x if it contains x variable nodes . Consider a parse tree T for a string x and a CNF grammar G with m variables. Suppose the longest path in T has length k. How long can this string x be? Suppose string x has length 2 m . How short can the longest path in T be? Take home review questions 1) What is a nullable variable? 2) How can we transform the following production so it fits CNF? S → AbCD where A, C, and D are variables and b is a terminal character....
View Full Document
- Fall '07
- Longest Path, Zürich Hauptbahnhof, parse tree, Zürich Stadelhofen, CNF grammar, final derived terminal