Abstract 1 Introduction 2 Preliminaries 3 Representations for Algebras with at most 4 Atoms 4 NP-hard Algebras with at most 4 Atoms 5 Tractable Algebras with at most 4 Atoms 6 Open Problems References Appendix A Appendix

The Network Satisfaction Problem for Relation Algebras with at Most 4 Atoms

Manuel Bodirsky ORCID Institut für Algebra, TU Dresden, Germany    Moritz Jahn ORCID Institut für Algebra, TU Dresden, Germany    Simon Knäuer ORCID Institut für Algebra, TU Dresden, Germany    Matěj Konečný ORCID Institut für Algebra, TU Dresden, Germany    Paul Winkler ORCID Institut für Algebra, TU Dresden, Germany
Abstract

Andréka and Maddux classified the relation algebras with at most 3 atoms, and in particular they showed that all of them are representable [1]. Hirsch and Cristiani showed that the network satisfaction problem (NSP) for each of these algebras is in 𝐏 or 𝐍𝐏-hard [26]. The literature contains many results on representations of relation algebras; in particular, some relation algebras with four atoms are not representable. We extend the result of Cristiani and Hirsch to relation algebras with at most 4 atoms: the NSP is always either in 𝐏 or 𝐍𝐏-hard. To this end, we construct universal, fully universal, or even normal representations for these algebras, whenever possible.

Keywords and phrases:
Constraint Satisfaction, Computational Complexity, Relation Algebras, Network Satisfaction, Normal Representations, Polynomial-Time Algorithms
Category:
Track B: Automata, Logic, Semantics, and Theory of Programming
Copyright and License:
[Uncaptioned image] © Manuel Bodirsky, Moritz Jahn, Simon Knäuer, Matěj Konečný, and Paul Winkler; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation
; Theory of computation Constraint and logic programming ; Theory of computation Problems, reductions and completeness
Related Version:
Full Version: https://arxiv.org/abs/2507.09324
Funding:
Manuel Bodirsky, Moritz Jahn, Matěj Konečný, and Paul Winkler received funding from the ERC (Grant Agreement no. 101071674, POCOCOP). Views and opinions expressed are however those of the authors only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency.
Editors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele Puppis

1 Introduction

Relation algebras are algebraic structures that can be used to abstractly reason about binary relations. They are certain expansions of Boolean algebras; besides the operations for union, intersection, and complement of binary relations, we also have a binary operation for composition of relations, and a unary operation ˘ for reversing the arguments of a binary relation. These operations need to satisfy certain natural identities; e.g., we require that (ab)˘=b˘a˘ holds for all elements a and b of the relation algebra.

Similarly to the fundamental facts that every group is isomorphic to a permutation group, and every Boolean algebra is isomorphic to an algebra of sets, the initial hope was that every relation algebra has a representation, which consists of a set of binary relations on some set that behave as prescribed by the relation algebra [39].

Example 1.

We first look at a concrete structure from which a small relation algebra can be obtained. Consider the structure (;<), where is the set of rational numbers and < is the usual strict linear order on . For any two rational numbers x,y, exactly one of the following holds: x<y, x=y, or x>y. Thus, the relations <, =, and > form a partition of 2. Moreover, <˘=>, where ˘ denotes the usual converse operation on binary relations, defined by R˘={(y,x)(x,y)R}.

This partition gives rise to a relation algebra 𝐀 with three atoms, denoted by r, Id, and r˘. Its domain A consists of all formal unions of these atoms, i.e., A={0,r,r˘,Id,rId,r˘Id,rr˘,rr˘Id}. The other Boolean operations are defined in the usual way.

Let denote the usual composition of binary relations, i.e.,

RS={(x,z)y:(x,y)R and (y,z)S}.

In (;<), for example, we have <<=< and <>=(<>=). Accordingly, 𝐀 has a binary operation, also denoted by , satisfying, for example, rr=r and rr˘=(rr˘Id).

Note that 𝐀 is a Boolean algebra with 8 elements, together with a binary operation and a unary operation ˘. Instead of obtaining 𝐀 from concrete relations on , one may also start with the abstract algebra 𝐀 and ask whether it has a “representation”, similarly as above. Formally, we ask whether there exists a set D and an injective homomorphism h:A𝒫(D2) preserving the Boolean operations, converse, and composition. In particular, distinct atoms are mapped to disjoint binary relations, while formal unions such as rId are mapped to the corresponding unions. In the present example, the ordered set (;<) provides such a representation: take D= and map r, Id, and r˘ to the relations <, =, and >, respectively. The value of h on all other elements of A is then determined by preservation of the Boolean operations; for example, h(rId)=h(r)h(Id)=(<=).  

1.1 Network Satisfaction Problems and CSP Complexity

Starting in the 90s, another generation of researchers investigated relation algebras motivated by applications in theoretical computer science, particularly for the theory of constraint satisfaction. In a constraint satisfaction problem, we are given a finite set of variables and a finite set of constraints, and the task is to determine whether there exists an assignment to the variables that satisfies all the constraints. Constraint satisfaction problems have been studied intensively if the variables take values from a fixed finite domain. Relation algebras allow one to formalize interesting constraint satisfaction problems where the variables may take values from an infinite domain.

Concretely, to every finite relation algebra 𝐀, we may associate the so-called network satisfaction problem, which is a computational problem where the input consists of a “constraint network”, i.e., a finite set of nodes V and a function labeling pairs of nodes with elements from the relation algebra, and the task is to decide whether there exists a representation of 𝐀 where this network is satisfiable. Under certain representability conditions, e.g., if 𝐀 has a square representation ([7, Section 1.5]; definitions may be found in Section 2), the network satisfaction problem for 𝐀 is a constraint satisfaction problem as described above, but not necessarily for values from a finite set (the values rather come from the elements of the representation, which might be infinite).

If there is a so-called fully universal representation, then the network satisfaction problem is in 𝐍𝐏. However, the complexity sometimes even drops to 𝐏 (polynomial time). The computational complexity of the NSP has been shown to be 𝐍𝐏𝐜 (𝐍𝐏-complete) or 𝐏 for each relation algebra with at most 8=23 elements by Cristiani and Hirsch [26] (such relation algebras are called “small relation algebras”).

Example 2.

Let 𝐀 be the relation algebra from Example 1. An 𝐀-network consists of finitely many nodes and a function f:V2A mapping each ordered pair to some element of the relation algebra. Under the representation over (;<), the label f(x,y) specifies the allowed relative position of the values assigned to x and y.

For instance, consider a network with nodes x,y,z and function f such that f(x,y)=r, f(y,z)=rId, and f(z,x)=r˘Id, and such that all other pairs are labeled by rr˘Id. Under the representation over (;<), these constraints mean x<y, yz, and zx, respectively. This network is satisfiable, for example by assigning x=0, y=1, and z=2.

On the other hand, if f(x,y)=r, f(y,z)=r, and f(z,x)=r, then the network is not satisfiable in this representation, since it would require x<y<z<x.

In fact, the representation over (;<) is normal, in particular fully universal; see Section 2 for the definitions. The fact that the representation is fully universal implies that the network satisfaction problem for 𝐀 amounts to deciding whether a finite system of constraints over the signature {,<,,>,,=,,2} can be satisfied over the rational numbers.  

Hirsch [30] asked whether the computational complexity of the network satisfaction problem can be classified for all finite relation algebras. Bodirsky and Knäuer [12] proved that the problem of deciding whether a given finite relation algebra has an NSP which is in 𝐏 is undecidable, which can be interpreted as a negative answer to Hirsch’s question. The proof of the undecidability result relies on two earlier results, namely that there are finite relation algebras whose NSP is undecidable [31], and that the question whether a finite relation algebra has a representation is undecidable [29]. The classification for relation algebras with a fully universal representation, however, remains wide open.

A particularly interesting subclass are the relation algebras that have a normal representation, i.e., a representation which is fully universal, square, and homogeneous [30]. While this combination of assumptions still captures a rich class of relation algebras, it has a wide range of strong and useful consequences, as we will see below. A relational structure is homogeneous if every isomorphism between finite substructures can be extended to an automorphism of the structure. If a relation algebra 𝐀 has a normal representation, then 𝐀 has a countable normal representation 𝔅, and this representation is unique up to isomorphism. Moreover, one can express important properties of the automorphism group of 𝔅 using 𝐀, and conversely, properties of 𝐀 are reflected in this group. It is known that the question whether a given finite relation algebra has a normal representation is decidable [6].

