Is the following CSG for a^nb^nc^n correct?
S->aSbC|abc
Cb->bC
C->c
If not please explain why?
Is the following CSG for a^nb^nc^n correct?
S->aSbC|abc
Cb->bC
C->c
If not please explain why?
Productions:
S -> abc | aAbc
Ab -> bA
Ac -> Bbcc
bB -> Bb
aB -> aa | aaA
Solution:
S → aAbc
→ abAc
→ abBbcc
→ aBbbcc
→ aaAbbcc
→ aabAbcc
→ aabbAcc
→ aabbBbccc
→ aabBbbccc
→ aaBbbbccc
→ aaabbbccc