For languages on
, prove the following:
Let
be a word of
. Then,
can be
derivated from
by the following sequence of reduction
by using first
times the
production
and then
times the production
. Thus, the language is at
least a subset of
.
The sortest word that can be produced is
of length 4. And that is also by definition of
the shortest word from the language. By construction
of the grammar, all the derivations have the same scheme. A word is guaranteed to have at least
one leftmost
and one rightmost
. Then it can go through a sequence of derivations adding
at the same time one
on the left and one
one the right. To terminate, a derivation must
use the
production that guarantees the word to have at least one
between
the
's and the
's (together with one
so that the property that the number of
plus
the number of
is equal to the number of
is always true). Before reaching the final derivation
(the
one), the derivation yields
's at the center together with
's (always taking
care of the above property) so that all the words derived from
are words of
. Thus,
is a subset of the language and in fact
.
Many situations may occur: