开发者

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

开发者 https://www.devze.com 2023-01-19 15:29 出处:网络
I am studying membership algorithms and I am working on this particular problem which says the following:

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 mo开发者_StackOverflowre 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消