This paper presents a brief introduction to relation algebras, including some examples motivated by work in computer science, namely, the 'interval algebras', relation algebras that arose from James Allen's work on temporal reasoning, and by 'compass algebras', which are designed for similar reasoning about space. One kind of reasoning problem, called a 'constraint satisfaction problem', can be defined for arbitrary relation algebras. It will be shown here that the constraint satisfiability problem is NP-complete for almost all compass and interval algebras.
Relation AlgebrasComposition of binary relations was introduced to logic by Augustus De Morgan [28] [29] (see [30, pp. 55-57, 208, 221, etc.]). De Morgan observed that the syllogism "every A is a B, every B is a C, so every A is a C" remains valid if the copula "is" is replaced by any transitive relation L. De Morgan went further, noting that if LM is the composition of the relation L with the relation M , that is, A is an LM of B just in case A is an L of an M of B, then the following syllogism is valid: "if every A is an L of a B, and every B is an M of a C, then every A is an LM of a C." De Morgan [29] (see [30, p. 222]) denoted the converse of the relation L by L −1 and its contrary by not-L, and observed that these operations commute: the converse of the contrary of L is the contrary of the converse of L. Around the same time, George Boole [7] [6] created algebra from the logic of classes. Starting with [31] in 1870, Charles Sanders Peirce applied Boole's ideas to create algebra from De Morgan's logic of relations, "and after many attempts produced a good general algebra of logic, together with another algebra specially adapted to dyadic relations (Studies in Logic, by members of the Johns Hopkins University, 1883, Note B,[187][188][189][190][191][192][193][194][195][196][197][198][199][200][201][202][203]