The NSPs for relation algebras with a normal representation fall into the scope of the so-called tractability conjecture in constraint satisfaction, which implies that CSPs of reducts of finitely bounded homogeneous structures are in 𝐏 or 𝐍𝐏-complete [16]. In particular, the subclasses of 𝐍𝐏 that properly lie between 𝐏 and 𝐍𝐏 and were constructed by Ladner [34] (conditionally on 𝐏𝐍𝐏) do not show up when classifying such NSPs. Such a dichotomy statement has been established for CSPs of finite structures [42] (announced independently by Bulatov [18] and by Zhuk [43]). One of the motivations for the more general conjecture from [16] is that many of the universal-algebraic methods used by both Bulatov and Zhuk can be applied for the more general class. And indeed, there exists a universal-algebraic condition which is a candidate for separating polynomial-time tractable from 𝐍𝐏-complete CSPs for reducts of finitely bounded homogeneous structures, and this condition has numerous equivalent characterisations [16, 4, 3, 5, 7]. If this condition applies, the CSP is provably 𝐍𝐏-hard; if not, then the conjecture states that the CSP is in 𝐏. In our case, the tractability conjecture can be formulated as follows (for the definition of pp-constructability, see Section 2). Let NAE:={0,1}3{(0,0,0),(1,1,1)} be the ternary Boolean not-all-equal relation.

Conjecture 2.

Let 𝔅 be a normal representation of a finite relation algebra 𝐀. If 𝔅 does not pp-construct ({0,1};NAE), then CSP(𝔅) and NSP(𝐀) are in 𝐏.111In the case where 𝔅 is a normal representation of 𝐀, CSP(𝔅) and NSP(𝐀) are the same computational problem up to the translation between 𝐀-networks and A-structures.

We mention that the scope of the tractability conjecture from [16] for NSPs of relation algebras is larger than just the relation algebras with a normal representation: e.g., if a relation algebra has a representation which is homogenizable in the sense that we can add finitely many first-order definable relations to make it homogeneous, then its NSP is covered as well.

Homogeneous structures are also of central interest in model theory; via Fraïssé’s theorem, they are particularly easy to construct and provide a rich source of examples and counterexamples. It is conceivable that the class of homogeneous structures with a finite relational signature can be classified in some sense. There are uncountably many [28], but the uncountable families usually have a particularly simple shape [23]. One of the approaches in the study of homogeneous structures is to fix some (often binary) relational signature (e.g., the signature of graphs [33], digraphs [23], permutations [21], metric spaces [22], etc.) and to then classify the homogeneous structures with this signature. One of the motivations for this research program is its success story of producing beautiful and interesting mathematical structures that have inspired research in the areas mentioned above. Systematically listing finite relation algebras and then testing for the existence of a normal representation is another approach that can produce interesting new examples of homogeneous (or homogeneizable) structures.

There are potentially further well-behaved subclasses of representable relation algebras beyond those admitting homogenizable or even normal representations. To identify such classes, it is natural to consider families of relation algebras that are both sufficiently representative and sufficiently small to allow for a detailed analysis. Restricting the number of atoms provides such a family.

1.2 Contributions

We extend the mentioned result of Hirsch and Cristiani on small relation algebras, and systematically study all relation algebras with at most 16=24 elements. An exhaustive list of the building blocks for such relation algebras has been computed by Maddux [37], confirming results of Comer [25], namely a list for the integral symmetric relation algebras with four atoms (numbered 1656565 by Maddux) and a list for the integral relation algebras with an asymmetric atom among its four atoms (numbered 1373737 by Maddux).

We prove that the NSPs for these not so small relation algebras are in 𝐏 or 𝐍𝐏-hard. In the case where the algebra has a normal representation, our results confirm the mentioned tractability conjecture from [16]. More formally, we obtain the following results.

Theorem 3.

Let 𝐀 be a finite relation algebra with at most four atoms. Then NSP(𝐀) is in 𝐏 or 𝐍𝐏-hard.

Theorem 4.

Let 𝔅 be a normal representation of a finite relation algebra 𝐀 with at most four atoms. If 𝔅 does not pp-construct ({0,1};NAE), then CSP(𝔅) and NSP(𝐀) are in 𝐏.

For all but one of these algebras we also prove the containment of the NSP in 𝐍𝐏; the one exceptional case is 5665. Actually, its NSP is also contained in 𝐍𝐏, but the proof requires substantially different techniques and is published separately (see [8]).

In addition to our classification of NSP complexity, we revisit representability for all finite relation algebras with at most 4 atoms. Several of the algebras in the list do not have a representation (in which case the NSP is trivial and in 𝐏). We determine for each of the representable algebras 𝐀 whether 𝐀 has a normal representation, and if not, whether at least it has a fully universal (or even fully universal square) representation. This result is of independent interest in the theory of relation algebras; representations for all relation algebras with at most 3 atoms have been found in 1994 [1]. For this purpose, we present a combinatorial characterization for the existence of a fully universal square representation.

We think of this paper as exploratory work towards more general classifications of the complexity of NSPs, or representability questions, of suitable subclasses of relation algebras. Maddux’s list of relation algebras with at most four atoms is at the same time rich enough to display diverse behaviour, while remaining small enough for detailed analysis, including computer-assisted inspection.

We verified that in many cases, the existing methods apply (e.g. [12, 11, 10]). At the same time, we also needed to develop new methods (such as proving 𝐍𝐏-hardness of the NSPs by reductions from the approximate graph coloring problem CSP(K3,K5) [19]; a so-called promise constraint satisfaction problem), as well as several ad hoc arguments for concrete cases. Several of these deserve explicit mention.

  • 2465; this algebra is related to the class of 3-edge-coloured cliques with no rainbow triangle, which exhibits some nice combinatorics, and has a fully universal representation. Our structural insights are then the basis for a polynomial-time algorithm for its NSP; see Section 5.1 for details.

  • 1737; this algebra is related to the class of quasi-transitive oriented graphs, which has been studied in graph theory [2]. There is no fully universal representation and we identify an atomic network with 4 vertices which is consistent but unsatisfiable. By working with the class of consistent atomic networks that exclude this 4-element network, we can construct a universal representation for 1737. Our structural insights in combination with results from [2] are then also useful for a polynomial-time algorithm for the NSP of 1737.

  • 5165; this algebra contains exactly one non-trivial equivalence relation, and in every representation, the equivalence relation can have at most 3 classes. Our representability results for this algebra follow a similar pattern as our results for 1737: while there is no fully universal representation, we can identify four atomic networks that are consistent but unsatisfiable. Excluding those, we can construct a universal representation; it follows that the NSP is in 𝐍𝐏, and in fact it is 𝐍𝐏-complete.

  • 5665; this relation algebra is similar to the previous one, but allows one extra triple compared to 5165. It has a representation, but not a fully universal one. Its NSP is 𝐍𝐏-hard.

There are already several thousand relation algebras with five atoms [37], making a direct extension of the present classification substantially more challenging. The four-atom examples are expected to correspond to large subclasses of the five-atom list, and analysing these subclasses will help to identify useful generalisations by methods developed in this article.

1.3 Significance for Constraint Satisfaction

We believe that network satisfaction problems for relation algebras with a normal representation are an important class on which to test the mentioned tractability conjecture. The reason is that this approach can lead to CSPs with different behaviour, challenging the current methods. Previously, the tractability conjecture has mainly been tested on structures obtained as follows: fix a homogeneous finitely bounded “base” structure of fundamental interest (such as (;<) or the Rado graph), and study the CSP of all first-order reducts of it (see, e.g., [9, 15]). The advantage of this approach is that the model-theoretic properties of the entire class of structures obtained like this are inherited from the base structure, and the remaining task is mostly universal-algebraic. This advantage is at the same time a disadvantage, because by fixing a base structure we might overlook some phenomena that only appear for other base structures. The approach of the present article avoids this; and indeed, our study shows that new structures with different behaviour and interesting polynomial-time CSPs may show up.

2 Preliminaries

In the following, we will introduce some concepts from universal algebra and constraint satisfaction, as well as formal definitions of relation algebras and representations.

2.1 Constraint Satisfaction

Our basic terminology and notation (relational structures, homomorphisms, etc.) is standard; see e.g., [32], or the long version of the article. Let 𝔅 be a structure with a finite relational signature τ. Then the constraint satisfaction problem CSP(𝔅) is the problem of deciding for a given finite τ-structure 𝔄 whether there exists a homomorphism to 𝔅.

Example 5.

CSP({0,1};NAE) is the positive not-all-equal 3-SAT problem, which is 𝐍𝐏-complete [27].  

A more refined tool than many-one reductions to determine the computational complexity of a CSP are pp-interpretations and pp-constructions. The advantage of these kinds of reductions is that they have an algebraic characterization and hence open up ways of solving complexity questions by means of universal algebra. A formula is called primitive positive (shortly pp) if it is of the form x1xk(ψ1ψn), where each ψi is atomic, i.e., of the form , , x=y, or R(xi1,,xil) for some relation R in the signature.

Definition 6.

Let 𝔄 and 𝔅 be structures with relational signatures τ and σ, respectively. A primitive positive interpretation of dimension d of 𝔄 in 𝔅 is a partial surjection h:dom(h)BdA such that for every relation R, say of arity k, which can be defined by an atomic formula over 𝔄, the (kd)-ary relation h1(R) given by

