How would I convert this state-transition diagram into a regular expression ?

155 Views Asked by At

The state-transition diagram of a finite-state recogniser is as follows :

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

I assume the undirected edges are meant left-to-right ($\to$).

Start with $s_0$ and repeat as many $a$ and $c$ as you want, then transition with $b$: [ac]*b. Then we need a $d$,$a$ and optionally any number of occurrences of $b$,$d$,$a$, i.e. [ac]*bda(bda)* Or shorter

[ac]*(bda)+