This site uses cookies only for the purpose of identifying user sessions.
This is required to properly register actions.
Non-ambiguous CFG for $\{ a^n c b^n \mid n>0 \}$
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.
Authors: Guillem Godoy
/
Documentation: