Clearly, generates .
, then, generates strings like a .
Thus we can get strings like and we can also get strings like where but cannot get where . Furthermore, we can generate any string beginning with a b or ending with an a, and every string beginning with a and ending with b that is not of the form . This, then, is exactly the complement of the language
A grammar for the complement of this language is
The language is
So, contains a string of such that the strings satisfy the following conditions:
1. The string starts with , where can be zero.
2. The string has any number of followed by an .
3. followed by any number of .
Using the description to give a context free grammar for , the complement of
is written as
are elements not in and they are,
.