# Proof Please: Context Free Grammar

• Apr 28th 2011, 07:10 PM
extatic
Find context-free grammar for the following languages (with $n\geqslant0$, $m\geqslant0$, $k\geqslant0$).
$(a) L = \{a^n b^m c^k : n + 2m = k\}$
$S \to aSc | A$
$A \to bAcc | \lambda$
$(b) L = \{a^n b^m c^k : n = m \or\ m \not= k\}$