For a context free grammar for L{a^n b^m c^t where t>0,m>0,n>2}
S -> ABC
A ->aB|a
B ->bB|b
C ->cC|c
Is this correct?
For a context free grammar for L{a^n b^m c^t where t>0,m>0,n>2}
S -> ABC
A ->aB|a
B ->bB|b
C ->cC|c
Is this correct?
This is incorrect. Your current grammar would allow the solution abc
which is not part of your grammar since a
does not appear more than two times.
It can be constructed the following way:
S -> ABC -> aBC -> abC -> abc
I would suggest the following grammar:
S -> aaABC
A -> aA|a
B -> bB|b
C -> cC|c