Converting Finite Automata to Regular Expression using Arden’s Theorem

Converting Finite Automata to Regular Expression using Arden’s Theorem

The Arden’s Theorem can be applied to find the regular expression recognized by the given transition diagram. This theorem can be applied to transition diagram not containing ?-moves or ?-transitions. Let’s first understand the Arden’s Theorem.

Arden’s Theorem

Let P, Q, and R be three Regular Expressions over ?. If P does not contain ? then the equation R= Q + RP has a unique solution given by R = QP*

Proof:

We have R = Q + RP*             ……….Eq (1)

and R = QP*

Substitute R = QP* in (1) we get.

R = Q + (QP*) P

   = Q + QP*P

   = Q (? + P*P)

   = QP* (by using identity ? + R*R = R*)

Thus R = QP* is a solution of R = Q + RP

Example 1

Find the regular expression equivalent to the following transition diagram.

Converting Finite Automata to Regular Expression using Arden’s Theorem

Solution:

The above transition diagram does not contain ?-moves or transitions. So, we apply Arden’s Theorem method to find the regular expression.

The equation corresponding to state q0 and q1 is shown below:

 q0 = q0b + ?                          …………. (1)

 q1 = q0a + q1a + q1b          ……………… (2)

In given transition diagram q1 is the final state. So, the resulting regular expression will be equal to q1.

From eq (2) we have:

q1 = q0a + q1a + q1b     

q1 = q0a + q1 (a + b)

q1 = q0a (a + b)*

(by using Arden’s Theorem, if R = Q +  RP then R = QP* )               ……………… (3)

From equation (1), we have

q0 = q0b + ?    

q0 = ?b*

q0 = b* (using Arden’s Theorem)

Substituting the value of q0 = b* in equation (3) we get,

q1 = b*a (a + b)*

Hence the final Regular Expression equivalent to the given transition diagram is:

Regular Expression =   b*a (a + b)*.

Example 2

Find the regular expression equivalent to the following transition diagram.

Converting Finite Automata to Regular Expression using Arden’s Theorem

Solution:

The above transition diagram does not contain ?-moves or transitions. So, we apply Arden’s Theorem method to find the regular expression.

The equations corresponding to state q0, q1 and q2 is shown below:

 q0 = q0b + ?                          …………. (1)

 q1 = q0a + q1b + q2a         ……………… (2)

 q2 = q1a                               ……………… (3)

In given transition diagram, q1 and q2 are the final states. So, the final resulting regular expression will be equal to the sum of both the regular expressions.

From equation (1), we have

q0 = q0b + ?    

q0 = ?b*

q0 = b* (using Arden’s Theorem)

Substituting the value of q0 and q2 in equation (2), we get ………………….. (4)

q1 = q0a + q1b + q2b a   

q1 = b*a + q1b + q1aa

q1 = b*a + q1 (b + aa)

q1 = b*a (b + aa)*             …………………… (5)

Substituting the value of q1 from equation (5) to equation (3), we get

 q2= q1a   

 q2 = b*a (b + aa)*a       

Hence the final Regular Expression equivalent will be equivalent to:

Regular Expression =   q1 + q2 = b*a (b + aa)*   + b*a (b + aa)*a        

Example 3

Find the regular expression equivalent to the following transition diagram.

Converting Finite Automata to Regular Expression using Arden’s Theorem

Solution:

The above transition diagram does not contain ?-moves or transitions. So, we apply Arden’s Theorem method to find the regular expression.

The equations corresponding to state q0, q1 and q2 is shown below:

 q0 = q0a + ?                          …………. (1)

 q1 = q0b + q1b       ……………… (2)

 q2 = q1 (a +b) + q2 (a + b)                              ……………… (3)

In given transition diagram q0 and q1 are the final state. So, the final resulting regular expression will be equal to the sum of both the regular expressions.

From equation (1), we have

q0 = q0a + ?    

q0 = ? a*

q0 = a* (using Arden’s Theorem)           ………………….. (4)

by substituting the value of q0 in equation (2), get

q1 = q0b + q1b      

q1 = a*b + q1b

q1 = a*bb*

q0 + q1 = a* + a*bb*

              = a*(? + bb*)

              = a*b* ( by using identity ? + RR* = R*)

Hence the final Regular Expression equivalent to the given transition diagram is

Regular Expression = a*b*.


Related Topics

Context Free Grammar - Automata

