I have this exercise for homework:
Say we have a language
L. we know that the language
pref(L)(all the prefixes of
L, including all the words in
Litself) is a regular language. Does this imply that the language
Lis regular as well?
I took the NFA of
pref(L) and divided it (via 2 epsilon transitions from
q0) to 2 separate NFA's, as 1 defines
L and the other defines
What I actually got is a NFA for
L, which means it is regular.
I am not sure this is the way or if it legal. I'd be glad for another lead.