$$\{a^nb^nc^k \in \{a,b,c\}^* | n,k >= 0\} $$
$E \to aEbS $
$S \to c$
I do not know where to go next, or even if this is right at all?
$$\{a^nb^nc^k \in \{a,b,c\}^* | n,k >= 0\} $$
$E \to aEbS $
$S \to c$
I do not know where to go next, or even if this is right at all?
Copyright © 2021 JogjaFile Inc.
Try this:
$$S \to PQ \\ P \to aPb \mid \epsilon \\ Q \to cQ \mid \epsilon$$
The second rule ensures that the number of a's and b's are equal, whereas the third rule ensures that there can be any number of c's. The fact that they are in the right order should be clear.