1 Introduction

In an edge n-colouring of a complete graph, each triangle of edges consists of either one colour, two colours or three colours: monochromatic, dichromatic or trichromatic. In this article, we explore edge-colourings determined by disallowed triangle colour combinations, but also requiring others. Thus, disallowing monochromatic triangles restricts to edge-coloured complete graphs within the Ramsey bound \(R(3,3,\dots ,3)\). But what if in addition to disallowing monochromatic triangles, we also impose the dual constraint that all remaining colour combinations (trichromatic and dichromatic) are present: is it possible to find such a network? These are natural combinatorial considerations in their own right, but there is an additional motivation by way of the algebraic foundations of qualitative reasoning, which finds wide application in AI settings around scheduling [1], navigation [20, 28] and geospatial positioning amongst others [29]. The constraint language underlying typical qualitative reasoning systems determines a kind of non-associative relation algebra (in the sense of Maddux [23]), which is attracting considerable attention from a theoretical computer science perspective; see [9, 14, 15, 21, 32] for example. The inverse problem of deciding if a suitably defined non-associative algebra arises from a concrete constraint network is shown to be NP-complete in [14]. The present work focusses on a natural family of combinatorially intriguing cases, that we find have nontrivial solutions, and provide some novel extensions of classically understood connections between certain associative relation algebras and combinatorial geometries, such as in Lyndon [22].

