用于模拟NFA的数据结构

时间:2014-08-03 06:46:53

标签: python finite-automata nfa

我试图找出最好的数据结构,我尝试了一个字典,但似乎不是更好的选择。

(0, ''): [0, 1, 3], (1, 'a'): 2, (2, ''): [2, 1, 3], (3, 'b'): 4

在列表中有ε-moves,但是当我不提出它们时,很难实现ε-closure功能。

我试图在Dragon's Book中实现这样的算法: enter image description here

我不知道如何以Python方式实现ε-closure

正则表达式:a*b

enter image description here

也许是一个链表?谢谢你的例子。

0 个答案:

没有答案