This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 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 ....
View
Full
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.
 Spring '07
 Staff

Click to edit the document details