Okay so here's my current solution for the question that asks whether the language is context free:
$$L = { a^nb^{3n}c^n | \, n \geq 0 } $$
Assume by contradiction that L is context-free. Let p be the pumping length given by the Pumping Lemma. Choose string $$s = a^pb^{3p}c^p ∈ L$$. |s| ≥ p. Take an arbitrary decomposition s = uvxyz where |vxy| ≤ p and |vy| > 0.
Case 1: i. $$v,y ∈ a*$$ ii. $$v,y ∈ b*$$ iii. $$v,y ∈ c*$$
Here, uv0xy0z ∉ L, due to incorrect number of symbols.
Case 3: i. $$v ∈ aa* and y ∈ bb*$$ ii. $$v ∈ bb* and y ∈ cc*$$
Here, uv0xy0z ∉ L, since #a's ≠ #c's.
So, s cannot be pumped, which contradicts the Pumping Lemma. Hence, L is not context-free.
However, after checking my answer, it seems that I missed that I missed one case where:
$$ v ∈ aa^*bb^* or \,\,y ∈ aa^*bb^* $$ $$ v ∈ bb^*cc^* or \,\,y ∈ bb^*cc^* $$
Here, uv2xy2z ∉ L, due to incorrect ordering of symbols.
But this doesn't make sense to me; how can this mess up the ordering of the symbols because wouldn't it follow that for example X would be the symbols after v?
Thanks guys,
\{
, rather than{
. Also in math mode, use*
rather than\*
. $\endgroup$