Artificial intelligent assistant

Proving that a certain language is regular Consider two languages $L$ and $\operatorname{minimum}(L) = \\{ w \in \Sigma^* \mid w \in L, \text{ but no real prefix of $w$ is in $L$}\\}$. I want to prove now, that for every DFA language $L$ , minimum(L) is a DFA language too. First thought: constructing the complement language $L^c $ . Wouldn't that describe minimum(L)? $L^c$ is per definition regular,so there is a DFA. But that seems a bit ....mmh. Open for any suggestions. And by the way, I am new to this stuff. Hope I offend no one with this question :) with best regards

Here's two ways of doing this.

Algebraic way: note that $\Sigma^+ = \Sigma^* \setminus \\{ \epsilon \\}$ is regular. The concatenation of regular languages $L \Sigma^+$ is also regular. So is the difference of regular languages $L \setminus (L \Sigma^+)$. Can you see that $L \setminus (L \Sigma^+) = minimum(L)$?

Automaton way: take a DFA for $L$, and add a "trap" state, where all arrows from it point to itself. For each accept state, redirect all arrows to the trap state. So the only way to accept a word is to reach an accept state and have no more symbols to process.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 11dea4bf3181a0ff40b2932d19a0aee6