edited by
1,982 views
2 votes
2 votes

Let $L\mid$ be a regular language and

$L_1| = \{x|\mid\text{there exist y}\mid \text{so that xy} \in L| \text{ and} \mid x \mid = 2 \mid y\mid \mid \}$

$L_2| = \{x|\mid\text{there exist y}\mid \text{so that yx} \in L| \text{ and} \mid x \mid = 2 \mid y\mid \mid \}$

Then which of the following is necessarily correct?

  1. $L_1|$ is regular but $L_2|$ is not.
  2. $L_2|$ is regular but $L_1|$ is not.
  3. Both $L_1|$ and $L_2|$ are regular.
  4. Both $L_1|$ and $L_2|$ are not regular.
edited by

1 Answer

Best answer
3 votes
3 votes

Both L1 and L2 are Regular.

L1 is nothing but the Language formed by taking the Starting 2/3rd part of all the Strings (Wherever Possible i.e. Those Strings whose Length is Multiple of 3 in L) in L. Similarly, L2 is nothing but the Language formed by taking the Ending 2/3rd part of all the Strings (Wherever Possible i.e. Those Strings whose Length is Multiple of 3 in L) in L.

And Set of Regular Languages is closed under Such Operations. And By Such Operations I mean "Taking some 1/kth portion (from starting or from ending)" of  all the strings of the language. 


You must be familiar with the standard Half(L) operation on languages : 

HALF(L) = {x ∣ xy ∈ L for some y with |y| = |x| }

And Set of Regular Languages is closed under "HALF" Operation. 


Useful Links :

https://cs.stackexchange.com/questions/29767/proving-regularity-of-languages-that-are-1-k-of-an-already-known-regular-languag

https://math.stackexchange.com/questions/1539658/automata-prove-that-if-l-is-regular-than-halfl-is-regular-too

https://cs.stackexchange.com/questions/29924/show-that-the-regular-languages-are-closed-against-taking-the-second-half

selected by

Related questions

0 votes
0 votes
1 answer
1
Deepak9000 asked Nov 27, 2023
216 views
Why is C is regular as it non regular as?Please help me with this confusion
0 votes
0 votes
1 answer
2
M_Umair_Khan42900 asked Dec 29, 2022
786 views
Show that the following pairs of regular expressions define the same language over the alphabet I = [a, b].s(a) p(pp)*( A + p)q + q and p*q(b) A +0(0+1)* + (0+1)* 00(0+1)...
0 votes
0 votes
2 answers
4
iarnav asked Dec 22, 2018
644 views
WXW^R where W,X belongs to (0,1)*W^R is reverse of a string!