cs243s2

cs243s2 - Solution to CS243 Assignment2 1 Text(Sipser...

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

View Full Document Right Arrow Icon
Solution to CS243 Assignment2 1. Text (Sipser, second edition) Chapter 1 (p.88) 1.29b [14%] A 2 = { ωωω | ω is in {a,b} * } Assume to the contrary that A 2 is regular, and let p be the pumping length given by pumping lemma. Choose s = a p ba p ba p b, which can be divided into three pieces s = xyz , where | xy | p . This means xy contains only a’s. Since | y | > 0, let y = a k , k>0. However, xy 2 z = a p+k ba p ba p b, where p+k>p, is not in A 2 . That is s cannot be pumped. This is a contradiction. Thus, A 2 is not regular. 2. Text (Sipser, second edition) Chapter 1 (p.89) 1.31 [14%]
Background image of page 1

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

View Full DocumentRight Arrow Icon
3. Text (Sipser, second edition) Chapter 1 (p.89) 1.34 [14%] The following DFA recognizes D. Thus, D is regular. 4. Text (Sipser, second edition) Chapter 1 (p.89) 1.37 [14%] We only need to construct a DFA to keep track of the remainder of the input seen so far (from left to right) divided by n. If it ends up with remainder zero, accept; otherwise reject. Notice the following relations: If (
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/07/2011 for the course CS 243 taught by Professor Sm during the Spring '11 term at Indiana.

Page1 / 3

cs243s2 - Solution to CS243 Assignment2 1 Text(Sipser...

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

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