813 views
1 votes
1 votes

We know Regular Union CFL is CFL as they are closed but a doubt came in my mind 

if

Regular -  (a+b)*

CFL -   anb

Isn't it regular (a+b)* U anbn   (a+b)* 

Then how come this statement Regular Union CFL is CFL as they are closed is true ?? 

Please correct me if i am wrong..

1 Answer

Best answer
3 votes
3 votes
Every regular is CFL because CFL can be parsed by PDA by using FA and stack. Hence for (a+b)* i will use of FA part of PDA and not stack.So it means PDA can parse (a+b)*,hence this is CFL.

Note:-Every regular is CFL but converse not true.
selected by

Related questions

3 votes
3 votes
1 answer
2
iarnav asked Nov 1, 2017
580 views
If L1 = Regular L and L2 = CFL then L1 UNION L2?= L1 U L2= Reg L U CFL= CFL U CFL= CFL is it True?
1 votes
1 votes
1 answer
3
Na462 asked Jan 13, 2019
1,047 views
Consider the following Statements :There Exist a non-deterministic CFL whose reversal is DCFL.There exist a non regular CSL whose Kleene Closure is regular.Which of follo...
0 votes
0 votes
2 answers
4
Dhoomketu asked May 10, 2018
595 views
Cfl is closed under intersection with regular language.Then resultant languages will be regular or cfl ?Let X is cflY is regular language L=X intersection YThen L is what...