为正则语言绘制NFA
在这里我发现常规语言的示例。
L = {a^n | n>=2 } 是有规律的。显然,我们可以画出一个具有 3 个状态的有限自动机。
我问自己这张图会是什么样子。如果我选择 n=11,这意味着该语言包含具有 11 个 a 序列的所有单词。这不能用具有 3 个状态的图来解决,还是我错了?
Here I found a example for a regular language.
L = { a^n | n>=2 } is regular. Clearly, we can draw a finite automaton with 3 states.
I was asking myself how this graph would look like. If I choose n=11, this means, that the language contains all words with a sequence of 11 a's. This can't be solved with a graph with 3 states, or am I wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
给定语言是 L = { a^n | n>=2}。
这里a的最小数量是2,所以有限自动机包含3个状态(2+1)
=>(q0,a)->(q1,a)->(qf,a*)。
类似地,如果所需的 a 的最小数量为 11(n>=11),则有限自动机包含 12 个状态 (11+1)。
因此 L = { a^n | n>=11} 无法使用 3 种状态求解
given language is L = { a^n | n>=2 }.
here the minimum number of a's is 2, so the finite automata contains 3 states(2+1)
=>(q0,a)->(q1,a)->(qf,a*).
Similarly if the minimum number of a's required is 11(n>=11),so the finite automata contains 12 states (11+1).
Therefore L = { a^n | n>=11} cannot be solved using 3 states
给定的语言 L 无法使用您的条件的 3 个状态(即 11a)来求解。对于包含 11 个 a 序列的每个单词,应该至少有 11 个 a。所以该图应包含 (11+1)=12 个状态。因此不能使用 3 种状态来解决。
The given language L cannot be solved using 3 states for your condition i.e, 11a's. For every word to contain a sequence of 11 a's, there should be a minimum of 11 a's. So the graph should contain (11+1)=12 States. Therefore it can't be solved using 3 states.