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: CS 381 Homework 6 Solutions 1. L = L0 ∩ L1 = { w#w(0 + 1)#  w (0 + 1) * } Describe the set L * ∩ 0#L*(0+1) * : L * ∩ 0#L * (0+1) * is the set { 0 # w # w 1 # w 2 # … # w 2n # , where w = 0(0+1), w n = w n1 (0+1), and n>=0 } This is another alternating blocks problem. Each block forces the next block to equal w(0+1), and the string must start with 0# due to the right side of the intersection. Modify the set so that it has an odd number of blocks: L * (0 + 1) * # ∩ 0#L * Since each instance of L has 2 blocks, this set is guarenteed to have an odd number of blocks. CS381, Homework #6 Solutions Question 4.1.1 Prove that the language of balanced parenthesis is not regular Proof by the Pumping Lemma: Suppose we select w from L such that w = ( n ) n where n is the n from the pumping lemma. Now we know that xy can only contain opening parenthesis since  xy  ≤ n . When we pump on this string its easy to see that we will only increase the number of open ing parenthesis, and since the pumped string contains a different number of...
View
Full
Document
This homework help was uploaded on 09/28/2007 for the course COM S 381 taught by Professor Hopcroft during the Fall '05 term at Cornell University (Engineering School).
 Fall '05
 HOPCROFT
 Formal languages, Regular expression, Regular language, Pumping lemma for regular languages

Click to edit the document details