# Proof Please: Context Free Grammar

• April 28th 2011, 07:10 PM
extatic
Proof Please: Context Free Grammar
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\}$

What i got so far is:

$S \to aSc | A$
$A \to bAcc | \lambda$

$(b) L = \{a^n b^m c^k : n = m \or\ m \not= k\}$

No idea