What is the equivalence of regular expressions?
Overview
Equivalence is defined as two regular expressions describing or producing the same language.
Assume the regular expressions
We can use regular expressions to show whether two languages produce the same strings.
Axioms for equivalence
Equivalence
- The associativity property for union:
- The commutativity property for union:
- The associativity property for concatenation:
- The identity property for union:
- The identity property for concatenation:
- The left distributivity property:
- The right distributivity property:
- The idempotence property of Kleene star:
- The annihilator property for concatenation:
Here, the theorem of substitution can also be applied.
The theorem of substitution
Let's assume two substrings,
Example
Let's check the equivalency for the following equation:
These proofs are subjective and follow no set logic. We can solve them based on propositional logic. For this example, we will prove that the right-hand side is equal to the left-hand side using axioms.
Let's take the
Use the identity property for concatenation:
Apply the left distributive property:
Use the associative property for concatenation:
Apply the right distributive property:
Use the identity property of concatenation:
Use the substitution property:
This is equal to the right-hand side of the equation. It is to be noted that
Free Resources