0 votes 0 votes $L1 = a^{p}$ | p is prime . $L2 = a^{p}$| p is odd . state the decidability of below statement. 1) $L1 \cup L2$ is regular 2) regular expression of $L1 \cup L2$ is $a(aa)^*$ Theory of Computation theory-of-computation + – Neal Caffery asked Dec 2, 2016 • edited Dec 2, 2016 by srestha Neal Caffery 594 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 2 votes 2 votes L1={aa,aaa,aaaaa,.....} L2={a,aaa,aaaaa,......} $L1\cup L2$={a,aa,aaa,aaaaa,..........} 1)it is REGULAR,SO IT IS DECIDABLE. 2)REGULAR EXPRESSION IS =aa+a$(aa)^{*}$. santhoshdevulapally answered Dec 2, 2016 • selected Dec 2, 2016 by vijaycs santhoshdevulapally comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments focus _GATE commented Dec 2, 2016 i edited by focus _GATE Dec 2, 2016 reply Follow Share l1 = CSL l2 = reg . –1 votes –1 votes focus _GATE commented Dec 2, 2016 reply Follow Share tell my mistake ? 0 votes 0 votes santhoshdevulapally commented Dec 2, 2016 reply Follow Share @ kunal L2 is not csl it regular. so csl U reg =csl.//it is sometimes regular also. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes L1 : Not regular .. as prime numbers in power L2 : It's Regular language and regular expression : a(aa)* So for L1 U L2 = Recursive U Regular = Recursive U Recursive = Recursive Language [Recursive language closed under Union] But L1 U L2 is nothing but set of prime powers or odd enumerations [but except 2 a prime no. is odd always] --> so L1 U L2 = {aa} U {a(aa)*}..Hence Regular. But how can be " regular expression of L1 U L2 is a(aa)* " --> asked for decidability, it should be true/false statement As L1UL2 = {aa} U {a(aa)*} [ Hence statement is false ]. Gate Mission 1 answered Dec 2, 2016 • edited Dec 2, 2016 by Gate Mission 1 Gate Mission 1 comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments santhoshdevulapally commented Dec 2, 2016 reply Follow Share a^9 is there is the language L1 U L2.check once 1 votes 1 votes santhoshdevulapally commented Dec 2, 2016 reply Follow Share DCFL U REG=DCFL.//some times it is regular i already gave an example. 0 votes 0 votes Gate Mission 1 commented Dec 2, 2016 reply Follow Share Yeah Correct for L1 U L2 expression will be {aa} U {a(aa)*} And for second I have also said same thing what you are saying ... see "always DCFL but not always regular". 1 votes 1 votes Please log in or register to add a comment.