in Theory of Computation edited by
14,753 views
34 votes
34 votes

If $L$ is a regular language over $\Sigma = \{a,b\} $, which one of the following languages is NOT regular?

  1. $L.L^R = \{xy \mid x \in L , y^R \in L\}$
  2. $\{ww^R \mid w \in L \}$
  3. $\text{Prefix } (L) = \{x \in \Sigma^* \mid \exists y \in \Sigma^* $such that$ \ xy \in L\}$
  4. $\text{Suffix }(L) = \{y \in \Sigma^* \mid \exists x \in \Sigma^* $such that$ \ xy \in L\}$
in Theory of Computation edited by
by
14.8k views

5 Answers

45 votes
45 votes
Best answer

$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).

edited by

4 Comments

I can Understand Option B is not Regular.

But, can Someone pls clarify why Option A can’t be non-Regular too ?

 

Thanks in advance
0
0

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

4
4

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
3 votes
3 votes
option B. is CFL

all others are regular
3 votes
3 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
2 votes
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
edited by

4 Comments

Same thing can happen in B) too. right?
1
1
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

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
Answer:

Related questions