In mathematics, relation algebra (RA) is an algebraic structure, a proper extension of the two-element Boolean algebra 2 intended to capture the mathematical properties of binary relations. RA consists of two binary operations, juxtaposition and relative product, two unary operations, complementation and converse, and the constant 1. Given any set, RA stands to its Cartesian square as Boolean algebra stands to its power set.
Relational algebra is a distinct concept mainly of interest to computer science.
The ordered pair (x, y) has first element x and second element y. Let B be the Cartesian square of A, namely the set of all possible ordered pairs constructible from the members of A, i.e., B = A × A. R and S denote arbitrary binary relations, and E denotes the set membership relation, namely if x∈B, then (x,B)∈E. Just as Boolean algebra is the algebra of the power set of any set, RA is the algebra of the Cartesian square of that set. Because all members of B are ordered pairs, the scope of RA is limited to binary relations but this is not a serious limitation, simply because a single binary relation E suffices for set theory, whose enormous expressive power is beyond question.
Syntax: The notation described here for the binary and unary operations of RA is not the conventional one. The syntax of 2 is:
To this Boolean syntax, we add syntax peculiar to RA:
Boolean Semantics: The intended interpretation of (-) is Boolean complementation; that of juxtaposition is one of Boolean meet or join. If φδ denotes the meet of φ and δ, ((φ)(δ)) denotes their join, and vice versa. Complementation with nothing in its scope denotes one of the two lattice bounds Boolean algebra requires. On the Boolean syntax and semantics employed here, see laws of form.
RA Semantics: 1 denotes the identity relation, consisting of all ordered pairs whose left and right members are identical. 0=(1) denotes the diversity relation, namely all ordered pairs whose left and right members are not identical. If (x,y)∈R, then (y,x)∈〈R〉. If, additionally, (y,z)∈S, then (x,z)∈Hence the intended interpretations of 〈-〉 and converse and relative product, for which the customary notations are and R|S, respectively. The period serves to eliminate ambiguities that would otherwise arise when juxtaposition and relative product interact, as in RA6 below. The notation [φγ.δ" target="_blank" >* denotes the relative product of δ with the juxtaposition of φ and γ.
| Label | Axiom | Remarks | |
|---|---|---|---|
| Axioms for the Boolean algebra 2 | |||
| BA1 | φδγ=δγφ | Juxtaposition commutes, associates. | |
| BA2 | (φ)φ=() | 2 is a bounded lattice. | |
| BA3 | φ(φδ) = φ(δ) | ||
| Axioms Peculiar to RA. | Converse : | ||
| RA1 | 〈〈φ〉〉=φ | * Involution. ((φ)) = φ is a theorem of 2. | |
| RA2 | 〈φδ〉=〈φ〉〈δ〉 | * Preserves juxtaposition. Contrast with RA5 below. | |
| Relative Product : | |||
| RA3 | * Associates. | ||
| RA4 | *=*=φ | * Has 1 as identity element. | |
| RA5 | 〈*〉=* | * Is preserved by converse, except transposed. Contrast with RA2. | |
| RA6 | *=** | * Distributes over juxtaposition. | |
| RA7 | *)]〈δ〉=〈δ〉 | * Is residuated. |
That juxtaposition commutes and associates are easy consequences of BA1 and the theorem φφ=φ. Relative product likewise associates (RA1), but commutes if (RA4) and only if one of the operands is 1. Hence 'and '' can bracket any number of operands, as long as it is understood that the order of operands (except, trivially, 1) cannot be altered. Note that φ and δ in RA2 may be freely interchanged on either side of '=', while the order of φ and δ in RA5 cannot be altered in this way.
RA is a semiring:
The unary operation 〈-〉 can be defined in terms of 1 and as follows. Redefine *" target="_blank" >or 1δ" target="_blank" >*" target="_blank" >⇔ 〈δ〉 and [φ1δ ⇔ [φδ.
Recall that E is the set membership relation, so that E∈R. If at least one of the following two axioms applies to E:
Because RA has the expressive power of Peano arithmetic and set theory, the classic theorems of Gödel apply to it. (N.B. The Boolean algebra fragment of RA is decidable.) In 1950, Roger Lyndon proved that there are statements true in every RA that cannot be proved from the above axioms. In 1964, Donald Monk further proved that there cannot exist a finite set of axioms from which all true equations of RA can be derived.
The computer science formalism relational algebra was pioneered around 1970 by Edgar F. Codd. His name appears nowhere in Tarski and Givant (1987).
This article is licensed under the GNU Free Documentation License.
It uses material from the
"Relation algebra".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world