0 0 votes Given $L_1=\{a^nb^nc^n | n\geq 0\}$ $L_2 =\{a^nb^mc^k|k=n+m \text{ and }n,m\geq 0 \}$ $L_3 =\{a^nb^mc^k|n,m,k \geq 0 \}$ Assume $L_4=L_1 (L_3)^*$ $L_5=(L_1\cap L_2)\cup L_3 $ Which of the following statement is correct? A. L4 is regular and L5 is not regular B. L4 is CFL and L5 is not CFL C. Both L4, L5 are regular D. Both L4, L5 are CFL but not regular Theory of Computation regular-language context-free-language + – GateAspirant999 1.0k views answer comment Share Follow Print See all 3 Comments 3 3 Comments reply joshi_nitish commented Mar 2, 2018 reply Follow flag both $L_4$ and $L_5$ are regular languages. $L_4=(a+b+c)^*$ $L_5=a^*b^*c^*$ hence option C is correct 2 2 replyShare GateAspirant999 commented Mar 3, 2018 reply Follow flag sorry I mis-written $L_3$ as $L_2$ in question. Now corrected. My doubts: how $L_4=(a+b+c)^*$? Given is $L_4=L_1.(L_3)^*$ So in each string $s\in L_4$, we will have string from $L_1$ as a prefix, that is we will have string of the form $a^nb^nc^n$ as a prefix, right? (am I understanding the formation of $L_4$ correctly?) If yes, then I guess $a^nb^nc^n$ cannot be part of any regular language right? About $L_5$, I can reach till this: $L_5=(L_1\cap L_2)\cup L_3=\{\epsilon \}\cup L_3=L_3$ But then $L_3$ does not seem to be regular right? $L_3$ contains all strings of the form $a^nb^mc^k$. If we look at the definition of $L_1$ (which contains all strings of the form $a^nb^nc^n$), it feels as if $n\neq m \neq k$ and in strings of $L_3$, number of occurrences of $a$, $b$ and $c$ should be different, right? So that does not translate to regular expression $a^*b^*c^*$, right? 0 0 replyShare GateAspirant999 commented Mar 3, 2018 reply Follow flag I have just realized that if $n=0$ in $L_1$, then $L_4=L_3^*=(a^*b^*c^*)^*=(a+b+c)^*$, so prefixing any language to it will result in $(a+b+c)^*$ only. But then this presumes that the definition of $L_3={a^nb^mc^k}$ does not imply that $n\neq m\neq k$ and that is why above I wrote $(a^*b^*c^*)^*$ instead of $(a^nb^mc^k)^*$. If we assume that the definition of $L_3={a^nb^mc^k}$ does not imply that $n\neq m\neq k$, $L_5$ also becomes regular as you said. But the assumption is necessary, right? 1 1 replyShare Please log in or register to add a comment.
1 1 vote option c abhishekmehta4u answered Mar 15, 2018 abhishekmehta4u comment Share Follow See 1 comment 1 1 comment reply Ram Swaroop commented Dec 20, 2018 reply Follow flag How are you taking intersection as a € 0 0 replyShare Please log in or register to add a comment.