
is regular (even though it might not seem to be at
first glance). Recall that
is the string w written backwards.
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.
accepting
.
), 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
.
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.
on the string
and
any computation on the string
.
accepting
.
It should be almost identical to
.
(i.e., use a shorthand
notation), draw the diagram of a PDA M accepting the language C.