{(b11,,b1d,,bk1,,bkd)Bkd(h(b11,,b1d),,h(bk1,,bkd))R𝔄}

can be defined in 𝔅 by a primitive positive formula φR. Since equality and are always allowed as atomic formulas, there must in particular exist

  • a σ-formula φ (called the domain formula) such that φ(b1,,bd) holds if and only if (b1,,bd) is in the domain of h;

  • a σ-formula φ= such that φ=(b1,,bd,c1,,cd) holds if and only if h(b1,,bd)=h(c1,,cd).

In this case we say that 𝔅 pp-interprets 𝔄. We say that 𝔅 pp-constructs 𝔄 if 𝔅 pp-interprets a structure that is homomorphically equivalent to 𝔄, i.e., there exists a homomorphism from 𝔄 to and one from to 𝔄.

The following is well-known.

Proposition 7 (see, e.g., [7, Theorem 3.1.4]).

If 𝔅 pp-constructs 𝔄, then CSP(𝔄) is log-space reducible to CSP(𝔅). In particular, if 𝔅 pp-constructs ({0,1};NAE), then CSP(𝔅) is 𝐍𝐏-hard.

An important concept from universal algebra to study the complexity of CSPs of finite and ω-categorical structures is that of polymorphisms.

Definition 8.

Let τ be a relational signature. A polymorphism of a τ-structure 𝔅 is a homomorphism f from the direct product 𝔅k to 𝔅.

Intuitively, polymorphisms are a generalisation of automorphisms; the existence of certain polymorphisms of 𝔅 can imply tractability of CSP(𝔅), while non-existence of certain polymorphisms often implies hardness.

2.2 Relation Algebras

(Integral) relation algebras have also been discovered and studied with a different formalism and under the different name of hypergroups [44] (also called polygroups [25]).

Definition 9.

A relation algebra is an algebra 𝐀 with domain A and signature {,¯,0,1,Id,˘,} such that

  1. 1.

    the structure (A;,,¯,0,1), with defined by xy:=(x¯y¯)¯, is a Boolean algebra;

  2. 2.

    is an associative binary operation on A, called composition;

  3. 3.

    for all a,b,cA: (ab)c=(ac)(bc);

  4. 4.

    for all aA: aId=a;

  5. 5.

    for all aA: a˘˘=a;

  6. 6.

    for all a,bA: (ab)˘=a˘b˘;

  7. 7.

    for all a,bA: (ab)˘=b˘a˘;

  8. 8.

    for all a,bA: b¯(a˘(ab)¯)=b¯.

If 𝐀 is a relation algebra with elements a and b, then we write ab if ab=a holds in 𝐀. Clearly, defines a partial order on A. An element bA{0𝐀} is called an atom if there is no element aA{0𝐀,b} with ab. The set of all atoms is denoted by A0.

For a finite relation algebra 𝐀, the operation is completely determined by its restriction to the atoms. A tuple (x,y,z)(A0)3 is called an allowed triple if zxy. Otherwise, (x,y,z) is called a forbidden triple. We denote by

Cy(𝐀):={(x,y,z)A0zxy}

the set of all allowed triples. An element aA is called reflexive if Ida, symmetric if a˘=a, transitive if a2a, and an equivalence relation if a is reflexive, symmetric, and transitive. A relation algebra 𝐀 is called symmetric if all aA are symmetric, integral if 01 and xy=0 implies x=0 or y=0 (see [36]), and simple if 1x1=1 for all x0. Each relation algebra has an associated finite relational structure, its atom structure.

Definition 10.

Let 𝐀 be a relation algebra. The atom structure of 𝐀 is the finite relational structure 𝔄0 with domain A0 and the following relations:

  • for every bA the unary relation b𝔄0:={aA0ab},

  • the binary relation E𝔄0:={(a1,a2)A02a1˘=a2}, and

  • the ternary relation R𝔄0:=Cy(𝐀).

If R1,R2B2 are two binary relations, then R1R2 denotes the composition

R1R2:={(x,z)B2 there exists yB with (x,y)R1 and (y,z)R2}.
Definition 11.

Let 𝐀=(A;,¯,0,1,Id,˘,) be a relation algebra. A structure 𝔅 with signature A is called a representation of 𝐀 if

  1. 1.

    0𝔅=;

  2. 2.

    1𝔅=aAa𝔅;

  3. 3.

    Id𝔅={(u,u)uB};

  4. 4.

    for all aA we have (a¯)𝔅=1𝔅a𝔅;

  5. 5.

    for all aA we have (a˘)𝔅={(u,v)(v,u)a𝔅};

  6. 6.

    for all a,bA we have a𝔅b𝔅=(ab)𝔅;

  7. 7.

    for all a,bA we have a𝔅b𝔅=(ab)𝔅.

Relation algebras that have a representation are called representable.

All relation algebras with at most 23=8 elements have a representation [1]. Tarski [39] asked whether every relation algebra is representable. This question was answered by Lyndon [35], who found a relation algebra with 256 elements which is not representable. Monk [38] later showed that this problem has no easy fix, because the class of representable relation algebras cannot be axiomatized by a finite set of identities, and not even by a finite set of first-order sentences, answering another question of Tarski. However, it follows from results of Tarski [40] that there is an infinite set of identities that axiomatizes the representable relation algebras.

A useful tool to construct more complex relation algebras from simpler ones is the so-called 2-cycle product; the construction preserves representability (and, as we will see, even fully universal representability, normal representability, etc.) and it will also be useful in complexity considerations.

Definition 12.

Let 𝐀 and 𝐁 be two finite relation algebras such that A0B0={Id}. The 2-cycle product 𝐀[𝐁] is defined to be the up to isomorphism unique relation algebra 𝐂 such that C0=A0B0 and

Cy(𝐂)=Cy(𝐀)Cy(𝐁){(a,b,b)aA0{Id},bB0{Id}}.
Definition 13.

If 𝐀 is a relation algebra, then an 𝐀-network (V,f) consists of a finite set of variables V and a function f:V2A (see, e.g., [7, Section 1.5.3]). If 𝔅 is a representation of 𝐀, then (V,f) is called satisfiable in 𝔅 if there exists a function s:VB such that for all x,yV we have (s(x),s(y))f(x,y)𝔅. An 𝐀-network (V,f) is called

  • atomic if for all x,yV we have that f(x,y) is an atom in 𝐀;

  • consistent (also: path-consistent, 3-consistent, or closed) if for all x,y,zV we have

    f(x,y)f(x,z)f(z,y) and f(x,x)Id; (2.1)
  • satisfiable if it is satisfiable in some representation of 𝐀.

Definition 14.

The network satisfaction problem for a fixed finite relation algebra 𝐀, denoted by NSP(𝐀), is the following computational problem: The input consists of an 𝐀-network (V,f). The task is to decide whether (V,f) is satisfiable.

Definition 15.

A representation 𝔅 of a relation algebra 𝐀 is called universal if every satisfiable 𝐀-network is satisfiable in 𝔅, and fully universal if every consistent atomic 𝐀-network is satisfiable in 𝔅.

Definition 16.

A representation 𝔅 of 𝐀 is called normal if it is square, fully universal, and homogeneous.

It follows from Theorem 18 below that the question whether a given finite relation algebra has a normal representation is decidable. The following definition is standard in model theory when phrased for structures; we present here a relation algebra version.

Definition 17 (The Amalgamation Property).

Let 𝐀 be a relation algebra and let 𝒞 be a class of consistent atomic 𝐀-networks. We say that 𝒞 has AP(k,l,m) (the (k,l,m)-amalgamation property) if for any two networks (V1,f1),(V2,f2)𝒞 with |V1|=k,|V1V2|=l, and |V2|=m, if f1(a,b)=f2(a,b) for all a,bV1V2, then there exists a network (V1V2,f)𝒞 with f(a,b)=fi(a,b) for all i{1,2} and a,bVi. We say that 𝒞 has the Joint Embedding Property (JEP) if AP(k,0,m) holds for all k,m.

Theorem 18 ([6, Theorem 8]).

Let 𝐀 be a relation algebra with k atoms and let 𝒞 be the class of all consistent atomic 𝐀-networks. Then 𝐀 has a normal representation if and only if 𝒞 has AP(k+1,k,k+1).

Some relation algebras do not have a normal representation, but still have a fully universal representation. Such representations can be conveniently constructed with the following theorem, which is essentially due to Comer [24], but phrased there in a different formalism.

Theorem 19.

Let 𝐀 be a finite relation algebra. Then 𝐀 has a

  • fully universal representation if and only if the class of all consistent atomic 𝐀-networks has AP(3,2,n) for all n;

  • fully universal square representation if and only if the class of all consistent atomic 𝐀-networks has the JEP and AP(3,2,n) for all n.

