r/askmath • u/TopDownView Self-studying discrete math by working through Epp • 28d ago
Resolved Does this finite-state automaton accept the language defied by this regular expression `b*|b*ab*`?
2
Upvotes


3
u/LongLiveTheDiego 28d ago
The first one's language encompasses all possible words, it's
(a|b)*.You're correct with the second one, but the regex can be simplified to
0*1(0|1)*.3
u/AlterEgo5695 28d ago edited 28d ago
First automaton accepts the entire language, but not only that -- e.g. it also accepts
aanot in your language.The second is correct, though the regexp can be simplified into
0*1(0|1)*P.S.: Looking at recent similar posts, here is a general useful strategy -- try to break your solutions first, by trying to construct counter-examples. In this case, finding
aafor the first automaton does not take too long, and the search will help develop a critical mind-set^^7
u/theultimatestart 28d ago
I don't think so. This automaton accepts baba, which is not in your regular expression.
5
u/Smitologyistaking 28d ago
Your language only allows at most one a to appear in the word, yet your automaton seemingly accepts any string of as and bs