Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要这种语言的 DFA 和正则表达式。
我认为 DFA 是这样,但我得到的正则表达式是 ((aUb)a)*,我认为这是不正确的。
现在使用 DFA 到正则表达式转换,我想我明白了:
((aa|ba)*a)|((aa|ba)*b)|(aa|ba)*
简化为@Bergi 所说:
(aa|ba)*|(a|b|ε)