3 Representations for Algebras with at most 4 Atoms

In this section we revisit the representability for relation algebras with at most 4 atoms. We will show that we may focus on integral relation algebras. Exhaustive lists of integral relation algebras have been computed by Maddux [37]. There are

  • 2 integral relation algebras with two atoms (Table 1),

  • 3 integral asymmetric relation algebras with three atoms (Table 2),

  • 7 integral symmetric relation algebras with three atoms (Table 3),

  • 37 integral asymmetric relation algebras with four atoms (Table 4), and

  • 65 integral symmetric relation algebras with four atoms (Table 5).

It can be shown that a relation algebra is simple in the sense defined earlier if and only if it is simple in the sense of universal algebra (see, e.g., [20]). The following lemma shows that we can focus on simple relation algebras.

Lemma 20 (see, e.g., [12]).

Let 𝔅1 be a representation of 𝐀1 and 𝔅2 a representation of 𝐀2, and suppose that A1A2= and B1B2=. Then 𝐀1×𝐀2 has a union representation, which is the (A1×A2)-structure 𝔅1𝔅2 with domain B1B2 defined by (a1,a2)𝔅1𝔅2:=a1𝔅1a2𝔅2.

Example 21.

Consider the relation algebra 𝐀 on four atoms a,b,c,d, which is uniquely given by requiring c˘=d and the multiplication table given in Figure 1. It has a normal representation 𝔅 with domain {0,1} which is given by a𝔅={(0,0)}, b𝔅={(1,1)}, c𝔅={(0,1)}, and d𝔅={(1,0)}. The algebra 𝐀 is simple, but not integral. It is easy to see that its NSP can be solved in polynomial time.  

It turns out that we can even restrict our attention to integral relation algebras.

Proposition 22.

The algebra from Example 21 is up to isomorphism the only simple non-integral relation algebra with at most four atoms.

a b c c˘
a a 0 0 c˘
b 0 b c 0
c c 0 0 b
c˘ 0 c˘ a 0
Figure 1: Multiplication table of the simple non-integral relation algebra from Example 21.

Comer [25] states that at least 28 of the 102 integral relation algebras with four atoms are not representable. Results of Maddux [37] imply that in fact 31 do not have a representation. (And, as we have mentioned earlier, all others turn out to have a representation.)

Theorem 23.

The following 31 integral relation algebras have no representation:

  • the 11 asymmetric relation algebras 1437, 1637, 2137, 24372937, 3237, 3437;

  • the 20 symmetric relation algebras 21652365, 35653865, 40654565, 47655065, 5465, 5865, 6065.

Therefore, their NSPs are trivial and in 𝐏.

Examples of finite relation algebras with a normal representation include those with a flexible atom (see, e.g., [11]).

Definition 24.

Let 𝐀 be a relation algebra. An atom aA0 is called a flexible atom if axy holds for all x,yA0{Id}.

The relation algebras with a flexible atom are listed in Figure 2. Note that if a relation algebra has a flexible atom then it has a normal representation, as one can, when applying Theorem 18, always use a flexible atom for all undetermined values.

Name Flexible Atoms Name Flexible Atoms
22 a 3265 a
33 r,r˘ 3365 a
67 a 3465 a
77 a,b 5565 a
3137 a 5765 a
3337 a 5965 a
3537 a 6165 a
3637 r,r˘ 6365 a
3737 a,r,r˘ 6465 a,b
6565 a,b,c
Figure 2: Integral relation algebras with at most four atoms and at least one flexible atom.

With the criterion presented in Theorem 18 we verified using a computer program that the following relation algebras with at most four atoms have a normal representation:

12,22,13,23,33,17,27,37,47,67,77,1371237,1537,18372037,22372337,3137,3337,35373737,165865,1065,1165,1365,1465,1665,18652065,25652965,32653465,4665,5265,5365,5565,5765,5965,61656565. (3.1)

We will now discuss how representability properties of relation algebras translate to their cycle products, and apply our results to the case of integral relation algebras with four atoms.

Theorem 25 ([36, Theorem 5], see also [24]).

Let 𝐀 and 𝐁 be two finite representable integral relation algebras such that A0B0={Id} and |A0|,|B0|2. Let and 𝔇 be square representations of 𝐀 and 𝐁, respectively. Then 𝐀[𝐁] is representable and has the representation 𝔇[] on the domain D×C defined as follows. For all aA0{Id},bB0{Id}:

Id𝔇[] :={((u0,v0),(u1,v1))u0=u1,v0=v1},
a𝔇[] :={((u0,v0),(u1,v1))u0=u1,(v0,v1)a},
b𝔇[] :={((u0,v0),(u1,v1))(u0,u1)b𝔇}.
12 22
𝐀 12[𝐀] 𝐀[12] 22[𝐀] 𝐀[22]
13 137 737 237 837
23 337 937 437 1037
33 537 1137 637 1237
17 165 165 265 565
27 365 265 465 665
37 565 365 665 765
47 765 465 865 865
57 1565 965 1765 1265
67 1665 1065 1865 1365
77 1965 1165 2065 1465
Figure 3: Relation algebras formed by 2-cycle products of small relation algebras.
Lemma 26.

Let 𝐀,𝐁 be finite integral relation algebras with A0B0={Id} and representations and 𝔇. Then

  1. 1.

    if and 𝔇 are fully universal, then 𝔇[] is a fully universal representation of 𝐀[𝐁].

  2. 2.

    if and 𝔇 are square, then 𝔇[] is a square representation of 𝐀[𝐁].

  3. 3.

    if and 𝔇 are normal, then 𝔇[] is a normal representation of 𝐀[𝐁].

To obtain a relation algebra from 1373737 as a 2-cycle product, we have to multiply an algebra from 1333 with 12 or with 22. See the first three lines of Figure 3 for all such products. Since all these algebras have a normal representation (see (3.1)), the 2-cycle product has a normal representation as well. To obtain a relation algebra from 1656565 as a 2-cycle product, we can restrict ourselves to the case where we multiply algebras from 1777 with 12 or with 22, see the last seven lines of Figure 3. Except for 57, all factors have a normal representation, so the corresponding products have a normal representation.

We are now left with relation algebras that are representable, but that do not have a normal representation. By verifying the criterion from Theorem 19, we obtain that the algebras 1337, 3037, 2465, 3065, and 3165 have fully universal square representations. It turns out that all remaining algebras do not have a fully universal representation. For the four algebras 965, 1265, 1565, and 1765, this can be shown by using the fact that they can all be written as 2-cycle products with one factor being 57, which does not have a fully universal representation. 3965 has a square representation 𝔅 with 7 elements, but it has no fully universal representation. Moreover, it can be shown that all of its square representations have at most 16 elements. 6265 has a square representation 𝔅 with 13 elements, but also no fully universal representation. All square representations have at most 16 elements.

Finally, we are left with the three relation algebras 1737, 5165, and 5665, which have infinite square representations, but no fully universal ones. For the first two of them, we even obtain the following stronger results.

Theorem 27.

There is a consistent, but unsatisfiable atomic 1737-network N on four vertices and a square representation 𝔅 of 1737 such that a consistent atomic 1737-network is satisfiable in 𝔅 if and only if it does not have N as a subnetwork.

Theorem 28.

There are four consistent, but unsatisfiable atomic 5165-networks N1, N2, N3, and N4 on four vertices and a square representation 𝔅 of 5165 such that a consistent atomic 5165-network is satisfiable in 𝔅 if and only if it has none of N1, N2, N3, and N4 as a subnetwork.

4 NP-hard Algebras with at most 4 Atoms

In this section we present 𝐍𝐏-hardness results for relation algebras with at most 4 atoms. If the relation algebra has a normal representation, it falls into the scope of the tractability conjecture (Conjecture 1.1), and we provide a pp-construction of ({0,1};NAE) in each of these cases. For the relation algebras with at most 3 atoms, a classification has already been established in [26], with two corrections in [10]; in particular, 67 is 𝐍𝐏-complete. For the relation algebras with 4 atoms, the NSP for 1537 has been shown to be 𝐍𝐏-complete by Broxvall and Jonsson [17]; by inspecting their proof, it is not difficult to obtain a pp-interpretation of ({0,1};NAE) in the normal representation of 1537, confirming the tractability conjecture in this case. The remaining hardness proofs are grouped according to the applied proof method.

The 𝐍𝐏-completeness of the NSP(3965) and NSP(6265) follows from our representability results together with the following lemma:

Lemma 29.

Let 𝐀 be a finite simple relation algebra such that the maximum cardinality of all square representations of 𝐀 equals n. Then NSP(𝐀) is in 𝐍𝐏. If 𝐀 additionally has a square representation with at least three elements, then NSP(𝐀) is 𝐍𝐏-complete.

