DFM accepting sum of ab* and ba*

100 Views Asked by At

I have a problem with task: Draw a diagram of the deterministic finite state machine accepting the sum of languages marked with regular expressions ab* and ba*.

I resolve task: Draw a diagram of the deterministic state finite machine accepting the concatenation languages marked with the regular expression ab* and ba*. https://drive.google.com/file/d/1X4hrCSbuqCcNOx1p9AQLkgmoRe06F27N/view?usp=sharing

but I have no idea how to do it for a sum. Please for help. Best regards !

1

There are 1 best solutions below

1
On

Welcome to MSE!

You mean $ab^*\cup ba^*$ (sum as union). The automaton graph has a common starting state $s_0$. Then there are transitions $s_0\stackrel{a}{\rightarrow} s_a$ and $s_0\stackrel{b}{\rightarrow} s_b$ and loops $s_a\stackrel{b}{\rightarrow} s_a$ and $s_b\stackrel{a}{\rightarrow} s_b$, where $s_a,s_b$ are the final states.