equivalent regular expressions
Let be an alphabet, and be the set of all regular expressions over . Two expressions are said to be equivalent, written , if they describe the same language: .
This relation is clearly an equivalence relation on , and therefore partitions into equivalence classes. Furthermore, if , and are interpreted as operations on , then it is clear that respects each of these operations, and so is a congruence relation on .
Let , the set of equivalence classes. Members of are denoted . For simplicity, we drop the square brackets around from now on.
The following identities (in ) are easily established: for any :
-
1.
-
2.
-
3.
-
4.
-
5.
-
6.
-
7.
-
8.
-
9.
-
10.
-
11.
-
12.
-
13.
-
14.
Identities 1,3,4 establish that is a commutative monoid with as the “addition”, and as the identity. Likewise, identities 5,10,11 establish that is a monoid with as the “multiplication”, and as the identity element. By identities 6 through 9, with the two operations form a semiring ( being the addition and the multiplication). Lastly, identity 2 says that is an idempotent semiring.
Now, as a idempotent semiring, the binary relation such that iff (or ). It is not hard to see the following implication:
(1) |
Assume the left hand side of the implication. In other words, . Then , which implies that , and , which, by induction, implies that , and hence . Now, . Hence we arrive at the right hand side of the implication.
This implication, together with identities 12 and 13, show that , with binary operations and the unary operation , is a Kleene algebra.
Remarks.
-
1.
If we impose the condition , the above implication can be written as
(2) Suppose . We use induction on the length of . If , then , since does not contain the empty word . Suppose now that . Then either where and , or . In the former case, since is not the empty word by the imposed condition, is a strictly shorter word than , which, by induction, is in . As a result, . In the latter case, we have . In either case, , and the implication is proved.
-
2.
Regular expressions can be thought of as well-formed formulas in a formal system. A sentence is of the form where are wffs. An interpretation of the sentence may be defined as the equation . A sentence is valid if its interpretation is true. The list of identities above are all valid sentences, and can in fact be thought of as axioms of the system. There are two rules of inferences:
-
(a)
formal variable substitution, and
-
(b)
from infer , given that is not valid (implication 2 above).
The system is complete if all valid sentences may be derived from the axioms by rules of inferences. We have the following results:
-
–
If the set of axioms is finite, and (a) as the sole rule of inference, then the system is not complete.
-
–
However, the system is complete if the (finite) set of axioms above, and both rules (a) and (b) are used.
-
–
In fact, with (a) and (b), all the axioms we need are 1, 4, 5, 6, 7, 8, 10, 13, 14, and none can be removed to keep the system complete.
-
(a)
References
- 1 A. Salomaa, Formal Languages, Academic Press, New York (1973).
Title | equivalent regular expressions |
---|---|
Canonical name | EquivalentRegularExpressions |
Date of creation | 2013-03-22 18:57:58 |
Last modified on | 2013-03-22 18:57:58 |
Owner | CWoo (3771) |
Last modified by | CWoo (3771) |
Numerical id | 10 |
Author | CWoo (3771) |
Entry type | Definition |
Classification | msc 20M35 |
Classification | msc 68Q70 |