This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Problem Set 4 Fall 09 Due: Thursday Nov 5 at 11:00 AM in class (i.e., Room 103 Talbot Lab) Please follow the homework format guidelines posted on the class web page: http://www.cs.uiuc.edu/class/fa09/cs373/ 1. [ Points : 10] Suppose G is a CFG with p rules and the body of each rule is not longer than n (Note: the rule S → aSbSA has a body length of 5). If we can derive ε from nonterminal S , then prove that we can derive it from S in no more than n p 1 n 1 steps. 2. [ Points : 10] (a) Prove that this language is not context free: L = { a i b j c max( i,j )  i,j ≥ } (b) Prove that context free languages are not closed under the operator max , as de ned below: max( A ) = { w ∈ A  if wx ∈ A for some string x , then x = ε } . Hint: part(a) might be useful. 3. [ Points : 10] Describe an algorithm that given a grammar G determines whether L ( G ) has at least 373 strings or not. 4. [ Points : 10] Given a grammar G in Chomsky normal form: (a) Design an algorithm (via modifying the CYK algorithm) that for any given number...
View
Full Document
 Spring '08
 Campbell
 Formal language, Contextfree grammar, queue automaton, twostack PDA

Click to edit the document details