Context Free Grammar Grammar defines a set of rules, and with the help of these rules valid sentences in a language are constructed. A grammar consists of collection of substitution rules,...

3 minutes read.

Equivalence of Regular Grammar and Finite Automata

Equivalence of Regular Grammar and Finite Automata Regular Grammar / type -3 grammar A regular grammar or type-3 defines the language called regular language that is accepted by finite Automata.A Regular Grammar...

3 minutes read.

Non-deterministic Turing Machine - Automata

A non-deterministic Turing machine (NTM) is a theoretical machine used in computability theory to study the extent to which a machine can "guess" at a solution and yet still be...

4 minutes read.

Converting Finite Automata to Regular Expression using Arden’s Theorem

Converting Finite Automata to Regular Expression using Arden’s Theorem The Arden’s Theorem can be applied to find the regular expression recognized by the given transition diagram. This theorem can be applied...

4 minutes read.

Conversion from Mealy Machine to Moore Machine

Conversion from Mealy Machine to Moore Machine In this topic, we will see different ways that are used for the conversion of Mealy Machine to Moore Machine. Moore Machine The output of Moore...

4 minutes read.

Pumping Lemma for Regular Languages - Automata

Pumping Lemma for Regular Languages The language accepted by the finite automata is called Regular Language. If we are given a language L and asked whether it is regular or not?...

4 minutes read.

Finite Automata with Output

Finite Automata with Output The Finite State machine is similar to Finite Automata, except that it has the additional capacity of producing output. Finite State machine = Finite Automata + Output Capabilities Types...

3 minutes read.

Finite Automata

Finite Automata Finite state Automata or Finite State Machine is the simplest model used in Automata. Finite state automata accepts regular language. In this, the term finite means it has a...

4 minutes read.

Recursive Language and Recursive Enumerable Language

Recursive Language and Recursive Enumerable Language Before discussing Recursive language and Recursive Enumerable language, let us see what Turing machine responds for some input string. If we have the Turing machine T...

4 minutes read.

What is Automata Theory?

What is Automata Theory? Automata theory is used to study the abstract machine and automata (the self-acting machine).  Abstract machine is a theoretical model of a computer used in Automata theory. Automata...

4 minutes read.

Chomsky's Normal Form - Automata

Chomsky's Normal Form (CNF) In context free grammar, the left-hand side of production rules contains only one variable, and right side may contain any number of variables or terminals in production...

4 minutes read.

Ambiguity in Context Free Grammar - Automata

Ambiguity in Context Free Grammar? Context Free Grammar Context Free Grammar has one condition for production rules, which is, on the left-hand side of each rule, there must be only single variable,...

4 minutes read.

Conversion from Moore Machine to Mealy Machine

Conversion from Moore Machine to Mealy Machine Moore Machine The output of Moore machine depends only on the present state. In this, if machine has N number of states, then it will...

6 minutes read.

Automata Greibach Normal Form

Greibach Normal Form In Greibach Normal Form, there is restriction on the position, in which, terminals and variables can appear on right-hand side of production rules. In Greibach Normal Form, every...

4 minutes read.

Automata Chomsky Hierarchy

Chomsky Hierarchy Formal languages: A language with precise syntax and semantics are called formal languages. Noam Chomsky has defined the Chomsky hierarchy in 1956. He is an American scientist and philosopher, and...

3 minutes read.

Pumping Lemma for Context Free Languages

Pumping Lemma for Context Free Languages The Pumping Lemma is made up of two words, in which, the word pumping is used to generate many input strings by pushing the symbol...

3 minutes read.

Push down Automata Acceptance

Acceptance of Language by Push down Automata Push down Automata accepts the language, which is called context free language. Push down Automata = Finite Automata + Auxiliary Memory (Stack) Auxiliary Memory helps Push...

3 minutes read.

Closure Properties of Regular Languages -Automata

Closure Properties of Regular Languages We use the term “Closure” when we talk about sets of things. If we have two regular languages L1 and L2, and L is obtained by...

3 minutes read.

Derivation Tree of Context Free Grammar - Automata

Derivation Tree of Context Free Grammar Derivation tree gives a way to show how a string can be derived from context free grammar. It is also called as parse tree, production...

3 minutes read.

Automata Tutorial

What is Automata? Automata is a mathematical model and abstract model, which is used to detect string in various languages. In Automata, Regular language is recognized by Finite state AutomataContext Free language...

4 minutes read.