-1

Will the language $\{w\in L_1\mid \exists v, wv\in L_2\}$ be regular if $L_1$ and $L_2$ regular languages?

xskxzr
  • 7,455
  • 5
  • 23
  • 46

1 Answers1

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