ε-transitions 如何在非确定性有限自动机中工作?

How do ɛ-transitions work in nondeterministic finite automata?

我对自动机实现语言感到困惑。如果存在 ε 转移,自动机是否会直接进入下一个状态?假设我有一个由三个状态 abc 组成的自动机(其中 a 是初始状态,c 是接受状态),字母表 { 0,1}。以下是如何工作的?

 a----ɛ--->(b----0---->a)
             (b----1---->c)

是否接受字符串“1”?如果我们有

会怎样
   a---1--->b----ɛ--->c

?字符串“1”会被接受吗?

Does the automaton go directly to the next state if there is an ɛ-transition?

粗略地说,是的。等同于您的 NFA 并标识后者描述的语言的 ε-转换(在 non-deterministic finite automaton, or NFA, for short) is a transition that is not associated with the consumption of any symbol (0 or 1, in this case). Once you understand that, it's easy (in this case) to derive deterministic finite automata(或简称 DFA)中。

Suppose I have an automaton [...] Is the string "1" accepted?

是的。这是您的第一个 NFA 的更好的图表(由 LaTeX 和 tikz 提供):

等效的 DFA 是:

一旦你有了它,很容易看出 NFA 接受的语言是

的字符串集
  • 从零个或多个 0 开始,
  • 恰好以一个 1.
  • 结尾

字符串“1”,因为它以零0开头,以11结尾,确实被接受了。

What if we had [...]? Would the string "1" be accepted?

是的。这是你的第二个 NFA 的更好的图表:

等效的 DFA 是:

事实上,这里很容易看出“1”是唯一接受的字符串。