But suppose instead of symbol a a symbol b comes at final state. Then we should move from final state to some non-final state. In present transition graph in this situation we should make a move to initial state from final state Q.(as again we need ab in string for acceptation)--►(Q0)---a---►(Q1)---b----►((Qf)) ▲ ▲-----a--------| |----------------b--------|此图仍不完整!因为没有Q 中符号a的传出边.对于状态Q 上的符号a,需要一个自循环,因为Q 表示最后一个符号是a.This graph is still incomplete! because there is no outgoing edge for symbol a from Q. And for symbol a on state Q a self loop is required because Q means last symbol was an a. a- || ▼|--►(Q0)---a---►(Q1)---b----►((Qf)) ▲ ▲-----a--------| |----------------b--------|现在,我相信Q &中存在所有可能的向外边缘上图中的Q .一个丢失的边是符号b从Q 的输出边.并且必须在状态Q 处存在一个自循环,因为再次需要一个ab序列,以便字符串可以被接受.Now I believe all possible out-going edges are present from Q & Q in above graph. One missing edge is an out-going edge from Q for symbol b. And there must be a self loop at state Q because again we need a sequence of ab so that string can be accept. (from Q to Q shift is possible with ab) b- a- || || ▼| ▼|--►(Q0)---a---►(Q1)---b----►((Qf)) ▲ ▲-----a--------| |----------------b--------|现在DFA已完成!偏离航道的方法在最初的几次尝试中可能看起来很困难.但是,如果您学会以这种方式进行绘制,您将观察到分析能力的提高.您会发现此方法是绘制DFA的快速而客观的方法.Off-course the method might look difficult at first few tries. But if you learn to draw this way you will observe improvement in your analytically skills. And you will find this method is quick and objective way to draw DFA. 这篇关于给定正则表达式绘制最小DFA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-03 18:01