Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

State Elimination Method convert DFA/NFA/Ɛ-NFA into Regular Expression

  • Difficulty Level : Easy
  • Last Updated : 11 Nov, 2020

State Elimination Method :
Rules to convert a DFA/NFA//Ɛ-NFA into corresponding Regular Expression.

Arden’s Method is not capable of converting Ɛ-NFA. By state elimination method you can conveniently and quickly find RE without writing anything just by imagination.

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

Rule-1 :
If there are no incoming edges to the start state proceed further to check other rules. If there are incoming transitions to the initial state, to get rid of incoming edges make new start with no incoming edges and an outgoing edge to the old start state with Ɛ-transition. the initial state before is now normal state with added incoming Ɛ-transition.



Rule-2 :
If there are no outgoing edges from final state proceed further to check the last rule. If there are outgoing transitions from final state, to get rid of outgoing edges make new final state with no outgoing edges and an incoming edge from old final state of Ɛ-transition. Old final state is transformed into normal state with the added transition of Ɛ.

Rule-3 :
If there are no multiple final states proceed to elimination (except final and initial) of normal states. If the Automata have multiple final states it is recommended to strip their status of being final states and add outgoing Ɛ-transition to new and only final state with no outgoing transitions.

Elimination of Normal States :
Let’s take an example of DFA, and try to find RE by State Elimination method.

DFA ending with ‘a’

Now Rule 1, 2 is violated to satisfy them to make a new final state and new initial state with incoming Ɛ-transition and outgoing Ɛ-transition respectively.

Eliminate State B and C in any order as you wish answer will be the same in both cases, now let’s eliminate B first.

Eliminate B and imagine if there wouldn’t have been any State B then we reach State C directly from Start state A with the input symbol of ‘Ɛb*a’ we can neglect Ɛ then input symbol will be ‘b*a’ from A to C.

Outgoing edge from State C to B is now become self Loop since State B is not there, compare images above and below after removal of B state. Edge from C is going to B, taking b* and returning to C with ‘a’ this can happen infinite time hence self-loop of b(b)*a. We can the two self-loops ‘a’ and ‘bb*a’ as (bb*a +a) meaning we can traverse one loop at a time. Either a or bb*a as resultant (bb*a + a) is a closure on C state = (bb*a + a)*.

Now after eliminating C state, We would reach final State D directly from initial state A, now we were reaching State C by input of ‘b*a’ on C state we are taking infinite loops on (bb*a + a) and with Ɛ reaching final state D. hence Finally no normal states remaining we got a stream of input symbols directly from initial to final which is b*a(bb*a + a)*.

If you reached this far thanks for reading this article this method helps you in finding RE quickly. It will help GATE-CSIT aspirants and CS undergrad also. If you understand this Concept try finding RE for Even 0’s and Odd 1’s, very tricky question I’ll be posting an article about it too. ping me if any error found.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!