Generate RE for a given finite automata by using the state elimination method.
There are two methods for converting a Deterministic Finite Automata (DFA) to Regular expression (RE).
The given automata is as follows−
Initial state is A that has an incoming edge.
So, we have to create a new initial state qi as follows−
Initial state is B that has an incoming edge.
So, we have to create a new final state qf as given below−
Now, try to eliminate all intermediate states one by one.
First eliminate state A
There is a path from state qi to B via A.
So, after eliminating state A, we can connect a direct path from qi to B having cost.
There is a loop on state B using State A.
So, after eliminating state A, we can draw a direct loop on state B having cost.
After eliminating A, we get the following −
Now eliminate State B
There is a path from state qi to qf via state B.
So, after eliminating B, we can draw a direct path from qi to state qf having cost
Final Regular Expression is = 0(10)*