The network satisfaction problem for finite symmetric relation algebras with a flexible atom is in 𝐏 or 𝐍𝐏-complete [11]. The tractability conjecture (Conjecture 1.1) has already been confirmed for this case (compare to [12, Theorem 9.1]). To determine which of the two cases applies in the concrete cases, we need the following propositions.

Proposition 30 ([11, Theorem 2.21 and Proposition 6.1]).

Let 𝐀 be a finite, symmetric, integral relation algebra with a flexible atom and 𝔅 a normal representation of 𝐀. If 𝔅 does not have a binary injective polymorphism, then CSP(𝔅) is 𝐍𝐏-complete.

Proposition 31 ([12, Lemma 4.3]).

Let 𝐀 be a finite symmetric relation algebra with a normal representation 𝔅 that has a binary injective polymorphism. Then (p,p,p) is an allowed triple of 𝐀 for all p𝐀.

The relation algebras 3265, 3365, 5565, 5765, 5965, 6365, and 6465 are all symmetric, have a flexible atom (see Figure 2), but contain an element p such that (p,p,p) is a forbidden triple. Thus, they have no binary injective polymorphism by Proposition 31, and therefore, by Proposition 30, their NSPs are 𝐍𝐏-complete. The algebra 3465 is symmetric and has a flexible atom too. It can be shown that its atom structure has an 𝐍𝐏-complete CSP, which implies that NSP(3465) is 𝐍𝐏-complete as well due to the following theorem:

Theorem 32 ([11, Theorem 9.1]).

Let 𝐀 be a finite symmetric relation algebra with a flexible atom and atom structure 𝔄0. Then CSP(𝔄0) and NSP(𝐀) are polynomial-time equivalent.

An equivalence relation EB2 is called proper if E is a proper subset of B2; it is called trivial if it is the equality relation on B, and non-trivial otherwise. The algebras 337, 437, 737, 937, 1137, 1837, 2037, 165, 265, 365, 465, 1065, 1165, 2565, 2665, and 2865 all have a normal representation 𝔅 and a non-trivial proper equivalence relation e such that e𝔅 has only finitely many classes. Hence, their NSPs are 𝐍𝐏-complete by the following theorem:

Theorem 33 ([10, Theorem 23]).

Let 𝐀 be a finite relation algebra with normal representation 𝔅 and a non-trivial proper equivalence relation eA such that e𝔅 has only finitely many classes. Then CSP(𝔅) is 𝐍𝐏-complete.

Next, we consider algebras which do not contain a non-trivial proper equivalence relation. A permutation group is called primitive if it does not preserve a non-trivial proper equivalence relation. Note that if 𝐀 is a finite relation algebra with a normal representation 𝔅, then Aut(𝔅) is primitive if and only if 𝐀 does not contain equivalence relations besides 1 and Id.

Using the following theorem, we obtain 𝐍𝐏-completeness for the NSPs of 2337, 3637, and 4665.

Theorem 34 ([10, Theorem 29]).

Let 𝐀 be a relation algebra with a normal representation 𝔅. If Aut(𝔅) is primitive and aA0 is symmetric such that (a,a,a) is forbidden in 𝐀, then CSP(𝔅) and NSP(𝐀) are 𝐍𝐏-complete.

The proofs of Theorem 33 and 34 in [10] already confirm the tractability conjecture (Conjecture 1.1) in all cases which we considered.

The following lemmas imply that if a relation algebra is a 2-cycle product of two relation algebras 𝐀 and 𝐁, and 𝐀 or 𝐁 has an 𝐍𝐏-complete NSP, then the network satisfaction problem for the 2-cycle product has an 𝐍𝐏-complete NSP as well.

Lemma 35.

Let 𝐀 and 𝐁 be finite relation algebras such that NSP(𝐀) and NSP(𝐁) are both in 𝐍𝐏. Then NSP(𝐀[𝐁]) is in 𝐍𝐏 as well.

Lemma 36.

Let 𝐀 and 𝐁 be finite representable relation algebras such that A0B0={Id}. Then there is a polynomial-time reduction from NSP(𝐀) to NSP(𝐀[𝐁]) and from NSP(𝐁) to NSP(𝐀[𝐁]). If 𝔄 and 𝔅 are normal representations of 𝐀 and 𝐁, respectively, then 𝔅[𝔄] pp-constructs 𝔄 and 𝔅.

From these two lemmas and Table 3 we infer the 𝐍𝐏-completeness of the NSPs of 1037, 565, 665, 965, 1265, 1365, 1565, 1665, 1765, and 1865 and confirm the tractability conjecture for those among them that have a normal representation.

We prove the 𝐍𝐏-hardness of seven NSPs by means of pp-interpretations. For the algebras 1937, 2765, and 2965, it can be inferred from the nonexistence of certain polymorphisms that the respective normal representation pp-interprets ({0,1};NAE); the argument is summarized in the following proposition.

Let 𝔅 be a normal representation of a finite relation algebra 𝐀 and XA0. An operation f:BnB is called X-canonical (with respect to 𝔅) if there exists a function f¯:XnA0 such that for all x,yBn and a1,,anX, if (xi,yi)ai𝔅 for all i{1,,n}, then (f(x),f(y))f¯(a1,,an)𝔅. The function f¯ is called the behaviour of f on X.

Proposition 37.

Let 𝐀 be a finite relation algebra with a normal representation 𝔅. If there are two distinct elements x,yA0 such that every polymorphism f of 𝔅 is {x,y}-canonical, but its behaviour on {x,y} is not a binary symmetric, a ternary majority, or a ternary minority operation, then NSP(𝐀) is 𝐍𝐏-complete.

We take a different approach for the two hardness proofs of NSP(3337) and NSP(3537), in which we directly give a pp-interpretation of a structure with 𝐍𝐏-hard CSP in the normal representation of the respective relation algebra.

Let =(V;E) be the Henson graph, i.e., the countable homogeneous graph whose age is the class of all finite undirected triangle-free graphs. We obtain a (normal) representation 𝔅=b,a of 67: we set b𝔅:=E, a𝔅:={(u,v)V2Euv}, Id𝔅:={(u,v)V2u=v}, and extend to all other relations by taking the respective Boolean combinations. It is known that NSP(67) is 𝐍𝐏-complete [10]. By a reduction from CSP(), we obtain that the normal representations of 3137 and 5265 pp-construct ({0,1};NAE); consequently, NSP(3137) and NSP(5265) are 𝐍𝐏-complete.

The algebras 3065, 3037, and 3165 do not have a normal representation and hence do not fall within the scope of the tractability conjecture. We show the 𝐍𝐏-hardness of their NSPs by many-one reductions from again the Henson graph and from 𝐍𝐏-hard Boolean satisfiability problems.

As we have seen (Theorem 28), the algebra 5165 has a universal representation, which is obtained by excluding four atomic networks that are consistent but unsatisfiable; it follows that the NSP is in 𝐍𝐏, and in fact it is 𝐍𝐏-complete. The algebra 5665 is similar to the previous one, but allows one extra triple compared to 5165. Its NSP is 𝐍𝐏-hard as well; proving the containment of the NSP in 𝐍𝐏 turns out to be challenging and was published separately (see [8]). We obtain the 𝐍𝐏-hardness of NSP(5165) and NSP(5665) as a corollary of the following new technique based on a recent hardness result from the area of promise constraint satisfaction problems [19].

Proposition 38.

Let 𝐀 be a representable finite relation algebra with two symmetric atoms p,q such that (p,p,p) and (q,q,q) are forbidden and (p,q,q) is an allowed triple. Then NSP(𝐀) is 𝐍𝐏-hard.

 Remark 39.

This method also shows that the NSP for each of the algebras 17, 57, 165, 265, 565, 1065, 1265, 1565, 1665, 1765, 3965, 5565, 6265, and 6365 is 𝐍𝐏-hard (which was already established earlier), since each of them is representable and has two atoms satisfying the condition of Proposition 38.

5 Tractable Algebras with at most 4 Atoms

We present polynomial-time algorithms for the network satisfaction problem for all the remaining integral relation algebras with at most four atoms.

Let 𝔄0 be the atom structure of a relation algebra 𝐀 that has a fully universal representation. The following implies that if CSP(𝔄0) is in 𝐏, then so is NSP(𝐀).

Proposition 40 ([12, Proposition 2.16]).

Let 𝐀 be a finite relation algebra with a fully universal representation 𝔅. Then there is a polynomial-time reduction from NSP(𝐀) to CSP(𝔄0).

The good news here is that there is a complete complexity classification of finite domain CSPs, as we mentioned in the introduction; the bad news is that CSP(𝔄0) might be 𝐍𝐏-complete, while NSP(𝐀) is still in 𝐏; this happens for instance for the point algebra 13 [41] and will later force us to treat some cases separately. But first, we will make use of Proposition 40 via the following lemma:

Lemma 41.

