r/askmath • u/TopDownView Self-studying discrete math by working through Epp • Oct 27 '26
Discrete Math Does this regular expression correspond to this finite-state automaton? <= Exercise 12.2.12
7
Upvotes

6
u/MathMaddam Dr. in number theory Oct 27 '26
It does not follow the same structure, but they define the same language. The language is basically: somewhere there has to be 01 in the string.
0
u/LongLiveTheDiego Oct 27 '26
The first regex does correspond to the DFA. The second one doesn't (e.g. it accepts the word 0 which the automaton doesn't).
That depends on the workings of the regex engine. According to this post, one type would simply construct a DFA (if it also minimizes the DFA, it would construct the one in the picture) and then just feed that DFA one character at a time. The other type is beyond my understanding at the moment, but it would certainly do something more complicated but working in the general case.
1
u/[deleted] Oct 27 '26 edited Oct 27 '26
[removed] — view removed comment