next up previous
Next: About this document

  1. Prove that the language is regular (even though it might not seem to be at first glance). Recall that is the string w written backwards.

  2. Exercise 2.1 on page 106. This problem will not be graded, but be sure you can do it.

  3. Exercise 2.3 on page 106. Note: in part (a), refer to Example 2.20 instead of 2.21.

  4. Problem 2.18 on page 107.

  5. This problem is an elaboration of Problem 2.22 on page 108. Our goal is to prove that is a context-free language.

    First, for any string x and any , let refer to the character of x from the left. E.g., .

    Then , where

    In and , if i is too large to index a character in either x or y, then the string is not included in the language.

    1. Draw the state-transition diagram of a PDA accepting .

    2. A computation of a PDA on an input is a sequence of (state, remaining input, stack contents) tuples consistent with the PDA's transition function, beginning with the tuple (initial state, all input, ), and leading to a tuple where no input remains. For instance, one computation of in Example 2.11 (page 94) of the book on input 0110 is Although this particular computation is accepting (because it ends in an accepting state), there are many other computations of the same string that are nonaccepting.

      Show an accepting computation of on the string and any computation on the string .

    3. Draw the state-transition diagram of a PDA accepting . Suggestion: have the PDA represent the number i by pushing i copies of the character `c' (denoting, well, ``character'') onto the stack. Using nondeterminism to select this number i, have your machine accept if and reject otherwise.

    4. Show an accepting computation of on the string and any computation on the string .

    5. Draw the state-transition diagram of a PDA accepting . It should be almost identical to .

    6. Without redrawing your machines (i.e., use a shorthand notation), draw the diagram of a PDA M accepting the language C.

  6. Extra Credit. Problem 2.17 on page 107. These proofs are easiest if you use the PDA characterization of context-free languages.





next up previous
Next: About this document



David Martin
Tue Nov 5 11:00:24 EST 1996