RE 和有限自动机是否相同?

Is the RE and the finite automata same?

我想知道 RE a∗ba∗ab∗ 是否与下面的有限自动机相同。我感到困惑的部分是,从状态 3 到状态 4 ,有一个 b ,这意味着语言需要在末尾有一个 b ,而 RE 只有 b* 意味着 0 或更多 b 。如果不是这个 RE 的正确有限自动机是什么?

确实,正则表达式 a*ba*ab* 与显示的 DFA 不等同,原因正是您在问题中所述。

Thompson's algorithm is a standard way of systematically converting a regular expression into an NFA. (If you need the finite automaton to be deterministic, you can then run the subset construction.)