If L is regular, then $L \setminus \{ \epsilon \}$ is regular.

253 Views Asked by At

I need to show that if $L$ is regular language, then $L \setminus \{ \epsilon \}$.

I was thinking: If $L$ contains $\epsilon$, then in the FSA the start state is a final state. But by making the start state not final, I may loose other word (not only $\epsilon$) (if the start state is part of a cycle). Any tips?

2

There are 2 best solutions below

0
On BEST ANSWER

You have the exact right idea!

As a hint to finish this problem off: Why not add a new state, which is exactly like the start state, but isn't accepting and has no incoming arrows. Then make this new state the start state instead.

This way any cycles and things still work, but at the very beginning we don't accept.

Can you see how to make this precise?


I hope this helps ^_^

0
On

First, make the start state $S$ non-accepting. All the outgoing arrow are the same. Make a new accepting state $T$. All incoming arrows to $S$ are redirected to end at $T$. Now the only string we lose is $\varepsilon.$