• edited by
24,520 views
59 59 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\}$

5 Answers

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

• edited by
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
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
• edited by
Answer:
Position:
Show:

Related questions

85 85 votes
7 answers 7 answers
57.0k
57.0k views
Arjun asked Feb 7, 2019
57,044 views
For $\Sigma = \{a ,b \}$, let us consider the regular language $L=\{x \mid x = a^{2+3k} \text{ or } x=b^{10+12k}, k \geq 0\}$. Which one of the following can be a pumping...
53 53 votes
3 answers 3 answers
20.3k
20.3k views
Arjun asked Feb 7, 2019
20,334 views
Which one of the following languages over $\Sigma=\{a, b\}$ is NOT context-free?$\{ww^R \mid w \in \{a, b\}^*\}$$\{wa^nb^nw^R \mid w \in \{a,b\}^*, n \geq 0\}$$\{wa^nw^Rb...
49 49 votes
5 answers 5 answers
24.3k
24.3k views
Arjun asked Feb 7, 2019
24,297 views
Consider the following sets:S1: Set of all recursively enumerable languages over the alphabet $\{0, 1\}$S2: Set of all syntactically valid C programsS3: Set of all langua...
116 116 votes
13 answers 13 answers
37.4k
37.4k views
Arjun asked Feb 7, 2019
37,418 views
Let $\Sigma$ be the set of all bijections from $\{1, \dots , 5\}$ to $\{1, \dots , 5 \}$, where $id$ denotes the identity function, i.e. $id(j)=j, \forall j$. Let $\circ$...