Let 𝐀 be a relation algebra with a fully universal representation and atom structure 𝔄0. If 𝔄0 has a polymorphism f which is binary symmetric or a ternary weak near unanimity operation, then NSP(𝐀) is in 𝐏.

The atom structures of the algebras 12, 22, 47, 77, 865, 1465, 2065, 5365, 6165, and 6565 all have a binary symmetric polymorphism; hence, the NSPs of those algebras are in 𝐏. For the algebras 33, 37, 537, 637, 1237, 2237, 3737, 765, and 1965, we obtain tractability of their NSPs since their respective atom structures all have a ternary weak near unanimity polymorphism; for 37, this was already shown in [14].

A particularly natural polynomial-time algorithm in the context of the network consistency problem and the network satisfaction problem for a fixed relation algebra 𝐀 is the path consistency algorithm. It takes as input an 𝐀-network (V,f) and repeatedly considers three variables u,v,w and updates f(u,v) by intersecting it with f(u,w)f(w,v). The NSPs of 137, 237, and 837 can be solved by the path consistency procedure, and are thus polynomial-time tractable.

We are left with the two algebras 2465 and 1737, which turn out to have polynomial-time tractable NSPs as well. Our algorithms for them are more involved and make use of structural results about consistent 2465- and 1737-networks, respectively, to solve their NSPs by a divide-and-conquer approach. The algebra 1737 is related to the class of quasi-transitive oriented graphs, which has been studied in graph theory [2]. As we have mentioned, it has a universal square representation, which is obtained by excluding a single consistent, but unsatisfiable atomic network on four vertices (Theorem 27); this representation is in turn closely related to series-parallel partial orders. We discuss the NSP of 2465 in the following section and refer to the long version of the paper for 1737.

5.1 The Relation Algebra 𝟐𝟒𝟔𝟓

The algebra 2465 has four symmetric atoms Id,a,b,c and (a,b,c) as forbidden triple. It is related to the class of 3-edge-coloured cliques with no rainbow triangle, which exhibits interesting combinatorics, and has a fully universal representation.

We need the following facts about consistent atomic 2465-networks (V,f). If d{a,b,c}, let Gd be the graph Gd:=(V;{(x,y)f(x,y){d,Id}}). The following is straightforward.

Lemma 42.

Let (V,f) be a consistent atomic 2465-network. If C1 and C2 are different connected components of Gd, for some d{a,b,c}, then f is constant on all pairs (x,y) for xC1 and yC2.

The following lemma is due to Sebastian Meyer (personal communication).

Lemma 43.

Let (V,f) be a consistent atomic 2465-network such that the image of f is not {Id}. Then at least one of the graphs Ga, Gb, and Gc is disconnected.

Note that all relations of the relation algebra 2465 can be generated from the following relations: Id¯=abc and Rd:=(dId) for d{a,b,c}. For example, a¯=RbRc. Similarly we can obtain b¯ and c¯. We can then obtain all others by appropriately intersecting the ones that we already have. It therefore suffices to present an algorithm for the NSP restricted to networks with the relations :={Ra,Rb,Rc,Id¯,Id,1} (see the long version of the paper for details).

Definition 44.

Let (V,g) be a 2465-network such that the image of g is contained in and let d{a,b,c}. A d-cut of (V,g) is a partition of V into k2 disjoint sets C1,,Ck such that if g(x,y){Rd,Id}, then x and y must lie in the same part. A d-cut is valid if for all distinct i,j{1,,k} there exists di,j{a,b,c}{d} such that di,jg(u,x) for all uCi and xCj.

Definition 45.

A non-identity solution to an 𝐀-network (V,g) is a solution (V,f) such that there are x,yV with f(x,y)Id.

Lemma 46.

Let (V,g) be a 2465-network such that (V,g) has a non-identity solution and the image of g is contained in . Then there is a valid d-cut in (V,g) for some d{a,b,c}.

Proof.

Let (V,f) be a non-identity solution of (V,g). By Lemma 43, there exists d{a,b,c} such that Gd is disconnected. Let C1,,CkV be the connected components of Gd. Clearly, it is a d-cut of (V,g). Lemma 42 implies that it is valid.

Note that the condition from Lemma 46 can be checked in polynomial time: to check whether (V,g) has a valid d-cut, we first compute the connected components of the graph (V;{(x,y)g(x,y){Rd,Id}}) (e.g., via depth-first search). If the connected components provide a valid d-cut we are done. Otherwise, there exist two components Ci and Cj that witness that the cut is not valid. In this case, we merge Ci and Cj into one component. If the resulting d-cut is valid, we are done. Otherwise, we repeat contracting components. If the procedure ends up with a single component, then there does not exist a valid d-cut.

Proposition 47.

NSP(2465) is in 𝐏.

Proof.

Let (V,g) be a given 2465-network. As we have explained earlier, we may assume without loss of generality that the image of g is contained in .

  1. 1.

    If there is no pair of variables labelled Id¯, then answer “satisfiable” (we may map all of V to the same point in a representation of 2465).

  2. 2.

    Otherwise, if for every d{a,b,c} there is no valid d-cut in (V,g) return “unsatisfiable” (there is no solution by Lemma 46).

  3. 3.

    Otherwise, let C1,,Ck be a valid d-cut in (V,g), for some d{a,b,c}, and recursively solve the subinstances induced on each of C1,,Ck.

  4. 4.

    If a recursive call returns “unsatisfiable”, then return “unsatisfiable”.

  5. 5.

    Otherwise, return “satisfiable” (a consistent atomic network (V,f) with f(x,y)g(x,y) for all x,yV can be obtained from solutions for C1,,Ck by setting f(x,y):=di,j for every xCi and yCj with ij).

The proof that this algorithm is correct follows by induction on the number of variables of the instance. The running time is in O(n2) if n is the size of the input.

6 Open Problems

We view our complexity dichotomy for the network satisfaction problem for relation algebras with at most 16 elements as an encouraging basis for a more general classification result without any restriction on the number of elements for the finite relation algebras with a normal (or even just fully universal) representation. The following other problems are also left open.

Question 47.

Is the existence of a fully universal representation for a given finite relation algebra effectively decidable?

Question 47.

What is the smallest relation algebra 𝐀 such that NSP(𝐀) is not in 𝐍𝐏?

The network consistency problem (NCP) of a relation algebra 𝐀 is the following computational problem: Its input is an 𝐀-network (V,f). The task is to decide whether there exists a consistent atomic network (V,s) (which will also be called the solution to the given problem instance) on the same set of vertices V such that for all x,yV we have s(x,y)f(x,y). Unlike the network satisfaction problem of a finite relation algebra 𝐀, which can be undecidable [31], the network consistency problem for 𝐀 is always in 𝐍𝐏. For relation algebras with a fully universal representation, the NSP and the NCP have the same complexity, whereas for other algebras, additional efforts are required; e.g., if 𝐀 has no representation, then NSP(𝐀) is trivial, whereas NCP(𝐀) is generally not.

Problem 47.

Obtain a similar classification for the network consistency problem.

Problem 47.

Obtain a similar classification for the variant of the network satisfaction problem where the inputs are restricted to networks (V,f) such that the range of f consists only of atoms and 1.

