Will the language $\{w\in L_1\mid \exists v, wv\in L_2\}$ be regular if $L_1$ and $L_2$ regular languages?
Asked
Active
Viewed 163 times
-1
-
Yes it is regular. – Nathaniel Dec 06 '21 at 18:45
-
2(Now if you want a better answer, you should try to improve your post: formatting, what you tried, your thoughts about the problem, …) – Nathaniel Dec 06 '21 at 18:47
-
but if i dont know anything. please help to prove it that languagee is regular – user144938 Dec 06 '21 at 19:38
-
2Here's an introduction to formatting math on this site: https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference – rici Dec 06 '21 at 20:00
-
This might also be useful: https://en.wikipedia.org/wiki/Quotient_of_a_formal_language – rici Dec 06 '21 at 20:07
-
https://math.stackexchange.com/q/13771/280596, https://cs.stackexchange.com/q/139389/83244 – xskxzr Dec 07 '21 at 08:21
-
1Does this answer your question? Closure against right quotient with a fixed language – xskxzr Dec 07 '21 at 08:31
-
@xskxzr This seems a somewhat simpler operation than quotient. It takes the prefixes from $L_2$ and then intersects with $L_1$. For a quotient the definition is like ${ w \mid \exists v\in L_1 , wv\in L_2}$. – Hendrik Jan Dec 07 '21 at 10:07
1 Answers
0
The prefix language of $L$ is the set of all prefixes of strings in $L$, $\{w\mid \exists v \in \Sigma^*, wv\in L\}$. In other words, it is the right quotient of $L$ with $\Sigma^*$, so it is certainly regular if $L$ is regular, by closure with right quotient.
A possibly simpler way to see this is to observe that you can construct a recogniser for the prefix language of $L$ by constructing the minimal DFA for $L$ and then making all states accepting.
Your language is the intersection of $L_1$ with the prefix language of $L_2$. Since regular languages are also closed with intersection, it must be regular if $L_1$ and $L_2$ are both regular.

rici
- 12,020
- 21
- 38