如何取两个有限Autometas的交集

时间:2013-07-18 10:47:34

标签: finite-automata state-machine

我想要一些如何取两个有限autometa机器的交叉点的例子(图表)。

我学会了两个有限的autometas联合。

我在互联网上搜索过但没找到任何东西。

请不要拒绝我。

1 个答案:

答案 0 :(得分:3)

这个想法非常简单,虽然我可以看到混乱的来源。我将通过笛卡尔积机构造给出交叉(联合,差异)机器的过程的文本/符号描述(同样的事情,如同你在谈论。)

DFA是5元组(E,Q,q0,A,f),其中

E is the input alphabet, a non-empty finite set of symbols
Q is the set of states, non-empty and finite
q0 is the start state, an element of Q
A is the set of accepting or final states, a subset of Q
f is the transition function, taking pairs from Q x E to Q

假设我们有两台机器M'=(E',Q',q0',A',f')和M''=(E'',Q'',q0'',A'',f '')。为了使讨论更容易,我们假设E'= E''。我们现在将构造M''',使得L(M'')= L(M')相交(或联合或差异)L(M'')。

Take E''' = E'' = E'
Take Q''' = Q' x Q''
Take q0''' = (q0', q0'')
Take A''' = (x, y) where x in A' and y in A'' (for union, x in A' or y in A''; for difference, x in A' but not y in A'').
Take f'''((x, y), e) = (f'(x, e), f''(y, e)).
你去吧!我们现在考虑两台机器:一台接受^ 2n,另一台接受^ 3n(交叉点应该是一台机器接受^ 6n ......对吗?)。

对于M',我们有......

E' = {a}
Q' = {s0, s1}
q0' = s0
A' = {s0}
f'(s0, a) = s1, f'(s1, a) = s0

对于M'',我们有......

E'' = {a}
Q'' = {t0, t1, t2}
q0'' = t0
A'' = {t0}
f''(t0, a) = t1, f''(t1, a) = t2, f''(t2, a) = t0

对于M''',我们得到......

E''' = {a}
Q''' = {(s0, t0), (s0, t1), (s0, t2), (s1, t0), (s1, t1), (s1, t2)}
q0''' = (s0, t0)
A''' = {(s0, t0)} for intersection, {(s0, t0), (s0, t1), (s0, t2), (s1, t0)} for union, {(s0, t1), (s0, t2)} for difference.
f'''((s0, t0), a) = (s1, t1), f'''((s1, t1), a) = (s0, t2), f'''((s0, t2), a) = (s1, t0), f'''((s1, t0), a) = (s0, t1), f'''((s0, t1), a) = (s1, t2), f'''((s1, t2), a) = (s0, t0).

你去吧!如果需要澄清,请告诉我。