简体   繁体   English

展示给定任何常规语言L的算法,该算法确定L = L *

[英]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 . 字符串ababL*一部分,但不是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.

相关问题 给定一个数组 l1,l2,l3 。 . . ln 创建一个新数组如下: (l1+ln),(l2+l[n-1]), . . .(l[n/2]+l[n/2+1]) - Given an array l1,l2,l3 . . . ln create a new array as follow: (l1+ln),(l2+l[n-1]), . . .(l[n/2]+l[n/2+1]) 一种算法,查找给定限制“ l”(0 &lt;= l &lt;= 10 ^ 16)中的数字数量,其中至少出现一次数字“ n”? - An algorithm to find number of numbers in a given limit 'l' (0 <= l <= 10^16) with atleast one occurence of a single digit number 'n'? 给定一组点 S,一个点 p 确定是否存在一个半平面 L 使得 L 包含 p 但不包含 S 中的任何其他点 - Given a set of points S, and a point p determine whether there exist a half-plane L such that L contains p but does not contain any other point from S 给定一组整数L和整数K,请选择L的最小子集S,以使SUM(S)&gt; = K - Given a set of integers L and an integer K, select a minimal subset S of L such that SUM(S) >= K 给定一个对象A和一个对象L列表,如何在不测试所有情况的情况下查找L上的哪些对象是A的克隆? - Given an object A and a list of objects L, how to find which objects on L are clones of A without testing all cases? 当 l 是生成器时无法测试“x in l” - Cannot test "x in l" when l is a generator STM32L1xx上的Flash ECC算法 - Flash ECC algorithm on STM32L1xx 查询范围[L,R] - Querying in a range[L,R] 有关L系统的信息 - Information on L-Systems 求(L,t)-团 - Find (L,t)-clump
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM