Are regular languages closed under the following construction?
$f(L) = \{w \mid w \in L$ and for all prefixes $x$ of $w$ it holds that $x \notin L$ $\}$
Are regular languages closed under the following construction?
$f(L) = \{w \mid w \in L$ and for all prefixes $x$ of $w$ it holds that $x \notin L$ $\}$
Yes, $f(L)$ is regular if $L$ is.
Hint. Take a deterministic finite automaton whose language is $L$ and remove all the outgoing transitions from the accepting states.