This preview shows pages 1–2. 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: Problem Set 3 Fall 09 Due: Thursday Oct 22 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. CFG construction. [ Points : 30] Construct CFGs for the following languages. Give a brief explanation of how your grammar works and what each nonterminal stands for. A = { a i b j  i 6 = j } B = { a i b j c k  i j or j k } C = { x { , 1 } *  x is not of the form ww } D = { x { a,b } *  x contains twice as many a 's than b 's } E = { x { a,b } *  x is not a palindrome and  x  is even } F = { a i b j  2 i + 3 j 4 i + 5 } 2. CFG interpretation. [ Points : 15] What is the language of the following CFG? Justify your answer. S A 1 B A A  B B  1 B  3. Proof. [ Points : 30] Consider the contextfree grammar: S S 1 S  1 S S  Describe L ( G ) in English, and prove that your answer is correct, i.e. G generates all strings you've described and only those strings.described and only those strings....
View
Full
Document
This note was uploaded on 11/15/2010 for the course CS 241 taught by Professor Campbell during the Spring '08 term at University of Illinois, Urbana Champaign.
 Spring '08
 Campbell

Click to edit the document details