References

  • [1] Hajnal Andréka and Roger D. Maddux. Representations for small relation algebras. Notre Dame Journal of Formal Logic, 35(4):550–562, 1994. doi:10.1305/NDJFL/1040408612.
  • [2] Jørgen Bang-Jensen and Jing Huang. Quasi-transitive digraphs. Journal of Graph Theory, 20(2):141–161, 1995. doi:10.1002/jgt.3190200205.
  • [3] Libor Barto, Michael Kompatscher, Miroslav Olšák, Trung Van Pham, and Michael Pinsker. The equivalence of two dichotomy conjectures for infinite domain constraint satisfaction problems. In Proceedings of the 32nd Annual ACM/IEEE Symposium on Logic in Computer Science – LICS’17, 2017. Preprint arXiv:1612.07551. arXiv:1612.07551.
  • [4] Libor Barto, Jakub Opršal, and Michael Pinsker. The wonderland of reflections. Israel Journal of Mathematics, 223(1):363–398, 2018.
  • [5] Libor Barto and Michael Pinsker. The algebraic dichotomy conjecture for infinite domain constraint satisfaction problems. In Proceedings of the 31st Annual IEEE Symposium on Logic in Computer Science – LICS’16, pages 615–622, 2016. Preprint arXiv:1602.04353. arXiv:1602.04353.
  • [6] Manuel Bodirsky. Finite relation algebras with normal representations. In Relational and Algebraic Methods in Computer Science - 17th International Conference, RAMiCS 2018, Groningen, The Netherlands, October 29 - November 1, 2018, Proceedings, pages 3–17, 2018. doi:10.1007/978-3-030-02149-8_1.
  • [7] Manuel Bodirsky. Complexity of Infinite-Domain Constraint Satisfaction. Lecture Notes in Logic (52). Cambridge University Press, Cambridge, United Kingdom; New York, NY, 2021. doi:10.1017/9781107337534.
  • [8] Manuel Bodirsky, Santiago Guzmán-Pro, Moritz Jahn, Matěj Konečný, and Paul Winkler. Circular chromatic numbers, balanceability, relation algebras, and network satisfaction problems, 2025. Preprint available under https://arxiv.org/abs/2512.06878. doi:10.48550/arXiv.2512.06878.
  • [9] Manuel Bodirsky and Jan Kára. The complexity of temporal constraint satisfaction problems. Journal of the ACM, 57(2):1–41, 2009. An extended abstract appeared in the Proceedings of the Symposium on Theory of Computing (STOC). doi:10.1145/1667053.1667058.
  • [10] Manuel Bodirsky and Simon Knäuer. Hardness of network satisfaction for relation algebras with normal representations. In Relational and Algebraic Methods in Computer Science, pages 31–46. Springer International Publishing, 2020. doi:10.1007/978-3-030-43520-2_3.
  • [11] Manuel Bodirsky and Simon Knäuer. The complexity of network satisfaction problems for symmetric relation algebras with a flexible atom. Journal of Artificial Intelligence Research, 75, 2022. doi:10.1613/jair.1.14195.
  • [12] Manuel Bodirsky and Simon Knäuer. Network satisfaction problems solved by k-consistency. In 50th International Colloquium on Automata, Languages, and Programming, ICALP 2023, July 10-14, 2023, Paderborn, Germany, pages 116:1–116:20, 2023. doi:10.4230/LIPIcs.ICALP.2023.116.
  • [13] Manuel Bodirsky and Martin Kutz. Pure dominance constraints. In Proceedings of the Symposium on Theoretical Aspects of Computer Science (STACS), pages 287–298, 2002. doi:10.1007/3-540-45841-7_23.
  • [14] Manuel Bodirsky, Barnaby Martin, Michael Pinsker, and András Pongrácz. Constraint satisfaction problems for reducts of homogeneous graphs. SIAM Journal on Computing, 48(4):1224–1264, 2019. A conference version appeared in the Proceedings of the 43rd International Colloquium on Automata, Languages, and Programming, ICALP 2016, pages 119:1-119:14. doi:10.1137/16M1082974.
  • [15] Manuel Bodirsky and Michael Pinsker. Schaefer’s theorem for graphs. Journal of the ACM, 62(3):52 pages (article number 19), 2015. A conference version appeared in the Proceedings of STOC 2011, pages 655-664. doi:10.1145/2764899.
  • [16] Manuel Bodirsky, Michael Pinsker, and András Pongrácz. Projective clone homomorphisms. Journal of Symbolic Logic, 86(1):148–161, 2021. doi:10.1017/JSL.2019.23.
  • [17] Mathias Broxvall and Peter Jonsson. Point algebras for temporal reasoning: Algorithms and complexity. Artificial Intelligence, 149(2):179–220, 2003. doi:10.1016/S0004-3702(03)00075-4.
  • [18] Andrei A. Bulatov. A dichotomy theorem for nonuniform CSPs. In 58th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2017, Berkeley, CA, USA, October 15-17, pages 319–330, 2017. doi:10.1109/FOCS.2017.37.
  • [19] Jakub Bulín, Andrei A. Krokhin, and Jakub Opršal. Algebraic approach to promise constraint satisfaction. In Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing, STOC 2019, Phoenix, AZ, USA, June 23-26, 2019, pages 602–613, 2019. doi:10.1145/3313276.3316300.
  • [20] Stanley N. Burris and Hanamantagouda P. Sankappanavar. A Course in Universal Algebra. Springer Verlag, Berlin, 1981.
  • [21] Peter J. Cameron. The random graph. R. L. Graham and J. Nešetřil, Editors, The Mathematics of Paul Erdös, 1996.
  • [22] Gregory Cherlin. Homogeneous ordered graphs and metrically homogeneous graphs, 2020. Preprint.
  • [23] Gregory L. Cherlin. The classification of countable homogeneous directed graphs and countable homogeneous n-tournaments. AMS Memoir, 131(621), January 1998.
  • [24] Stephen D. Comer. Extension of polygroups by polygroups and their representations using color schemes. In Ralph S. Freese and Octavio C. Garcia, editors, Universal Algebra and Lattice Theory, pages 91–103, Berlin, Heidelberg, 1983. Springer Berlin Heidelberg.
  • [25] Stephen D. Comer. A remark on chromatic polygroups. Congressus Numerantium, 38:85–95, 1983.
  • [26] Matteo Cristiani and Robin Hirsch. The complexity of the constraint satisfaction problem for small relation algebras. Artificial Intelligence Journal, 156:177–196, 2004. doi:10.1016/J.ARTINT.2004.02.003.
  • [27] Michael Garey and David Johnson. A guide to NP-completeness. CSLI Press, Stanford, 1978.
  • [28] C. Ward Henson. Countable homogeneous relational systems and categorical theories. Journal of Symbolic Logic, 37:494–500, 1972.
  • [29] R. Hirsch and I. Hodkinson. Representability is not decidable for finite relation algebras. Transactions of the American Mathematical Society, 353(4):1387–1401, 2001.
  • [30] Robin Hirsch. Relation algebras of intervals. Artificial Intelligence Journal, 83:1–29, 1996.
  • [31] Robin Hirsch. A finite relation algebra with undecidable network satisfaction problem. Logic Journal of the IGPL, 7(4):547–554, 1999. doi:10.1093/JIGPAL/7.4.547.
  • [32] Wilfrid Hodges. A shorter model theory. Cambridge University Press, Cambridge, 1997.
  • [33] Alistair H. Lachlan and Robert E. Woodrow. Countable ultrahomogeneous undirected graphs. Transactions of the AMS, 262(1):51–94, 1980.
  • [34] Richard E. Ladner. On the structure of polynomial time reducibility. Journal of the ACM, 22(1):155–171, 1975. doi:10.1145/321864.321877.
  • [35] R. Lyndon. The representation of relational algebras. Annals of Mathematics, 51(3):707–729, 1950.
  • [36] Roger D. Maddux. Finite symmetric integral relation algebras with no 3-cycles. In Renate A. Schmidt, editor, Relations and Kleene Algebra in Computer Science, 9th International Conference on Relational Methods in Computer Science and 4th International Workshop on Applications of Kleene Algebra, RelMiCS/AKA 2006, Manchester, UK, August 29-September 2, 2006, Proceedings, volume 4136 of Lecture Notes in Computer Science, pages 2–29. Springer, 2006. doi:10.1007/11828563_2.
  • [37] Roger Duncan Maddux. Relation Algebras: Volume 150. Studies in logic and the foundations of mathematics. Elsevier Science, London, England, May 2006.
  • [38] Donald Monk. On representable relation algebras. Michigan Mathematical Journal, 11(3):207–210, 1964. doi:10.1307/mmj/1028999131.
  • [39] Alfred Tarski. On the calculus of relations. J. Symbolic Logic, 6, 1941. doi:10.2307/2268577.
  • [40] Alfred Tarski. Contributions to the theory of models. Koninklijke Nederlandse Akademie van Wetenschappen, Proceedings, 58:56–64, 1955.
  • [41] Marc Vilain, Henry Kautz, and Peter van Beek. Constraint propagation algorithms for temporal reasoning: A revised report. Reading in Qualitative Reasoning about Physical Systems, pages 373–381, 1989.
  • [42] Dmitriy Zhuk. A proof of the CSP dichotomy conjecture. J. ACM, 67(5):30:1–30:78, 2020. doi:10.1145/3402029.
  • [43] Dmitriy N. Zhuk. A proof of CSP dichotomy conjecture. In 58th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2017, Berkeley, CA, USA, October 15-17, pages 331–342, 2017. arXiv:1704.01914.
  • [44] Paul-Hermann Zieschang. Hypergroups. Springer, 2023.

Appendix A Appendix

In Tables 15, we present Maddux’s lists of integral relation algebras, together with references and comments about their representability and the computational complexity of their network satisfaction problem, thus summarizing the findings of the previous sections. The first column is the numbering introduced by Maddux. The following columns are labelled by triples (omitting brackets and commas for space reasons). An entry of the table contains the triple if it is an allowed triple of the relation algebra; this uniquely describes the relation algebra.

In the tables, we use the following abbreviations:

  • none: no representation exists

  • ¬f.u.: the relation algebra is representable, but there is no fully universal representation.

  • f.u.: there exists a fully universal square representation, but no normal representation.

  • normal: there exists a normal representation, but the algebra has no flexible atom.

  • flex: there is a flexible atom (which implies the existence of a normal representation).

In [10] it has been noted that in the case of 27 and 67 the claims about the complexity of the NSP from [26] are incorrect, and we state the corrected results.

