Hmwk3

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Johny Nguyen October 26th, 2010 CS 473 Homework 3 Downey Problem 1 Use the Pumping Lemma for Regular languages to show that is not regular. Assume L is regular. Let p be the pumping length given by the pumping lemma. Let s be the string apbapba2p. The pumpling lemma guarantees that s can be split into three pieces s = xyz. Let x and z be the empty strings. That would mean y would have to consist of either of the following: 1. s contains only a’s or only b’s 2. s contains both but not enough of each Both would imply that the pieces are not in L. Which means s cannot be pumped. Therefore, L is not regular. Problem 2 2.4 Give context ­free grammars that generate the following languages 1. {w | w starts and ends with the same symbol} R1 0R2 | 1R3 |ε R2 0R4 | 1R2 R3 1R4 | 0R3 R4 0R3 | 1R2 |ε R1 is our starting state. If it takes in a 0, it will go to R2. If it takes...
View Full Document

Ask a homework question - tutors are online