hwsol9 - Theory of Algorithms. Spring 2000. Homework 9...

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

View Full Document Right Arrow Icon
Theory of Algorithms. Spring 2000. Homework 9 Solutions. Section 8.1 (5a) Let L = ± a n ww R a n : n 0 ,w ∈{ a, b } * ² .T h e n L is context-free. In fact, L is just ± ww R : w ∈{ a, b } * ² . (5b) Let L = { a n b j a n b j : n 0 ,j 0 } .Th en L is not context-free. Proof. Assume towards a contradiction that L is context-free. Let m> 0 be given by the Context- Free Pumping Lemma. Then let w = a m b m a m b m .N o t i c et h a t w L and | w |≥ m .S o l e t w = uvxyz be the decomposition of w given by the Pumping Lemma. So | vxy |≤ m and | vy |≥ 1. Here are some of the possibilities for what v and y look like: (Case 1) vxy is a substring of the first block of a ’s. In this case let i =2 . W ehav e w 2 = uv 2 xy 2 z = a m + k b m a m b m where k = | vy | .S ince k 6 =0 , w 2 / L . (Case 2) vx is a substring of the first block of a ’s, and y = a k b s for some k,s 1. In this case let i =2. Noticethat w 2 / L ( a * b * a * b * ), so w 2 / L . (Case 3) v is a substring of the first block of a ’s and y is a substring of the first block of b ’s. In this case let i =2 . Wehave
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/17/2011 for the course MAD 3512 taught by Professor Staff during the Spring '07 term at University of Florida.

Page1 / 3

hwsol9 - Theory of Algorithms. Spring 2000. Homework 9...

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

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