简体   繁体   中英

Exhibiting an algorithm that determines if L = L*, given any regular language L

I am studying membership algorithms and I am working on this particular problem which says the following:

Exhibit an algorithm that, given any regular language L, determines whether or not L = L*

So, my first thought was, we have L* which is Kleene star of L and to determine if L = L*, well couldn't we just say that since L is regular, we know L* is by definition which states that the family of regular languages is closed under star-closure. Therefore L will always be equal to L*?

I feel like there is definitely a lot more to it, there is probably something I am missing. Any help would be appreciated. Thanks again.

since L is regular, we know L* is by definition which states that the family of regular languages is closed under star-closure. Therefore L will always be equal to L*?

No. Regular(L) --> Regular(L*) , but that does not mean that L == L* . Just because two languages are both regular does not mean that they are the same regular language. For instance, a* and b* are both regular languages, but this does not make them the same language.

A example of L != L* would be the language L = a*b* , and thus L* = (a*b*)* . The string abab is part of L* but not part of L .

As far as an algorithm goes, let me remind you that the concept of a regular language is one that can be parsed by a DFA - and for any given DFA, there is a single optimal reduction of that DFA.

The implication that you stated is wrong. Closedness under the Kleene star means only that L* is again regular, if L is regular. One possibility to check whether L = L* is to compute the minimal automaton for both and then checking for equivalence.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM