sol02 - CS 154 Intro. to Automata and Complexity Theory...

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 154 Intro. to Automata and Complexity Theory Handout 12 Autumn 2008 David Dill October 13, 2009 Solution Set 2 1 Problem 1 L ( M ) = ( ab ) c Problem 2 a. L 1 = { w | w contains twice as many 1s as 0s } is not regular. Pumping Lemma: Proof Assume L 1 is regular and apply the Pumping Lemma. By P.L. there exists some pumping constant n > 0. We choose w = 0 n 1 2 n , which is in L 2 and satisfies | w | n . By P.L. w = xyz such that | xy | n and y negationslash = . Note that the first condition implies that both x and y contain only 0s. Let | x | = a and | y | = b , the second condition implies b > 0. We choose k = 0: xz L 1 by P.L., but xz = 0 n b 1 2 n which is not in L 1 since b negationslash = 0. Thus we get a contradiction, which implies our initial assumption was wrong. We conclude that L 1 is not regular. Closure Properties: Proof Suppose L 1 were regular. Define h : { , 1 } { , 1 } so that h (0) = 0 and h (1) = 11. Then { i 1 i | i } = h 1 [ L 1 L (0 1 )]. To see this, we show that w { i 1 i | i } iff h ( w ) h 1 [ L 1 L (0 1 )]. If w { i 1 i | i } , it is obvious that h ( w ) L 1 L (0 1 ). If w negationslash { i 1 i | i } , then it must either have different numbers of 0s and 1s, in which case h ( w ) will not have twice as many 1s and 0s as required to be in L 1 , or w has a 1 before a 0, in which case h ( w ) will have the same property and will not be a member of L (0 1 ).) Since the regular languages are closed under inverse homomorphisms, { i 1 i | i } would be regular, but it is known not to be. Therefore, L 1 must not be regular.must not be regular....
View Full Document

This note was uploaded on 01/12/2010 for the course CS 154 at Stanford.

Page1 / 4

sol02 - CS 154 Intro. to Automata and Complexity Theory...

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