简体   繁体   中英

How to convert (ab u aab u aba)* into a NFA?

(ab u aab u aba)*

I did it but I would like some feedback on its correctness:

If it is correct: Can we simplify (ab u aab u aba)* any further?

If not: What did I miss?

EDIT: It seems I am missing e-transitions from all 3 final states back to the initial state and I need a new state that is initial and final which will go to the old initial state on e-transition. (Kleene Star rule).

在此处输入图片说明

PS Can we also simplify (aub)*aabab and (aub)*a(aub)(aub)(aub)(aub) .

The reason why I ask because if there's no way to simplify/minimize, it will be a ridiculously long DFA...

I can see a small simplification of your first case in that you can write it as (a(bu ab u ba))* but that doesn't necessarily help. I would still guess that your DFA won't need as many states as you think.

Both of the latter cases will need DFAs with 32 states in order to keep track of the last 5 characters read. The difference is that the second DFA only has one terminal state while the third DFA has 16.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM