Context free grammar question i have two context free grammar questions and I don't know how to do them. 


*

*$$\{(a^n)b(c^n) \mid n >0 \}$$ I'm having trouble with this one because I don't know how to account for $a$ or $b$ not having empty set.

*$$\{(a^n)(b^m)(c^n) \mid n,m \ge 0\}$$ 

You are close for the first:
$$S\to aAc,\qquad A\to S \mid b$$
and for the second 
$$S\to aSc \mid A\qquad A\to bA\mid\epsilon $$
should work
