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 - anbn 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.. Theory of Computation theory-of-computation closure-property + – Himanshu Goyal asked Jun 29, 2017 Himanshu Goyal 814 views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply rahul sharma 5 commented Jun 29, 2017 reply Follow Share 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.Every regular is CFL but converse not true. 2 votes 2 votes Rupendra Choudhary commented Jun 29, 2017 reply Follow Share Hello Rahul , your answer is quite correct , when you are sure enough about the correctness of your answer please try to make it in form of answer rather comment so at least it doesn't appear in unanswered questions. It may save our time. 1 votes 1 votes Please log in or register to add a comment.
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. rahul sharma 5 answered Jun 29, 2017 • selected Jun 30, 2017 by Himanshu Goyal rahul sharma 5 comment Share Follow See all 3 Comments See all 3 3 Comments reply student2018 commented Jun 30, 2017 reply Follow Share I understood your explaination but can you give any example by taking cfl and regular languages please 0 votes 0 votes Himanshu Goyal commented Jun 30, 2017 reply Follow Share Thanks bro @rahul sharma 5 0 votes 0 votes Himanshu Goyal commented Jun 30, 2017 reply Follow Share @student2018 my question is itself an example 1 votes 1 votes Please log in or register to add a comment.