简体   繁体   中英

Is the RE and the finite automata same?

在此处输入图片说明

I want to understand if RE a∗ba∗ab∗ is same as the following the finite automata. The Part where I am confused is that, From state 3 to state 4 , there is ab , which means that the language needs to have ab at the end , while the RE just has b* which means 0 or more b . If not what is correct finite automata for this RE ?

Indeed, the regular expression a*ba*ab* is not equivalent to the DFA shown for exactly the reason you stated in your question.

Thompson's algorithm is a standard way of systematically converting a regular expression into an NFA. (If you need the finite automaton to be deterministic, you can then run the subset construction .)

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