This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Homework 4 CISC 303 Timo Ktzing (tkoe@udel.edu) Handed out: Friday, March 6. Due Date: Friday, March 13. Problem 1. (8 points) Give a regular expression for the following languages. (i) L = { w { a,b } *  the second to last symbol of w is a } ; (ii) L 1 = { w { a } *   w  is divisible by 3 or by 5 } ; (iii) L 2 = { a n  n } { ( ba ) n  n } ; (iv) The language introduced in Homework Set 2, Problem 3 ( oating point numbers). Problem 2. (8 points) Transform the following regular expressions into NFAs, using the algorithm from class. (i) ( bb ) *  bb ; (ii) ( aba ) * ba ; (iii) a * ( bb  ab  ba ) aa . Problem 3. (8 points) Let A = { c,d } * and L = { w A *  w contains the same number of c s and d s } . Claim: L is not regular. Proof: Suppose, by way of contradiction, L is regular. L ( c * d * ) is regular, so L L ( c * d * ) is regular as it is the intersection of two regular languages. But L L ( c * d * ) = { c n d n  n } is not regular as shown in class (just with...
View
Full
Document
 Spring '08
 Carberry,M

Click to edit the document details