This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: u,v,w,x,y , such that vx 6 = ; and uv i wx i y belongs to L ( G ) for all i 0. answer: An easy way to get such a string is to draw a derivation tree that repeats a variable along a path from the root. Then see what happens to the string when the derivation tree rooted at the lower of the repeated variables is exchanged for the derivation tree rooted at the higher one. This is how I got the following u = v = ad w = b x = da w = a i.e. ( ad ) i b ( da ) i a L ( G ) for all i . 8. For the following grammar, write an equivalent grammar that is not leftrecursive. S SS + AA A Ab + a B BS + 9. Construct a PDA for the language L = {  #( w ) a 1 mod 3 } { a n b n  n } . answer: The straightforward construction yields a machine with 4 states....
View
Full
Document
This note was uploaded on 06/09/2011 for the course COT 4210 taught by Professor Staff during the Spring '08 term at University of Central Florida.
 Spring '08
 Staff
 Computer Science

Click to edit the document details