1 votes 1 votes If a given CFL Language is L= {a^n b^n ;n>=0} then how can we determine the value of L^2 .Explain with an example . Theory of Computation theory-of-computation pushdown-automata context-free-language + – shekhar chauhan asked Jun 6, 2016 retagged Jul 4, 2017 by Arjun shekhar chauhan 906 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 6 votes 6 votes $L^2 =L.L= \{a^nb^n\;|\;n>=0\}.\{a^mb^m\;|\;m>=0\}$ $=\{a^nb^na^mb^m\;|\;n,m>=0\}$ Praveen Saini answered Jun 7, 2016 selected Jun 7, 2016 by Arjun Praveen Saini comment Share Follow See all 2 Comments See all 2 2 Comments reply shekhar chauhan commented Jun 7, 2016 reply Follow Share L={anbn|n>=0} it represents L like this if we put n>=0 {eps ,ab ,a^2b^2 ,a^3b^3} if we simply apply 2 time concatination L.L then we get something like this L .L ={a^n.b^ :n>=0}{a^n.b^n>=0} ===>{eps ,ab ,a^2b^2 ,a^3b^3}{eps ,ab ,a^2b^2 ,a^3b^3} ===>{ eps ,ab a^2b^2 , ab.a^2b^2} but string ab.a^2b^2 can't be derived from this 0 votes 0 votes Praveen Saini commented Jun 7, 2016 reply Follow Share $L.L=\{\epsilon,ab,a^2b^2,a^3b^3,.... \}\{\epsilon,ab,a^2b^2,a^3b^3,....\}$ $=\{\epsilon,ab,a^2b^2,a^3b^3,....,abab,a^2b^2ab,a^3b^3ab,....,aba^2b^2,a^2b^2a^2b^2,a^3b^3a^2b^2,.... \}$ 1 votes 1 votes Please log in or register to add a comment.
–1 votes –1 votes L={anbn|n>=0} L2={anbn}{anbn} ={anbn . anbn}={a2nb2n} It is concatenation and kleen closure operation on CFL So, CFL closed under these two operation srestha answered Jun 6, 2016 srestha comment Share Follow See 1 comment See all 1 1 comment reply shekhar chauhan commented Jun 7, 2016 reply Follow Share sir if you concatenate ab from L1 and a^2b^2 from L2 then resulting string ab a^2 b^2 can't be generated from this. now my question is to get to the final resulting lang which you have written a^n b^n a^m b^m. .And what does m and n mean here the question was in powers of n now how did you get 2 different powers as m and n. and please cross verify the srestha ans is that right it is different from yours. {anbnambm|n,m>=0} 0 votes 0 votes Please log in or register to add a comment.