0

I have generated the CFG of $a^n b^m c^p$ where $m = n+p+2$:

$S \rightarrow ASC \mid \varepsilon$

$A \rightarrow aAb \mid \varepsilon$

$C \rightarrow bCc \mid \varepsilon$

I have been trying $a^n b^m c^p$ where $n=m+p+2$ but cannot figure out how to represent $n=m+p+2$. Any hint would really be appreciated.

Nathaniel
  • 15,071
  • 2
  • 27
  • 52
Hasnat
  • 1
  • 1

0 Answers0