Write a
non-ambiguous CFG generating the words over
{a,b,c} such that
there is an occurrence of
c exactly at the middle, to its left there are only
a’s (and there is at least one
a), and to its right there are only
b’s
(and there is at least one
b). Note that, since the only occurrence of
c
must be exactly at the middle, the number of
a’s must be equal to the number
of
b’s.