Table 1: Integral relation algebras with two atoms.
#2 aaa Representability NSP Complexity
12 normal 𝐏[26]
22 aaa flex 𝐏[26]
Table 2: Integral asymmetric relation algebras with three atoms.
#3 rrr rrr˘ Representability NSP Complexity
13 rrr normal 𝐏[41]
23 rrr˘ normal 𝐍𝐏𝐜[26]
33 rrr rrr˘ flex 𝐏[26]
Table 3: Integral symmetric relation algebras with three atoms.
#7 aaa bbb abb baa Representability NSP Complexity
17 abb normal 𝐍𝐏𝐜[26]
27 aaa abb normal 𝐍𝐏𝐜[10]
37 bbb abb normal 𝐏[26]
47 aaa bbb abb normal 𝐏[26]
57 abb baa ¬f.u. 𝐍𝐏𝐜[26]
67 aaa abb baa flex 𝐍𝐏𝐜[10]
77 aaa bbb abb baa flex 𝐏[26]
Table 4: The relation algebras 1373737 with the four atoms a,r,r˘,Id, where a is symmetric and r is non-symmetric, representability information, and complexity of their NSP.
#37 aaa rrr rrr˘ arr rar raa rra Representation NSP Complexity
137 rrr arr rar normal 𝐏
237 aaa rrr arr rar normal 𝐏
337 rrr˘ arr rar normal 𝐍𝐏𝐜
437 aaa rrr˘ arr rar normal 𝐍𝐏𝐜
537 rrr rrr˘ arr rar normal 𝐏
637 aaa rrr rrr˘ arr rar normal 𝐏
737 rrr raa normal 𝐍𝐏𝐜
837 aaa rrr raa normal 𝐏
937 rrr˘ raa normal 𝐍𝐏𝐜
1037 aaa rrr˘ raa normal 𝐍𝐏𝐜
1137 rrr rrr˘ raa normal 𝐍𝐏𝐜
1237 aaa rrr rrr˘ raa normal 𝐏
1337 aaa rrr arr raa f.u. 𝐏[13]
1437 rrr arr rar raa none 𝐏
1537 aaa rrr arr rar raa normal 𝐍𝐏𝐜[17]
1637 rrr rrr˘ arr rar raa none 𝐏
1737 aaa rrr rrr˘ arr rar raa ¬f.u. 𝐏
1837 rra normal 𝐍𝐏𝐜
1937 rrr rrr˘ rra normal 𝐍𝐏𝐜
2037 aaa arr rar rra normal 𝐍𝐏𝐜
2137 aaa rrr arr rar rra none 𝐏
2237 aaa rrr rrr˘ arr rar rra normal 𝐏
2337 rrr raa rra normal 𝐍𝐏𝐜
2437 aaa rrr raa rra none 𝐏
2537 rrr rrr˘ raa rra none 𝐏
2637 aaa rrr rrr˘ raa rra none 𝐏
2737 rrr arr raa rra none 𝐏
2837 aaa rrr arr raa rra none 𝐏
2937 rrr rrr˘ arr raa rra none 𝐏
3037 aaa rrr rrr˘ arr raa rra f.u. 𝐍𝐏𝐜
3137 aaa arr rar raa rra flex 𝐍𝐏𝐜
3237 rrr arr rar raa rra none 𝐏
3337 aaa rrr arr rar raa rra flex 𝐍𝐏𝐜
3437 rrr˘ arr rar raa rra none 𝐏
3537 aaa rrr˘ arr rar raa rra flex 𝐍𝐏𝐜
3637 rrr rrr˘ arr rar raa rra flex 𝐍𝐏𝐜
3737 aaa rrr rrr˘ arr rar raa rra flex 𝐏
Table 5: The symmetric relation algebras 1656565 with four atoms a,b,c,Id, representability information, and complexity of their NSP.
#65 aaa bbb ccc abb baa acc caa bcc cbb abc Representation NSP Complexity
165 abb acc bcc normal 𝐍𝐏𝐜
265 aaa abb acc bcc normal 𝐍𝐏𝐜
365 bbb abb acc bcc normal 𝐍𝐏𝐜
465 aaa bbb abb acc bcc normal 𝐍𝐏𝐜
565 ccc abb acc bcc normal 𝐍𝐏𝐜
665 aaa ccc abb acc bcc normal 𝐍𝐏𝐜
765 bbb ccc abb acc bcc normal 𝐏
865 aaa bbb ccc abb acc bcc normal 𝐏
965 abb baa acc bcc ¬f.u. 𝐍𝐏𝐜
1065 aaa abb baa acc bcc normal 𝐍𝐏𝐜
1165 aaa bbb abb baa acc bcc normal 𝐍𝐏𝐜
1265 ccc abb baa acc bcc ¬f.u. 𝐍𝐏𝐜
1365 aaa ccc abb baa acc bcc normal 𝐍𝐏𝐜
1465 aaa bbb ccc abb baa acc bcc normal 𝐏
1565 baa acc caa bcc ¬f.u. 𝐍𝐏𝐜
1665 aaa baa acc caa bcc normal 𝐍𝐏𝐜
1765 bbb baa acc caa bcc ¬f.u. 𝐍𝐏𝐜
1865 aaa bbb baa acc caa bcc normal 𝐍𝐏𝐜
1965 aaa ccc baa acc caa bcc normal 𝐏
2065 aaa bbb ccc baa acc caa bcc normal 𝐏
2165 abb baa acc caa bcc cbb none 𝐏
2265 aaa abb baa acc caa bcc cbb none 𝐏
2365 aaa bbb abb baa acc caa bcc cbb none 𝐏
2465 aaa bbb ccc abb baa acc caa bcc cbb f.u. 𝐏
2565 abc normal 𝐍𝐏𝐜
2665 aaa abb abc normal 𝐍𝐏𝐜
2765 aaa bbb abb baa abc normal 𝐍𝐏𝐜
2865 aaa abb acc abc normal 𝐍𝐏𝐜
2965 aaa bbb ccc baa caa abc normal 𝐍𝐏𝐜
3065 aaa ccc abb baa caa abc f.u. 𝐍𝐏𝐜
3165 aaa bbb ccc abb baa caa abc f.u. 𝐍𝐏𝐜
3265 aaa abb baa acc caa abc flex 𝐍𝐏𝐜
3365 aaa bbb abb baa acc caa abc flex 𝐍𝐏𝐜
3465 aaa bbb ccc abb baa acc caa abc flex 𝐍𝐏𝐜
3565 aaa bbb abb acc bcc abc none 𝐏
3665 aaa bbb ccc abb acc bcc abc none 𝐏
3765 aaa bbb abb baa acc bcc abc none 𝐏
3865 aaa bbb ccc abb baa acc bcc abc none 𝐏
3965 abb caa bcc abc ¬f.u. 𝐍𝐏𝐜
4065 aaa abb caa bcc abc none 𝐏
4165 aaa bbb abb caa bcc abc none 𝐏
4265 aaa bbb ccc abb caa bcc abc none 𝐏
4365 abb baa caa bcc abc none 𝐏
4465 aaa abb baa caa bcc abc none 𝐏
4565 bbb abb baa caa bcc abc none 𝐏
4665 aaa bbb abb baa caa bcc abc normal 𝐍𝐏𝐜
4765 ccc abb baa caa bcc abc none 𝐏
4865 aaa ccc abb baa caa bcc abc none 𝐏
4965 bbb ccc abb baa caa bcc abc none 𝐏
5065 aaa bbb ccc abb baa caa bcc abc none 𝐏
5165 bbb baa acc caa bcc abc ¬f.u. 𝐍𝐏𝐜
5265 aaa bbb baa acc caa bcc abc normal 𝐍𝐏𝐜
5365 aaa bbb ccc baa acc caa bcc abc normal 𝐏
5465 abb baa acc caa bcc abc none 𝐏
5565 aaa abb baa acc caa bcc abc flex 𝐍𝐏𝐜
5665 bbb abb baa acc caa bcc abc ¬f.u. 𝐍𝐏𝐜[8]
5765 aaa bbb abb baa acc caa bcc abc flex 𝐍𝐏𝐜
5865 ccc abb baa acc caa bcc abc none 𝐏
5965 aaa ccc abb baa acc caa bcc abc flex 𝐍𝐏𝐜
6065 bbb ccc abb baa acc caa bcc abc none 𝐏
6165 aaa bbb ccc abb baa acc caa bcc abc flex 𝐏
6265 abb baa acc caa bcc cbb abc ¬f.u. 𝐍𝐏𝐜
6365 aaa abb baa acc caa bcc cbb abc flex 𝐍𝐏𝐜
6465 aaa bbb abb baa acc caa bcc cbb abc flex 𝐍𝐏𝐜
6565 aaa bbb ccc abb baa acc caa bcc cbb abc flex 𝐏