I have came across a question stating that language $L = a^n b^n c^{2n}$ is not a context free language and hence, no PDA can be constructed for it. But what I am wondering is that, if I add another alphabetical comparison to the above language as
$L_1= a^n b^n c^{2n} d^n$
$L_2= a^n b^{2n} c^n d^{2n}$
And a mixture of above will lead to cfg. Because now we have two comparison so not only we can push the symbol but with the help of other symbol we can pop it so as to empty the stack implies to acceptance of the strings.
my question is I do not know that whether my assertion to the modification of the language is right or wrong so please if you can tell me where iam wrong or right it would be helpful.
- One more thing if iam right, then please show the cfg production to derive them as I can make PDA for them( if iam right) but finding hard to assign production the accepts the above cgl language ( if its then) Thanks