# Theory of Computation | Arden’s Theorem

**Arden’s theorem** state that:

“If P and Q are two regular expressions over , and if P does not contain , then the following equation in R given by R = Q + RP has a unique solution i.e., R = QP*.”

That means, whenever we get any equation in the form of R = Q + RP, then we can directly replaced by R = QP*. So, here first we will prove that R = QP* is the solution of this equation and then we will also prove that it is the unique solution of this equation.

Let’s start by taking this equation as equation (i)

R = Q + RP ......(i)

Now, replacing R by R = QP*, we get,

R = Q + QP*P

Taking Q as common,

R = Q( + P*P) R = QP*

(As we know that + R*R = R*). Hence proved.

*Thus, R = QP* is the solution of the equation R = Q + RP.*

Now, we have to prove that this is the only solution of this equation. Let me take this equation again:

R = Q + RP

Now, replace R by R = Q + RP,

R = Q + (Q + RP)P = Q + QP + R

Again, replace R by R = Q + RP:-

R = Q + QP + (Q + RP) = Q + QP + Q + R = ... = ... = Q + QP + Q + .. + Q + R

Now, replace R by R = QP*, we get,

R = Q + QP + Q + .. + Q + QP*

Taking Q as common,

R = Q( + P + + .. + + P*) = QP* [As + P + + .. + + P* represent the closure of P]

Hence proved.

**Thus, R = QP* is the unique solution of the equation R = Q + RP. **

To understand this theorem, we will solve an example:

**Example –**

q1 = q1.0 + q2 = q1.1 + q2.0 q3 = q2.1 + q3.0 + q3.1

Now,

q1 = + q1.0 q1 = .0* [By Arden's theorem] q1 = 0* [R = R] .'. q2 = 0*1 +q2.0 q2 = 0*10*

[Applying Arden’s theorem]. Hence, the value of q2 is 0*10*.

## Recommended Posts:

- Theory of Computation | Decidability
- Theory of Computation | Minimization of DFA
- Theory of Computation | Conversion from NFA to DFA
- TOC | Introduction of Theory of Computation
- Theory of Computation | Chomsky Hierarchy
- Theory of Computation | Pushdown Automata
- Theory of Computation | Pumping Lemma
- Last Minute Notes - Theory of Computation
- Theory of Computation | L-graphs and what they represent
- Theory of Computation | Applications of various Automata
- Theory of computation | Halting Problem
- Theory of computation | Decidable and undecidable problems
- Theory of Computation | Relationship between grammar and language
- Theory of Computation | Finite Automata Introduction
- Theory of Computation | Operator grammar and precedence parser

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.