[英]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* 展示一种算法,该算法在给定任何常规语言L的情况下,确定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. 因此,我的第一个想法是,我们有L *,它是L的Kleene星,并确定L = L *,我们不能仅仅说L是规则的,所以我们知道L *是按定义的,即常规语言家族在关闭星号后关闭。 Therefore L will always be equal to L*?
因此,L将始终等于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.
由于L是正规的,因此我们知道L *是按定义的,它表示正则语言族在星号封闭状态下是封闭的。 Therefore L will always be equal to L*?
因此,L将始终等于L *?
No. Regular(L) --> Regular(L*)
, but that does not mean that L == L*
. 否
Regular(L) --> Regular(L*)
,但这并不意味着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*
和b*
都是常规语言,但这并不能使它们成为同一语言。
A example of L != L*
would be the language L = a*b*
, and thus L* = (a*b*)*
. L != L*
示例是语言L = a*b*
,因此L* = (a*b*)*
。 The string abab
is part of L*
but not part of L
. 字符串
abab
是L*
一部分,但不是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. 就算法而言,让我提醒您,常规语言的概念是可以由DFA解析的-对于任何给定的DFA,该DFA都有一个最佳的还原形式。
The implication that you stated is wrong. 您所说的含义是错误的。 Closedness under the Kleene star means only that L* is again regular, if L is regular.
如果L是规则的,则在Kleene星下的封闭性仅意味着L *又是规则的。 One possibility to check whether L = L* is to compute the minimal automaton for both and then checking for equivalence.
检查L = L *的一种可能性是计算两者的最小自动机,然后检查等效性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.