59 59 votes If $L$ is a regular language over $\Sigma = \{a,b\} $, which one of the following languages is NOT regular? $L.L^R = \{xy \mid x \in L , y^R \in L\}$ $\{ww^R \mid w \in L \}$ $\text{Prefix } (L) = \{x \in \Sigma^* \mid \exists y \in \Sigma^* $such that$ \ xy \in L\}$ $\text{Suffix }(L) = \{y \in \Sigma^* \mid \exists x \in \Sigma^* $such that$ \ xy \in L\}$ Theory of Computation gatecse-2019 theory-of-computation regular-language one-mark + – Arjun 24.5k views answer comment Share Follow Print See all 3 Comments 3 3 Comments reply Reetu Chaudhary commented Aug 23, 2025 reply Follow flag idea to make dfa for option d :https://math.stackexchange.com/questions/304379/suffix-regular-language 0 0 replyShare Ash24 commented Oct 15, 2025 reply Follow flag https://courses.grainger.illinois.edu/cs374/fa2018/slides/05-nfa-reg-lang-closure.pdf 0 0 replyShare Omkar_Shelke commented Nov 6, 2025 reply Follow flag L.L^R is simlar to L ^ L^R, regular is closed in both intersection and complement , so it is closed here also ww^R is palindrome string which is a well known CFL which is not regular prefix is similar to duke set or balancing parenthesis problem of DSA done using stack here, in duke set, for any string like '(()())()', # of opening brackets>= closing brackets for every prefix similar is for suffix also 0 0 replyShare Please log in or register to add a comment.
Best answer 71 71 votes $ww^R$ is well known CFL - the PDA can non-deterministically determine the middle position of the string and start popping (this is not DCFL though). Reverse, Suffix, Prefix, Concatenation of Regular(s) is Regular. Answer is (B). Digvijay Pandey answered Feb 7, 2019 • edited May 13, 2019 by Krithiga2101 Digvijay Pandey comment Share Follow See all 13 Comments 13 13 Comments reply Show 10 previous comments Abhineet Singh commented Dec 10, 2020 reply Follow flag I think it is already explained in the answer… Reverse, Concatenation operations on Regular(s) is Regular. option A is a concatenation of regular and its reverse, therefore it is a regular language 10 10 replyShare blue404 commented Jan 27, 2024 reply Follow flag Draw Finite Automata for L then Interchange states intial to final and final to initial then concatenate L with L^R using Epsilon 0 0 replyShare aarushitiwari19 commented Jan 11, 2025 reply Follow flag because regular languages are closed under reverse and concatenation operation . 1 1 replyShare Please log in or register to add a comment.
11 11 votes A simple point where one can easily miss out is in L.L^R it is given L and L^r are different strings belonging to L(x and y^R) whereas in option B it is the same string concatenated with reversed (wR). That's why A is regular and B is CFL Accel_Blaze answered Feb 3, 2021 Accel_Blaze comment Share Follow 0 reply Please log in or register to add a comment.
3 3 votes option B. is CFL all others are regular Naveen Kumar 3 answered Feb 7, 2019 Naveen Kumar 3 comment Share Follow 0 reply Please log in or register to add a comment.
3 3 votes ww^R cannot be recognized without using stack, so it cannot be regular. air1ankit answered Feb 15, 2019 air1ankit comment Share Follow 0 reply Please log in or register to add a comment.
2 2 votes $L$ is given as regular so, $L^r$ is regular so,$L.L^r$ is regular but $W.W^r$ is CFL so, ans is B Dharmendra Tiwari answered Feb 7, 2019 • edited May 25, 2019 by akash.dinkar12 Dharmendra Tiwari comment Share Follow See all 8 Comments 8 8 Comments reply Show 5 previous comments Winner commented Dec 28, 2019 reply Follow flag option a has a language ,so if a language is regular then its reverse is also regular so concatenation is also regular option b has a string and its reverse so it belongs to problem of string matching therefore it is cfl 0 0 replyShare Yor commented Jun 4, 2021 reply Follow flag I am not able to differentiate between option A and Option B. I got the example for option B. Can someone provide example for option A? if L= {ab} then in option A → it becomes ab.ba= abba In option B also abba possible. For both the cases stack is needed. 0 0 replyShare Shaik Masthan commented Nov 8, 2024 reply Follow flag @Yor, Take L = {ab,ba} for option A and check whether it is same as option B or not. 0 0 replyShare Please log in or register to add a comment.