Let \(C^+ = \{1',c_1,\dots ,c_n\}\) be a finite set of colours, let U be any set and let \(\lambda :U\times U \rightarrow C^+\) be a surjective map such that \(\lambda (x,y) = \lambda (y,x)\) and \(\lambda (x,y) = 1'\) iff \(x=y\). Then, \(\{\lambda ^{-1}(1'),\lambda ^{-1}(c_1), \dots , \lambda ^{-1}(c_n)\}\) is a partition of \(U\times U\) with every \(\lambda ^{-1}(c_i)\) symmetric and \(\lambda ^{-1}(1')\) the identity relation. We call \(\lambda \) an edge n-colouring of the complete graph with the set of vertices U, informally thinking of \(1'\) as an invisible colour. The set \(C = C^+\setminus \{1'\}\) is the set of proper colours. We will consider natural conditions on the colourings, forbidding certain triangles and requiring others. To forbid the occurrence of monochromatic triangles for example, we can impose the following condition

$$\begin{aligned} \forall a,b,c\in C:|\{a,b,c\}| = 1 \Rightarrow \lambda ^{-1}(a)\circ \lambda ^{-1}(b)\cap \lambda ^{-1}(c) = \varnothing \end{aligned}$$

where \(\circ \) is the relational composition. Strengthening the condition above to an equivalence

$$\begin{aligned} \forall a,b,c\in C:|\{a,b,c\}| = 1 \Leftrightarrow \lambda ^{-1}(a)\circ \lambda ^{-1}(b)\cap \lambda ^{-1}(c) = \varnothing \end{aligned}$$

we still have all monochromatic triangles forbidden, but moreover all non-monochromatic triangles must occur. As noted earlier, it is not immediately clear whether such colourings exist: the Ramsey Theorem gives an upper bound on the size of the graphs, the occurrence of all non-monochromatic triangles gives a lower bound – conceivably greater than the upper bound.

In general, letting F be any subset of \(\{1,2,3\}\) we arrive at 8 natural conditions of the form

$$\begin{aligned} \forall a,b,c\in C:|\{a,b,c\}| \in F \Leftrightarrow \lambda ^{-1}(a)\circ \lambda ^{-1}(b)\cap \lambda ^{-1}(c) = \varnothing \end{aligned}$$

and 8 corresponding existence questions; these are tied precisely to the algebraic properties of interest in Lemma 3.2 below. We will also consider the weaker conditions, with forward implication only; these are somewhat less interesting since they do not determine a unique algebraic object (see Lemma 3.3).

2 Nonassociative relation algebras and their representations

In this section, we recall basic constructions and ideas from the theory of relation algebras, which we then tie to the combinatorial conditions discussed informally at the start of the article. This culminates in Lemma 3.2 of the next section, which shows that the basic hierarchy of strengths of representability (strong implies qualitative implies feeble) in the algebraic setting correspond precisely to three natural constraints around forbidden colour combinations and required colour combinations. The reader wishing to skip the algebraic connections can survive most of the remainder of the article with only the notation presented in Definition 3.1 and by using Lemma 3.2 as a Rosetta stone to relate algebraic terminology to combinatorial properties on edge-coloured complete graphs.

Nonassociative algebras were introduced and first studied in [23]. A nonassociative relation algebra or simply a nonassociative algebra (NA) is an algebra \(\textbf{A} = (A, \wedge , \vee , \mathbin {;}, \breve{\ }, \lnot , 0, 1, 1')\) with the following properties.

  1. (1)

    \((A, \vee , \wedge , \lnot , 0, 1) \) is a Boolean algebra.

  2. (2)

    \((A, \mathbin {;}, \breve{\ }, 1')\) is an involutive groupoid with unit. That is, \(\mathbin {;}\) is a binary operation, \(\breve{\ }\) unary, \(1'\) nullary, and the following identities hold:

    1. (a)

      \(1'\mathbin {;}x = x = x\mathbin {;}1'\)

    2. (b)

      \(x\breve{\ }\breve{\ } = x\).

  3. (3)

    The non-Boolean operations are operators. That is, the following further identities hold:

    1. (a)

      \(x\mathbin {;}(y\vee z) = (x\mathbin {;}y)\vee (x\mathbin {;}z)\) and \((x\vee y)\mathbin {;}z = (x\mathbin {;}z)\vee (y\mathbin {;}z)\)

    2. (b)

      \(x\mathbin {;}0 = 0 = 0\mathbin {;}x\)

    3. (c)

      \((x\vee y)\breve{\ } = x\breve{\ }\vee y\breve{\ }\)

    4. (d)

      \( 0\breve{\ }= 0\).

  4. (4)

    \((x\mathbin {;}y)\wedge z=0\) iff \((x\breve{\ }\mathbin {;}z)\wedge y=0\) iff \((z\mathbin {;}y\breve{\ })\wedge x=0\).

The equivalences in (4) are known as the triangle laws, or Peircean laws. If the operation \(\mathbin {;}\) is associative, then \(\textbf{A}\) is a relation algebra (RA), in the sense of Tarski [31]; see a monograph such as Givant [10], Hirsch and Hodkinson [13] or Maddux [24]. For any set U and an equivalence relation \(E\subseteq U\times U\), the powerset \(\mathcal {P}(E)\) carries a natural relation algebra structure. The Boolean operations are set-theoretical, \(\mathbin {;}\) is the relational composition, \(\breve{\ }\) the converse, and \(1'\) the identity relation. Denote this algebra by \({\mathfrak {Re}}_E(U)\). If \(E = U\times U\), we write \(\mathfrak {Re}(U)\), so \({\mathfrak {R}}{\mathfrak {e}}(U)\) is the algebra of all binary relations on U. In general, E is always an equivalence relation on U, but not necessarily the full relation. The bottom element of the of the Boolean reduct of \(\mathscr {P}(E)\) is \(\emptyset \) and the top element is E, so the Boolean complement is calculated relative to E. A relation algebra \(\textbf{A}\) is representable if there is an injective homomorphism \(\phi :\textbf{A}\rightarrow \mathfrak {Re}_E(U)\), for some U (called the base of the representation) and E. In particular, we have

  1. (r1)

    \(0^\phi =\varnothing \), \(1^\phi = E\), \((1')^\phi = Id_U\),

  2. (r2)

    \(\phi \) is a homomorphism of Boolean algebras,

  3. (r3)

    \((a\breve{\ })^\phi = (a^\phi )^{-1}\),

  4. (r4)

    \((a\mathbin {;}b)^\phi = a^\phi \circ b^\phi \),

where \({}^{-1}\) and \(\circ \) are the operations of relational converse and composition, respectively. If \(E = U\times U\), the representation is called square. To avoid confusion with ‘representation’ in a generic sense of ‘any kind of representation’, we will refer to representations above as strong representations. Two weakenings of this notion of representation, which apply to nonassociative algebras, were defined in [14], and we now recall them. A set \(\mathcal {H}\subseteq \mathscr {P}(U\times U)\) for some set U is called a herd if

  1. (H1)

    \(\mathcal {H}\) is a Boolean set algebra with top element \(U\times U\),

  2. (H2)

    \(Id_U\in \mathcal {H}\),

  3. (H3)

    \(S\in \mathcal {H}\) implies \(S^{-1}\in \mathcal {H}\).

In any herd \(\mathcal {H}\), the smallest element R containing \(S \circ T\), if it exists, is called the weak composition of S and T and is often denoted by \(S\diamond T\). When \(\mathcal {H}\) is finite (or more generally, complete) as a Boolean algebra, then \(S \diamond T\) always exists as we may simply intersect the elements of \(\mathcal {H}\) that fully contain the relation \(S \circ T\).

A nonassociative algebra \(\textbf{A}\) is said to be qualitatively representable if there is a bijection \(\phi \) from A to a herd \(\mathcal {H}\) such that

  1. (q1)

    \(0^\phi =\varnothing \), \(1^\phi =U\times U\), \((1')^\phi = Id_U\),

  2. (q2)

    \(\phi \) is a homomorphism of Boolean algebras,

  3. (q3)

    \((a\breve{\ })^\phi = (a^\phi )^{-1}\),

  4. (q4)

    \(a^\phi \circ b^\phi \subseteq c^\phi \leftrightarrow a\mathbin {;}b\le c\).

Note that (q4) states that \(c^\phi \) is the smallest solution to \(c^\phi \supseteq a^\phi \circ b^\phi \), and so \(c^\phi = a^\phi \diamond b^\phi \). If (q4) is strengthened to (r4), then the qualitative representation \(\phi \) is a strong square representation.

On the other hand, if (q4) is weakened to \(\varphi (a\mathbin {;}b)\supseteq \varphi (a)\circ \varphi (b)\), we obtain a still weaker notion of representation, called feeble in [14]. The next lemma combines well known facts on representations of relation algebras with parts of Lemmas 12 and 18 of [14].

Lemma 2.1

Let \(\textbf{A}\) be complete and atomic with the set of atoms At(A), and let \(\varphi :\textbf{A} \rightarrow \mathscr {P}(U\times U)\) satisfy (1)–(3) above. Then, (R1) is equivalent to (R2), (Q1) is equivalent to (Q2), and (F1) is equivalent to (F2).

  1. (R1)

    \(\phi \) is a strong square representation of \(\textbf{A}\).

  2. (R2)

    For all \(a,b,c\in At(A)\), we have \((a\mathbin {;}b)\wedge c \ne 0\) iff for all \(x,y\in U\) such that \((x,y)\in c^\phi \), there exists \(z\in U\) with \((x,z)\in a^\phi \) and \((z,y)\in b^\phi \).

  3. (Q1)

    \(\phi \) is a qualitative representation of \(\textbf{A}\).

  4. (Q2)

    For all \(a,b,c\in At(A)\), we have \((a\mathbin {;}b)\wedge c \ne 0\) iff there exist \(x,y,z\in U\) such that \((x,z)\in a^\phi \), \((z,y)\in b^\phi \), \((x,y)\in c^\phi \).

  5. (F1)

    \(\phi \) is a feeble representation of \(\textbf{A}\).

  6. (F2)

    For all \(a,b,c\in At(A)\) if there exist \(x,y,z\in U\) such that \((x,z)\in a^\phi \), \((z,y)\in b^\phi \), \((x,y)\in c^\phi \), then \((a\mathbin {;}b)\wedge c \ne 0\).

Since abc are atoms, the equivalence \((a\mathbin {;}b)\wedge c \ne 0 \Leftrightarrow a\mathbin {;}b\ge c\) holds in \(\textbf{A}\). Strong representations must reflect this property by (R2), but qualitative and feeble representations do not need to.

Definition 2.2

Let \(\textbf{A}\) be a nonassociative algebra. The atom structure of \(\textbf{A}\) is the structure \(At(\textbf{A}) = (At(A),\breve{\ }, I,T)\), where At(A) is the set of atoms of \(\textbf{A}\), \(\breve{\ }\) is the converse operation of \(\textbf{A}\) restricted to atoms, \(I = \{x\in At(A) \mid x\le 1' \}\) is the set of subidentity atoms (other atoms are called diversity atoms), \(T = \{(x,y,z)\in At(A)^3\mid z \le x\mathbin {;}y\}\) is the set of consistent triples. Triples \((x,y,z)\notin T\) are called forbidden.

Conversely, for a relational structure \(\mathcal {X} = (X, \ \breve{\ }, I, T)\) where \(\ \breve{\ }\) is a unary function, \(I\subseteq X\), and \(T\subseteq X^3\), the complex algebra \(\mathfrak {Cm}(\mathcal {X})\) of \(\mathcal {X}\) is the algebra \((\mathscr {P}(X),\cap ,\cup ,\mathbin {;}, \lnot , \ \breve{\ },\varnothing , X, I)\), where for \(R,S\subseteq X\), we put \(S\breve{\ } = \{s\breve{\ }: s\in S\}\), and \(S\mathbin {;}R = \{u\in X: (s,r,u)\in T, \text { for some } s\in S, r\in R\}\).

If \(\textbf{A}\) is an atomic nonassociative algebra, then the map \(x\mapsto \{a\in At(A): a\le x\}\) is an embedding of \(\textbf{A}\) into \(\mathfrak {Cm}(At(\textbf{A}))\). If \(\textbf{A}\) is moreover complete, then it is an isomorphism. It is convenient and very common to present complete and atomic nonassociative algebras in terms of their atom structures. The next lemma, proved in [23], characterises structures that are atom structures of nonassociative algebras.

Lemma 2.3

Let \(\mathcal {X} = (X, \ \breve{\ }, I, T)\) be a structure such that I is a subset of X, T is a subset of \(X^3\), and \(\ \breve{\ }\) is a function satisfying \(a\breve{\ }\breve{\ } = a\). The following are equivalent:

  • \(\mathcal {X}\) is the atom structure of some nonassociative algebra.

  • For all \(a,b,c\in X\), we have

    • \(b =c\) iff there is some \(e\in I\) such that \((e,b,c)\in T\)

    • if \((a,b,c)\in T\) then \((c\breve{\ },a,b\breve{\ })\in T\) and \((b\breve{\ },a\breve{\ },c\breve{\ })\in T\).

The triples (abc), \((a\breve{\ },c,b)\), \((c,b\breve{\ },a)\), \((b,c\breve{\ },a\breve{\ })\), \((c\breve{\ },a,b\breve{\ })\), \((b\breve{\ },a\breve{\ },c\breve{\ })\) are called the Peircean transforms of (abc). See Fig. 1 for a pictorial explanation of Peircean triples. The relation T above is always closed under Peircean transforms.

Fig. 1
figure 1

If \((a,b,c)\in T\), then the Peircean transforms correspond to all of the other cyclic traverses of this triangle. If any one is present in a network, then all the others are too. In this article, all algebras are symmetric, so the arrow direction is not important

There are many finite relation algebras that admit strong representations over infinite sets but no finite set, and in general deciding strong representability for finite relation algebras is algorithmically undecidable, by Hirsch and Hodkinson [12]. Qualitative representability is decidable, though is NP-complete [14, Theorem 15]. Much of the simplification is due to the following useful lemma, whose easy proof is a brute-force argument relying on the fact that in a finite algebra \(\textbf{A}\) there are at most \(3|At(\textbf{A})|\) distinct triangles that must be witnessed; so if a qualitative representation exists it can always be pruned to contain only as many points as are needed to witness all the necessary triangles.

Lemma 2.4

[14, Lemma 13] If an atomic nonassociative algebra \(\textbf{A}\) admits a qualitative representation, then it admits a qualitative representation as relations on set of size at most \(3|At(\textbf{A})|\) points.

3 Chromatic algebras

Definition 3.1

Let \(S\subseteq \{1,2,3\}\). We define a nonassociative algebra \(\mathfrak {E}_{n+1}^S\) with \(n+1\) atoms as the complex algebra \(\mathfrak {Cm}(\mathcal {C})\) of the structure \(\mathcal {C} = (C^+, \ \breve{\ }, I, T)\), where \(C^+ = \{1',c_1,\dots ,c_n\}\), \(c\breve{\ } = c\) for any \(c\in C^+\), \(I = \{1'\}\), and T is given by

  1. (1)

    \(\forall b,c\in C^+: b =c \Leftrightarrow (1',b,c)\in T\),

  2. (2)

    \(\forall a,b,c\in C: |\{a,b,c\}| \in S \Leftrightarrow (a, b, c)\in T\), where \(C = C^+{\setminus }\{1'\}\).

We call algebras \(\mathfrak {E}_{n+1}^S\) chromatic.

It is easy to see that T is closed under the Peircean transforms. Note that S gives the types of consistent triples rather than forbidden ones, which would be more in line with the remarks in Sect. 1. We stated the definition this way to keep the notation \(\mathfrak {E}_{n+1}^S\) in agreement with [24]. Expressing (2) in terms of the operations in the complex algebra \(\mathfrak {Cm}(\mathcal {C})\), and identifying singletons with their single elements in a set-theoretically incorrect but notationally convenient way, we get

$$\begin{aligned} \forall a,b,c\in C: |\{a,b,c\}| \in S \Leftrightarrow (a\mathbin {;}b)\wedge c \ne 0. \end{aligned}$$

Then, putting \(F = \{1,2,3\}\setminus S\), we arrive at an equivalent version of (2)

$$\begin{aligned} \forall a,b,c\in C: |\{a,b,c\}| \in F \Leftrightarrow (a\mathbin {;}b)\wedge c = 0 \end{aligned}$$

matching the remarks in Sect. 1 and the statement of Lemma 2.1. With this the next lemma is not difficult to prove: the representation (strong, qualitative or feeble) on the atoms is precisely \(\lambda ^{-1}\).

Lemma 3.2

Let \(S\subseteq \{1,2,3\}\) and \(F = \{1,2,3\}\setminus S\). The following hold.

  1. (1)

    \(\mathfrak {E}_{n+1}^S\) is strongly representable if and only if there exists an edge n-colouring \(\lambda \) of a complete graph, satisfying

    1. (a)

      \(\forall a,b,c\in C:|\{a,b,c\}| \in F \Leftrightarrow \lambda ^{-1}(a)\circ \lambda ^{-1}(b)\cap \lambda ^{-1}(c) = \varnothing \), and

    2. (b)

      \(\forall a,b,c\in C:|\{a,b,c\}| \in S \Leftrightarrow \lambda ^{-1}(a)\circ \lambda ^{-1}(b)\supseteq \lambda ^{-1}(c)\).

  2. (2)

    \(\mathfrak {E}_{n+1}^S\) is qualitatively representable if and only if there exists an edge n-colouring \(\lambda \) of a complete graph, satisfying

    1. (a)

      \(\forall a,b,c\in C:|\{a,b,c\}| \in F \Leftrightarrow \lambda ^{-1}(a)\circ \lambda ^{-1}(b)\cap \lambda ^{-1}(c) = \varnothing \).

  3. (3)

    \(\mathfrak {E}_{n+1}^S\) is feebly representable if and only if there exists an edge n-colouring \(\lambda \) of a complete graph satisfying

(a\({}'\)):

\(\forall a,b,c\in C:|\{a,b,c\}| \in F \Rightarrow \lambda ^{-1}(a)\circ \lambda ^{-1}(b)\cap \lambda ^{-1}(c) = \varnothing \).

Note that the left-hand sides of (a) and (b) above are negations of one another, but the right-hand sides are not. Thus, (a) alone forces \(\mathbin {;}\) to be represented as weak composition, but (a) together with (b) force \(\mathbin {;}\) to be represented as composition.

Lemma 3.3

If \(S\subseteq S'\) and \(\mathfrak {E}_{n+1}^S\) has a feeble representation given as a colouring, the same colouring is also a feeble representation of \(\mathfrak {E}_{n+1}^{S'}\).

Proof

Let \(F = \{1,2,3\}\setminus S\) and \(F' = \{1,2,3\}\setminus S'\). Then, \(F'\subseteq F\) and the claim follows by Lemma 3.2(3)(a\({}'\)). \(\square \)

4 Algebras \(\mathfrak {E}_{n+1}^\varnothing \), \(\mathfrak {E}_{n+1}^{\{1\}}\), \(\mathfrak {E}_{n+1}^{\{1,2\}}\) and \(\mathfrak {E}_{n+1}^{\{1,2,3\}}\)

For \(\mathfrak {E}_{n+1}^\varnothing \), all triangles are forbidden, so the only possible representation is the colouring of \(K_2\) with a single colour (\(n=1\)). For \(\mathfrak {E}_{n+1}^{\{1\}}\), the only possible representation is \(K_m\) for \(m\ge 3\) coloured with a single colour (\(n=1\)). These representations are strong.

The existence of strong (infinite) representations for \(\mathfrak {E}_{n+1}^{\{1,2\}}\) is Theorem 453 of Maddux [24], and the lack of finite representability for \(n > 3\) is Theorem 455 there. The proof of Theorem 453 can be presented in terms of the representability games of Hirsch and Hodkinson [13]. A finite qualitative representation can be then extracted by Lemma 2.4.

Finite strong representations of \(\mathfrak {E}_{n+1}^{\{1,2,3\}}\) are obtained by Jipsen, Maddux and Tuza in [16]. A qualitative representation is much easier to get: take the disjoint union of all possible triangles, and use an arbitrary colour for all the missing edges.

5 Algebras \(\mathfrak {E}_{n+1}^{\{3\}}\)

The algebra \(\mathfrak {E}_{4}^{\{3\}}\) has a unique strong representation on 4 points. For \(n>3\), the algebras \(\mathfrak {E}_{n+1}^{\{3\}}\) are not associative, so strong representability is impossible, making qualitative representability of particular interest. Our construction for representability will be based around quasigroups, and we direct the reader to a text such as Smith [30] for further background.

Let \((Q,\cdot )\) be a commutative idempotent quasigroup on \(\{0,\dots ,n-1\}\). We define edge colourings \(\lambda _1\) on the complete graph on \(\{0,\dots ,n-1\}\) and \(\lambda _2\) on \(\{-1,0,1,\dots ,n-1\}\) into the coloursFootnote 1\(\{1',c_0,\dots ,c_{n-1}\}\) as follows:

$$\begin{aligned} \lambda _1(i,j)={\left\{ \begin{array}{ll} 1'&{}\text { (invisible) if }i=j\\ c_{i\cdot j}&{} \text { otherwise} \end{array}\right. } \end{aligned}$$

and

$$\begin{aligned} \lambda _2(i,j)={\left\{ \begin{array}{ll} 1'&{}\text { (invisible) if }i=j\\ \lambda _1(i,j) &{}\text { if }i,j\ne -1\\ c_j&{}\text { if }i=-1\ne j\\ c_i&{}\text { if }j=-1\ne i. \end{array}\right. } \end{aligned}$$

Commutativity of \((Q,\cdot )\) ensures that \(\lambda _i(j,k)=\lambda _i(k,j)\).

Lemma 5.1

If \((Q,\cdot )\) is a commutative idempotent quasigroup on \(\{0,1,\dots ,n-1\}\), then \(\lambda _1^{-1}\) and \(\lambda _2^{-1}\) are feeble representations of \(\mathfrak {E}_{n+1}^{\{3\}}\). Moreover, the following properties are related by (1)\(\Leftrightarrow \)(3) and (1)\(\Rightarrow \)(2):

  1. (1)

    \(\lambda _1\) is a qualitative representation of \(\mathfrak {E}_{n+1}^{\{3\}}\),

  2. (2)

    \(\lambda _2\) is a qualitative representation of \(\mathfrak {E}_{n+1}^{\{3\}}\),

  3. (3)

    \((Q,\cdot )\) satisfies the following 3-cycle condition: for each xyz with \(|\{x,y,z\}|=3\), there exists uvw with \(u\cdot v=x\), \(v\cdot w=y\) and \(w\cdot u=z\).

Proof

It is clear that \(\lambda _1\) and \(\lambda _2\) are surjective, so to establish that both determine feeble representations we must ensure that there are no monochromatic or dichromatic triangles. For \(\lambda _1\), this is just the cancellativity property of quasigroups: for \(i,j,k\in \{0,\dots ,n-1\}\) with \(j\ne k\), we have \(\lambda _1(i,j)\ne \lambda _1(i,k)\) because \(i\cdot j=i\cdot k\Rightarrow j=k\), showing that no triangle contains two edges of the same colour. Thus,  \(\lambda _1^{-1}\) is a feeble representation. Now, observe that under \(\lambda _1\), each point i is incident to edges of all colours \(c_0,\dots ,c_{n-1}\) except colour \(c_i\) (this is where idempotency of \((Q,\cdot )\) is used). The colouring \(\lambda _2\) extends \(\lambda _1\) to the extra vertex \(-1\) by adding the missing colour for each vertex: an edge of colour \(c_i\) between \(-1\) and i, for each \(i\in \{0,\dots ,n-1\}\). It follows immediately that no non-trichromatic triangles are added under this extension: edges leaving \(-1\) are coloured according to the name of the vertex at the other end, so cannot be the same colour; and such an edge does not coincide in colour with any other edge incident to that vertex. Thus, \(\lambda _2^{-1}\) also is a feeble representations of \(\mathfrak {E}_{n+1}^{\{3\}}\).

For the three conditions: (1) implies (2) because \(\lambda _2\) extends \(\lambda _1\), while according to the definition of \(\lambda _1\), the 3-cycle condition in (3) is precisely the condition that \(\lambda _1\) provides instances of each trichromatic triangle, so (1) is equivalent to (3). \(\square \)

It is well known that commutative idempotent quasigroups exist for all and only odd orders, though we omit details because it emerges naturally from the proof of our main classification of qualitative representability \(\mathfrak {E}_{n+1}^{\{3\}}\); Theorem 5.3 below. We next recall a standard example of a commutative idempotent quasigroup, for every odd order, and verify that it satisfies the 3-cycle condition.

On universe \(Q_n=\{0,\dots ,n-1\}\) for an odd n, define a multiplication \(\cdot \) by

$$\begin{aligned} i\cdot j = \frac{i+j}{2} \end{aligned}$$

where \(\frac{x}{2}\) stands for the unique integer \(u\in {\mathbb {Z}}_n\) such that \(2u = x \pmod n\), which exists because n is odd.

Lemma 5.2

The quasigroup \((Q_n,\cdot )\) satisfies the 3-cycle condition.

Proof

Let \(|\{i,j,k\}| = 3\) (equivalently \(|\{c_{i},c_{j},c_{k}\}| = 3\)). We claim that it is possible to choose \(a,y_{a},x_{a} \in Q_n\), so that we have \(i=a \cdot x_{a},\) \(j=a \cdot y_{a},\) \(k=x_{a}\cdot y_{a}\), verifying the 3-cycle condition. By the unique solution property of \((Q_n, \cdot )\), for each \(a\in Q_{n}\), there exists \(x_{a}, y_{a}\in Q_n\), where

$$\begin{aligned} a \cdot x_{a}&= i\\ a \cdot y_{a}&= j. \end{aligned}$$

Then, a simple calculation shows that

$$\begin{aligned} x_{a}\cdot y_{a}=i+j-a \pmod n \end{aligned}$$

holds. It follows that choosing a to be \(k-i-j\pmod n\) provides the desired solution. \(\square \)

Theorem 5.3

The algebra \(\mathfrak {E}_{n+1}^{\{3\}}\) is qualitatively representable if and only if \(n\ge 3\) is odd. Up to isomorphism, every representation of \(\mathfrak {E}_{n+1}^{\{3\}}\) arises from a representation of the form \(\lambda _1^{-1}\) or \(\lambda _2^{-1}\) of Lemma 5.1.

Proof

Assume \(\mathfrak {E}_{n+1}^{\{3\}}\) is qualitatively representable for some n. Then, there exists a finite representation, over a complete graph \(K_m\). Equivalently, there is a colouring map \(\lambda :K_m\times K_m\rightarrow C\), with \(|C| = n\). Consider an arbitrarily chosen vertex \(v\in K_m\). Since dichromatic and monochromatic triangles are forbidden, all adjacent edges must be of different colours, so \(m-1\le n\). As there are \(n\atopwithdelims ()3\) different trichromatic triangles to realise, we must have \(m\ge n\). So, \(n\le m\le n+1\).

If \(m = n+1\), then every vertex has adjacent edges of all colours. Since edges of the same colour cannot be adjacent, the edges of any given colour form a disjoint union of copies of \(K_2\) and there are no isolated vertices. So the number of vertices is even, hence n is odd.

Next, assume \(m = n\). Since there are \({n \atopwithdelims ()3}\) trichromatic triangles to realise, each necessary triangle appears exactly once in the representation. By symmetry of the colouring condition, each edge of a given colour appears the same number of times, and as there are \(\frac{n(n-1)}{2}\) edges and n colours, each edge appears \(\frac{n-1}{2}\) times, so n is odd. Thus, qualitative representations can exist only for odd orders, and Lemma 5.2 and Lemma 5.1 show that all odd orders of size at least 3 are possible.

For the second part, first consider a representation on n vertices. Each vertex has adjacent edges of all but one colour, call it the missing colour. Suppose there are vertices v and w such that they miss the same colour, say m, so that no edge coloured m is adjacent to either v or w. As each edge appears \(\frac{n-1}{2}\) times, \(K_n\setminus \{v,w\}\) contains \(\frac{n-1}{2}\) edges coloured m. These edges are disjoint, so \(K_n\setminus \{v,w\}\) must contain \(n-1\) vertices, in contradiction to \(|K_n\setminus \{v,w\}| = n-2\). It follows that each vertex has a different missing colour. It follows further that adding one vertex, say \(v_{-1}\) to \(K_n\) and letting \(\lambda (v_{-1},v_i)\) be the missing colour of \(v_i\), we obtain a representation on \(n+1\) vertices. So, every representation on n vertices is uniquely extendable to a representation on \(n+1\) vertices. Equivalently, every representation on n vertices can be obtained from a representation on \(n+1\) vertices by removing one vertex.

Now, consider a representation on \(n+1\) vertices. Numbering the vertices \(v_{-1}\), \(v_0,\dots ,v_{n-1}\) in such a way that \(\lambda (v_{-1},v_i) = c_i\) for any \(i\ne -1\), we define multiplication on the set of indices \(\{0,\dots ,n-1\}\) putting \(i\cdot i\) and \(i\cdot j = k\) if \(i\ne j\) and \(\lambda (v_i,v_j) = c_k\). It is then routine to verify that \(\{0,\dots ,n-1\}\) is a commutative idempotent quasigroup, and that the colouring coincides with \(\lambda _2\) (restricting to coincide with \(\lambda _1\) amongst the vertices \(v_0,\dots ,v_{n-1}\)). \(\square \)

The two qualitative representations of \(\mathfrak {E}_{n}^{\{3\}}\) can be visualised on the complex plane as follows. Let \(v_{-1}\) be the origin, and \(v_0,\dots ,v_{n-1}\) be the n-th roots of unity. Put \(\lambda (v_{-1},v_{0}) = c_0 = \lambda (v_j,\overline{v_j})\), for \(j\in \{1,\dots , \lfloor \frac{n}{2} \rfloor \}\), where \(\overline{v_j}\) is the complex conjugate of \(v_j\). Rotate and repeat with a different colour, as in Fig. 2. To get a representation on n points remove the origin and its outgoing edges.

Fig. 2
figure 2

First stages of drawing a qualitative representation of \(\mathfrak {E}_{7}^{\{3\}}\) on the complex plane

For feeble representations, we only need to consider \(\mathfrak {E}_{n+1}^{\{3\}}\) for an even n. Taking a qualitative representation for \(\mathfrak {E}_{n}^{\{3\}}\), and re-colouring a single arbitrarily chosen edge with a new colour gives a feeble representation of \(\mathfrak {E}_{n+1}^{\{3\}}\). Hence, \(\mathfrak {E}_{n+1}^{\{3\}}\) is feebly representable for all \(n\ge 3\). Now, using Lemma 3.3 we immediately obtain the following.

Observation 5.4

Let \(3\in S\). Then, \(\mathfrak {E}_{n+1}^S\) is feebly representable for all \(n\ge 3\).

6 Algebras \(\mathfrak {E}_{n+1}^{\{2\}}\)

The algebras \(\mathfrak {E}_{n+1}^{\{2\}}\) are associative. The pentagon algebra is the unique strong representation of \(\mathfrak {E}_{3}^{\{2\}}\), and it is easy to show that strong representations do not exist for \(n>2\). At the other extreme, feeble representations always exist.

Observation 6.1

Let \(2\in S\). Then, \(\mathfrak {E}_{n+1}^S\) is feebly representable for all \(n\ge 2\).

Proof

By Lemma 3.3, it suffices to show that \(\mathfrak {E}_{n+1}^{\{2\}}\) is feebly representable for all \(n\ge 2\). Let \(V = \{v_0,\dots , v_n\}\) be a set of vertices, and \(C = \{c_1,\dots ,c_n\}\) a set of proper colours. Define a colouring \(\lambda :V^2\rightarrow C\) by \(\lambda (v_i,v_j) = c_j\) if \(i<j\). Then, any triangle that occurs is dichromatic, and all colours are used, so we have a feeble representation. \(\square \)

Qualitative representations do not exist for \(n>2\), but proving this is considerably more difficult than for strong representations. We will work our way towards a contradiction. Assume a qualitative representation over a base B exists, and let \(v\in B\). The chromatic degree \(\textrm{deg}_\chi (v)\) of v is the number of colours of its adjacent edges. If a vertex v has \(\textrm{deg}_\chi (v) = n\), we call v chromatically saturated. To distinguish clearly between triangles given as sets of vertices, and triangles given as sets of edges, we will use parentheses \((v_i,v_j,v_k)\) for vertices and square brackets \([\ell ,p,q]\) for edges/colours.

Lemma 6.2

If \(\mathfrak {E}_{n+1}^{\{2\}}\) has a qualitative representation over a base B, and \(v_0\in B\), then it also has a qualitative representation over a base \(B'\), extending B, in which \(v_0\) is chromatically saturated.

Proof

Assume \(\mathfrak {E}_{n+1}^{\{2\}}\) has a qualitative representation over B. Pick an arbitrary \(v_0\in B\). We can assume \(B = \{v_0,\dots ,v_m\}\). If \(\textrm{deg}_\chi (v) = n\), there is nothing to prove, so assume \(\textrm{deg}_\chi (v) = k<n\). Let d be a colour not adjacent to \(v_0\). Add a vertex \(v'\) and extend the labelling by

$$\begin{aligned} \lambda (v',v_i) = {\left\{ \begin{array}{ll} d &{} \text { if } i = 0\\ \lambda (v_0, v_i) &{} \text { otherwise} \end{array}\right. } \end{aligned}$$

We will show that this labelling is consistent. As the only possible inconsistency involves \(v'\), consider \(v_i\), \(v_k\), \(v'\) with \(|\{v_i,v_k,v'\}| = 3\). If \(i\ne 0\ne k\), then we have \(\lambda (v',v_i) = \lambda (v_0,v_i)\) and \(\lambda (v',v_k) = \lambda (v_0,v_k)\). Since the triangle \((v_0,v_i,v_k)\) is consistent, so is \((v',v_i,v_k)\). Next, assume \(i\ne 0 = k\), so we consider the triangle \((v',v_0,v_i)\). Then, we have \(\lambda (v', v_0) = d\), and \(\lambda (v', v_i) = \lambda (v_0, v_i)\) by construction. By assumption, \(\lambda (v_0, v_i)\ne d\), so the triangle \((v',v_0,v_i)\) is consistent.

Repeating the extension procedure sufficiently many times produces the desired qualitative representation. \(\square \)

By Lemma 6.2, we can assume that \(\mathfrak {E}_{n+1}^{\{2\}}\) has a qualitative representation over some B such that there is a chromatically saturated vertex \(v\in B\). Every vertex \(u\in B\) defines a partition of \(B{\setminus }\{u\}\) by adjacent colours, i.e. \(z\sim _u w\) if and only if \(\lambda (u,z) = \lambda (u,w)\). Let \(v_0\) be chromatically saturated. Pick a single representative of each equivalence class of \(\sim _{v_0}\) and let the representatives be \(v_1,\dots , v_n\), for the colours \(1,\dots , n\), so that \(\lambda (v_0,v_i) = i\). Let G be the induced labelled subgraph of B on the vertices \(\{v_0, \dots ,v_n\}\). Define a binary relation \(\sqsubset \) on \(\{v_0, \dots ,v_n\}\) by putting \(v_i\sqsubset v_j\) if \(\lambda (v_i,v_j) = j\). Note that \(v_0 \sqsubset v_i\) for every \(i > 0\).

Lemma 6.3

The relation \(\sqsubset \) is a strict linear order on \(\{v_0,\dots ,v_n\}\).

Proof

Antireflexivity is immediate from the definition. To show transitivity, assume \(v_p\sqsubset v_q\) and \(v_q\sqsubset v_r\). By definition of \(\sqsubset \), only p can be 0, and in this case the claim follows immediately, as \(\lambda (v_0,v_r) = r\) by definition.

Assume \(p\ne 0\). Then, \(\lambda (v_p,v_q) = q = \lambda (v_0,v_q)\) and \(\lambda (v_q,v_r) = r = \lambda (v_0,v_r)\). Now, consider \(\lambda (p,r)\). Since \(\lambda (v_0,v_p) = p\), we must have \(\lambda (v_p,v_r)\in \{q,r\}\cap \{p,r\}\), and since \(p\ne q\), we get \(\lambda (v_p,v_r) = r\) as required.

Linearity is also immediate. Take arbitrary \(v_p\) and \(v_q\). If \(p=0\) or \(q = 0\), the claim holds trivially. Otherwise, we have \(\lambda (v_p,v_q)\in \{\lambda (v_0,v_p), \lambda (v_0,v_q)\} = \{p,q\}\). \(\square \)

Although G is a feeble representation of \(\mathfrak {E}_{n+1}^{\{2\}}\) (isomorphic to the one of Observation 6.1), it is not a qualitative representation of \(\mathfrak {E}_{n+1}^{\{2\}}\), as no triangle \((v_i,v_i,v_j)\) with \(i\sqsubset j\) is realised in G. Hence, if B is the base of a qualitative representation of \(\mathfrak {E}_{n+1}^{\{2\}}\), then \(G \ne B\). Consider a vertex \(u\notin G\). As \(|G| = n+1\), by the pigeonhole principle we must have \(\lambda (u,v_p) = \lambda (u,v_q)\) for some distinct vertices \(v_p,v_q\in G\). Assume that \(\ell \) denotes the value \(\lambda (u,v_p) = \lambda (u,v_q)\).

Renumbering the colours, we can assume that \(\sqsubset \) coincides with the usual strict order on natural numbers. From now on, we will work under this assumption, using < for the induced order on colours. We will refer to G as a naturally ordered subgraph of B. While there may be many subgraphs of this form, it suffices to work with a single chosen one and only vary the choice of \(u\notin G\), as the values \(p,q,\ell \) depend on the choice of u.

We can assume \(p<q\), so \(\lambda (v_p,v_q) = q\), and thus, \(\ell \ne q\). We can also assume that q is the largest vertex (amongst \(v_0,\dots ,v_n\)) with a repeat, that is, such that \(\lambda (u,v_s) = \lambda (u,v_q)\) holds for some \(s\ne q\). Thus, for every distinct \(s,t\ge q\) we have \(\lambda (u,v_s) \ne \lambda (u,v_t)\). We will keep these assumptions fixed throughout the rest of the section and invite the reader to draw pictures while reading.

Lemma 6.4

Let G be a naturally ordered subgraph of B, and let \(u\notin G\). The following hold:

  1. (1)

    If \(p\ne \ell \), then, for every \(r \le p\) we have \(\lambda (u,v_r)=\ell \).

  2. (2)

    If \(p = \ell \), then, for every \(r < p\) we have \(\lambda (u,v_r)=q\).

  3. (3)

    For every \(r,r' < p\), we have \(\lambda (u,v_r) = \lambda (u,v_{r'})\).

  4. (4)

    If \(p<\ell <q\), we have \(\lambda (u,v_\ell )=q\).

  5. (5)

    For every \(r\ne \ell \) with \(p<r<q\), we have \(\lambda (u,v_r)=\ell \).

  6. (6)

    For every \(r\ne \ell \) with \(q<r\), we have \(\lambda (u,v_r)=r\).

Proof

For (1), let \(v_r\sqsubset v_p\). Then, \(\lambda (v_r,v_p) = p\) and \(\lambda (v_r,v_q) = q\), so \(\lambda (u,v_r)\in \{\ell ,p\}\cap \{\ell ,q\}\), as \(p\ne \ell \). Hence, \(\lambda (u,v_r) = \ell \).

For (2), let \(v_r\sqsubset v_p\). By transitivity, \(v_r \sqsubset v_q\), so \(\lambda (v_r, v_q) = q\), hence \(\lambda (u,v_r) \in \{\ell ,q\}\). As \(p = \ell \), we also have \(\lambda (v_r,v_p) = \ell \), so \(\lambda (u,v_r) \ne \ell \), hence \(\lambda (u,v_r) = q\).

Next, (3) follows immediately from (1) and (2).

For (4), let \(v_p\sqsubset v_\ell \sqsubset v_q\). Then, \(\lambda (u,v_\ell )\in \{\ell ,q\}\), as \(\lambda (u,v_q) = \ell \) and \(\lambda (v_\ell ,v_q) = q\). Since \(\lambda (u,v_p) = \ell = \lambda (v_\ell ,v_p)\), we also have \(\lambda (u,v_\ell )\ne \ell \), hence \(\lambda (u,v_r) = q\).

For (5), let \(v_p\sqsubset v_r\sqsubset v_q\) and \(r\ne \ell \). Then, \(\lambda (v_p,v_r) = r\) and \(\lambda (v_q,v_r) = q\), so \(\lambda (u,v_r)\in \{\ell ,r\}\cap \{\ell ,q\}\), as \(r\ne \ell \). Hence, \(\lambda (u,v_r) = \ell \).

For (6), we have \(\lambda (u,v_r)\in \{\ell ,r\}\), but \(\lambda (u,v_r) = \ell \) contradicts the assumption that \(v_q\) is the largest vertex with a repeat. Hence, \(\lambda (u,v_r) = r\). \(\square \)

Lemma 6.5

Let G be a naturally ordered subgraph of B, and let \(u\notin G\). Then, \(v_\ell = v_{q-1}\) or \(v_\ell = v_{q+1}\). Therefore, \(\ell = q-1\) or \(\ell = q+1\).

Proof

We will apply Lemma 6.4 repeatedly, and referring to numbers (1)–(6) under the tacit understanding that these will be the items in Lemma 6.4. Firstly, assume that \(p = \ell \) and \(p< r < q\). From (5), we get \(\lambda (u,v_r) = \ell \). By assumption, \(\lambda (u,v_q) = \ell \). By transitivity, if \(i < p\), then \(\lambda (v_i,v_r) = r\), and \(\lambda (v_i, v_q) = q\), hence \(\lambda (u,v_i) \in \{\ell , r\} \cap \{\ell , q\}\). Since \(r \ne q\), we have \(\lambda (u,v_i) = \ell \). This contradicts (2), so such a configuration cannot occur. As \(p > 0\), such an \(i\) always exists. So, when \(p = \ell \), we require that no such \(r\) exists, i.e. that \(\ell = p = q-1\). We can now assume that \(p \ne \ell \).

Now, assume \(p< \ell < q-1\). Then, \(p< q-1 <q\), so by (5), we have \(\lambda (u,v_{q-1}) = \ell \). As \(\lambda (v_{\ell },v_{q-1}) = q-1\) and \(\lambda (v_{\ell },v_{q}) = q\), we have \(\lambda (u,v_\ell )\in \{\ell ,q\}\cap \{\ell ,q-1\} = \{\ell \}\). This contradicts (4), as \(\ell \ne q\). It follows that \(p< \ell < q\) implies \(\ell = q-1\).

Assume \(q< \ell \). Clearly, \(\lambda (v_q, v_\ell ) = \ell \). By (6), \(q+1 < \ell \) means \(\lambda (u,v_{q+1}) = q+1\), so \(\lambda (u,v_\ell ) \in \{\ell , q+1\}\). But \(\lambda (u,v_q) = \ell = \lambda (v_q, v_\ell )\), so we have \(\lambda (u,v_{\ell }) = q+1\), which contradicts our minimality assumption on repeated labels of edges with \(u\). Thus, we must have \(\ell = q+1\) if \(q < \ell \).

Assume \(0< \ell < p\). Then, by (1), we have \([\ell ,\ell ,\ell ] = [\lambda (v_\ell ,v_0), \lambda (u,v_\ell ), \lambda (u,v_0)]\), which is a contradiction, as monochromatic triangles are forbidden.

Finally, the case \(q = \ell \) is impossible due to \([\lambda (u,v_q), \lambda (u,v_p), \lambda (v_p,v_q)]\), so the results cover all cases. \(\square \)

Lemma 6.6

Let G be a naturally ordered subgraph of B, and let \(u\notin G\). Let p, q and \(\ell \) be as in Lemmas 6.4 and 6.5. Then, exactly one of the following three cases occurs:

  1. (1)

    \(\lambda (u,v_i) = q+1\) for all \(i\in \{0,\dots ,q\}\), \(\lambda (u,v_{q+1})\in \{1,\dots ,q\}\), \(\lambda (u,v_j) = j\) for all \(j\in \{q+2,\dots , n\}\).

  2. (2)

    \(\lambda (u,v_i) = q-1\) for all \(i\in \{0,\dots ,q-2\}\cup \{q\}\), \(\lambda (u, v_{q-1}) = q\), \(\lambda (u,v_j) = j\) for all \(j\in \{q+1,\dots , n\}\).

  3. (3)

    \(\lambda (u,v_i) = q\) for all \(i\in \{0,\dots ,q-2\}\), \(\lambda (u,v_{q-1}) = \lambda (u,v_{q}) = q-1\), \(\lambda (u,v_j) = j\) for all \(j\in \{q+1,\dots , n\}\).

Proof

By Lemma 6.5, we have either \(\ell = q+1\) or \(\ell = q-1\). Thus, \(\ell = q+1\) implies \(\lambda (u,v_q) = q+1\), and then cases (1), (5), and (6) of Lemma 6.4 apply, showing that the first and the third items of (1) above hold. For the second item, note that \(\lambda (u,v_{q+1}) \ge q+1\) contradicts the assumption of \(v_q\) being the largest vertex with a repeat.

If \(\ell = q-1\), then we have \(\lambda (u,v_q) = q-1=\lambda (u, v_p)\). Recalling that \(p<q\), we will discover that case (3) above will result from \(p=q-1\) and case (2) from \(p<q-1\).

If \(p = q-1\), then case (2) of Lemma 6.4 applies yielding \(\lambda (u,v_j) = q\) for all \(j\in \{0,\dots , q-2\}\), and these together with case (6) of the same lemma imply that (3) above holds.

Finally, if \(\ell = q-1\) and \(\lambda (u, v_p) = q-1\) for \(p<q-1\), then \(\lambda (u,v_q) = q-1\), and by case (4) of Lemma 6.4 we have \(\lambda (u,v_{q-1}) = q\). As \(p\ne q-1\), case (1) of Lemma 6.4 applies, giving \(\lambda (u,v_j) = q-1\) for all \(j\le p\). Further, case (5) yields \(\lambda (u,v_j) = q-1\) for all \(j\in \{p+1,\dots ,q-2\}\). Putting all of these together, we have \(\lambda (u,v_j) = q-1\) for all \(j\in \{0,\dots , q-2\}\cup \{q\}\), and then applying case (6) we obtain \(\lambda (u,v_j) = j\) for all \(j>q\), as required by (2) above. \(\square \)

Corollary 6.7

Let G be a naturally ordered subgraph of B, and let \(u\notin G\). Then, the following hold:

  1. (1)

    If \(\lambda (u,v_{i}) < i\), then \(\lambda (u,v_j) = j\) for all \(j>i\).

  2. (2)

    If for some j we have \(\lambda (u,v_j) = j\) and \(\lambda (u,v_{j-1}) = j-1\), then there is an \(i<j-1\) with \(\lambda (u,v_i) < i\).

  3. (3)

    \(|\lambda (u,v_0)-\lambda (u,v_1)|\le 1\).

Proof

Follows by inspecting the cases of Lemma 6.6. \(\square \)

It will be useful to state separately one special case of Lemma 6.6, covering the case where the largest repeat occurs somewhere at the last three vertices.

Lemma 6.8

Let G be a naturally ordered subgraph of B, and let \(u\notin G\). Assume \(\lambda (u,v_n)\ne n\). The exactly one of the following three cases occurs:

  1. (1)

    \(\lambda (u,v_i) = n\) for all \(i\in \{0,\dots ,n-1\}\), \(\lambda (u,v_n)\in \{1,\dots ,n-1\}\).

  2. (2)

    \(\lambda (u,v_i) = n-1\) for all \(i\in \{0,\dots ,n-2\}\cup \{n\}\), \(\lambda (u, v_{n-1}) = n\).

  3. (3)

    \(\lambda (u,v_i) = n\) for all \(i\in \{0,\dots ,n-2\}\), \(\lambda (u,v_{n-1}) = \lambda (u,v_{n}) = n-1\).

Now, by definition, G does not contain the triangle [1, 1, n], so if B is the base of a qualitative representation of \(\mathfrak {E}_{n+1}^{\{1,3\}}\), there must exist vertices \(a,b,c\in B\) realising this triangle. We can assume \(\lambda (a,b) = n\) and \(\lambda (a,c) = 1 = \lambda (b,c)\). We have several cases to consider.

Lemma 6.9

Let \(a,b,c \notin G\). Then, \(G\cup \{a,b,c\}\) is an inconsistent configuration.

Proof

Consider \(\lambda (a,v_n)\) and \(\lambda (b,v_n)\). They cannot be both equal to n, so assume \(\lambda (a,v_n) \ne n\). Taking \(u = a\), we see that the following possibilities can occur.

We begin with case (2) of Lemma 6.8. We have \(\lambda (a,v_{i}) = n-1\) for all \(i\in \{0,\dots ,{n-2}\}\cup \{n\}\) and \(\lambda (a,v_{n-1}) = n\). This implies \(\lambda (b,v_{n-1}) \ne n\). Let \(k = \lambda (b,v_{n-1})\).

(2.1) If \(k < n-1\), then by Corollary 6.7(1) we get \(\lambda (b,v_n) = n\). Hence, \(\lambda (c,v_n) \in \{\lambda (c,a), \lambda (a,v_n)\} \cap \{\lambda (c,b), \lambda (b,v_n)\} = \{1,n-1\}\cap \{1,n\} = \{1\}\). So, \(\lambda (c,v_n) = 1\) and then Lemma 6.8(1) applies, giving \(\lambda (c,v_i) = n\) for all \(i<n\). In particular, \(\lambda (c,v_{n-2}) = n\), and since \(\lambda (c,a) = 1\) and \(\lambda (a,v_{n-2}) = n-1\), we obtain an inconsistent, trichromatic triangle \((a,c,v_{n-2})\).

(2.2) If \(k = n-1\), then \(\lambda (c,v_{n-1})\in \{\lambda (c,a), \lambda (a,v_{n-1})\} \cap \{\lambda (c,b), \lambda (b,v_{n-1})\} = \{1,n\}\cap \{1,n-1\} = \{1\}\). So, \(\lambda (c,v_{n-1}) = 1\) and thus, by Corollary  6.7(1), we have \(\lambda (c,v_n) = n\). Then, however, we obtain \(\lambda (a,c) = 1\), \(\lambda (a,v_n) = n-1\), and \(\lambda (c,v_n) = n\); an inconsistent, trichromatic triangle.

Next, cases (1) and (3) of Lemma 6.8 will be dealt with together. For case (1), we have \(\lambda (a,v_i) = n\) for all \(i<n\). As \(\lambda (a,b) = n\), it follows that \(\lambda (b,v_i)\ne n\) for all \(i<n\). For case (3), we have \(\lambda (a,v_{n-1}) = \lambda (a,v_{n}) = n-1\), and \(\lambda (a,v_{i}) = n\) for all \(i<n-1\). Then, \(\lambda (b,v_{i}) \ne n\) for all \(i<n-1\). Therefore, in both cases we have \(\lambda (b,v_{i}) \ne n\) for all \(i<n-1\). Since \(n>2\), we get \(\lambda (b,v_0) \ne n\ne \lambda (b,v_1)\).

(1.1/3.1) If \(\lambda (b,v_i)\ne 1\) for \(i \in \{0,1\}\), then \(\lambda (c,v_i) \in \{1,n\}\cap \{1,\lambda (b,v_i)\} = \{1\}\) for \(i\in \{0,1\}\), and then \(\lambda (c,v_0) = \lambda (c,v_1) = \lambda (v_0,v_1) = 1\); an inconsistent, monochromatic triangle.

(1.2/3.2) Assume \(\lambda (b,v_i) = 1\) for exactly one \(i\in \{0,1\}\). Putting \(\{s,t\} = \{0,1\}\), let \(\lambda (b,v_s) = 1\) and \(\lambda (b,v_t) \ne 1\). Thus, \(\lambda (c,v_s) = n\) and \(\lambda (c,v_t) = 1\), contradicting Corollary 6.7(3). \(\square \)

Lemma 6.10

Let \(a,b\notin G\) and \(c\in G\). Then, \(G\cup \{a,b\}\) is an inconsistent configuration.

Proof

By the assumption, \(c = v_j\) for some j, so \(\lambda (a,v_j) = 1 = \lambda (b,v_j)\). As in the previous lemma, we can have at most one of \(\lambda (a,v_n)\), \(\lambda (b,v_n)\) equal to n, so without loss assume \(\lambda (a,v_n)\ne n\). We analyse possible cases.

Case (1) of Lemma 6.8. We have \(\lambda (a,v_i) = n\) for all \(i \in \{0,\dots ,n-1\}\), which can only happen if \(j = n\). But, \(\lambda (b,v_j) = 1\) as well, so, as \(1<n-1\), case (1) is the only possibility for \(\lambda (b,v_j)\), and thus, we get \(\lambda (b,v_i) = n\) for all \(i \in \{0,\dots ,n-1\}\). In particular, \(\lambda (a,v_{n-1}) = \lambda (b,v_{n-1}) = \lambda (a,b) = n\), producing an inconsistent, monochromatic triangle.

Case (2) of Lemma 6.8. We have \(\lambda (a,v_{i}) = n-1\) for all \(i\in \{0,\dots ,{n-2}\}\cup \{n\}\) and \(\lambda (a,v_{n-1}) = n\). Since \(\lambda (a,v_j) = 1\) for some j, it implies \(n = 2\), contradicting the assumptions.

Case (3) of Lemma 6.8. We have \(\lambda (a,v_{n-1}) = \lambda (a,v_{n}) = n-1\), and \(\lambda (a,v_{i}) = n\) for all \(i\in \{0,\dots ,n-2\}\). Since \(\lambda (a,v_j) = 1\) for some j, it implies \(n = 2\), contradicting the assumptions. \(\square \)

Lemma 6.11

Let \(b,c\notin G\) and \(a\in G\). Then, \(G\cup \{b,c\}\) is an inconsistent configuration.

Proof

We have \(a = v_j\) for some j. First, we show that we can assume \(j\ne n\). If \(j=n\), then \(\lambda (c,v_n) = 1\), and since \(n>2\) only the case (1) of Lemma 6.8 applies. It follows that \(\lambda (c,v_i) = n\) for all \(i<n\). Then, \(\lambda (b,v_{n-1})\in \{\lambda (b,c),\lambda (c,v_{n-1})\} = \{1,n\}\). But \(\lambda (b,v_n) = \lambda (v_n,v_{n-1}) = n\), so \(\lambda (b,v_{n-1})\ne n\), hence \(\lambda (b,v_{n-1}) = 1\). Thus, we have a [1, 1, n] triangle on \((c,b,v_{n-1})\), so switching the roles of b and c, and putting \(a = v_{n-1}\) we get \(\lambda (a,b) = n\) with \(a\ne v_n\), and \(\lambda (a,c) = 1 = \lambda (b,c)\).

Now, we can assume \(a = v_j\) for some \(j\ne n\). Then, since \(\lambda (b,c) = 1\) and \(\lambda (c,v_n) \in \{\lambda (c,v_j),\lambda (v_j,v_n)\} = \{1,n\}\), we have \(\lambda (b,v_n) \in \{1,n\} \). However, \(\lambda (b,v_j) = n = \lambda (v_j,v_n) \), so \(\lambda (b,v_n) = 1\). This excludes cases (2) and (3) of Lemma 6.8, as \(n > 2\). The remaining case (1) gives \(\lambda (b,v_i) = n\) for all \(i< n\), and then, it follows that \(\lambda (c,v_k) \in \{\lambda (c,v_j),\lambda (v_j,v_k)\}\cap \{\lambda (c,b),\lambda (b,v_k)\} = \{1,\lambda (v_j,v_k)\}\cap \{1,n\} = \{1\}\), for all \(k\in \{0,\dots ,j-1\}\cup \{j+1,n-1\}\) as \(\lambda (v_j,v_k)\ne n\) for all such k. Therefore, \(\lambda (c,v_k) = 1\) for all \(k<n\). In particular, \(\lambda (v_0,v_1) = \lambda (c,v_1) = \lambda (c,v_0) = 1\), producing an inconsistent, monochromatic triangle. \(\square \)

Lemma 6.12

Let \(c\notin G\) and \(a,b\in G\). Then, \(G\cup \{c\}\) is an inconsistent configuration.

Proof

Let \(a = v_i\) for some \(i<n\) and \(b = v_n\). As \(\lambda (c,v_n) = 1\) and \(n>2\), the only applicable case of Lemma 6.8 is (1). However, it implies \(\lambda (c,v_i) = n\) for all \(i<n\), contradicting \(\lambda (c,a) = 1\). \(\square \)

Lemma 6.13

Let \(b\notin G\) and \(a,c\in G\). Then, \(G\cup \{b\}\) is an inconsistent configuration.

Proof

We must have \(\{a,c\} = \{v_0,v_1\}\). But then \(\lambda (b,a)=n\) and \(\lambda (b,c)=1\) contradicts Corollary 6.7(3). \(\square \)

Lemma 6.13 completed the last possibility for the triangle \(\{a,b,c\}\), and as each possibility led to inconsistent networks, the proof of the claimed impossibility of qualitative representability is complete.

Theorem 6.14

The algebra \(\mathfrak {E}_{n+1}^{\{2\}}\) is not qualitatively representable for any \(n>2\).

7 Algebras \(\mathfrak {E}_{n+1}^{\{2,3\}}\)

The so-called Ramsey algebras \(\mathfrak {E}_{n+1}^{\{2,3\}}\) (sometimes also known as Monk algebras and as Comer relation algebras) have received particularly ardent attention in the literature, with the obvious close connection to classical Ramsey-theoretic considerations of avoidance of monochromatic triangles, as discussed in the introduction; [11] and [17] for example. The problem of determining when \(\mathfrak {E}_{n+1}^{\{2,3\}}\) has a strong representation was posed by Maddux in [23] and by Comer in [8], and remains open. Strong representability presents very tightly constrained condition (see Lemma 3.2) and proves to be particularly challenging. Ramsey algebras appear in both of the texts [13] and [24], with strong representability for \(1\le n\le 5\) established by Comer [8] and later \(n=6,7\) by Maddux [25]. The limits of strong representability were subsequently pushed upward via a series of efforts of Kowalski [18], Alm and Manske [4] and finally Alm [2], which is the current state of knowledge: strong representability is achievable for all \(n\le 2000\) except possibly \(n=8,13\). The cases of \(n=8,13\) and \(n>2000\) remain tantalisingly unresolved, though the finite field constructions in the above articles have been computationally verified as not providing solutions for \(n=8,13\) (see A263308 in the Online Encyclopædia of Integer Sequences [3]). In [19], Kramer and Maddux develop a version of Ramsey theory where monochromatic and trichromatic triangles must both be avoided. Their results give the existence and an upper bound for the sizes of feeble representations. Qualitative representability presents an interesting intermediate condition, and in this section, we show that qualitative representability is possible for all n.

We employ a variant of Walecki’s construction (see, e.g. [5]) originally used to partition \(K_{2k}\) into k Hamiltonian paths. Let the vertices of \(K_{2n}\) be distributed evenly on a circle. Colour a zigzagging path in one colour, as in Fig. 3. Then, rotate the picture one step, change the colour and repeat. Rotating n times and using n different colours gives the desired colouring of \(K_{2n}\).

Fig. 3
figure 3

The Walecki construction

It is clear that no monochromatic triangles occur, so it remains to be shown that all non-monochromatic triangles are realised. To avoid cluttering subscripts, we will use \(1, \dots , n\) as the colours, instead of \(c_1, \dots , c_n\). For each \(n \in \mathbb {N}\), define a map \(s_n :\mathbb {Z} \rightarrow \{1,\dots , n\}\) by \(x \mapsto R_n(x-1)+1\), where \(R_n(k)\) is \(k \pmod n\). In particular, we have \(s_n(s_{2n}(a) + s_{2n}(b)) = s_n(a+b)\) for all \(a,b\in \mathbb {Z}\) and \(n\in \mathbb {N}\). We will use this fact repeatedly below to omit \(s_{2n}\) within parentheses.

It can be seen from the construction that the colour of \((u_{1},u_{1+s})\) is \(\lceil \frac{s+1}{2}\rceil \), for each \(s \in \{1,2,\dots ,2n-1\}\). Rotating i steps clockwise, we get that for each \(i \in \{1,\dots ,2n\}\) and \(s \in \mathbb {Z}{\setminus }\{2mn: m\in \mathbb {Z}\}\), the colour of \((u_{i}, u_{s_{2n}(i+s)})\) is

$$\begin{aligned} s_n\bigg (\bigg \lceil \frac{s+1}{2} \bigg \rceil + i - 1\bigg ). \end{aligned}$$

To see this, note that the colour of \((u_{1}, u_{s_{2n}(1+s)})\) is \(s_n(\lceil \frac{s+1}{2}\rceil )\) and then, shift the colour \(i-1\) steps forward using the rotational symmetry and the fact that the colours cycle with period n.

Lemma 7.1

The colouring defined above realises all non-monochromatic triangles.

Proof

Take \(i,j,k \in \{1,\dots ,n\}\) with \(i < j\). We will show that there is a triangle coloured (ijk). We consider two cases: \(k\ne i\) and \(k\ne j\). Assume first that \(k\ne i\). Put

$$\begin{aligned} \ell \mathrel {\mathop :}=s_{2n}(i + j - k), \quad s \mathrel {\mathop :}=2k - 2j + 1, \quad \text {and} \quad t \mathrel {\mathop :}=2k - 2i. \end{aligned}$$

Note that \(s,t\in \mathbb {Z}\setminus \{2mn: m\in \mathbb {Z}\}\). Hence, the colour of \((u_\ell , u_{s_{2n}(\ell + s)})\) is

$$\begin{aligned} s_n\bigg (\bigg \lceil \frac{(2k-2j+1)+1}{2} \bigg \rceil +( i + j - k) - 1\bigg ) = s_n(k-j+1 + i + j - k -1) = i. \end{aligned}$$

The colour of \((u_\ell , u_{s_{2n}(\ell + t)})\) is

$$\begin{aligned} s_n\bigg (\bigg \lceil \frac{(2k-2i)+1}{2} \bigg \rceil + (i + j - k) - 1\bigg ) = s_n(k-i+1 + i + j - k -1) = j. \end{aligned}$$

As \(i < j\), we have \(s < t\). Now,

$$\begin{aligned} t - s = (2k - 2i) - (2k - 2j + 1) = 2(j-i) -1, \end{aligned}$$

which is not a multiple of 2n. Hence, the colour of \((u_{s_{2n}(\ell +s)}, u_{s_{2n}(\ell +t)})\) is

$$\begin{aligned} s_n\bigg (\bigg \lceil \frac{(2(j-i)-1)+1}{2} \bigg \rceil + (i + j - k) + (2k -2j + 1) - 1\bigg )&\\ =s_n(j-i +i + j -k + 2k -2j + 1 -1)&= k. \end{aligned}$$

So, \((u_{\ell },u_{s_{2n}(\ell +s)},u_{s_{2n}(\ell + t)})\) is a triangle with edges coloured by \(i\), \(j\), and \(k\). Next, assume \(k\ne j\) and put

$$\begin{aligned} \ell \mathrel {\mathop :}=s_{2n}(i + j - k), \quad s \mathrel {\mathop :}=2k - 2j, \quad \text {and} \quad t \mathrel {\mathop :}=2k - 2i +1. \end{aligned}$$

Again, \(s,t\in \mathbb {Z}\setminus \{2mn: m\in \mathbb {Z}\}\). By calculations similar to the first case, we get that the colour of \((u_\ell , u_{s_{2n}(\ell + s)})\) is i, and the colour of \((u_\ell , u_{s_{2n}(\ell + t)})\) is j. Moreover,

$$\begin{aligned} t - s = (2k - 2i +1) - (2k - 2j) = 2(j-i) +1, \end{aligned}$$

so the colour of \((u_{s_{2n}(\ell +s)}, u_{s_{2n}(\ell +t)})\) is

$$\begin{aligned} s_n\bigg (\bigg \lceil \frac{(2(j-i)+1)+1}{2} \bigg \rceil + (i + j - k) + (2k -2j) - 1\bigg )&= \\ s_n(j-i+1 + i +j -k +2k -2j -1)&= k. \end{aligned}$$

Choosing between the two cases, as needed for (i) \(k = i, k\ne j\), (ii) \(k \ne i, k = j\), or (iii) \(k\ne i,j\) we can construct all non-monochromatic triangles. \(\square \)

Theorem 7.2

For any natural number n, the algebra \(\mathfrak {E}_{n+1}^{\{2,3\}}\) is qualitatively representable on the graph \(K_{2n} \).

Proof

Immediate by Lemma 7.1. \(\square \)

8 Algebras \(\mathfrak {E}_{n+1}^{\{1,3\}}\)

These algebras are better known as Lyndon algebras. Lyndon [22] showed that for \(n\ge 4\), strong representations of the algebra \(\mathfrak {E}_{n+1}^{\{1,3\}}\) precisely correspond to affine planes of order \(n-1\), so that by the Bruck–Ryser Theorem [7] and standard field constructions, there are infinitely many n for which \(\mathfrak {E}_{n+1}^{\{1,3\}}\) is strongly representable, and infinitely many for which it is not strongly representable. This was used by Monk to show that the strongly representable relation algebras admit no finite axiomatisation [26]. We now explore how qualitative and even feeble representations of \(\mathfrak {E}_{n+1}^{\{1,3\}}\) relate similarly to geometric objects. The natural starting point will be feeble representations, which we find correspond to parallelisms of linear spaces, in the sense of finite geometry. We direct the reader to a text on linear spaces such as [6] for further background on linear spaces, though the connection with feeble representations of Lyndon algebras is presented here for the first time.

A linear space is a system \((G,\mathcal {L})\), where G is a set of points, and \(\mathcal {L}\) a family of subsets of G called lines satisfying the following axioms:

  1. (LS1)

    Every pair of distinct points is contained in a line;

  2. (LS2)

    Every pair of distinct lines have intersection that is either empty or a singleton;

  3. (LS3)

    Every line contains at least two points.

An obvious consequence of LS1 and LS2 is that each pair of points p, q are contained within a unique line, which we denote by \({\overline{pq}}\). As usual, points lying on the same line are said to be collinear, two lines are incident if they intersect to a common point.

A parallelism of a linear space \((G,\mathcal {L})\) is an equivalence relation \(\varpi \) on \(\mathcal {L}\) with the property that lines within a common block do not intersect. The blocks of \(\varpi \) are referred to as parallel classes and lines within a block are parallel. The identity relation on \(\mathcal {L}\) is always an example of a parallelism, and we refer to this as the trivial parallelism. But in general there may be many other parallelisms, with various numbers of parallel classes. The next theorem shows that n-block parallelisms of linear spaces precisely capture feeble representations of the algebra \(\mathfrak {E}_{n+1}^{\{1,3\}}\), modulo the choice of bijection between diversity atoms and parallel classes.

Theorem 8.1

Every linear space \((G,\mathcal {L})\) with n-block parallelism \(\varpi \) yields a feeble representation of \(\mathfrak {E}_{n+1}^{\{1,3\}}\) by relating \(p,q\in G\) by the \(i^\textrm{th}\) colour whenever p is collinear with q by way of a line in the \(i^{\textrm{th}}\) block of \(\varpi \). Moreover, every feeble representation \(\mathfrak {E}_{n+1}^{\{1,3\}}\) arises in this way.

Proof

For the forward direction, we consider the n-block parallelism \(\varpi \) of \((G,\mathcal {L})\) and the defined mapping of diversity atoms of \(\mathfrak {E}_{n+1}^{\{1,3\}}\) to parallel classes as given. For convenience, we allow the parallel classes to share the same name as the colour of the atom to which they are matched. So the (attempted) feeble representation \(a^\theta \) of a diversity atom a labels the edge from p to q if p is collinear to q by way of a line in a (the identity atom is represented, as required, by the identity relation). By Axioms LS1 and LS2, all pairs receive a unique colour. By LS3, all colours appear, so that \(\theta \) is a feeble representation of \(\mathfrak {E}_{n+1}^{\{1,3\}}\).

For the converse direction, let \(\theta \) be a feeble representation of \(\mathfrak {E}_{n+1}^{\{1,3\}}\) on a set G. To define the lines \(\mathcal {L}\), for each diversity atom a we will include maximal cliques with respect to edges \(a^\theta \) as lines in \(\mathcal {L}\). To define the parallelism \(\varpi \), we define lines to be parallel if they are cliques with respect to a common atom. Because each pair of points in G are related by \(a^\theta \) for some atom a, we have that Axiom LS1 holds. Because no edge is coloured by more than one atom, we have that Axiom LS2 holds. It is trivial that Axiom LS3 holds. Because \(\theta \) is a feeble representation, each atom labels at least one edge, so that the number of blocks in \(\varpi \) is exactly n. Because there are no dichromatic triangles in the feeble representation \(\theta \), we have that the lines within common blocks of \(\varpi \) do not intersect, so that \(\varpi \) is a parallelism of \((G,\mathcal {L})\). Finally, it is clear that the representation of \(\mathfrak {E}_{n+1}^{\{1,3\}}\) over \((G,\mathcal {L})\), \(\varpi \) agrees with the one defined in the first half of the proof, with the obvious matching of atoms to parallel classes. \(\square \)

An example of a linear space with parallelism is given in Fig. 4. It is not a Lyndon geometry, but its resemblance to the projective plane of order 3 is not accidental: it illustrates a construction to be used shortly for projective planes of order at least 4.

Fig. 4
figure 4

A linear space \((G,\mathcal {L})\) with parallelism, where \(G = \{a,b,c,d,e,f,g,h\}\) and lines of \(\mathcal {L}\) are drawn. The points at infinity \(d_1,\dots , d_5\) define the parallel classes. For instance, \(d_1\) contains lines \({\overline{ab}}\), \({\overline{df}}\), \({\overline{eh}}\), and \({\overline{cg}}\). Each line in this class has precisely two points

We mention in passing that an alternative presentation here is to begin with a linear space \((G,\mathcal {L})\) in which there is a distinguished line \(L_\infty \) (the line at infinity) that is incident with all other lines and contains precisely n points. Provided that every line other than \(L_\infty \) contains at least 3 points, we may obtain a linear space \((G\backslash L_\infty ,\mathcal {L}\backslash \{L_\infty \})\) and define an n-block parallelism by letting two lines be parallel if they were incident in \((G,\mathcal {L})\) to a common point on \(L_\infty \). Conversely, any parallelism \(\varpi \) of a linear space gives rise to a new linear space by letting the blocks of \(\varpi \) be treated as additional new points, and the set of blocks of \(\varpi \) be considered as an additional new line (“at infinity”). This of course is a general case of the familiar interplay between projective planes and affine planes.

Since \(3\in \{1,3\}\), applying Observation 5.4 immediately gives the next result.

Observation 8.2

Feeble representations of Lyndon algebras, and hence the corresponding linear spaces, exist for all \(n\ge 3\).

A simple application of Theorem 8.1 yields another solution. The near pencil is a linear space on \(n\ge 3\) points \(p_0,p_1,\dots ,p_{n-1}\), where the lines are \(\{p_1,\dots ,p_{n-1}\}\) along with \(\{p_0,p_i\}\) for each \(i=1,\dots ,n-1\). This near pencil has n lines, and with the trivial parallelism yields a further easy feeble representation of \(\mathfrak {E}_{n+1}^{\{1,3\}}\).

We now consider qualitative representations; each triangle type has a natural geometric interpretation, the first that there are large enough lines, the second that there are enough points in general position.

Theorem 8.3

A linear space \((G,\mathcal {L})\) with n-block parallelism \(\varpi \) represents all monochromatic triangles in \(\mathfrak {E}_{n+1}^{\{1,3\}}\) precisely when (LS4) holds and all trichromatic triangles precisely when (LS5) holds:

LS4:

each parallel class contains a line with at least 3 points.

LS5:

each triple of parallel classes are witnessed by 3 points in general position. That is, for parallel classes \(d_1,d_2,d_3\) there are points \(p_1,p_2,p_3\) in general position, with \(\overline{p_1p_2}\in d_1\), \(\overline{p_2p_3}\in d_1\), \(\overline{p_3p_1}\in d_3\).

Proof

This is immediate, as it simply states the condition on representations in the geometric formulation shown equivalent by Theorem 8.1. \(\square \)

We will refer to a linear space with parallelism \((G,\mathcal {L},\varpi )\) as an affine Lyndon geometry if it satisfies the extra axioms LS4 and LS5. The linear space obtained from an affine Lyndon geometry by adjoining the line at infinity and associated directions will be called a Lyndon geometry; note that a Lyndon geometry is a linear space with a distinguished line. As with affine planes and projective planes, these two concepts in some sense differ only in that parallel classes and the parallelism is given the name “points at infinity” and “line at infinity”. In order to match the case for affine planes, we let the order of affine Lyndon geometry \((G,\mathcal {L},\varpi )\) be the number n such that \(\varpi \) has \(n+1\) blocks.

We now show that affine Lyndon geometries of every order exist.

Theorem 8.4

Let \((G,\mathcal {L})\) be an affine plane of order \(n > 3\) and consider any set D of \(k\le n-2\) points in G. Define a parallelism \(\varpi \) on the subspace on \(G\setminus D\) by defining two lines parallel if: in \((G,\mathcal {L})\), they pass through a unique point of D; and otherwise, if they were parallel in \((G,\mathcal {L})\). The parallelism \(\varpi \) has \(n+k+1\) blocks.

Proof

Let \(\mathcal {L}_D\) denote the lines in the defined subspace: so \(K\in \mathcal {L}_D\) is of the form \(L\setminus D\) for a unique \(L\in \mathcal {L}\). For \(L\in \mathcal {L}\), we will write \(L^-\) to denote \(L\setminus D\). We will refer to blocks of \(\varpi \) corresponding to a parallel class in \((G,\mathcal {L})\), as old directions, and those consisting of the pencil of lines that pass through precisely one single point \(p\in D\) as new directions. Since each line in \(\mathcal {L}\) contains n points, each line in \(\mathcal {L}_D\) contains at least 2 points, verifying the axiom (LS3). The axioms (LS1) and (LS2) are inherited from \((G,\mathcal {L})\), so \((G{\setminus } D,\mathcal {L}_D)\) is a linear space.

To verify axiom (LS4) note that as there are n lines in each direction of the affine plane \((G,\mathcal {L})\), and at most \(n-2\) of these lines are through unique points in D, there are at least 2 lines in each old direction. Let m be the number of lines in an old direction o. These lines contain at least \(mn-(n-2)\) points, and as \(n > 3\) and \(m\ge 2\) we have \(mn-n+2 > 2m\), showing that at least one of the m lines must contain strictly more than 2 points. Analogously, there are \(n+1\) lines through each point p of D, and at most \(k-1\le n-3\) of them can pass through a second point of D, so each new direction contains at least 4 lines. As above, let m be the number of the lines in a new direction d. Each of these lines contains at least \(n-1\) points, so the lines together contain at least \(m(n-1) - (n-2)\) points, and thus, \(m>3\) and \(2\ge 2\) give \(m(n-1) - (n-2) > 2m\). Hence, at least one of these lines contains at least 3 points. It is now also clear that the parallelism \(\varpi \) has \(n+k+1\) blocks.

For axiom (LS5), consider three directions from \(\varpi \). If all three are old, say, \(o_1\), \(o_2\) and \(o_3\), then as there are n lines of \(\mathcal {L}\) in \(o_1\), there is a line \(L_1\in \mathcal {L}\cap o_1\), with \(L_1\cap D=\varnothing \), so \(L_1\in \mathcal {L}_D\cap o_1\), that is, \(L_1^- = L_1\). Similarly, there is a line \(L_2\in \mathcal {L}\cap o_2\) with \(L_2^- = L_2\). Let p be the unique point in \(L_1\cap L_2\). As there are n lines in \(\mathcal {L}\cap o_3\), and \(|D\cup \{p\}|= k+1 \le n-1\), there is a line \(L_3\in \mathcal {L}\cap o_3\) with \(L_3\cap (D\cup \{p\})=\varnothing \), so that \(L_3^- = L_3\). Since \(L_1\), \(L_2\) and \(L_3\) are lines from \(\mathcal {L}\), not all through the same point, they intersect pairwise at 3 distinct points. Hence, \(p\in L_1\cap L_2\), \(q\in L_1\cap L_3\) and \(r\in L_2\cap L_3\) are 3 points in general position in \(G\setminus D\). But since \(L_1=L_1^-\), \(L_2=L_2^-\) and \(L_3=L_3^-\) they witness (LS5) for \(o_1\), \(o_2\) and \(o_3\) in \((G\setminus D, \mathcal {L}_D)\).

Next, let \(o_1\) and \(o_2\) be old directions and let \(d_3\) be a new direction. Reasoning as before, we find lines \(L_1\in \mathcal {L}\cap o_1\) and \(L_2\in \mathcal {L}\cap o_2\) such that \(L_1^- = L_1\), \(L_2^- = L_2\), and \(L_1\cap L_2 = \{p\}\) with \(p\in G{\setminus } D\). As there are \(n+1\) lines in \(\mathcal {L}\) passing through \(d_3\), there is a line \(L_3\in \mathcal {L}\) passing through \(d_3\), with \(L_3\cap ((D\cup \{p\}){\setminus }\{d_3\})=\varnothing \). Then, \(p\in L_1\cap L_2\), \(q\in L_1\cap L_3\) and \(r\in L_2\cap L_3\) are 3 points in general position in \(G\setminus D\). Moreover, \(L_3^- = L_3{\setminus }\{d_3\}\), so \(L_1^-\), \(L_2^-\) and \(L_3^-\) witness (LS5) for \(o_1\), \(o_2\) and \(d_3\) in \((G\setminus D, \mathcal {L}_D)\).

Further, let \(o_1\) be an old direction and let \(d_2\) and \(d_3\) be new directions. As there are \(n+1\) lines in \(\mathcal {L}\) passing through \(d_2\), there are n lines in \(\mathcal {L}\setminus o_1\) passing through \(d_2\), so we find a line \(L_2\in \mathcal {L}{\setminus } o_1\) such that \(d_2\in L_2\) and \(L_2\cap (D{\setminus }\{d_2\}) =\varnothing \). Let \(o_2\) be the direction of \(L_2\) in \((G,\mathcal {L})\). As there are \(n-1\) lines in \(\mathcal {L}\setminus (o_1\cup o_2)\) passing through \(d_3\), we find \(L_3\in \mathcal {L}{\setminus } (o_1\cup o_2)\) with \(d_3\in L_3\) such that \(L_3\cap (D\setminus \{d_3,\}) =\varnothing \). Then, \(L_2\) and \(L_3\) intersect at a point \(r\in G\setminus D\). Now, consider \(o_1\). There are n lines of \(\mathcal {L}\) in \(o_1\), at most \(k+1 = n-1\) of them having nonempty intersections with \(D\cup \{r\}\), so there is a line \(L_1\in o_1\) such that \(L_1\cap (D\cup \{r\}) = \varnothing \). Then, \(p\in L_1\cap L_2\), \(q\in L_1\cap L_3\) and \(r\in L_2\cap L_3\) are 3 points in general position in \(G\setminus D\). So the lines \(L_1^- = L_1\), \(L_2^- = L_2{\setminus } \{d_2\}\) and \(L_3^- = L_3{\setminus }\{d_3\}\), witness (LS5) for \(o_1\), \(d_2\) and \(d_3\) in \((G\setminus D, \mathcal {L}_D)\).

Finally, let \(d_1\), \(d_2\) and \(d_3\) be new directions. We find \(L_2\in \mathcal {L}\) such that \(d_2\in L_2\) and \(L_2\cap (D{\setminus }\{d_2\}) =\varnothing \). Let \(o_2\) be the direction of \(L_2\) in \((G,\mathcal {L})\). Then, we find \(L_3\in \mathcal {L}{\setminus } o_2\), with \(d_3\in L_3\) and \(L_3\cap (D{\setminus }\{d_3,\}) =\varnothing \), so \(r\in L_2\cap L_3\) is a point in \(G\setminus D\). Let \(o_3\) be the direction of \(L_3\) in \((G,\mathcal {L})\). There are \(n-1\) lines in \(\mathcal {L}\setminus (o_2\cup o_3)\) passing through \(d_1\), and \(|(D{\setminus }\{d_1\})\cup \{r\}| = k\le n-2\), so there is a line \(L_1\in \mathcal {L}\setminus (o_2\cup o_3)\) passing through \(d_1\) with \(L_1\cap ((D{\setminus }\{d_1\})\cup \{r\}) =\varnothing \). Then, \(p\in L_1\cap L_2\), \(q\in L_1\cap L_3\) and \(r\in L_2\cap L_3\) are 3 points in general position in \(G\setminus D\), and the lines \(L_1^- = L_1{\setminus }\{d_1\}\), \(L_2^- = L_2{\setminus } \{d_2\}\) and \(L_3^- = L_3{\setminus }\{d_3\}\), witness (LS5) for \(d_1\), \(d_2\) and \(d_3\) in \((G\setminus D, \mathcal {L}_D)\). \(\square \)

The construction described above can be applied to the projective plane of order 3, and it results in a linear space isomorphic to the one from Fig. 4. To see it, extend \(\overline{ab}\), \(\overline{eh}\) and \(\overline{df}\) to pass through \(d_1\), \(d_4\) and \(d_5\), respectively; then make \(\overline{cg}\) incident with \(d_3\). The resulting linear space fails LG4, showing that the condition \(n>3\) in Theorem 8.4 is the best possible.

Corollary 8.5

There exist affine Lyndon geometries of all orders greater than 3; equivalently, \(\mathfrak {E}_{n+1}^{\{1,3\}}\) is qualitatively representable for all \(n\ge 3\).

Proof

By Theorem 8.3, it suffices to cover all \(n \ge 3\) using Theorem 8.4. There exist affine planes of every prime power order, so orders 3 and 4 are covered, and Theorem 8.4 shows that there are affine Lyndon geometries of all orders \(p,p+1,\dots ,2(p-1)\), for all \(p\ge 5\). All numbers \(n\ge 2\) lie in the interval \([p, 2(p-1)]\) for some prime p: this is trivial to verify for small n, and follows, for example, from Nagura’s variant of Bertrand’s postulate [27], showing that for \(m\ge 25\) there is a prime between m and 5m/4. \(\square \)

9 Infinite cardinalities

The definition of chromatic algebras \(\mathfrak {E}_{n}^S\) easily extends to allow for the case \(n=\kappa \) for an infinite cardinal \(\kappa \). Strong representations for \(\mathfrak {E}_{\kappa }^S\) are known for \(S=\{1,3\}\) (by way of affine planes of order \(\kappa \)), while strong representations for \(\mathfrak {E}_{\kappa }^S\) in the case of \(S=\{1,2\},\{2,3\},\{1,2,3\}\) are easily achievable using the game-theoretic methods of Hirsch and Hodkinson [13], but they are somewhat convoluted, being subdirect products of representations of countable subalgebras of \(\mathfrak {E}_{\kappa }^S\) (even in the case \(\kappa =\omega \)). We will not investigate them here. The remaining cases do not admit strong representations: for \(\varnothing \) and \(\{1\}\) this is trivial, while for \(S=\{3\}\) and \(S=\{2\}\), the situation is discussed in the relevant Sects. 5 and 6.

For qualitative representations, there emerges an interesting contrast with the finite colour results, namely, \(\mathfrak {E}_{\kappa }^{\{2\}}\) becomes qualitatively representable for all infinite \(\kappa \), despite \(\mathfrak {E}_{n+1}^{\{2\}}\) not being qualitatively representable for any finite n. Moreover, there is a direct, uniform method of constructing representations for all infinite cases.

Theorem 9.1

Let \(\kappa \) be an infinite cardinal. For \(S\subseteq \{1,2,3\}\), the algebra \(\mathfrak {E}_{\kappa }^S\) has a qualitative representation if and only if \(S\cap \{2,3\}\ne \varnothing \).

Proof

For \(S=\varnothing \) or \(S=\{1\}\), it is trivial that no representations exist.

Now, assume that \(3\in S\), and let \(C_\kappa \) be the set of all colours. There are \(\kappa \) triangles \((T_\alpha : \alpha <\kappa )\) to be witnessed in order to achieve a qualitative representation of \(\mathfrak {E}_{\kappa }^S\). We will construct a chain of complete networks \((N_\alpha : \alpha <\kappa )\) and a chain of sets of colours \((C_\alpha : \alpha <\kappa )\) such that \(C_\alpha \) is the set of all colours used in \(N_\alpha \). We use \(\otimes \) and \(\oplus \) for cardinal multiplication and addition, and \(+\) for ordinal addition. Let \(N_0\) be the empty network. Assume inductively that a chain of complete networks \((N_\beta : \beta <\alpha )\) has been constructed, such that (i) each \(N_\beta \) witnesses the triangles \(T_\gamma \) for all \(\gamma < \beta \), (ii) \(|N_\beta | \le 3\otimes |\beta |\), and (iii) \(|C_\beta | \le 9\otimes |\beta |\otimes |\beta |\). Construct \(N_\alpha \) as follows.

  • If \(\alpha = \gamma +1\) for some \(\gamma \), let \(N'_\alpha := N_\gamma \uplus T_\gamma \). Then, \(|N'_\alpha | = |N_\gamma |\oplus 3 \le 3\otimes |\gamma |\oplus 3 \le 3\otimes |\alpha |\), and \(N'_\alpha \) witnesses all triangles \(T_\beta \) for \(\beta <\alpha \). So \(N'_\alpha \) satisfies (i) and (ii), but it is not complete (except for \(\gamma =0\)). Let \(M'_\alpha :=\{\{x,y\}: x\in N_\gamma ,\ y\in T_\gamma \}\). Then, \(|M'_\alpha | = 3\otimes |N_\gamma |\), and putting \(C'_\alpha \) for the set of colours used in \(N'_\alpha \) we get \(|C'_\alpha | = |C_\gamma |\oplus 3\le 9\otimes |\gamma |\otimes |\gamma | \oplus 3<\kappa \). Hence, \(|C_\kappa \setminus C_\alpha '| = \kappa \) and therefore, we can choose from \(C_\kappa \setminus C_\alpha '\) a unique colour for each \(\{x,y\}\in M'_\alpha \) and thus, complete \(N_\alpha '\) to \(N_\alpha \). Then, \(|N_\alpha | = |N'_\alpha | \le 3\otimes |\alpha |\), and \(|C_\alpha | \le |C_\alpha '\cup M'_\alpha | \le 9\otimes |\gamma |\otimes |\gamma | \oplus 3\oplus 3\otimes |N_\gamma |\le 9\otimes |\gamma |\otimes |\gamma |\oplus 3\oplus 9\otimes |\gamma | \le 9\otimes |\alpha |\otimes |\alpha |\). Thus, (i), (ii) and (iii) are satisfied.

  • If \(\alpha \) is a limit ordinal, let \(N_\alpha := \bigcup _{\beta <\alpha }N_\beta \). Then, \(N_\alpha \) is a complete network witnessing the triangles \(T_\beta \) for all \(\beta < \alpha \), so (i) is satisfied. Moreover, \(|N_\beta |\le 3\otimes |\beta | \le |\alpha |\) for each \(\beta <\alpha \), so \(N_\alpha \) is a union of \(|\alpha |\) sets, each of cardinality at most \(|\alpha |\); hence, \(|N_\alpha |\le |\alpha |\), satisfying (ii). Similarly, \(|C_\beta |\le 9\otimes |\beta |\otimes |\beta |\le |\alpha |\) for each \(\beta <\alpha \), so \(|C_\alpha | = |\bigcup _{\beta <\alpha }C_\beta |\le |\alpha |\), showing that (iii) is satisfied.

The union \(\bigcup _{\alpha <\kappa } N_\alpha \) is a well-defined qualitative representation of \(\mathfrak {E}_{\kappa }^S\). If \(3\notin S\) but \(2\in S\), we can apply same methodology as for \(3\in S\), except that now to complete \(N'_\alpha \) to \(N_\alpha \) for a successor \(\alpha \) we select a single colour from \(\kappa \) unused ones for all the missing edges. \(\square \)

10 Summary

The table summarises the known results on representability of finite chromatic algebras. The main question that remains open is for which n strong representations of Ramsey algebras \(\mathfrak {E}_{n+1}^{\{2,3\}}\) exist.

Representations of \(\mathfrak {E}_{n+1}^S\)

S

comp. of diversity atoms

quali-rep.

strong rep.

\(\{1,2,3\}\)

\(a_i\mathbin {;}a_j ={\left\{ \begin{array}{ll} 0' &{} \text { if } i\ne j\\ 1 &{} \text { if } i = j \end{array}\right. }\)

Yes

Yes

\(\{2,3\}\)

\(a_i\mathbin {;}a_j ={\left\{ \begin{array}{ll} 0' &{} \text { if } i\ne j\\ \lnot a_i &{} \text { if } i = j \end{array}\right. }\)

Yes

Yes for \( n\lesssim 2000\) except 8 and 13 Not known in general

\(\{1,3\}\)

\(a_i\mathbin {;}a_j ={\left\{ \begin{array}{ll} \lnot a_i\wedge \lnot a_j\wedge 0' &{} \text { if } i\ne j\\ 1'\vee a_i &{} \text { if } i = j \end{array}\right. }\)

Yes iff \(n>3\)

Yes iff \(\exists \) proj. plane of ord. \(n-1\)

\(\{1,2\}\)

\(a_i\mathbin {;}a_j ={\left\{ \begin{array}{ll} a_i\vee a_j &{} \text { if } i\ne j\\ 1 &{} \text { if } i = j \end{array}\right. }\)

Yes

Yes (only infinite rep’s)

\(\{3\}\)

\(a_i\mathbin {;}a_j ={\left\{ \begin{array}{ll} \lnot a_i\wedge \lnot a_j\wedge 0' &{} \text { if } i\ne j\\ 1' &{} \text { if } i = j \end{array}\right. }\)

Yes iff n is odd

Yes iff \(n = 3\)

\(\{2\}\)

\(a_i\mathbin {;}a_j ={\left\{ \begin{array}{ll} a_i\vee a_j &{} \text { if } i\ne j\\ \lnot a_i &{} \text { if } i = j \end{array}\right. }\)

No

No

\(\{1\}\)

\(a_i\mathbin {;}a_j ={\left\{ \begin{array}{ll} 0 &{} \text { if } i\ne j\\ 1'\vee a_i &{} \text { if } i = j \end{array}\right. }\)

Yes iff \(n=1\)

Yes iff \(n=1\)

\(\{\varnothing \}\)

\(a_i\mathbin {;}a_j ={\left\{ \begin{array}{ll} 0 &{} \text { if } i\ne j\\ 1' &{} \text { if } i = j \end{array}\right. }\)

Yes iff \(n=1\)

Yes iff \(n=1\)