[英]Need help constructing a deterministic finite automata?
What are the rules for constructing a deterministic finite automata in the form of a diagram? 以图表形式构造确定性有限自动机的规则是什么? My professor explained by examples, but I am not exactly sure what rules must be followed by all diagrams. 我的教授通过示例进行了解释,但是我不确定所有图表必须遵循哪些规则。 Any help is appreciated, thanks! 任何帮助表示赞赏,谢谢!
Off the top of my head, in a DFA, these are the main rules, (terms specific to DFAs are in double quotes):- 在我的头上,在DFA中,这些是主要规则(特定于DFA的术语用双引号引起来):
each "state" must have a "transition" for each "input" defined in the DFA 对于DFA中定义的每个“输入”,每个“状态”都必须有一个“转换”
so this means, that a transition must be defined for every input being considered in a dfa, for a state, so that one knows where to go from that state for each input. 因此,这意味着必须为状态中的dfa中考虑的每个输入定义一个过渡,以便每个输入都知道从该状态出发。
each "state" can have only ONE "transition" for each "input" 每个“状态”对于每个“输入”只能有一个“转换”
well this rule is pretty self explanatory, so if you have already defined a transition for an input for a particular state, don't create another transition for the same input from the same state. 很好,这条规则是很容易解释的,因此,如果您已经为特定状态的输入定义了转换,则不要为来自相同状态的相同输入创建另一个转换。
Yeah these are the ones i remember. 是的,我记得这些。 Hope it helps. 希望能帮助到你。 Further these points can be used to differentiate a dfa from a nfa. 此外,这些点可用于区分dfa和nfa。 Other simple rules for drawing would be :- 其他简单的绘图规则是:
make a start state, indicated with arrow pointing towards the state 设定开始状态,并以指向该状态的箭头指示
have at least one final state, indicated with concentric circles to draw the state boundary 具有至少一个最终状态,用同心圆表示以画出状态边界
draw the transitions as arrows 用箭头绘制过渡
mark all the transitions with their respective input symbols 用它们各自的输入符号标记所有过渡
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.