• retagged by
4,897 views

2 Answers

Best answer
5 5 votes

Consider for the case  $i >= j$

Push A for each a
Pop A for each b
Push C for each c
Pop C first and then A for each d. 

Accept if stack is empty when input finishes. 

For the case $i < j$

Push A for each a
Pop A for each b until stack becomes empty
Push B for each b after that
Pop B for each c until stack becomes empty
Push C for each c after that
Pop C first and then B for each d.

Accept if stack is empty when input finishes. 

So, clearly $L$ is CFL. But we can combine the two cases and there is no guess needed making $L$ a DCFL. 

• selected
2 2 votes
The language can be like a^n b^m c^n d^m. and cannot put in one stack. So it is not CFL
Position:
Show:

Related questions

0 0 votes
1 1 answer
1.1k
1.1k views
practicalmetal asked Mar 20, 2023
1,082 views
Is the following language CFL :{ ww | w in (a+b)* and |w| <1000 }
0 0 votes
1 answers 1 answer
999
999 views
practicalmetal asked Mar 15, 2023
999 views
Is the following language context free:The set of all strings with number of a’s equal to number of b’s and the sum of a’s and b’s to be divisible by 3.
0 0 votes
0 0 answers
407
407 views