retagged by
4,598 views

4 Answers

5 votes
5 votes
I think a pda cannot be drawn for this language,a stack can be used to check dependency between a and b ( push for a &pop for b ) but for implementing dependency with c a tm will be needed thus it's nt a cfl

And the language is same as a^nb^nc^2n
edited by
2 votes
2 votes

This is not CFL as , anbnc2n  can be written as anbncnc. So , if we use a stack , on seeing 'a' we will push into stack , on seeing 'b' , we will pop . but , then when 'c' will come , we will not have any 'a' on stack to be compared. 

So , we can not design a PDA for the language. Hence , it is not CFL.

0 votes
0 votes
It is nt cfl but this is cfl L=a^p b^q c^r where r=p+q here p may be equals to q or may not
0 votes
0 votes
Yes, this is a CFL ( deterministic one ). There are two approaches, one right other wrong. The wrong approach is to push 2 a's for every input a. This will accept languages like aabccc.  The right approach is to push a for every a, then on seeing b's pop the    'a'   and push a   'b' and thereafter for every   'c'    pop a    'b'.

Related questions

0 votes
0 votes
0 answers
1
hacker16 asked Dec 18, 2017
726 views
Let Ʃ = {a, b} and L = {anwan | n ≥ 1, w ∈ Ʃ*}.ThenL is context free but not regularL is not context free but regularL is context free as well as regularL is neithe...
2 votes
2 votes
1 answer
2
Mahesha999 asked Dec 24, 2016
305 views
How below language is context free? I am not able to imagine what could be the behaviour of the PDA accepting this language. Can anyone give a hint?$L=\{\omega:2n_a(\omeg...
8 votes
8 votes
3 answers
3
Payal Rastogi asked Nov 2, 2015
7,349 views
The complement of the language $L$ containing an equal number of $a's$,$b's$ and $c's$ is (a) regular(b) context free(c) context sensitive but not context free(d) recursi...
2 votes
2 votes
1 answer
4
ayushigupta asked Oct 17, 2015
2,228 views
Consider the following CFG$S \to AB$$A \to aBc \mid aB \mid a$$B \to bDe \mid f \mid CD$$C \to Dg \mid h$$D \to g$The rank of the non-terminal $B$ is __________