381hw6solns - 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 …

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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 n-1 (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).

Page1 / 5

381hw6solns - 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 …

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online