Enter the regular expressions P and Q into the calculator to solve a linear regular equation using Arden’s Theorem. This is commonly used when deriving a regular expression from a finite automaton by writing and solving state equations.
Related Calculators
- Muller Equation Calculator
- Multiplying Monomials Calculator
- Pascal’s Triangle Calculator
- Common Ratios Calculator
- All Math and Numbers Calculators
Arden’s Theorem Formula
The following formulas are used to solve linear regular-expression equations using Arden’s Theorem (where “+” means union and juxtaposition means concatenation).
\begin{aligned}
X &= P X + Q,\ \varepsilon \notin L(P)\ \Rightarrow\ X = P^{*}Q \\
X &= Q + X P,\ \varepsilon \notin L(P)\ \Rightarrow\ X = QP^{*}
\end{aligned}Variables:
- X is the unknown regular expression (the solution you want)
- P and Q are known regular expressions
- ε is the empty string, and ε ∉ L(P) means P does not generate the empty string
- * is the Kleene star (zero or more repetitions)
To solve the equation, rewrite it in one of the standard forms above and then apply the corresponding solution (either P*Q or QP*).
What is Arden’s Theorem?
Arden’s Theorem is a result in formal language theory used to solve certain linear equations over regular expressions (or, equivalently, regular languages). In its standard form, if P and Q are regular expressions and ε ∉ L(P), then the equation X = P·X + Q has a unique solution as a language, and one regular expression describing that solution is X = P*·Q. (Different regular expressions can still represent the same language.) Arden’s Theorem is commonly used when converting a finite automaton into a regular expression by setting up and solving state equations.
How to Use Arden’s Theorem?
The following steps outline how to apply Arden’s Theorem to solve a regular equation.
- Write the equation in a standard form, such as X = P·X + Q or X = Q + X·P.
- Identify the expressions P and Q (the “coefficients” and constant term).
- Check the condition for uniqueness: ε ∉ L(P).
- Apply Arden’s Theorem to obtain the solution: X = P*·Q for X = P·X + Q, or X = Q·P* for X = Q + X·P.
- Optionally simplify the resulting regular expression (without changing the language it represents).
- Check your result with the calculator above.
Example Problem :
Use the following as an example problem to test your knowledge.
Equation: X = aX + b
Here, P = a and Q = b
By Arden’s Theorem (since ε ∉ L(a)), the solution is X = a* b
