{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

cs243s2

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

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

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%]

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

View Full Document
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 (
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online