retagged by
3,798 views

2 Answers

Best answer
5 votes
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 votes
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

Related questions

0 votes
0 votes
1 answer
1
0 votes
0 votes
1 answer
2
practicalmetal asked Mar 15, 2023
516 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.