简体   繁体   English

从NFA到DFA的转换(具有多个开始状态)

[英]NFA to DFA conversion with multiple start states

So I can take a given NFA with a single start state and convert it into an equivalent DFA quite easily, however I'm stumped when it comes to an NFA with multiple start states. 因此,我可以将一个具有单个起始状态的NFA转换为相当的DFA,但是对于具有多个起始状态的NFA却感到困惑。

Since a DFA can only have one start state (if I'm correct) how do I know which of the two start states in the NFA becomes the sole start state in the DFA. 由于DFA只能有一个开始状态(如果我是对的),我如何知道NFA中的两个开始状态中的哪个成为DFA中唯一的开始状态。

For reference, this is the NFA I'm trying to convert: 供参考,这是我要转换的NFA:

   N|   a   |   b   |   c   |
____________________________
 ->0| {0,2} | {0,3} |  ---  |
*->0|  {0}  |  {0}  |  {3}  |
   0|  {2}  |  ---  | {2,3} |
 * 0|  {2}  |  ---  |  {3}  |

Where: -> = initial state, * = accepting state, --- = empty set, 其中:-> =初始状态,* =接受状态,--- =空集,

A NFA with multiple start states is equivalent to a NFA with an additional state (which becomes the new, single start state) and ϵ-edges from that to the "actual" start states: 具有多个起始状态的NFA等效于具有附加状态的NFA(它将变为新的单个起始状态),并且从该边缘到“实际”起始状态的ϵ边缘

   N|   a   |   b   |   c   |   ϵ   |
----+-------+-------+-------+-------+
   0| {0,2} | {0,3} |   {}  |   {}  |
*  1|  {0}  |  {0}  |  {3}  |   {}  |
   2|  {2}  |   {}  | {2,3} |   {}  |
*  3|  {2}  |   {}  |  {3}  |   {}  |
 ->4|   {}  |   {}  |   {}  | {0,1} |

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM