hwsol6 - Theory of Algorithms Spring 2000 Homework 6...

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

View Full Document Right Arrow Icon
Theory of Algorithms. Spring 2000. Homework 6 Solutions. Section 4.3 (3) Let L = { w ∈ { a, b } * : n a ( w ) = n b ( w ) } . Then L is not regular. (Since L * = L , L * is also not regular either.) Proof. Assume towards a contradiction that L is regular. Let m > 0 be given by the Pumping Lemma. Then let w = a m b m . Notice that w L and | w | ≥ m . So let w = xyz be the decomposition of w given by the Pumping Lemma. Notice that y = a k for some k with 1 k m . Now let i = 2. Then w i = w 2 = xy 2 z = a m + k b m . So w i / L because m + k 6 = m . This contradicts the Pumping Lemma. So L is not regular. (4a) Let L = a n b l a k : k n + l . Then L is not regular. Proof. Assume towards a contradiction that L is regular. Let m > 0 be given by the Pumping Lemma. Then let w = a m b m a 2 m . Notice that w L and | w | ≥ m . So let w = xyz be the decomposition of w given by the Pumping Lemma. Notice that y = a t for some t with 1 t m . Now let i = 2. Then w i = w 2 = xy 2 z = a m + t b m a 2 m . So w i / L because 2 m 6≥ ( m + t ) + m . This contradicts the Pumping Lemma. So L is not regular. (4b) Let L = a n b l a k : k 6 = n + l . Then L is not regular. Proof. Assume towards a contradiction that L is regular. Then ¯ L L ( a * b * a * ) is also regular since the family of regular languages is closed under compliment and intersection. Let us write L 1 for ¯ L L ( a * b * a * ). Notice that L 1 = a n b l a k : k = n + l . We will apply the Pumping Lemma to L 1 . Let m > 0 be given by the Pumping Lemma. Then let w = a m b m a 2 m . Notice that w L 1 and | w | ≥ m . So let w = xyz be the decomposition of w given by the Pumping Lemma. Notice that y = a t for some t with 1 t m . Now let i = 2. Then w i = w 2 = xy 2 z = a m + t b m a 2 m . So w i / L 1 because 2 m 6 = ( m + t ) + m . This contradicts the Pumping Lemma. So L is not regular. (4c) Let L = a n b l a k : n = l or l 6 = k . Then L is not regular. Proof. Assume towards a contradiction that L is regular. Let m > 0 be given by the Pumping Lemma. Then let w = a m b m a m . Notice that w L (since n=m=l) and | w | ≥ m . So let w = xyz be the decomposition of w given by the Pumping Lemma. Notice that y = a t for some t with 1 t m . Now let i = 2. Then w i = w 2 = xy 2 z = a m + t b m a m . So w i / L because n = m + t 6 = m = l and l = m = k . This contradicts the Pumping Lemma. So L is not regular. (4d) Let L = a n b l : n l . Then L is not regular. Proof. Assume towards a contradiction that L is regular. Let m > 0 be given by the Pumping Lemma. Then let w = a m b m . Notice that w L and | w | ≥ m . So let w = xyz be the decomposition of w given by the Pumping Lemma. Notice that y = a t for some t with 1 t m . Now let i = 2. Then w i = w 2 = xy 2 z = a m + t b m . So w i / L because m + t 6≤ m . This contradicts the Pumping Lemma. So L is not regular.
Image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '07
  • Staff
  • WI, Formal language, Formal languages, Regular expression, Regular language, Pumping lemma for regular languages

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern