{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

sol02

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

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

CS 154 Intro. to Automata and Complexity Theory Handout 12 Autumn 2008 David Dill October 13, 2009 Solution Set 2 1

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

View Full Document
Problem 1 L ( M ) = ( ab ) c Problem 2 a. L 1 = { w | w contains twice as many 1’s as 0’s } 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 0’s. 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 : { 0 , 1 } → { 0 , 1 } so that h (0) = 0 and h (1) = 11. Then { 0 i 1 i | i 0 } = h 1 [ L 1 L (0 1 )]. To see this, we show that w ∈ { 0 i 1 i | i 0 } iff h ( w ) h 1 [ L 1 L (0 1 )]. If w ∈ { 0 i 1 i | i 0 } , it is obvious that h ( w ) L 1 L (0 1 ). If w negationslash∈ { 0 i 1 i | i 0 } , then it must either have different numbers of 0’s and 1’s, in which case h ( w ) will not have twice as many 1’s and 0’s 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, { 0 i 1 i | i 0 } would be regular, but it is known not to be. Therefore, L 1 must not be regular. ⊔⊓ b. The language L 2 = { 0 n 1 m 2 n m | n m 0 } over Σ = { 0 , 1 , 2 } .
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern