带有连接的常规语言
常规语言在以下操作下是封闭的:
init(L) = 字符串 w 的集合,使得对于某些 x,wx 在 L 中。
编辑: x 可以是任何字符串、字符或空字符串 我怎样才能证明这一点?
the regular languages are closed under the operation:
init(L) = the set of the strings w such that for some x, wx is in L.
EDIT :
x can be any string, a character or empty string
How can I prove that ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
好吧,第一次看错问题,现在明白了。这仍然是微不足道的。查看自动化,您搜索的是自动化的一部分,分为两个状态集 S1 和 S2,因此它们之间只有一个转换(如果它从 S1->S2 S1 当然包含起始节点,而 S2 包含结束节点)。这样的情况总是存在的(空语言除外),如果没有这样的节点可以添加一个,所以w只是一个包含空词的集合,这当然也是正则的(空语言情况也是如此)。
OK, misread the quesion on the first time, now I get it. It still trivial. Looking at the automate what you searching is a partion of the automate into two state sets S1 and S2, so that just one transition is between them (and if its from S1->S2 S1 contains of course the start node, and S2 the end node). Such exist always (exception empty language), in case there is no such node you can add one, so w is just a set containing the empty word, which is of course also regular (as well as the empty language case).
除非我误会了,否则答案是你不能。因为这不是真的。
首先,让我们考虑语言
L = {aa, bb, cc}
和字母表{a, b, c}
因此,
init(L) = {a ,b,c}
。但是,init(L)
中的每个元素都不在L
中。编辑:如果我们连接空字符,则 init(L) = {a, b, c, aa, bb, cc}。这仍然不等于
L
。Unless I'm misunderstanding, the answer is that you can't. Because it's not true.
First, let's consider the language
L = {aa, bb, cc}
and alphabet{a, b, c}
So,
init(L) = {a, b, c}
. However, each of the elemnts ininit(L)
are not inL
.Edit: If we are concatenating empty characters, then
init(L) = {a, b, c, aa, bb, cc}
. Which is still not equal toL
.一种语言是正规的,当且仅当有一个有限状态自动机可以识别它。因此,假设 L 是一种常规语言,而 A 是一个能够识别它的自动机。现在,如果有一组可能的转换从 A 开始并以“接受”状态结束,则称 A 的状态是“好”。定义一个新的自动机 A',其中所有到“好”状态的转换都被直接转换到接受状态所取代。那么A'识别的语言正是init(L)。
A language is regular iff there's a finite-state automaton that recognizes it. So, suppose L is a regular language and let A be an automaton that recognizes it. Now, say that a state of A is "good" if there's some set of possible transitions starting there and ending in the "accept" state. Define a new automaton A' in which all transitions to "good" states are replaced by direct transitions to the accept state. Then the language recognized by A' is exactly init(L).
我认为这是一个新的DFA B,它使A(原始DFA)的所有状态可以达到A的最终状态为B的最终状态。
I think it's a new DFA B, that makes all the state of A(the original DFA) that can reach to the final states of A the final state of B.