Abstract
We study two measures of associativity for graph algebras of finite undirected graphs: the index of nonassociativity and (a variant of) the semigroup distance. We determine “almost associative” and “antiassociative” graphs with respect to both measures. It turns out that the antiassociative graphs are exactly the balanced complete bipartite graphs, no matter which of the two measures we consider. In the class of connected graphs the two notions of almost associativity are also equivalent.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
There are several ways to measure the (non)associativity of a given binary operation \(\circ \). The index of nonassociativity counts the number of triples (a, b, c) such that \((a \circ b) \circ c \ne a \circ (b \circ c)\). The semigroup distance counts the minimum number of changes we need to perform in the Cayley table of \(\circ \) in order to make it associative. The associative spectrum counts the number of term functions arising from different bracketings of \(x_1 \circ \dots \circ x_n\), thereby giving information about the consequences of the associative identity that are (not) satisfied by \(\circ \).
We define these notions more precisely in Sect. 2, and we give several examples as well as a brief overview of earlier research in this area. The examples will show that there is little relationship among these measures of associativity: it is possible that one of them is very small, while another one is very large, for the same binary operation.
We can define a binary operation on the vertices of a graph by
where 0 is an external zero element. The main topic of this paper is the study of associativity measures of these graph algebras. Again, the more formal definition is given in Section 2, and we also recall some notions of graph theory there.
We will only consider undirected graphs, and these have been completely classified with respect to their associative spectra in [18] (we state this classification in Theorem 5.1 in Section 5). Therefore, we focus on the semigroup distance (more precisely, a “graph-algebraic” version of the semigroup distance) and on the index of nonassociativity in Sections 3 and 4. In particular, we determine the minimal and maximal values of these measures of associativity, and we characterize graphs corresponding to these extremal values.
We will conclude in Section 5 that—as opposed to the case of arbitrary binary operations—the semigroup distance and the index of nonassociativity are closely related: for connected undirected graphs, the notions of “antiassociativity” and “almost associativity” coincide for these two measures of associativity (but not for the associative spectrum).
2 Preliminaries
2.1 Measures of (non)associativity
Definition 2.1
([2]). The index of nonassociativity of a finite groupoid \(\mathbb {A}=(A;\circ )\) is the number of nonassociative triples in \(\mathbb {A}\):
The index of nonassociativity was defined by Climescu [2], and he proved that all values between 1 and \(n^3\) are possible for n-element groupoids if \(n \ge 3\) (see also [5]). (For 2-element groupoids the possible values are 0, 2, 4 and 8.) Clearly, \({\text {ns}}(\mathbb {A})=0\) if and only if \(\mathbb {A}\) is associative (or, more precisely, the binary operation of \(\mathbb {A}\) is associative), and we may say that \(\mathbb {A}\) is almost associative if \({\text {ns}}(\mathbb {A})=1\), while \(\mathbb {A}\) can be regarded as antiassociative if \({\text {ns}}(\mathbb {A})=n^3\). Groupoids with \({\text {ns}}(\mathbb {A})=1\) are also called Szász–Hájek-groupoids, because their structure was first studied by Szász [25] and Hájek [6], and later by Kepka and Trch in a long series of papers [10,11,12,13,14,15,16,17].
To introduce our second measure of associativity, we need to define the distance of two groupoids. Let \(\mathbb {A}_1=(A;\circ )\) and \(\mathbb {A}_2=(A;*)\) be two groupoids on the same finite set A. The distance of \(\mathbb {A}_1\) and \(\mathbb {A}_2\) is the Hamming distance of their operation tables, i.e., the number of positions where the operation tables differ:
The set of all groupoids on A is a metric space with the above defined distance. The semigroup distance a groupoid \(\mathbb {A}\), introduced by Kepka and Trch [9], is simply the distance of \(\mathbb {A}\) to the set of all semigroups in this metric space.
Definition 2.2
([9]). The semigroup distance of a finite groupoid \(\mathbb {A}=(A;\circ )\) is defined by
Informally, \({\text {sdist}}(\mathbb {A})\) is the least number of changes one has to perform in the operation table of \(\mathbb {A}\) to make it associative. We have \({\text {sdist}}(\mathbb {A})=0\) if and only if \(\mathbb {A}\) is associative, and we can say that \(\mathbb {A}\) is almost associative if \({\text {sdist}}(\mathbb {A})=1\). Antiassociativity for n-element groupoids could be defined by \({\text {sdist}}(\mathbb {A})={\text {maxdist}}(n)\), where
However, the value of \({\text {maxdist}}(n)\) is not known. It is clear that \({\text {maxdist}}(n) \le n^2-n\), as we can make any groupoid associative by changing each entry in the operation table to the most frequently occurring element. As a lower bound, we have \({\text {maxdist}}(n) \ge n^2/4\), as shown by the following example.
Example 2.3
[9]. Let A be an n element set, and let \(x \circ y = f(x)\), where f is a permutation of A that has no fixed points. Then we have \({\text {ns}}(\mathbb {A}) = n^3\) (this is easy to verify) and \({\text {sdist}}(\mathbb {A}) \ge n^2/4\) (this was proved in [9]).
Let us now describe a third way to measure associativity, which was proposed by Csákány [3].
Definition 2.4
[3]. For a groupoid \(\mathbb {A}= (A;\circ )\), let \(s_n(\mathbb {A})\) denote the number of term operations induced by bracketings of the “product” \(x_1 \circ \cdots \circ x_n\). The sequence \({{\,\textrm{spec}\,}}(\mathbb {A}) = (s_1(\mathbb {A}),s_2(\mathbb {A}),s_3(\mathbb {A}),\dots )\) is called the associative spectrum of \(\mathbb {A}\).
Clearly, \(s_1(\mathbb {A})=s_2(\mathbb {A})=1\) for all groupoids, and \(s_3(\mathbb {A})=1\) if \(\mathbb {A}\) is associative, while \(s_3(\mathbb {A})=2\) if \(\mathbb {A}\) is not associative. Moreover, by the generalized associative law, \(s_3(\mathbb {A})=1\) implies \(s_n(\mathbb {A})=1\) for all \(n \in \mathbb {N}\), thus the associative spectrum of a semigroup is \((1,1,1,\dots )\). The associative spectrum measures associativity by its consequences: a nonassociative groupoid \(\mathbb {A}\) may still satisfy some identities that are consequences of the associative law, and a relatively small spectrum indicates that \(\mathbb {A}\) satisfies relatively many of these identities. On the other hand, if \(\mathbb {A}\) satisfies no nontrivial “bracketing identities”, then \(s_n(\mathbb {A})\) equals the number of formally different bracketings of \(x_1 \circ \cdots \circ x_n\), which is the \((n-1)\)-st Catalan number \(C_{n-1} = \frac{1}{n} {2n-2 \atopwithdelims ()n-1}\). In the latter case \(\mathbb {A}\) can be regarded as antiassociative, and almost associativity could be defined by \({{\,\textrm{spec}\,}}(\mathbb {A})=(1,1,2,1,1,\dots )\), as this is the least nonassociative associative spectrum(!). For more background about associative spectra, we refer the reader to [3, 20].
2.2 Comparisons
As the following example illustrates, \({\text {ns}}(\mathbb {A})\) can be arbitrarily large for a groupoid with \({\text {sdist}}(\mathbb {A})=1\), and, at the same time, \(\mathbb {A}\) can have a Catalan spectrum.
Example 2.5
Let us define a binary operation \(\circ \) on \(A = \{ 0,1,\dots ,n-1 \}\) by
It is clear that \({\text {sdist}}(\mathbb {A})=1\) (we get a zero semigroup by setting \(0 \circ 0 = 0\)), and it is not hard to verify that \({\text {ns}}(\mathbb {A})=2n(n-1)\) [9]. Restricting \(\circ \) to the subuniverse \(\{ 0,1 \}\), we get the Sheffer operation (NOR operation), which does not satisfy any nontrivial bracketing identities [3], hence the same is true for \(\mathbb {A}\), i.e., \(\mathbb {A}\) has a Catalan spectrum.
In some sense, the example above is the worst possible: if \(|A|=n\), then \({\text {sdist}}(\mathbb {A})=1\) implies \({\text {ns}}(\mathbb {A}) \le 2n(n-1)\) [9] (and, of course, no associative spectrum can exceed the Catalan numbers). Analogously to Example 2.5, a groupoid with \({\text {ns}}(\mathbb {A})=1\) can have arbitrarily large semigroup distance [1, 16]. However, here we do not know the maximal value of \({\text {sdist}}(\mathbb {A})\) among n-element groupoids with \({\text {ns}}(\mathbb {A})=1\); the authors of [1] only mention that the size of the groupoids they have constructed grow quickly.
In the next example we present groupoids that are almost associative with respect to both the index of nonassociativity and the semigroup distance but are antiassociative in the “spectral” sense.
Example 2.6
Let us consider the groupoid \(\mathbb {A}= (A;\circ )\) defined by the following operation table:
We have \({\text {sdist}}(\mathbb {A})=1\) (we get a semigroup by setting \(1 \circ 2 = 2\)) and \({\text {ns}}(\mathbb {A})=1\) (the only nonassociative triple is (1, 2, 1)). On the other hand, \(\mathbb {A}\) has a Catalan spectrum [3]. Repeatedly extending the groupoid by a zero element, we can construct arbitrarily large groupoids with these properties.
Let us now see how small can be the semigroup distance of an n-element groupoid \(\mathbb {A}\) with \({\text {ns}}(\mathbb {A})=n^3\).
Proposition 2.7
If \(\mathbb {A}\) is an n-element groupoid and \({\text {ns}}(\mathbb {A})=n^3\), then we have \({\text {sdist}}(\mathbb {A}) \ge n\).
Proof
Assume for contradiction that there is an n-element groupoid \(\mathbb {A}=(A;\circ )\) such that \({\text {ns}}(\mathbb {A})=n^3\) and \({\text {sdist}}(\mathbb {A}) < n\). Then there is a semigroup \(\mathbb {A}^*=(A;*)\) with \({\text {dist}}(\mathbb {A},\mathbb {A}^*) < n\). By the pigeonhole principle, there is an element \(a \in A\) such that the row of a in the operation table of \(\mathbb {A}\) is identical to the row of a in the operation table of \(\mathbb {A}^*\), and similarly, there exist \(c \in A\) such that the column of c looks the same in the two operation tables:
This implies that (a, b, c) is an associative triple in \(\mathbb {A}\) for any \(b \in A\):
However, this contradicts the assumption \({\text {ns}}(\mathbb {A})=n^3\). \(\square \)
The estimate in the proposition above is sharp, as shown by the following example
Example 2.8
Let us define a binary operation \(\circ \) on \(A = \{ 0,1,\dots ,n-1 \}\) by \(x \circ y = f(x)\), where the map \(f:A \rightarrow A\) is given by
(Compare this with Example 2.3.) Then we have \((a \circ b) \circ c = f^2(a)\) and \(a \circ (b \circ c) = f(a)\); therefore, \({\text {ns}}(\mathbb {A})=n^3\). This implies \({\text {sdist}}(\mathbb {A}) \ge n\) by Proposition 2.7. Actually, we have \({\text {sdist}}(\mathbb {A}) = n\), as \(\mathbb {A}\) is of distance n to a zero semigroup. Considering the associative spectrum, note that evaluating \(x_1 \circ \cdots \circ x_n\) over \(\mathbb {A}\), we get either \(f(x_1)\) or \(f^2(x_1)\), depending on the bracketing. Thus the associative spectrum of \(\mathbb {A}\) is quite small: \({{\,\textrm{spec}\,}}(\mathbb {A})=(1,1,2,2, \dots )\).
Summarizing our observations, we can say that the three measures of associativity behave quite differently, but there seems to be some weak connection between the index of nonassociativity and the semigroup distance. The latter is also illustrated by the following inequality.
Theorem 2.9
[9]. If \(|A|=n\), then \({\text {ns}}(\mathbb {A}) \le (2n^2+2n) \cdot {\text {sdist}}(\mathbb {A})\).
2.3 Graphs
A directed graph is a pair \(G=(V;\rho )\), where \(V=V(G)\) is a nonempty set (vertices) and \(\rho \subseteq V \times V\) is a relation on V. We consider finite undirected graphs, i.e., we always assume that the relation \(\rho \) is symmetric. (Sometimes we drop the adjective “undirected”: by default, a graph always means an undirected graph in this paper.) If G is such a graph and \((x,y) \in \rho \) for two distinct vertices \(x,y \in V(G)\), then \(e=\{x,y\}\) is an (undirected) edge of G, which we will simply write as \(e=xy\) (of course, yx is the same edge). If \((x,x) \in \rho \), then there is a loop on the vertex x. It will be convenient to treat loops and “real” edges separately. Therefore, by a slight abuse of terminology, in the following we say that \(e=xy\) is an edge only in the case \(x \ne y\). The set of “loopy” vertices is denoted by \(L(G)\), thus we write \(x \in L(G)\) to indicate that there is a loop on the vertex x. We denote by E(G) the set of edges (loops are not included!), and we partition this set into three parts according to the number of loops at the endpoints of the edges:
(Thus \(e \in E_i\) means that exactly i of the two endpoints of the edge e have a loop.) We say that G is a reflexive graph if the underlying relation is reflexive, i.e., \(L(G)= V(G)\). Similarly, we say that G is irreflexive if there are no loops, i.e., if \(L(G)= \emptyset \). We use the notation \(G^\circlearrowleft \) for the graph that we obtain from G by adding loops to all vertices.
The neighborhood of x in G is the set \(N(x) = \{y \in V(G) : xy \in E(G) \}\). Since loops and edges are treated separately, we have \(x \notin N(x)\) even if there is a loop on x. The degree of a vertex x is the size of it neighborhood: \(d(x) = |N(x)|\). Note that if there is a loop on x, it is not taken into account in d(x). We say that x is an isolated vertex if \(d(x)=0\). Again, loops do not matter: a vertex with a loop that is not connected to any other vertices is considered isolated. A connected component of G is said to be nontrivial if it has at least two vertices; the trivial connected components are just the isolated vertices. For \(A \subseteq V\), we denote by \(G\vert _A\) the induced subgraph of G on the vertex set A, and \(G{\setminus } A\) stands for \(G\vert _{V {\setminus } A}\).
By a cherry in G, we mean a three-vertex induced subgraph in which exactly two edges are present (loops do not matter):
![figure a](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs00012-024-00854-8/MediaObjects/12_2024_854_Figa_HTML.png)
The set of cherries in G will be denoted by \(Ch(G)\). Thus \(xyz \in Ch(G)\) if x, y, z are three distinct vertices, and exactly two of \(xy \in E(G)\), \(yz \in E(G)\) and \(xz \in E(G)\) holds. Here we use xyz as a shorthand for \(\{x,y,z\}\) (just as xy is a shorthand for \(\{x,y\}\) when we speak about (non)edges).
An irreflexive graph G is bipartite if \(V(G) = A \cup B\), where A and B are disjoint sets (called the two color classes) such that every edge of G has one of its endpoints in A and the other endpoint in B. (We usually draw bipartite graphs in such a way that A is above B and B is below A.) For natural numbers n, m, let \(K_n\) denote the complete graph on n vertices, and let \(K_{n,m}\) denote the complete bipartite graph with n and m vertices in the two color classes. We will often need balanced complete bipartite graphs, where the sizes of the two color classes differ by at most one. Up to isomorphism there is only one such graph on n vertices, namely \(K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }\). These graphs are irreflexive by definition; but we will also frequently encounter the reflexive complete graph . We use the notation
for the graph that we obtain from
by removing one loop (of course, up to isomorphism, it does not matter which loop is removed). Similarly,
and
indicate the removal of one edge from \(K_n\) and
, respectively (loops are retained in the second case).
We will need the following classical result of extremal graph theory, which is a special case of Turán’s theorem about \(K_r\)-free graphs (see, e.g., [4, Theorem 7.1.1]).
Theorem 2.10
If G is a triangle-free irreflexive undirected graph on n vertices, then \(|E(G)| \le \big \lfloor n/2 \big \rfloor \cdot \big \lceil n/2 \big \rceil = \big \lfloor n^2/4 \big \rfloor \). Equality holds here if and only if \(G \cong K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }\).
2.4 Graph algebras
Shallon [24] proposed a construction of an algebra associated to a directed graph. These graph algebras have a binary and a nullary operation, but here we only consider their groupoid reducts (for simplicity, we do not introduce a new name, and we just call these reducts graph algebras).
Definition 2.11
[24]. The graph algebra of a directed graph \(G=(V;\rho )\) is the groupoid \(\mathbb {A}({G})=(V\mathbin {{\dot{\cup }}}\{0\};\circ )\), where
Let us mention that there are also other ways to assign a groupoid to a directed graph; for instance, in [7] the authors study associative triples in the groupoid \((V;\cdot )\), where the binary operation is defined by \(x \cdot y = x\) if \((x,y) \in \rho \) and \(x \cdot y = y\) if \((x,y) \notin \rho \).
Poomsa-ard [21] characterized directed graphs with associative graph algebras.
Theorem 2.12
[21]. The graph algebra of a directed graph is associative if and only if the edge relation is transitive and the outneighborhood of each vertex is a reflexive complete graph.
For undirected graphs, the characterization takes the following simple form.
Corollary 2.13
An undirected graph has an associative graph algebra if and only if all of its nontrivial connected components are reflexive complete graphs.
Associative spectra of graph algebras were investigated in [18, 19]. The main tool in that study was a result of Pöschel and Wessel [22] describing satisfaction of identities in terms of graph homomorphisms. Since associative spectra of undirected graphs were completely described in [18] (we state this result in Theorem 5.1), we consider \({\text {ns}}(\mathbb {A}({G}))\) and \({\text {sdist}}(\mathbb {A}({G}))\).
More precisely, we consider a variant of the semigroup distance that seems more relevant to our setting, and, admittedly, is easier to handle. We restrict our attention to the metric space of graph algebras of undirected graphs with a fixed vertex set V, and we measure associativity by the distance to the set \({\text {AssGr}}(V)\) of associative graph algebras in this metric space.
Definition 2.14
For a finite nonempty set V, let \({\text {AssGr}}(V)\) denote the set of all undirected graphs H with \(V(H)=V\) such that \(\mathbb {A}({H})\) is associative. For a finite undirected graph G with \(V(G)=V\), we define \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\) as follows:
Clearly, \({\text {sdist}}(\mathbb {A}({G})) \le {\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\), and sometimes we have equality here (e.g., when \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))=1\)), but it may also happen that the inequality is strict (e.g., for \(G \cong K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }\); see Section 5). Observe that deleting or adding an edge requires two changes in the operation table, while deleting or adding a loop requires only one change. Thus, if G and H are two graphs on the same finite vertex set, then
Tables 1, 2 and 3 in Appendix C show the results of a brute force computer exploration of graph algebras of undirected graphs of sizes 3, 4 and 5 (we leave the case of 2-vertex graphs as an exercise to the interested reader). Note that the size of the graph algebra is one more than the size of the graph, due to the external zero element. We will always refer to the size of the graph; in particular, n denotes the number of vertices of the graph under consideration throughout the paper (hence the corresponding graph algebra has \(n+1\) elements).
We can conjecture from the tables that the range of \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\) for n-vertex graphs is an interval. This is indeed the case: we prove in Theorem 3.5 that the possible values are \(0,1,\dots , \big \lfloor n^2/2 \big \rfloor \), and we characterize graphs with the maximal value \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))= \big \lfloor n^2/2 \big \rfloor \) in Theorem 3.6. The behavior of the index of nonassociativity seems more complicated. It will be clear that \({\text {ns}}(\mathbb {A}({G}))\) is always even (see Proposition 4.1), but we see “gaps” in the range of \({\text {ns}}(\mathbb {A}({G}))\) even if we disregard odd numbers (these missing values are indicated by gray color in Tables 2 and 3). We find the maximal value of \({\text {ns}}(\mathbb {A}({G}))\) and the corresponding graphs in Theorem 4.6, and we describe some gaps at the top of the range in Corollary 4.8. In Theorem 4.10 we prove that the bottom of the range contains an interval of even numbers that is asymptotically as long as the whole range. This means that the “chaotic” part at the top is very small, but it remains an open problem to complete the description of the range of \({\text {ns}}(\mathbb {A}({G}))\).
3 Semigroup distance of graph algebras
Our first result is an upper estimate of \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\) in terms of the number of edges. We prove this inequality in the next lemma, then we prove that the inequality is strict in some special cases (Lemma 3.2), and in Proposition 3.3 we characterize graphs for which the estimate is sharp.
Lemma 3.1
For any finite undirected graph G, we have \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\le 2\cdot |E(G)|\).
Proof
Consider the graph H such that \(V(H)=V(G)\), \(E(H)=\emptyset \) and \(L(H)=L(G)\), i.e., H is obtained from G by deleting all edges (but keeping the loops). By Corollary 2.13, H has an associative graph algebra, since it has no nontrivial component. Clearly, \({\text {dist}}(\mathbb {A}({G}),\mathbb {A}({H}))=2\cdot |E(G)|\), thus \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\le 2\cdot |E(G)|\). \(\square \)
Lemma 3.2
If G is a finite undirected graph that has a loop on a non-isolated vertex, then \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))< 2\cdot |E(G)|\).
Proof
Assume that \(x \in L(G)\) and \(xy \in E(G)\). We consider the graph H such that \(V(H)=V(G)\), \(E(H)=\{xy\}\) and \(L(H)=L(G)\cup \{y\}\), i.e., H is obtained from G by deleting all edges except xy and adding a loop to y (if there was no loop there). By Corollary 2.13, H has an associative graph algebra, since its only nontrivial component is isomorphic to . According to (2.1), we have
thus \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))< 2\cdot |E(G)|\), as claimed. \(\square \)
Proposition 3.3
For any finite undirected graph G, we have
and equality holds here if and only if G is triangle-free and loops appear only on isolated vertices.
Proof
We have already proved the inequality \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\le 2\cdot |E(G)|\) in Lemma 3.1, so we only need to describe the graphs for which we have equality. Isolated vertices (with or without loops) do not influence the value of \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\), and they do not count into \(|E(G)|\) either. Therefore, we can assume without loss of generality that G has no isolated vertices. Moreover, by Lemma 3.2, we may also suppose that G is irreflexive.
Assume first that G contains a triangle xyz. Let us construct the graph H such that \(V(H)=V(G)\), \(E(H)=\{xy, xz, yz\}\) and \(L(H)=\{x,y,z\}\), i.e., H is obtained from G by deleting all edges except the three edges of the triangle xyz and adding a loop to x, y and z. By Corollary 2.13, H has an associative graph algebra, since its only nontrivial component is isomorphic to . According to (2.1), we have
thus \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))< 2\cdot |E(G)|\), as claimed.
It remains to prove that if G is an irreflexive triangle-free graph without isolated vertices, then \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\ge 2\cdot |E(G)|\). Let \(H \in {\text {AssGr}}(V)\), where \(V=V(G)\), and let us verify that \({\text {dist}}(\mathbb {A}({G}),\mathbb {A}({H}))\ge 2\cdot |E(G)|\). By Corollary 2.13, all nontrivial connected components of H are reflexive complete graphs. Denote the vertex sets of the nontrivial components of H by \(V_i\ (i=1,\dots ,k)\) and let \(V_0\) denote the set of isolated vertices of H (we can assume without loss of generality that H has no loops on isolated vertices). Of course, it may happen that H has no nontrivial connected components; in that case we have \(k=0\) and \(V_0=V\). Let \(e_i\) (\(i=1,\dots ,k\)) denote the number of edges in \(G|_{V_i}\) and let \(e_0\) denote the number of the remaining edges in G. Note that \(e_0\) counts the edges of G within \(V_0\) as well as the edges across the sets \(V_i\ (i=0,1,\dots ,k)\).
This time it will be easier to compute \({\text {dist}}(\mathbb {A}({G}),\mathbb {A}({H}))\) directly by considering the operation tables of \(\mathbb {A}({G})\) and \(\mathbb {A}({H})\), instead of using (2.1). The two operation tables differ at \(|V_i|^2-2e_i\) many places in \(V_i \times V_i\) for \(i=1,\dots ,k\) and at \(2e_0\) many places outside the set \(\bigcup _{i=1}^kV_i \times V_i\). Therefore, we have \({\text {dist}}(\mathbb {A}({G}),\mathbb {A}({H}))= 2e_0+\sum _{i=1}^k(|V_i|^2-2e_i)\). Since \(G|_{V_i}\) (\(i=1,\dots ,k\)) is an irreflexive triangle-free graph, \(e_i\le |V_i|^2/4\) holds by Theorem 2.10. This implies \(|V_i|^2- 2e_i \ge 2e_i\) for \(i=1,\dots ,k\), hence
and this completes the proof. \(\square \)
Before stating and proving the main results of this section that describe possible values of \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\) (Theorem 3.5) and the graphs attaining the maximal value (Theorem 3.6), we need to look at what happens to \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\) if we add a loop to a vertex.
Lemma 3.4
Let G be a finite undirected graph with \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))=m\), and assume that there is no loop on the vertex \(v \in V(G)\). Let \(G^*\) be the graph obtained from G by adding a loop to v. Then \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G^*)})\in \{m, m-1\}\).
Proof
Clearly \({\text {dist}}(\mathbb {A}({G}),\mathbb {A}({G^*)})=1\), thus the triangle inequality implies that \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G^*)}) \ge m-1\). In order to prove \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G^*)}) \le m\), let us consider \(H \in {\text {AssGr}}(V)\), with \(V=V(G)\) and \({\text {dist}}(\mathbb {A}({G}),\mathbb {A}({H}))=m\). If \(v \in L(H)\) then \({\text {dist}}({\mathbb {A}({G^*})},{\mathbb {A}({H})})=m-1 \le m\). If \(v \notin L(H)\) then, by Corollary 2.13, v is an isolated vertex in H and the graph \(H^*\) obtained from H by adding a loop to the vertex v also belongs to \({\text {AssGr}}(V)\); furthermore, \({\text {dist}}({\mathbb {A}({G^*})},\mathbb {A}({H^*)})=m\) in this case. This proves that in both cases there is an associative graph algebra of distance at most m from \(\mathbb {A}({G})\), thus \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\le m\), as claimed. \(\square \)
Let \({{\,\textrm{range}\,}}_n({\text {sdist}}_\textrm{gr})\) denote the range of \({\text {sdist}}_\textrm{gr}\) on graph algebras of n-vertex undirected graphs:
Theorem 3.5
For any positive integer n, we have
Proof
Let us consider bipartite graphs G with color classes A and B, where \(|A|=\big \lfloor n/2 \big \rfloor \), \(|B|=\big \lceil n/2 \big \rceil \). The number of edges of such a graph can be any number between 0 and \(\big \lfloor n/2 \big \rfloor \cdot \big \lceil n/2 \big \rceil \). Since bipartite graphs are triangle-free, we have \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))= 2\cdot |E(G)|\) by Proposition 3.3, thus \({{\,\textrm{range}\,}}_n({\text {sdist}}_\textrm{gr})\) contains all even numbers between 0 and \(2\cdot \big \lfloor n/2 \big \rfloor \cdot \big \lceil n/2 \big \rceil =\big \lfloor n^2/2 \big \rfloor \).
To obtain the odd numbers in this interval, let G be any one of the graphs considered above that has a non-isolated vertex x. (The latter assumption exludes only the empty graph.) If \(G^*\) is the graph obtained from G by adding a loop to the vertex x, then we have \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G^*)})=2\cdot |E(G)|-1\) by Lemmas 3.2 and 3.4. This proves that \({{\,\textrm{range}\,}}_n({\text {sdist}}_\textrm{gr})\) contains all odd numbers between 1 and \(\big \lfloor n^2/2 \big \rfloor -1\).
It remains to prove that \({{\,\textrm{range}\,}}_n({\text {sdist}}_\textrm{gr})\) does not contain any number greater than \(\big \lfloor n^2/2 \big \rfloor \). Let \(V=V(G)\) have n elements, let \(H_0\) be the empty graph on V (with no edges and no loops), and let \(H_1\) be the reflexive complete graph on V (thus ). Clearly, \(H_0, H_1 \in {\text {AssGr}}(V)\) and \({\text {dist}}(\mathbb {A}({G}),\mathbb {A}({H_0)}) + {\text {dist}}(\mathbb {A}({G}),\mathbb {A}({H_1)}) = n^2\). This implies that the smaller one of \({\text {dist}}(\mathbb {A}({G}),\mathbb {A}({H_0)})\) and \({\text {dist}}(\mathbb {A}({G}),\mathbb {A}({H_1)})\) is at most \(\big \lfloor n^2/2 \big \rfloor \), hence \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\le \big \lfloor n^2/2 \big \rfloor \). \(\square \)
Theorem 3.6
For an arbitrary finite undirected graph G on n vertices, we have \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))=\big \lfloor n^2/2 \big \rfloor \) if and only if \(G \cong K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }\).
Proof
It is clear from Proposition 3.3 that \({\text {sdist}}_\textrm{gr}(K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }) = 2 \cdot \big \lfloor n/2 \big \rfloor \cdot \big \lceil n/2 \big \rceil = \big \lfloor n^2/2 \big \rfloor \). Conversely, assume that \(V=V(G)\) has n elements and \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))=\big \lfloor n^2/2 \big \rfloor \), and let us prove that \(G \cong K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }\). We separate two cases on whether G contains loops or not.
Case 1: There are no loops in G (i.e., G is irreflexive). Let \(H_0\) be the empty graph on V (with no edges and no loops), and let \(H_1\) be the reflexive complete graph on V (thus ). Then we have
From these two inequalities we get \(\big \lfloor n^2/2 \big \rfloor \le 2 \cdot |E(G)| \le \big \lceil n^2/2 \big \rceil \). If n is odd, then \(\big \lceil n^2/2 \big \rceil \) is an odd number, hence \(2 \cdot |E(G)| = \big \lceil n^2/2 \big \rceil \) is impossible. So we have \(2 \cdot |E(G)| = \big \lfloor n^2/2 \big \rfloor \), and this is certainly true also if n is even. Therefore, \(2\cdot |E(G)| = {\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\), and then G is triangle-free, according to Proposition 3.3. Furthermore, G is irreflexive and \(|E(G)| = 1/2 \cdot \big \lfloor n^2/2 \big \rfloor = \big \lfloor n^2/4 \big \rfloor \), thus we can use Theorem 2.10 to conclude that \(G \cong K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }\).
Case 2: There is at least one loop in G. By Lemma 3.4, \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\) could only increase if we remove loops, but by Theorem 3.5, \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))= \big \lfloor n^2/2 \big \rfloor \) is the maximum of \({{\,\textrm{range}\,}}_n({\text {sdist}}_\textrm{gr})\). This means that \({\text {sdist}}_\textrm{gr}(\mathbb {A}({{\hat{G}})}) = \big \lfloor n^2/2 \big \rfloor \) holds for the graph \({\hat{G}}\) that we obtain from G by removing all loops. Now \({{\hat{G}}} \cong K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }\) follows by Case 1, hence \(E({\hat{G}}) = \big \lfloor n/2 \big \rfloor \cdot \big \lceil n/2 \big \rceil \). Since G contains a loop but has no isolated vertices, we can apply Lemma 3.2:
However, this contradicts our assumption \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))= \big \lfloor n^2/2 \big \rfloor \), so Case 2 is actually not possible. \(\square \)
4 Index of nonassociativity of graph algebras
As the next proposition shows, the index of nonassociativity is much easier to compute than \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\): we just need to count cherries and edges. We also see that \({\text {ns}}(\mathbb {A}({G}))\) is always an even number for undirected graphs.
Proposition 4.1
For any finite undirected graph G, we have
Proof
Let uvw be a cherry, say, with \(uv, uw \in E(G)\) and \(vw \notin E(G)\). It is straightforward to verify that 4 of the 6 permutations of u, v, w give a nonassociative triple, namely (u, v, w), (u, w, v), (v, u, w) and (w, u, v). We claim that all nonassociative triples with pairwise distinct entries do arise this way from a cherry. Indeed, if (x, y, z) is a nonassociative triple, then either \((xy)z = 0 \ne x = x(yz)\) or \((xy)z = x \ne 0 = x(yz)\). The first case holds if and only if \(xy \in E(G)\), \(yz \in E(G)\), \(xz \notin E(G)\), while the second case is equivalent to \(xy \in E(G)\), \(yz \notin E(G)\), \(xz \in E(G)\). We see that in both cases xyz is a cherry, provided that x, y, z are pairwise distinct. Thus the number of nonassociative triples consisting of three different entries is \(4 \cdot |Ch(G)|\).
Now if u and v are two different vertices and \(uv \notin E(G)\) or \(uv \in E_2(G)\), then all triples formed from u and v are associative. If \(uv \in E_0(G)\), then we get the 4 nonassociative triples (u, v, v), (u, v, u), (v, u, u) and (v, u, v). If \(uv \in E_1(G)\), say, with \(u \in L(G)\) and \(v \notin L(G)\), then we get only 2 nonassociative triples, namely (u, v, v) and (v, u, v). Thus the number of nonassociative triples consisting of two different entries is \(4 \cdot |E_0(G)| + 2 \cdot |E_1(G)|\). To finish the proof, we only need to note that triples of the form (u, u, u) are associative (as well as those that contain the zero element). \(\square \)
Proposition 4.2
For any finite undirected graph G, we have
and equality holds here if and only if G is triangle-free and loops appear only on isolated vertices.
Proof
Isolated vertices (with or without loops) do not influence the index of nonassociativity, and they do not count into vertex degrees either. Therefore, we can assume without loss of generality that G has no isolated vertices. By Proposition 4.1, \({\text {ns}}(\mathbb {A}({G}))\le 4 \cdot |Ch(G)| + 4 \cdot |E(G)|\), with equality if and only if G is irreflexive. Each vertex v is the “top” vertex of at most \({d(v) \atopwithdelims ()2}\) cherries, and if v is not contained in any triangle, then (and only then), v is the “top” vertex of exactly \({d(v) \atopwithdelims ()2}\) cherries. Thus we can estimate \({\text {ns}}(\mathbb {A}({G}))\) as follows:
(in the last step we used the well-known handshaking theorem: the sum of the degrees is twice the number of edges). It is clear from the arguments above that this estimate is sharp if and only if G contains neither loops nor triangles.
\(\square \)
Example 4.3
It follows immediately from the proposition above that for the complete bipartite graph \(K_{a,b}\), we have \({\text {ns}}(\mathbb {A}({{K_{a,b}})}) = 2ab^2+2a^2b = 2(a+b)ab\).
In the following we take a route similar to Section 3: we estimate \({\text {ns}}(\mathbb {A}({G}))\) by the number of edges (Proposition 4.4), then we see what happens to \({\text {ns}}(\mathbb {A}({G}))\) when we add a loop (Lemma 4.5), and we use these to prove our main results about the range of \({\text {ns}}(\mathbb {A}({G}))\) (Theorem 4.6, Corollary 4.8 and Theorem 4.10).
Proposition 4.4
For any finite undirected graph G with n vertices, we have
and equality holds here if and only if G is either a complete bipartite graph or G has no edges.
Proof
Example 4.3 shows that \({\text {ns}}(\mathbb {A}({G}))= 2n \cdot |E(G)|\) for complete bipartite graphs, and this is trivially true for “edgeless” graphs, too.
Now assume that G has at least one edge, and for any \(e \in E(G)\), let ch(e) denote the number of cherries that contain the edge e. Clearly, we have \(ch(e) \le (n-2)\) for each \(e \in E(G)\); furthermore, \(\sum _{e \in E(G)} ch(e) = 2 \cdot |Ch(G)|\), as each cherry contains exactly two edges. Using these observations together with Proposition 4.1, we can estimate \({\text {ns}}(\mathbb {A}({G}))\) as follows:
The inequalities above turn into equalities if and only if the endpoints of each edge are loopless, and every edge is contained in \(n-2\) cherries, i.e.,
Let us assume that G is such a graph, and suppose for contradiction that G contains a cycle C of odd length. Any chord of C (i.e., an edge connecting two non-consecutive vertices of C) cuts C into two shorter cycles, one of which has odd length. Therefore, if we choose C to be of minimal odd length \(\ell \), then C is a chordless cycle. However, the existence of a chordless cycle of length \(\ell \) contradicts (4.1), unless \(\ell =4\). This proves that G does not contain any cycles of odd length, hence G is bipartite. Let A and B be the two color classes, and let \(xy \in E(G)\) with \(x \in A\) and \(y \in B\). If v is any vertex from A, then (4.1) gives that \(yv \in E(G)\), whereas if v belongs to B, then we have \(xv \in E(G)\). Since this is true for every edge xy of G, we can conclude that G is a complete bipartite graph. \(\square \)
Lemma 4.5
Let G be a finite undirected graph, let v be a loopless vertex of G, and let \(G^*\) denote the graph obtained from G by adding a loop to v. Then we have
Proof
Let p denote the number of loopless neighbors of v, and let q denote the number of neighbors of v that have a loop. Then we have
Now we can compute \({\text {ns}}(\mathbb {A}({G^*)})\) with the help of Proposition 4.1:
\(\square \)
Theorem 4.6
For any finite irreflexive undirected graph G on n vertices, the following hold:
-
(i)
if \(G \cong K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }\), then \({\text {ns}}(\mathbb {A}({G}))= 2n\big \lfloor n/2 \big \rfloor \big \lceil n/2 \big \rceil = n\big \lfloor n^2/2 \big \rfloor \);
-
(ii)
if \(G \ncong K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }\), then \({\text {ns}}(\mathbb {A}({G}))\le 2n\big \lfloor n/2 \big \rfloor \big \lceil n/2 \big \rceil - 4\big \lfloor n/2 \big \rfloor + 4\).
Proof
The proof is quite long and technical, so we present it separately in Appendix A. \(\square \)
Remark 4.7
Let G be the graph obtained from \(K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }\) by connecting two vertices in the color class of size \(\big \lceil n/2 \big \rceil \) by an edge. Then we have \({\text {ns}}(\mathbb {A}({G}))= 2n\big \lfloor n/2 \big \rfloor \big \lceil n/2 \big \rceil - 4\big \lfloor n/2 \big \rfloor + 4\), and this shows that the estimate in item (ii) of Theorem 4.6 cannot be improved.
Let \({{\,\textrm{range}\,}}_n({\text {ns}})\) denote the range of \({\text {ns}}\) on graph algebras of n-vertex undirected graphs:
Corollary 4.8
Let n be a positive integer, and assume that \(n \ge 8\).
-
(i)
If n is even, then the three largest elements of \({{\,\textrm{range}\,}}_n({\text {ns}})\) are
$$\begin{aligned} \frac{n^3}{2} - (2n-4), \quad \frac{n^3}{2} - n, \quad \frac{n^3}{2}. \end{aligned}$$ -
(ii)
If n is odd, then the four largest elements of \({{\,\textrm{range}\,}}_n({\text {ns}})\) are
$$\begin{aligned} \frac{n^3-n}{2} - (2n-6), \quad \frac{n^3-n}{2} - (n+1), \quad \frac{n^3-n}{2} - (n-1), \quad \frac{n^3-n}{2}. \end{aligned}$$
Proof
The corollary can be derived from Theorem 4.6 and Lemma 4.5 as follows. Let G be a graph on n vertices, and let \({\hat{G}}\) denote the graph that we obtain from G by deleting all loops. If \({\hat{G}} \ncong K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }\), then
and we can have equality here, for example, if G is the graph described in Remark 4.7. If \({\hat{G}} \cong K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }\), then
This number can be larger than \(2n\big \lfloor n/2 \big \rfloor \big \lceil n/2 \big \rceil - 4\big \lfloor n/2 \big \rfloor + 4\) only if G has at most one loop, and then the subtrahend \(\sum _{v \in L(G)} 2d(v)\) is either zero, \(2\big \lfloor n/2 \big \rfloor \) or \(2\big \lceil n/2 \big \rceil \). \(\square \)
Remark 4.9
Corollary 4.8 is valid also for \(n < 8\), in the sense that the largest elements of \({{\,\textrm{range}\,}}_n({\text {ns}})\) are
-
\(2n\big \lfloor \frac{n}{2}\big \rfloor \big \lceil \frac{n}{2}\big \rceil - 4\big \lfloor \frac{n}{2}\big \rfloor + 4\),
-
\(2n\big \lfloor \frac{n}{2}\big \rfloor \big \lceil \frac{n}{2}\big \rceil -2\big \lceil \frac{n}{2}\big \rceil \),
-
\(2n\big \lfloor \frac{n}{2}\big \rfloor \big \lceil \frac{n}{2}\big \rceil -2\big \lfloor \frac{n}{2}\big \rfloor \),
-
\(2n\big \lfloor \frac{n}{2}\big \rfloor \big \lceil \frac{n}{2}\big \rceil \),
but some of these numbers might coincide (even for odd n), and their order might be different.
We have seen that there are some gaps close to the top of \({{\,\textrm{range}\,}}_n({\text {ns}})\); however, the bottom of \({{\,\textrm{range}\,}}_n({\text {ns}})\) contains a long sequence of consecutive even numbers (asymptotically as long as the whole range).
Theorem 4.10
Let \(r_n\) be the greatest even integer such that all even numbers up to \(r_n\) belong to \({{\,\textrm{range}\,}}_n({\text {ns}})\). Then we have
Proof
The proof is quite long and technical, so we present it separately in Appendix B. \(\square \)
It is easy to determine graphs with the least possible nonzero index of nonassociativity (we will do this in Section 5, but we invite the reader to do this on their own now), and most of these graphs are not connected. Connected graphs are much more interesting in this respect, so we conclude this section by a characterization of the “most associative” connected graphs.
Let denote the graph that is constructed by connecting a vertex of \(K_a\) and a vertex of \(K_b\) by a path of length \(\ell \). Here, by the length of a path we mean the number of edges in the path, i.e.,
has \(a+b+\ell -1\) vertices. As an illustration, let us draw
and
(vertices of the connecting paths are colored gray):
![figure b](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs00012-024-00854-8/MediaObjects/12_2024_854_Figb_HTML.png)
Clearly, we have ; furthermore, the graphs
,
and
are isomorphic, as all of them are paths of length \(\ell +2\). Therefore, in the following we will always assume that \(a \ge 2\) and \(b \ge 2\) when we consider the graphs
. This way the path of length 2 cannot be written in the form
, but it is included in the second item of the proposition below as
.
Proposition 4.11
For any finite connected irreflexive undirected graph G on \(n \ge 3\) vertices, the following hold:
-
(i)
if \(G \cong K_n\), then \(|Ch(G)| = 0\);
-
(ii)
if
, then \(|Ch(G)| = n-2\);
-
(iii)
if
for some \(r,s \ge 2\), \(\ell \ge 1\) with \(r+s+\ell -1=n\), then \(|Ch(G)| = n-2\);
-
(iv)
if G is not isomorphic to any of the above mentioned graphs, then \(|Ch(G)| > n-2\).
Proof
The first three statements of the proposition are straightforward to verify. We prove (iv) by induction on n. The case \(n=3\) is void, and for \(n=4\) there are only two graphs (up to isomorphism) that are relevant to (iv), and both of them indeed have more than \(n-2=2\) cherries:
![figure c](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs00012-024-00854-8/MediaObjects/12_2024_854_Figc_HTML.png)
From now on we consider the case \(n \ge 5\). If every vertex of G has degree 1 or \(n-1\), then G is isomorphic either to the complete graph \(K_n\) or to the star \(K_{1,n-1}\). In the latter case \(|Ch(G)| = {n-1 \atopwithdelims ()2} > n-2\), since \(n \ge 5\).
Therefore, we may assume that there is a vertex x with \(2 \le d(x) \le n-2\). Setting \(A = N(x)\) and \(B = V(G) {\setminus } (A \cup \{x\})\), we have \(|A| = d(x) \ge 2\) and \(|B|=n-1-|A| \ge 1\). There are two types of cherries in G that contain the vertex x:
![figure d](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs00012-024-00854-8/MediaObjects/12_2024_854_Figd_HTML.png)
For type (a) we need that \(uv \notin E(G)\), thus the number of cherries of this type is the number of non-edges in the induced subgraph \(G\vert _A\); we will denote this number by \(n_A = {|A| \atopwithdelims ()2} - |E(G\vert _A)|\). Since \(xw \notin E(G)\) for all \(w \in B\) (by the very definition of the set B), the number of cherries of type (b) equals the number of edges uw with \(u \in A\) and \(w \in B\), which we will denote by \(e_{AB}\). Thus we have the following relationship between the number of cherries in G and in \(G{\setminus }\{x\}\):
It is possible that \(n_A=0\), but the connectedness of G guarantees that \(e_{AB} \ge 1\) (recall that B is not empty, as \(d(x) \le n-2\)). We discuss four cases for \(G{\setminus }\{x\}\) corresponding to (i), (ii), (iii) and (iv).
If \(G{\setminus }\{x\} \cong K_{n-1}\), then \(|Ch(G{\setminus }\{x\})|=0\), \(n_A=0\) and \(e_{AB}=|A|\cdot |B|\). The case \(|A|=n-2\) is not possible, since then G would be isomorphic to . Therefore, \(2 \le |A| \le n-3\), which together with \(|A| + |B| = n-1\) implies \(|A| \cdot |B| \ge 2 \cdot (n-3) > n-2\). Now (4.2) gives \(|Ch(G)| = 0 + 0 + |A|\cdot |B| > n-2\), and this is what we had to prove.
If , then \(|Ch(G{\setminus }\{x\})|=n-3\), \(n_A \in \{0,1\}\) and \(e_{AB} \ge 2\). (The last inequality follows from the fact that for \(n \ge 5\) it is not possible to divide the vertices of
into two parts in such a way that only one edge goes across the two parts.) By (4.2), we have \(|Ch(G)| \ge (n-3) + 0 + 2 > n-2\), as required.
If , then \(|Ch(G{\setminus }\{x\})|=n-3\), \(n_A \ge 0\) and \(e_{AB} \ge 1\), hence (4.2) yields \(|Ch(G)| \ge (n-3) + 0 + 1 \ge n-2\). We have equality here if and only if \(n_A=0\) and \(e_{AB}=1\). This means that A induces a complete subgraph of \(G{\setminus }\{x\}\) that can be separated from the rest of \(G{\setminus }\{x\}\) by the removal of a single edge, which is possible only if A corresponds to \(K_r\) or \(K_s\) at the isomorphism
. Since G is obtained from \(G{\setminus }\{x\}\) by connecting the new vertex x to each element of A, either
or
, contradicting the assumption of (iv). This proves that \(|Ch(G)| > n-2\).
In the remaining cases the induction hypothesis gives that \(|Ch(G{\setminus }\{x\})|>n-3\), hence \(|Ch(G)| > (n-3) + 0 + 1 = n-2\) follows by (4.2), as \(n_A \ge 0\) and \(e_{AB} \ge 1\). \(\square \)
Theorem 4.12
For any finite connected undirected graph G on \(n \ge 3\) vertices, the following hold:
-
(i/a)
if
, then \({\text {ns}}(\mathbb {A}({G}))= 0\);
-
(i/b)
if
, then \({\text {ns}}(\mathbb {A}({G}))= 2(n-1)\);
-
(ii)
if
, then \({\text {ns}}(\mathbb {A}({G}))= 4(n-2)\);
-
(iii)
if
for some \(r,s \ge 2\), \(\ell \ge 1\) with \(r+s+\ell -1=n\), then \({\text {ns}}(\mathbb {A}({G}))= 4(n-2)\);
-
(iv)
if G is not isomorphic to any of the above mentioned graphs, then \({\text {ns}}(\mathbb {A}({G}))> 4(n-2)\).
Proof
The first four statements follow from propositions 4.1 and 4.11. In order to prove (iv), consider the graph \({\hat{G}}\) that is obtained from G by removing all loops.
If \({\hat{G}} \cong K_n\), then Proposition 4.1 shows that \({\text {ns}}(\mathbb {A}({G}))= 2(n-1) \cdot (n-|L(G)|)\). Here we must have \(|L(G)| \le n-2\) (otherwise we are in case (i/a) or (i/b)), hence \({\text {ns}}(\mathbb {A}({G}))\ge 2(n-1) \cdot 2 > 4(n-2)\).
If or
, then G must have at least one loopless vertex (otherwise we are in case (ii) or (iii)); therefore, \({\text {ns}}(\mathbb {A}({G}))> 4 \cdot |Ch(G)|\) according to Proposition 4.1, and \(|Ch(G)| = n-2\) by Proposition 4.11. This proves that \({\text {ns}}(\mathbb {A}({G}))> 4(n-2)\).
If G is not isomorphic to any of the above mentioned graphs, then propositions 4.1 and 4.11 give \({\text {ns}}(\mathbb {A}({G}))\ge 4 \cdot |Ch(G)| > 4(n-2)\). \(\square \)
5 Conclusion
In this section we compare the extremal cases for the three measures of associativity (\({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\), \({\text {ns}}(\mathbb {A}({G}))\) and \({{\,\textrm{spec}\,}}(\mathbb {A}({G}))\)) for undirected graphs. Before doing so, let us complement the results of the previous two sections by the following description of associative spectra of graph algebras of undirected graphs (the first item in the theorem is just a repetition of Corollary 2.13).
Theorem 5.1
[18]. Let G be an undirected graph.
-
(i)
If every nontrivial connected component of G is a reflexive complete graph, then \(s_n(\mathbb {A}({G})) = 1\) for all \(n \in \mathbb {N}\).
-
(ii)
If every nontrivial connected component of G is either a reflexive complete graph or a complete bipartite graph, and the last case occurs at least once, then \(s_n(\mathbb {A}({G})) = 2^{n-2}\) for all \(n \ge 2\).
-
(iii)
Otherwise \(s_n(\mathbb {A}({G})) = C_{n-1}\) for all \(n \in \mathbb {N}\).
By Theorems 3.6 and 4.6, the only antiassociative graph algebra on n vertices is \(\mathbb {A}({K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }})\), if we measure associativity by \({\text {sdist}}_\textrm{gr}\) or by \({\text {ns}}\). However, \(\mathbb {A}({K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }})\) is not antiassociative with respect to the associative spectrum (in fact, it is almost associative!), according to the theorem above. On the other hand, most graph algebras are antiassociative in the “spectral” sense by Theorem 5.1, and the other two measures of associativity can be very small for these graphs (see below).
The least nonzero value of \({\text {sdist}}_\textrm{gr}\) is 1, and we have \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))=1\) if and only if G is obtained from a graph \(H \in {\text {AssGr}}(V(G))\) by removing one loop, but G itself does not belong to \({\text {AssGr}}(V(G))\). By Corollary 2.13, this means that one component of G is isomorphic to for some \(r \ge 2\), and all other nontrivial components are reflexive complete graphs. For such a graph, we have \({\text {ns}}(\mathbb {A}({G}))= 2(r-1)\) by Proposition 4.1. Therefore, \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))=1\) implies \({\text {ns}}(\mathbb {A}({G}))\le 2(n-1)\) for graphs G with n vertices. (This explains the \((n-1)\) dots in the second column in Tables 1, 2 and 3.) Theorem 5.1 shows that these graphs have a Catalan spectrum.
Since the index of nonassociativity of a graph algebra is always an even number, the least possible nonzero value is 2, and, by Proposition 4.1, we have \({\text {ns}}(\mathbb {A}({G}))= 2\) if and only if \(Ch(G)= E_0(G)= \emptyset \) and \(|E_1(G)|=1\). It is straightforward to verify that this happens if and only if one component of G is isomorphic to (an edge with a loop at one endpoint) and all other nontrivial components are reflexive complete graphs. If G is such a graph, then \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))=1\), and G has a Catalan spectrum. (This explains why we only have one dot in the second row in Tables 1, 2 and 3.)
We see that if \(\mathbb {A}({G})\) is almost associative with respect to the index of nonassociativity (i.e., \({\text {ns}}(\mathbb {A}({G}))=2\)), then it is almost associative also with respect to \({\text {sdist}}_\textrm{gr}\) (i.e., \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))=1\)), but the converse implication is not true. However, if we restrict our attention to connected graphs with at least four vertices, then these two notions of almost associativity actually coincide. Indeed, for connected graphs with n vertices, the least nonzero value of \({\text {ns}}(\mathbb {A}({G}))\) is \(2(n-1)\), and this value is attained only for if \(n \ge 4\) (see Theorem 4.12). On the other hand, it follows from the discussion above that if G is connected, then \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))=1\) holds also only if
.
We can conclude that for undirected graphs, \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\) and \({\text {ns}}(\mathbb {A}({G}))\) match nicely (at least as far as antiassociativity and almost associativity are concerned), but the associative spectrum is quite unrelated to them. The following theorem, which is an analogue of Theorem 2.9, and Conjecture 5.3 below also show connections between \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\) and \({\text {ns}}(\mathbb {A}({G}))\).
Theorem 5.2
For every undirected graph G with n vertices, we have
Proof
Let \(H \in {\text {AssGr}}(V(G))\) such that \({\text {dist}}(\mathbb {A}({G}),\mathbb {A}({H}))= {\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\). By (2.1), we have \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))= 2k + \ell \), where \(k = |E(G) \bigtriangleup E(H)|\) and \(\ell = |L(G)\bigtriangleup L(H)|\). We introduce some more notation to facilitate the proof: let \(e_i = |E_i(G)|\) and \(e'_i = |E_i(G) \cap E(H)|\) for \(i=0,1\). We claim that
Indeed, by the definition of k, we have
and this is equivalent to (5.1).
Let us consider the following sets for \(i=0,1\):
If \(xy \in E_0(G)\cap E(H)\), then xy is an edge of H, hence, by Corollary 2.13 both x and y must have a loop in H. Since these two vertices do not have a loop in G, both (xy, x) and (xy, y) belong to \(\Theta _0\); consequently, \(|\Theta _0| = 2 e'_0\). Similarly, if \(xy \in E_1(G)\cap E(H)\), then exactly one of (xy, x) and (xy, y) belongs to \(\Theta _1\), hence \(|\Theta _1| = e'_1\). On the other hand, for each \(x \in L(G)\bigtriangleup L(H)\), there are at most \(n-1\) vertices y such that \((xy,x) \in \Theta _0 \cup \Theta _1\), thus \(|\Theta _0 \cup \Theta _1| \le (n-1) \cdot \ell \). This implies that
(note that \(\Theta _0\) and \(\Theta _1\) are disjoint). Comparing this with (5.1), we obtain that
Next we consider the following set:
Since H contains no cherries by Corollary 2.13, all cherries of G must be “destroyed”, i.e., each cherry of G appears at least once as the first component of an element of \(\Xi \), thus \(|\Xi | \ge |Ch(G)|\). On the other hand, for each \(xy \in E(G) \bigtriangleup E(H)\), there are at most \(n-2\) vertices z such that \((xyz,xy) \in \Xi \), hence \(|\Xi | \le (n-2) \cdot k\). This implies that
Now we can prove the desired inequality with the help of (5.2), (5.3) and Proposition 4.1:
\(\square \)
Conjecture 5.3
For every undirected graph G with n vertices, we have
Remark 5.4
As we have already mentioned, we have \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))=1\) and \({\text {ns}}(\mathbb {A}({G}))=2(n-1)\) for . This shows that the estimate in Theorem 5.2 cannot be improved. Similarly, if G is a disjoint union of r copies of
, then \({\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))=r\) and \({\text {ns}}(\mathbb {A}({G}))=2r\), hence Conjecture 5.3 is also sharp (if it is true at all). This conjecture can clearly seen in Tables 1, 2 and 3: there are no dots above the main diagonal.
Finally, let us list some topics for further research:
-
1.
Prove or disprove Conjecture 5.3.
-
2.
Complete the description of the set \({{\,\textrm{range}\,}}_n({\text {ns}})\) by determining all gaps in the range.
-
3.
In Section 3 we considered \({\text {sdist}}_\textrm{gr}\) instead of the “real” semigroup distance. Determine the range of \({\text {sdist}}(\mathbb {A}({G}))\) for graph algebras of n-vertex undirected graphs and characterize graphs corresponding to the extremal cases. Let us mention that \({\text {sdist}}(\mathbb {A}({G})) < {\text {sdist}}_\textrm{gr}(\mathbb {A}({G}))\) holds for \(G=K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }\) if \(n \ge 3\). Indeed, let H be the directed graph that we obtain from \(K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }\) by making all edges one-way, pointing to the color class of size \(\big \lfloor n/2 \big \rfloor \), and adding a loop to each vertex of this color class. By Theorem 2.12, \(\mathbb {A}({H})\) is associative, and we have \({\text {dist}}(\mathbb {A}({K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }),{\mathbb {A}({H})}}) = \big \lfloor n/2 \big \rfloor \cdot \big \lceil n/2 \big \rceil + \big \lfloor n/2 \big \rfloor \), which is less than \({\text {sdist}}_\textrm{gr}(\mathbb {A}({K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil })}) = 2 \cdot \big \lfloor n/2 \big \rfloor \cdot \big \lceil n/2 \big \rceil \) for \(n \ge 3\).
-
4.
Investigate measures of (non)associativity for graph algebras of directed graphs (see [19] for a study of associative spectra of these graph algebras).
Data availability
Data sharing not applicable to this article, as datasets were neither generated nor analysed.
References
Batíková, B., Dvořáková, Š, Trch, M.: Semigroup distances of finite groupoids. Italy J. Pure Appl. Math. 32, 547–560 (2014)
Climescu, Al.C,: Études sur la théorie des systèmes multiplicatifs uniformes I. L’indice de non-associativité. Bull. École Polytech. Jassy 2, 347–371 (1947). (French)
Csákány, B., Waldhauser, T.: Associative spectra of binary operations. Mult.- Valued Log. 5, 175–200 (2000)
Diestel, R.: Graph Theory, Graduate Texts in Mathematics, vol. 173, 5th edn. Springer, Heidelberg (2016)
Drápal, A., Kepka, T.: Sets of associative triples. Europ. J. Combin. 6, 227–231 (1985)
Hájek, P.: Die Szászschen Gruppoide. Mat.-Fyz. Časopis. Sloven. Akad. Vied. 15, 15–42 (1965)
Kepka, T., Kratochvíl, J.: Graphs and associative triples in quasitrivial groupoids. Comment. Math. Univ. Carolin. 25, 679–687 (1984)
Kepka, T., Trch, M.: Groupoids and the associative law I. (Associative triples). Acta Univ. Carol. Math. Phys. 33, 69–86 (1992)
Kepka, T., Trch, M.: Groupoids and the associative law II. (Groupoids with small semigroup distance). Acta Univ. Carol. Math. Phys. 34, 67–83 (1993)
Kepka, T., Trch, M.: Groupoids and the associative law III. (Szász–Hájek groupoids). Acta Univ. Carol. Math. Phys. 36, 17–30 (1995)
Trch, M.: Groupoids and the associative law IIIA. (Primitive extensions of SH-groupoids and their semigroup distances). Acta Univ. Carol. Math. Phys. 50, 73–82 (2009)
Kepka, T., Trch, M.: Groupoids and the associative law IV. (Szász–Hájek groupoids of type (A, B, A)). Acta Univ. Carol. Math. Phys. 35, 31–42 (1994)
Kepka, T., Trch, M.: Groupoids and the associative law V. (Szász–Hájek groupoids of type (A, A, B)). Acta Univ. Carol. Math. Phys. 36, 31–44 (1995)
Kepka, T., Trch, M.: Groupoids and the associative law VI. (Szász–Hájek groupoids of type (a, b, c)). Acta Univ. Carol. Math. Phys. 38, 13–22 (1997)
Trch, M.: Groupoids and the associative law VII. (Semigroup distance of SH-groupoids). Acta Univ. Carol. Math. Phys. 47, 57–63 (2006)
Trch, M.: Groupoids and the associative law VIIA. (SH-groupoids of type (A, B, A) and their semigroup distances). Acta Univ. Carol. Math. Phys. 48, 43–54 (2007)
Trch, M.: Groupoids and the associative law VIIB. (SH-groupoids and simply generated congruences). Acta Univ. Carol. Math. Phys. 52, 77–87 (2011)
Lehtonen, E., Waldhauser, T.: Associative spectra of graph algebras I. Foundations, undirected graphs, antiassociative graphs. J. Algebraic Combin. 53, 615–638 (2021)
Lehtonen, E., Waldhauser, T.: Associative spectra of graph algebras II. Satisfaction of bracketing identities, spectrum dichotomy. J. Algebraic Combin. 55, 533–557 (2022)
Liebscher, S., Waldhauser, T.: On associative spectra of operations. Acta Sci. Math. (Szeged) 75, 433–456 (2009)
Poomsa-ard, T.: Hyperidentities in associative graph algebras. Discuss. Math. Gen. Algebra Appl. 20, 169–182 (2000)
Pöschel, R., Wessel, W.: Classes of graphs definable by graph algebra identites or quasi-identities. Comment. Math. Univ. Carolin. 28, 581–592 (1987)
Pyatkin, A., Lykhovyd, E., Butenko, S.: The maximum number of induced open triangles in graphs of a given order. Optim. Lett. 13, 1927–1935 (2019)
Shallon, C.R.: Non-finitely based binary algebras derived from lattices, PhD thesis, UCLA (1979)
Szász, G.: Über die Unabhängigkeit der Assoziativitätsbedingungen. Acta Sci. Math. (Szeged) 15, 20–28 (1953). (German)
Acknowledgements
The author are grateful to the anonymous referees for their suggestions improving the paper.
Funding
Open access funding provided by University of Szeged.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of Interest
The authors declare that they have no conflict of interest.
Additional information
Communicated by Presented by Friedrich Martin Schneider.
Dedicated to Reinhard Pöschel on the occasion of his 75th birthday.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This research was partially supported by the National Research, Development and Innovation Office of Hungary under grant no. K138892, and by project TKP2021-NVA-09, implemented with the support provided by the Ministry of Culture and Innovation of Hungary from the National Research, Development and Innovation Fund, financed under the TKP2021-NVA funding scheme.
Appendices
Proof of Theorem 4.6
Graphs with the maximal number of cherries were determined in [23] (cherries are called open triangles in that paper). We will use the same line of reasoning to find the maximal value of \({\text {ns}}(\mathbb {A}({G}))\). We need two technical lemmas: in Lemma A.1 we determine the maximum of a function that will appear in the proof of Theorem 4.6, and in Lemma A.2 we deal with a special case that would cause some trouble during the proof.
Lemma A.1
Let us define a four-variable function f on real numbers by
For a given \(t \in \mathbb {N}\), let \(\Sigma _t = \{(a,b,c,d) \in \mathbb {N}_0^4 : a+b+c+d=t\}\). The maximum of f on \(\Sigma _t\) is
Depending on the parity of t, the maximal value is attained at one or three tuples.
-
(i)
If t is even, then \(f(a,b,c,d) = M_t\) if and only if
$$\begin{aligned} (a,b,c,d) = \left( \frac{t}{2},\,\frac{t}{2},\,0,\,0\right) . \end{aligned}$$ -
(ii)
If t is odd, then \(f(a,b,c,d) = M_t\) if and only if (a, b, c, d) is one of the following three tuples:
$$\begin{aligned} \left( \frac{t-1}{2},\,\frac{t+1}{2},\,0,\,0\right) ,\;\; \left( \frac{t+1}{2},\,\frac{t-1}{2},\,0,\,0\right) ,\;\; \left( \frac{t-1}{2},\,\frac{t-1}{2},\,1,\,0\right) . \end{aligned}$$
Proof
Let \((a,b,c,d)\in \Sigma _t\) with \(c\ge 1\) and \(d\ge 1\). Then \((a+1,b+1,c-1,d-1)\in \Sigma _t\) and it is straightforward to verify that
Therefore, we can increase the value of f by simultaneously increasing a and b by 1 while decreasing c and d by 1. Hence the maximum value of f can be attained only at tuples with \(c=0\) or \(d=0\) or both. We investigate the three cases \(c>0,d=0\) and \(c=0,d>0\) and \(c=0,d=0\) separately.
-
1.
If \(c\ge 1\) and \(d=0\), then \((a+1,b,c-1,0), (a,b+1,c-1,0) \in \Sigma _t\) and
$$\begin{aligned}&f(a,b,c,0) = (a+c+1)(a/2+b) + (b+c+1)(b/2+a) + 2c,\\&f(a+1,b,c-1,0) =f(a,b,c,0)-a/2+b/2+3c/2-3/2,\\&f(a,b+1,c-1,0) =f(a,b,c,0)+a/2-b/2+3c/2-3/2,\\&f(a+1,b,c-1,0)+f(a,b+1,c-1,0)=2f(a,b,c,0)+3c-3. \end{aligned}$$If \(c\ge 2\) then \(3c-3 > 0\), thus the above calculations show that at least one of the inequalities \(f(a+1,b,c-1,0) > f(a,b,c,0)\) and \(f(a,b+1,c-1,0) > f(a,b,c,0)\) hold. This means that f(a, b, c, 0) cannot be maximal if \(c \ge 2\). If \(c=1\), then we have
$$\begin{aligned}&f(a+1,b,0,0)=f(a,b,1,0)-(a/2-b/2),\\&f(a,b+1,0,0)=f(a,b,1,0)+(a/2-b/2). \end{aligned}$$This implies that if \(a\ne b\), then one of \(f(a+1,b,0,0)\) and \(f(a,b+1,0,0)\) is greater than f(a, b, 1, 0), hence the latter cannot be the maximal value of f. We can conclude that in the case \(c \ge 1, d=0\), the maximum of f can be attained only at \(((t-1)/2,(t-1)/2,1,0)\), which is possible only if t is odd.
-
2.
If \(c=0\) and \(d\ge 1\), then \((a+1,b,0,d-1) \in \Sigma _t\) and
$$\begin{aligned}&f(a,b,0,d) = (a+1)(a/2+b+d) + (b+1)(b/2+a+d) -2d,\\&f(a+1,b,0,d-1) =f(a,b,0,d)+b+d+1>f(a,b,c,d). \end{aligned}$$Therefore, we can increase the value of f by simultaneously increasing a by 1 and decreasing d by 1, hence cannot get the maximal value of f in this case.
-
3.
Finally we assume that \(c=0\) and \(d=0\). Then \((a,b,0,0) \in \Sigma _t\) implies \(a+b=t\), hence
$$\begin{aligned} f(a,b,0,0)&= (a+1)(a/2+b) + (b+1)(b/2+a)\\&=\frac{1}{2}t^2+\frac{3}{2}t+ab. \end{aligned}$$Since t is constant on \(\Sigma _t\), in this case the maximum of f can be attained only if \(a=\big \lfloor (t-1)/2 \big \rfloor \), \(b=\big \lceil (t-1)/2 \big \rceil \) or \(a=\big \lceil (t-1)/2 \big \rceil \), \(b=\big \lfloor (t-1)/2 \big \rfloor \).
We have proved that f can take its maximal value only at the tuples listed in items (i) and (ii) in the statement of the lemma. To finish the proof, one only needs to verify that f takes the same value at these tuples, and this common value is
\(\square \)
Lemma A.2
Let G be a finite irreflexive undirected graph on \(n \ge 7\) vertices, and for any edge \(e \in E(G)\), let \(\Delta (e)\) denote the number of triangles containing e. Let \(m = \min \{ \Delta (e) : e \in E(G) \}\), and assume that for every edge \(e=xy \in E(G)\) with \(\Delta (e)=m\), we have \(G{\setminus }\{x,y\} \cong K_{\big \lfloor (n-2)/2 \big \rfloor ,\big \lceil (n-2)/2 \big \rceil }\). Then one of the following holds:
-
(i)
\(m=0\) and G is isomorphic to \(K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }\), or
-
(ii)
\(m=0\) and G has the following structure:
-
\(V(G) = \{ v_1, \dots , v_{n-2}, x, y \}\);
-
\(G\vert _{\{ v_1, \dots , v_{n-2} \}}\) is isomorphic to \(K_{\big \lfloor (n-2)/2 \big \rfloor ,\big \lceil (n-2)/2 \big \rceil }\);
-
x is connected by an edge to all other vertices, whereas y is connected only to x.
-
Example A.3
Here are the two graphs considered in the lemma above for the case \(n=7\):
![figure e](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs00012-024-00854-8/MediaObjects/12_2024_854_Fige_HTML.png)
Proof
Let \(xy \in E(G)\) be an arbitrary edge such that \(\Delta (xy)=m\). Then \(G {\setminus }\{x,y\}\) is a balanced complete bipartite graph with at least five vertices:
![figure f](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs00012-024-00854-8/MediaObjects/12_2024_854_Figf_HTML.png)
Since \(G {\setminus }\{x,y\}\) has no triangles, a triangle containing an edge of the form \(a_ib_j\) must have either x or y as the third vertex, hence \(\Delta (a_ib_j) \le 2\), thus \(m \le 2\). We separate two cases on whether there is an edge \(a_ib_j\) with \(\Delta (a_ib_j)=m\).
Case 1: We have \(\Delta (a_ib_j)=m\) for some i and j, say, \(\Delta (a_1b_1)=m\). Then \(G{\setminus }\{a_1,b_1 \}\) is a balanced complete bipartite graph (we may also assume without loss of generality that x is a “upper” vertex and y is an “lower” vertex in this bipartite graph):
![figure g](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs00012-024-00854-8/MediaObjects/12_2024_854_Figg_HTML.png)
Let us summarize what we know about our graph:
![figure h](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs00012-024-00854-8/MediaObjects/12_2024_854_Figh_HTML.png)
The dashed lines indicate that so far we do not know if \(xa_1\), \(xb_1\), \(ya_1\), \(yb_1\) are edges in G. However, despite the lacking information, we can conclude that the edge \(a_2b_2\) is not included in any triangle, hence \(\Delta (a_2b_2)=0=m\). This implies that \(G{\setminus }\{a_2,b_2 \}\) is a balanced complete bipartite graph, thus \(xb_1, ya_1 \in E(G)\) and \(xa_1, yb_1 \notin E(G)\). Now we have completely determined the structure of G, and we see that \(G \cong K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }\):
![figure i](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs00012-024-00854-8/MediaObjects/12_2024_854_Figi_HTML.png)
Case 2: We have \(\Delta (a_ib_j)>m\) for all i and j. This implies \(\Delta (a_ib_j) \ge 1\), thus each edge \(a_ib_j\) is included in at least one triangle. Recall also that \(a_ib_j\) can be included in at most two triangles (namely \(a_ib_jx\) and \(a_ib_jy\)), hence \(m < \Delta (a_ib_j) \le 2\) and consequently \(m \le 1\). We split Case 2 into two subcases depending on the edges between the sets \(\{ x,y \}\) and \(\{ a_1, a_2, \dots , b_1, b_2, b_3 \dots \}\).
Case 2a: For all i and j, we have \(xa_i, xb_j, ya_i, yb_j \in E(G)\). In this case our graph looks like this:
![figure j](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs00012-024-00854-8/MediaObjects/12_2024_854_Figj_HTML.png)
There exists a triangle xyv for all \(v \in \{ a_1, a_2, \dots , b_1, b_2, b_3, \dots \}\), thus \(\Delta (xy)=n-2\). Now \(n-2 = m \le 1\) follows, contradicting our assumption \(n \ge 7\).
Case 2b: There exist \(v \in \{ x,y \}\) and \(w \in \{ a_1, a_2, \dots , b_1, b_2, b_3, \dots \}\) such that \(vw \notin E(G)\). We may assume without loss of generality that \(yb_1 \notin E(G)\). Then the only triangle containing the edge \(a_ib_1\) can be \(a_ib_1x\), so we must have \(xb_1 \in E(G)\) and \(xa_i \in E(G)\) for all i:
![figure k](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs00012-024-00854-8/MediaObjects/12_2024_854_Figk_HTML.png)
It remains to find out the status of the dashed (non)edges. We see that \(\Delta (a_ib_1)=1>m\), hence \(m=0\), i.e., xy is contained in no triangle. This implies that y cannot be connected to any \(a_i\):
![figure l](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs00012-024-00854-8/MediaObjects/12_2024_854_Figl_HTML.png)
Now the only triangle containing the edge \(a_ib_j\) can be \(a_ib_jx\), so we must have \(xb_j \in E(G)\) for all j (previously we saw this only for \(j=1\)):
![figure m](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs00012-024-00854-8/MediaObjects/12_2024_854_Figm_HTML.png)
The final step is to observe that \(\Delta (xy)=0\) implies \(yb_j \notin E(G)\) for all \(j \ge 2\), and now we see that our graph has the structure described in item (ii) in the statement of the lemma:
![figure n](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs00012-024-00854-8/MediaObjects/12_2024_854_Fign_HTML.png)
\(\square \)
Remark A.4
The assumption \(n \ge 7\) cannot be dropped in Lemma A.2, as witnessed by the following four graphs:
![figure o](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs00012-024-00854-8/MediaObjects/12_2024_854_Figo_HTML.png)
Now we are ready to prove Theorem 4.6.
Proof of Theorem 4.6
The first statement of the theorem follows from Example 4.3. We prove the second statement by induction on the number of vertices. For \(n \le 6\) we have verified (ii) by computer. Let us now assume that \(G \ncong K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }\) with \(n=|V(G)| \ge 7\) and that (ii) holds for graphs with less than n vertices. Let \(m = \min \{ \Delta (e) : e \in E(G) \}\).
If \(G{\setminus }\{x,y\} \cong K_{\big \lfloor (n-2)/2 \big \rfloor ,\big \lceil (n-2)/2 \big \rceil }\) holds for every edge \(e=xy \in E(G)\) with \(\Delta (e)=m\), then G is the second graph described in Lemma A.2. Let us compute \({\text {ns}}(\mathbb {A}({G}))\) with the help of Proposition 4.1. The number of (loopless) edges is
Next we count the cherries in G (we use the notation of the second item of Lemma A.2): we have
Summing it up, Proposition 4.1 gives
After simple but tedious calculations we get that the inequality of (ii) is equivalent to \(8\big \lfloor \frac{n-2}{2} \big \rfloor \big \lceil \frac{n-2}{2} \big \rceil - 4\big \lfloor \frac{n-2}{2} \big \rfloor \ge 0\), which is indeed true (for all \(n \ge 2\)).
Now suppose that there is an edge \(e=xy \in E(G)\) with \(\Delta (e)=m\) such that \(G{\setminus }\{x,y\} \ncong K_{\big \lfloor (n-2)/2 \big \rfloor ,\big \lceil (n-2)/2 \big \rceil }\). We introduce some notation to facilitate cherry-counting:
The triangles containing the edge e are of the form xyv, where \(v \in C\), thus \(\Delta (e)=m=c\). Comparing the graphs G and \(G{\setminus }\{x,y\}\), we see that
Therefore, the index of nonassociativity of \(\mathbb {A}({G})\) can be computed as follows (we divide by 4, for convenience):
Applying the induction hypothesis to the graph \(G{\setminus }\{x,y\}\) and observing that \(ch(e)=a+b\) (since xyv is a cherry if and only if \(v \in A \cup B\)), we obtain
In order to estimate ch(x), we note that there are three types of cherries that contain the vertex x:
![figure p](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs00012-024-00854-8/MediaObjects/12_2024_854_Figp_HTML.png)
The number of cherries of type (a) is b, as \(yv \in E(G)\) and \(xv \notin E(G)\) for all \(v \in B\). For cherries of type (b), we observe that \(xu \in E(G)\) for all \(u \in A \cup C\) and \(xv \notin E(G)\) for all \(v \in B \cup D\), thus the number of such cherries is equal to the number of edges between \(A \cup C\) and \(B \cup D\), which is at most \((a+c)(b+d)\). To get a cherry of type (c), we can choose the pair \(\{u,v\} \subseteq N(x) = A \cup C \cup \{y\}\) in \({a+c+1 \atopwithdelims ()2}\) many ways, but we must make sure that \(uv \notin E(G)\) so that we indeed obtain a cherry. Therefore, the number of cherries of type (c) is \({a+c+1 \atopwithdelims ()2} - E(G\vert _{N(x)})\), where \(G\vert _{N(x)}\) denotes the induced subgraph of G on the vertex set N(x). For any \(u \in N(x)\), we have \(\Delta (xu) = d_{G\vert _{N(x)}}(u)\), since xuv is a triangle if and only if \(v \in N(x)\) and \(uv \in E(G)\). We have seen that \(\min \{ \Delta (e) : e \in E(G) \} = c\), so we can conclude that \(d_{G\vert _{N(x)}}(u) \ge c\). Thus every vertex of the graph \(G\vert _{N(x)}\) has degree at least c, hence \(E(G\vert _{N(x)}) \ge \frac{1}{2} \cdot |N(x)| \cdot c = \frac{1}{2}(a+c+1)c\). Consequently, the number of cherries of type (c) is at most \({a+c+1 \atopwithdelims ()2} - \frac{1}{2}(a+c+1)c\). Adding our estimates for cherries of type (a), (b) and (c), we get
Let us record for later reference that equality holds in this estimate if and only if
We can treat ch(y) in a similar manner, we only need to interchange A and B:
and equality holds here if and only if
Substituting (A.2) and (A.4) into (A.1), we get
where f is the function considered in Lemma A.1. Since \(a+b+c+d=n-2\), we have \(f(a,b,c,d) \le M_{n-2}\) by Lemma A.1, and this gives
which is unfortunately 1 more than what we would need for (ii). As a remedy, we shall prove that it is not possible that \(f(a,b,c,d) = M_{n-2}\), and, at the same time, equality holds in (A.2) as well as in (A.4).
So let us assume for contradiction that \(f(a,b,c,d) = M_{n-2}\) and that (A.3) and (A.5) both hold. Then, according to Lemma A.1, we have \(d=0\), \(c \le 1\) and the difference of a and b is at most one. By the first parts of (A.3) and (A.5), all edges across the sets A, B, C are drawn, thus our graph has the following structure:
![figure q](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs00012-024-00854-8/MediaObjects/12_2024_854_Figq_HTML.png)
Since each vertex of A is connected to each vertex of C by an edge, the second part of (A.3) implies that there are no edges inside the set A (recall that \(N(x) = A \cup C \cup \{y\}\)); similarly, there are no edges within B either, by the second part of (A.5). This shows that if \(c=0\), then \(G \cong K_{\big \lfloor n/2 \big \rfloor ,\big \lceil n/2 \big \rceil }\), contradicting the assumption of (ii). If \(c=1\) and u is the unique element of C, then \(d_{G\vert _{N(x)}}(u) = a+1\), hence the second part of (A.3) gives \(c=a+1\), i.e., \(a=0\). Similarly, we have \(b=0\), and then \(n = a+b+c+d+2 = 3\), which is again a contradiction.
We have proved that the inequality in (A.7) cannot be equality, and this implies \(\frac{1}{4}{\text {ns}}(\mathbb {A}({G}))\le n/2 \cdot \big \lfloor n/2 \big \rfloor \cdot \big \lceil n/2 \big \rceil - \big \lfloor n/2 \big \rfloor + 1\), which is equivalent to (ii). \(\square \)
Proof of Theorem 4.10
We will construct a family of graphs that cover a large part of \({{\,\textrm{range}\,}}_n({\text {ns}})\). The graphs are parameterized by tuples of natural numbers, and in the first three lemmas we establish the required properties of these tuples.
For positive integers h and k, let
We consider the following property for tuples \(\omega =(\omega _1,\dots ,\omega _h) \in \Omega _{h,k}\):
(Note that this implies that the leftmost nonzero entry of the tuple \(\omega \) is 1.) For \((\omega _1,\dots ,\omega _h) \in \Omega _{h,k}\), this property guarantees that each integer between 0 and \(\omega _1+\dots +\omega _h\) can be written as the sum of some of the numbers \(\omega _1,\dots ,\omega _h\). This fact is almost trivial, but we provide the proof in the next lemma (however, it might be easier for the reader to prove it for themselves than reading the proof).
Lemma B.1
If \(\omega =(\omega _1,\dots ,\omega _h) \in \Omega _{h,k}\) has property (B.1), then for each nonnegative integer s with \(s \le \omega _1+\dots +\omega _h\), there exist \(\varepsilon _1,\dots ,\varepsilon _h \in \{0,1\}\) such that \(s = \varepsilon _1\omega _1+\dots +\varepsilon _h\omega _h\).
Proof
We may assume without loss of generality that \(\omega _1 = 1\) (hence \(\omega _i > 0\) for each i), since the zero entries in \(\omega \) (if there are any) are irrelevant for the lemma. We prove the lemma by induction on h. For \(h=1\) the claim is obvious, as \(\omega _1 = 1\), hence s is either 0 or \(\omega _1\). Now let \(h \ge 2\) and let \(s \le \omega _1+\dots +\omega _h\). If \(s \le \omega _1+\dots +\omega _{h-1}\), then we can apply the induction hypothesis to the tuple \((\omega _1,\dots ,\omega _{h-1}) \in \Omega _{h-1,k}\) with the number s. If \(s > \omega _1+\dots +\omega _{h-1}\), then \(s \ge \omega _h\), since \(\omega _{h} \le \omega _1+\dots +\omega _{h-1} + 1\) holds by (B.1). Thus \(s-\omega _h\) is a nonnegative integer, and \(s-\omega _h \le \omega _1+\dots +\omega _{h-1}\). Therefore, we can apply the induction hypothesis to the tuple \((\omega _1,\dots ,\omega _{h-1}) \in \Omega _{h-1,k}\) with the number \(s-\omega _h\): there are coefficients \(\varepsilon _1,\dots ,\varepsilon _{h-1} \in \{0,1\}\) such that \(s-\omega _h = \varepsilon _1\omega _1+\dots +\varepsilon _{h-1}\omega _{h-1}\). Setting \(\varepsilon _h=1\), we can write s as \(s = (s-\omega _h) + \omega _h = \varepsilon _1\omega _1+\dots +\varepsilon _{h-1}\omega _{h-1}+\varepsilon _h\omega _h\). \(\square \)
For \(\omega = (\omega _1,\dots ,\omega _h) \in \Omega _{h,k} {\setminus } \{(0,\dots ,0)\}\), let \(m=m(\omega )\) denote the multiplicity of the maximal (i.e., rightmost) entry: \(\omega _{h-m} < \omega _{h-m+1} = \dots = \omega _h\).
Lemma B.2
If \(\omega =(\omega _1,\dots ,\omega _h) \in \Omega _{h,k} {\setminus } \{(0,\dots ,0)\}\) has property (B.1), then for each nonnegative integer s with \(s \le m(\omega )+\omega _1+\dots +\omega _h\), there exist \(\varepsilon _0,\varepsilon _1,\dots ,\varepsilon _h \in \{0,1\}\) such that \(s = \varepsilon _0 m(\omega )+\varepsilon _1\omega _1+\dots +\varepsilon _h\omega _h\).
Proof
Let \(m=m(\omega )\) and \(\sigma =\omega _1+\dots +\omega _h\), for brevity. Lemma B.1 shows that each integer in the interval \([0,\sigma ]\) can be written as the sum of some of the numbers \(\omega _1,\dots ,\omega _h\). Adding m to each of these numbers, we find that each integer in the interval \([m,m+\sigma ]\) can be written as the sum of some of the numbers \(m,\omega _1,\dots ,\omega _h\). To finish the proof, we just need to verify that the intervals \([0,\sigma ]\) and \([m,m+\sigma ]\) cover \([0,m+\sigma ]\). Indeed, \(m \le \sigma \), as the sum \(\sigma =\omega _1+\dots +\omega _h\) contains m copies of the positive integer \(\omega _h\). \(\square \)
For \(\omega = (\omega _1,\dots ,\omega _h) \in \Omega _{h,k} {\setminus } \{(0,\dots ,0)\}\), we define \(\omega ^-\) as the tuple that is obtained from \(\omega \) by decreasing the leftmost occurrence of \(\omega _h\) by 1:
where \(m=m(\omega )\). For example, if \(\omega =(0,1,2,4,5,5,5)\), then we have \(\omega ^-=(0,1,2,4,4,5,5)\), and if \(\omega =(0,1,2,3,4,7,9)\), then \(\omega ^-=(0,1,2,3,4,7,8)\). It is clear that if \(\omega \in \Omega _{h,k} {\setminus } \{(0,\dots ,0)\}\), then \(\omega ^- \in \Omega _{h,k}\); moreover, property (B.1) is preserved under the map \(\omega \mapsto \omega ^-\) (this is straightforward to verify, so we omit the proof).
Lemma B.3
If \(\omega \in \Omega _{h,k} {\setminus } \{(0,\dots ,0)\}\) has property (B.1), then \(\omega ^-\) also satisfies (B.1).
Now we describe the promised graph construction: we assign a bipartite graph \(G_\omega \) to each tuple \(\omega \in \Omega _{h,k}\). Let \(V(G_\omega ) = \{a_1,\dots ,a_h, b_1,\dots ,b_k\}\) and
We can regard \(\omega \) as a partition of the number \(\omega _1+\dots +\omega _h\), and we can visualize this by a Ferrers diagram. The left hand side of the figure below shows this Ferrers diagram for \(\omega =(0,1,2,4,5,5,5) \in \Omega _{7,5}\).
![figure r](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs00012-024-00854-8/MediaObjects/12_2024_854_Figr_HTML.png)
This Ferrers diagram can be considered as a kind of adjacency matrix for the bipartite graph \(G_\omega \), as indicated by the row and column indices of the diagram. The graph \(G_\omega \) can be seen on the right hand side the figure above. (Removing the gray dot we obtain the diagram of \(\omega ^-=(0,1,2,4,4,5,5)\), and removing the dashed edge from the graph we get \(G_{\omega ^-}\).) The degrees of the vertices \(a_i\) are determined by the rows of the Ferrers diagram: \(d(a_i) = \omega _i\) for \(i=1,\dots ,h\). The vertices \(b_j\) correspond to the columns of the diagram. One could expess the degrees \(d(b_j)\) in terms of the conjugate partition, but we will not formalize this; we will only need that \(d(b_{\omega _h})=m(\omega )\).
The next lemma is crucial to obtain graphs whose indices of nonassociativity cover all even numbers in a “large” interval.
Lemma B.4
Let \(\omega \in \Omega _{h,k} {\setminus } \{(0,\dots ,0)\}\), let \(G=G_\omega \) and \(G^-=G_{\omega ^-}\). If t is an even number and \({\text {ns}}(\mathbb {A}({G^-)}) \le t \le {\text {ns}}(\mathbb {A}({G}))\), then there is a graph \(G^*\) with \(n=h+k\) vertices, such that \({\text {ns}}(\mathbb {A}({G^*)}) = t\).
Proof
By Proposition 4.1, the index of nonassociativity of any graph algebra is even, thus we can write \({\text {ns}}(\mathbb {A}({G}))- t = 2s\) for some nonnegative integer s with \(s \le \frac{1}{2}{\text {ns}}(\mathbb {A}({G}))- \frac{1}{2}{\text {ns}}(\mathbb {A}({G^-)})\). We have to construct a graph \(G^*\) such that \(\frac{1}{2}{\text {ns}}(\mathbb {A}({G^*)}) = \frac{1}{2}{\text {ns}}(\mathbb {A}({G}))- s\). We will do this by adding loops to appropriate vertices of G.
Let \(V=\{a_1,\dots ,a_h, b_1,\dots ,b_k\}\) be the common vertex set of G and \(G^-\). We can obtain \(G^-\) from G by deleting one edge: \(E(G^-) = E(G) {\setminus } \{ a_{h-m+1}b_{\omega _h} \}\). Therefore, \(d_G(a_{h-m+1}) = \omega _h\), \(d_{G^-}(a_{h-m+1}) = \omega _h-1\) and \(d_G(b_{\omega _h})=m\), \(d_{G^-}(b_{\omega _h})=m-1\), where \(m=m(\omega )\), but apart from these two exceptions, the degrees of the vertices are the same in G and in \(G^-\). This implies, with the help of Proposition 4.2 that
This proves that \(s \le 2\omega _h + 2m - 2\).
We would like to use Lemma B.2, so we need to verify that \(2\omega _h + 2m - 2 \le m + \omega _1+\dots +\omega _h\). By property (B.1) and by the definition of \(m=m(\omega )\), we can estimate \(\omega _1+\dots +\omega _h\) as follows:
We can derive the desired inequality as follows:
Now we can apply Lemma B.2: \(s = \varepsilon _0 m(\omega )+\varepsilon _1\omega _1+\dots +\varepsilon _h\omega _h\) for suitable \(\varepsilon _0,\varepsilon _1,\dots ,\varepsilon _h \in \{0,1\}\). Let us modify the graph G by adding a loop to \(b_{\omega _h}\) if \(\varepsilon _0=1\), and let us add a loop to \(a_i\) if \(\varepsilon _i=1\). By Lemma 4.5, the index of nonassociativity of the resulting graph \(G^*\) can be computed as follows:
As we have already mentioned, this is equivalent to \({\text {ns}}(\mathbb {A}({G^*)})=t\). \(\square \)
Now we are ready to prove Theorem 4.10.
Proof of Theorem 4.10
Theorem 4.6 shows that \(r_n \le n^3/2\), so our task is to give a lower estimate that is asymptotically \(n^3/2\). To this end, let us fix positive integers h and k such that \(h+k=n\), and let us consider the graphs \(G_\omega \) for \(\omega \in \Omega _{h,k}\).
We claim that if \(\omega \in \Omega _{h,k}\) satisfies (B.1), then \(r_n \ge {\text {ns}}(\mathbb {A}({G_\omega )})\). According to Lemma B.4, \({{\,\textrm{range}\,}}_n({\text {ns}})\) contains all even numbers from \({\text {ns}}(\mathbb {A}({G_{\omega ^-})})\) to \({\text {ns}}(\mathbb {A}({G_{\omega })})\). Since, by Lemma B.3, \(\omega ^-\) also has property (B.1), we can apply Lemma B.4 again, and we get that \({{\,\textrm{range}\,}}_n({\text {ns}})\) contains all even numbers from \({\text {ns}}(\mathbb {A}({G_{(\omega ^-)^-})})\) to \({\text {ns}}(\mathbb {A}({G_{\omega ^-})})\). We can continue this process, until, after applying the transformation \(\omega \mapsto \omega ^-\) sufficiently many times (more precisely: \(\omega _1+\dots +\omega _h\) times), we reach the tuple \((0,\dots ,0)\) and the corresponding “edgeless” graph, whose graph algebra is obviously associative. This proves that each even number from 0 to \({\text {ns}}(\mathbb {A}({G_\omega )})\) occurs as index of nonassociativity of a graph algebra of a graph with n vertices, hence \(r_n \ge {\text {ns}}(\mathbb {A}({G_\omega )})\), as claimed.
Now we only need to find a tuple \(\omega \in \Omega _{h,k}\) satisfying (B.1), such that \({\text {ns}}(\mathbb {A}({G_\omega )})\) is large enough. Let \(h=\big \lfloor n/2 \big \rfloor \), \(k=\big \lceil n/2 \big \rceil \), and let \(\omega = (1,2,4,\dots ,2^\ell ,k,\dots ,k)\), where \(\ell = \big \lfloor \log _2 k \big \rfloor \) and the number of copies of k is \(m=m(\omega )=h-\ell -1\). The identity \(1+2+4+\dots +2^{i-1}=2^i-1\) guarantees that \(\omega \in \Omega _{h,k}\) has property (B.1). The graph \(G_\omega \) has m vertices of degree k (namely, \(a_{\ell +2},\dots ,a_h)\), and each of the vertices \(b_1\), ..., \(b_k\) has degree at least m. Therefore, since \(G_\omega \) is irreflexive and triangle-free, Proposition 4.2 implies that
Clearly, \(\lim _{n \rightarrow \infty } k/n = \lim _{n \rightarrow \infty } m/n = 1/2\), hence we can conclude that \(\lim _{n \rightarrow \infty } 2(m k^2 + k m^2)/n^3 = 1/2\), and this gives the desired lower estimate for \(r_n\). \(\square \)
Tables
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Kátai-Urbán, K., Waldhauser, T. Measuring associativity: graph algebras of undirected graphs. Algebra Univers. 85, 25 (2024). https://doi.org/10.1007/s00012-024-00854-8
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s00012-024-00854-8
Keywords
- Binary operation
- Groupoid
- Associativity
- Index of nonassociativity
- Semigroup distance
- Graph algebra
- Undirected graph
- Associative spectrum