How to find the intersection of two NFA

后端 未结 5 1506
萌比男神i
萌比男神i 2021-01-06 09:54

In DFA we can do the intersection of two automata by doing the cross product of the states of the two automata and accepting those states that are accepting in both the init

5条回答
  •  渐次进展
    2021-01-06 10:31

    there is a huge mistake in the templatetypedef 's answer .

    the product automaton of L1 and L2 which are NFAs :

    new states Q = product of the states of L1 and L2 .

    now the transition function :

    a is a symbol in the union of both automatons alphabets

    delta( (q_1,q_2) , a) = delta_L1(q_1 , a) X delta_L2(q_2 , a)

    which means you should multiply the set that is the resualt of delta_L1(q_1 , a) with the set that results from delta_L2(q_1 , a).

    the problem in the templatetypedef's answer is that the product result (qk ,rk) is not mentioned .

提交回复
热议问题