hmwk4

# hmwk4 - Johny Nguyen November 9th 2010 CS 473 Homework 4...

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

Johny Nguyen November 9 th , 2010 CS 473 Homework 4 Downey

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

View Full Document
Problem 1 Show that L = {a n b m c n d m | m, n 1} is not CFL. Proof: Suppose L is context free. Let p be the pumping length of L that is guaranteed to exist by the pumping lemma. Let s = a p b p c p d p , which is a member of L. the pumping lemma states that s can be pumped. Let s = uvxyz. Then we consider one of two cases. a. When both v and y contain only one type of alphabet symbol. This can be divided into three sub cases. a. v and y are adjacent letters WLOG, let v = a and y = b, and let s = abcd. uvxy = ab, z = cd uv 2 xy 2 = aabb, z = cd uv 2 xy 2 z = aabbcd which is not in L. This is will work for any number of a’s and b’s. Contradiction. b. v and y are not adjacent letters. WLOG let v = a and y = c, and let s = abcd. vxy must be abc, therefore z = d. but | vxy | > p, which violates the pumping lemma. Contradiction. c. v and y equal each other.
WLOG, let v = y = a. Let s = abcd. uvxy = a, z = bcd uv 2 xy 2 = aa, z = bcd uv 2 xy 2 z = aabcd which is not in L. This is will work for any number of a’s Contradiction. b. When both v and y contain more than one type of alphabet symbol. If v and y contained more than one symbol, let v = y = ij where i and j are a,b,c,d and i j. Then uv 2 xy 2 z will have ij repeat which will cause letters to be out of order. Contradiction. One of the cases must occur, but each derives a contradiction, therefore L is not a CFL.

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

View Full Document
Problem 2 (a) Show that A = {a m b n c n | m, n 0} and B = {a n b n c m | m, n 0} are not closed under intersection. A
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 11/29/2010 for the course CSC 873569 taught by Professor Roberts during the Spring '10 term at ASU.

### Page1 / 12

hmwk4 - Johny Nguyen November 9th 2010 CS 473 Homework 4...

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

View Full Document
Ask a homework question - tutors are online