542 views

3 Answers

1 votes
1 votes
ACCORDING to me it should be cfl but i am facing difficulty in drawing the pda for it , i don't know it's correct answer.

My approach -for every a we can push 2 a's and if c comes then pop 2a's for every b and if d comes pop single a for every b
edited by
1 votes
1 votes
Union of 2 cfl is always cfl and here both the languages given is CFL .So, L is a CFL but...

 

But we need to check wether L is DCFL or not . Union of 2 DCFL may or may not be DCFL but here the langauage generated after union is DCFL .

Reason :

L : Lanaguages having equal no of a and b or no of a is twice the no of b

push 2 a for each a and after all a's are over then see if next symbole is c or d. It will go to 2 different statet based on this. if next symbole is c then delete 2 a for each b otherwise delete one a for each b. No non-determ required ,
edited by
0 votes
0 votes
It think it is CFL because on starting state we will go to two states by seeing the a

On one state we will push a's and when c will come then we will pop the a for every single b and on other state  we will push two a's for every single a  and and when d will come then after that we will pop b's for every single a

Related questions

3 votes
3 votes
2 answers
1
0 votes
0 votes
1 answer
2
Hirak asked May 22, 2019
553 views
is union of regular language and context free language always regular?
1 votes
1 votes
2 answers
3
Parshu gate asked Nov 29, 2017
828 views
Suppose in question we are given the language is Turing Recognizable , can I consider it a CFL or Regular?
0 votes
0 votes
0 answers
4