1 Introduction

Let G be a finite simple graph and let \(f:V(G)\rightarrow \mathbb {Z}\) be an injective labelling. We may derive two natural edge labellings \(f_+:E(G)\rightarrow \mathbb {Z}\) and \(f_-:E(G)\rightarrow \mathbb {Z}\) from f as follows.

$$\begin{aligned} f_+:uv&\mapsto f(u)+f(v);\\ f_-:uv&\mapsto |f(u)-f(v)|. \end{aligned}$$

We consider two parameters of G based on these labellings. The sum index, \({\text {sum}}(G)\), introduced by Harrington and Wong [8], is the minimum number of different values taken by \(f_+\) for any choice of f, and the difference index, \({\text {dif}}(G)\), is defined likewise with respect to \(f_-\). Note that restricting f to the positive integers would make no difference, since adding a constant to f does not change the number of values taken by \(f_+\) or \(f_-\). In a recent preprint [6], Harrington, Henninger-Voss, Karhadkar, Robinson and Wong introduced the difference index and made the following bold conjecture, based on computations of exact values for several families of graphs.

Conjecture 1

([6, Conjecture 4.2]) Every nonempty simple graph G satisfies

$$\begin{aligned}{\text {dif}}(G)=\lceil {\text {sum}}(G)/2\rceil .\end{aligned}$$

They further supported Conjecture 1 by proving a one-directional version for bipartite graphs: if G is bipartite then \({\text {dif}}(G)\ge \lceil {\text {sum}}(G)/2\rceil \).

We show in Sects. 2 and 3 that Conjecture 1 is false in general, and in fact the conjectured value can be arbitrarily far from the truth in either direction. In one direction, we prove this in the strongest possible form: we show that the sum index cannot be bounded by any function of the difference index, and in fact even for difference index 2 there are connected graphs with arbitrary sum index. In the other direction, while the discrepancy from the conjectured value may be arbitrarily large, it is small relative to the size of the two indices. We give some new bounds on the sum and difference indices, and as a consequence we obtain the exact sum index of the prism graphs, which was not previously known.

In an updated version [7], which appeared as a preprint simultaneously with the first version of this paper, Harrington et al. give two counterexamples to Conjecture 2 in the second direction, although both of these only achieve a discrepancy of 1. They therefore modify Conjecture 1 as follows.

Conjecture 2

([7, Conjecture 4.4]) Every nonempty simple graph G satisfies

$$\begin{aligned}\lceil {\text {sum}}(G)/2\rceil \le {\text {dif}}(G)\le {\text {sum}}(G).\end{aligned}$$

Our results in Sect. 2 show that Conjecture 2 is still false in a strong sense.

We also consider the exclusive sum number of a graph, which is closely related to the well-studied sum number, introduced by Harary [5]. Harary defined a graph G to be a sum graph if there is an injective function \(f:V(G)\rightarrow \mathbb {Z}_+\) such that for any distinct vertices \(u,v\in V(G)\) we have \(uv\in E(G)\) if and only if \(f(u)+f(v)\in f(V(G))\); this f is a sum labelling of G. Necessarily any sum graph has at least one isolated vertex, since the vertex v maximising f(v) cannot have any neighbours; the sum number, \(\sigma (G)\), of a graph G is the smallest number of isolated vertices which can be added to create a sum graph. Harary asked for bounds on \(\sigma (G)\), and conjectured that \(\sigma (T)=1\) for every tree T on more than one vertex. Bounds on \(\sigma (G)\) in terms of an optimal clique cover for G were given by Gould and Rödl [4], and Harary’s conjecture for trees was proved by Ellingham [1]. There has since been a great deal of work on the sum number and variations thereof; see [3, Section 7.1] for (much) more detail, including on the exclusive sum number defined below.

The exclusive sum number was introduced by Nagamochi, Miller and Slamin [12], and further developed by Miller, Patel, Ryan, Sugeng, Slamin and Tuga [10]. Given a sum labelling f of a graph, a vertex w is a working vertex if \(f(w)=f(u)+f(v)\) for some edge uv. If G is a graph with sum number r and f is a sum labelling of \(G\cup {\overline{K}}_r\), then necessarily all vertices not in G are working vertices, since otherwise one of them could be omitted to obtain a sum labelling of \(G\cup {\overline{K}}_{r-1}\). A sum labelling f is an exclusive sum labelling if these are the only working vertices, and the exclusive sum number, \(\epsilon (G)\), of G to be the minimum r for which \(G\cup {\overline{K}}_r\) has an exclusive sum labelling. (We will generally assume G to be a connected graph on more than one vertex, so that it will be clear which vertices may be working.) For further results on this parameter, see [11, 13].

Before describing our result involving the exclusive sum number, we first give an equivalent, but more natural, definition. For two finite sets of positive integers ST we define \(G_+(S,T)\) to be the graph on vertex set S, with two vertices being adjacent if and only if their sum is in T.

Proposition 1

For any finite graph G, \(\epsilon (G)\) is the smallest possible value of \(|T|\) among pairs ST satisfying \(G\cong G_+(S,T)\).

Proof

Note that if \(f:V(G\cup {{\overline{K}}}_r)\rightarrow \mathbb {Z}_+\) is an exclusive sum labelling for G, then \(G\cong G_+(S,T)\) where \(S=f(V(G))\) and \(T=f(V({{\overline{K}}}_r))\) are disjoint. Conversely, if \(G\cong G_+(S,T)\) for some pair of disjoint sets ST then we may recover an exclusive sum labelling \(f:G\cup {{\overline{K}}}_{|T|}\rightarrow \mathbb {Z}_+\) from this isomorphism: set \(f(v)=\phi (v)\) if \(v\in V(G)\), where \(\phi :V(G)\rightarrow S\) is the isomorphism, and choose the remaining values of f such that \(f(V({{\overline{K}}}_{|T|}))=T\).

Consequently \(\epsilon (G)\) is the smallest value of \(|T|\) among pairs of disjoint sets ST such that \(G\cong G_+(S,T)\). However, we may equivalently omit the disjointness condition, since \(G_+(S,T)\cong G_+(S+\{k\},T+\{2k\})\) for any \(k\in \mathbb {Z}_+\), and, for any fixed finite sets S and T, choosing k sufficiently large ensures \(S+\{k\}\) and \(T+\{2k\}\) are disjoint.\(\square \)

Harrington et al. [7, Theorem 2.5] observed that the exclusive sum number gives an upper bound for the sum index, and proved that there is strict inequality for one specific graph. (There are also graphs for which equality occurs; for example \({\text {sum}}(K_n)=\epsilon (K_n)\).) Motivated by this, they conjecture that the difference can be made arbitrarily large.

Conjecture 3

For any positive integer N there exists a graph G with \(\epsilon (G)-{\text {sum}}(G)>N\).

In fact Conjecture 3 is true in a strong sense, and this follows immediately from known results on the sum number. Clearly \(\epsilon (G)\ge \sigma (G)\), and it was shown by Gould and Rödl [4] that there exist graphs with \(\sigma (G)=\Theta (|G|^2)\), and by Nagamochi, Miller and Slamin [12] that such graphs are quite common. Since trivially \({\text {sum}}(G)=O(|G|)\), such graphs satisfy \({\text {sum}}(G)=o(\epsilon (G))\). However, both proofs referred to are non-constructive, and in fact no specific construction is known for which \(\sigma (G)=\Omega (|G|)\) (see [3, 10]). In Sect. 4 we give a constructive proof of Conjecture 3 by giving an explicit sequence of graphs with unbounded exclusive sum index for which the two parameters differ by a constant multiplicative factor.

We conclude by giving some natural open questions suggested by this work. In what follows, we often use the notation \([m]:=\{1,\ldots ,m\}\) for \(m\in \mathbb {Z}_+\).

2 Graphs with Large Sum Index and Bounded Difference Index

In this section we show that the sum index cannot be bounded by a function of the difference index, contradicting Conjecture 1. If G satisfies \({\text {dif}}(G)<\lceil {\text {sum}}(G)\rceil \) then G cannot be bipartite by [7, Theorem 3.3]. However, we can give triangle-free examples, and indeed can forbid short odd cycles of arbitrary length.

We start by giving a new lower bound on the sum index.

Theorem 1

If G contains s cycles of length \(2k+1\) then \({\text {sum}}(G)\ge \root 2k+1 \of {(4k+2)s}+1\).

Proof

Let \(f:V(G)\rightarrow \mathbb {Z}\) be an injective vertex labelling chosen such that \(f_+(e)\) takes \({\text {sum}}(G)\) different values. Fix a cycle \(v_1\ldots v_{2k+1}\) of length \(2k+1\), and for ease of notation write \(v_{2k+2}=v_1\). Note that

$$\begin{aligned}2f(v_1)=\sum _{i=1}^{k+1}f_+\left( v_{2i-1}v_{2i}\right) -\sum _{i=1}^{k}f_+\left( v_{2i}v_{2i+1}\right) ,\end{aligned}$$

and similar expressions for the other vertices may be obtained by symmetry. Thus, given the ordered edge labels around a \((2k+1)\)-cycle we may deduce the ordered vertex labels. The ordered edge labels around a \((2k+1)\)-cycle have the property that no two consecutive labels are equal and all labels are taken from the set \(f_+(E(G))\) of \({\text {sum}}(G)\) elements. Thus every \((2k+1)\)-tuple of ordered edge labels corresponds to a proper \({\text {sum}}(G)\)-colouring of \(C_{2k+1}\). Recall that the chromatic polynomial of \(C_{2k+1}\) is given by \(P(\lambda )=(\lambda -1)^{2k+1}-(\lambda -1)\), and so there are fewer than \(({\text {sum}}(G)-1)^{2k+1}\) possible tuples arising as the ordered edge labels of some \((2k+1)\)-cycle. However, there are s cycles of this length, each gives \(4k+2\) tuples of ordered edge labels (since the starting point and direction may be chosen arbitrarily), and all these tuples must be different. Consequently

$$\begin{aligned}\left( {\text {sum}}(G)-1\right) ^{2k+1}\ge \left( 4k+2\right) s,\end{aligned}$$

from which the claimed bound follows.\(\square \)

As a consequence we deduce the following.

Theorem 2

There exist connected graphs with difference index 2 but arbitrarily large sum index and girth.

Fig. 1
figure 1

Chaining s odd cycles with difference index 2

Proof

Let G consist of a path \(v_1\ldots v_{2sk+1}\) together with the additional edges

$$\begin{aligned}\{v_{2(a-1)k+1}v_{2ak+1}\mid a\in [s]\};\end{aligned}$$

this forms a chain of s cycles, each of length \(2k+1\). Let f be the function \(v_i\mapsto i\); see Fig. 1 for G with this labelling. Then \(f_-:E(G)\rightarrow \{1,2k\}\), and since the only graphs with difference index 1 are the path-forests we have \({\text {dif}}(T_n)=2\). However, \({\text {sum}}(G)\ge \root 2k+1 \of {(4k+2)s}+1\) and G has girth \(2k+1\); we may choose sk to make both parameters arbitrarily large.\(\square \)

3 Graphs with Difference Index Larger than Conjectured

We now show that Conjecture 1 also fails in the other direction. In [7, Theorem 3.1] it is observed that \({\text {dif}}(G)\ge \delta (G)\). We give a strengthening of this fact, and establish a similar bound for the sum index. Write \(\delta _k(G)\) for the kth smallest degree.

Theorem 3

For any graph G we have \({\text {dif}}(G)\ge \max _{k\ge 1}(\delta _{2k}(G)-k+1)\).

Proof

Let G be a graph and choose k to maximise the expression \(\delta _{2k}(G)-k+1\). Fix an injective vertex labelling f, and order the vertices \(v_1,\ldots ,v_n\) such that \(f(v_i)<f(v_j)\) if and only if \(i<j\). Observe that at least one of \(\{v_1,\ldots ,v_k,v_{n-k+1},\ldots ,v_n\}\) has degree at least \(\delta _{2k}(G)\). Suppose without loss of generality that \(d(v_i)\ge \delta _{2k}(G)\) for some \(i\le k\). Now \(v_i\) has at least \(d(v_i)-k+1\) neighbours \(v_j\) with \(j>i\), and hence \(f(v_j)>f(v_i)\); the edge to such a neighbour gets label \(f(v_j)-f(v_i)\), giving at least \(\delta _{2k}(G)-k+1\) distinct labels.\(\square \)

Theorem 4

For any graph G we have \({\text {sum}}(G)\ge \max _{k\ge 1}(\delta _{k}(G)+\delta _{k+1}(G)-k)\).

Remark 1

This gives a stronger lower bound for regular graphs than any previously known, since by taking \(k=1\) we obtain \({\text {sum}}(G)\ge 2d-1\) if G is d-regular. In [7] it is observed that \({\text {sum}}(G)\ge \chi '(G)\). However, by Vizing’s theorem, \(\chi '(G)\le d+1\) if G is d-regular, and so there is a considerable gap between these two bounds for large d.

Proof

Let G be a graph and choose k to maximise the expression \(\delta _{k}(G)+\delta _{k+1}(G)-k\). Fix an injective vertex labelling f. Let \(V_k\) be the \(k-1\) vertices of smallest degree, and let \(u,v\in V(G)\setminus V_k\) be chosen so that f(u) is as small as possible and f(v) is as large as possible.

Write \(V_k^-\) for the set \(\{w\in V_k:f(w)<f(u)\}\) and \(V_k^+\) for the set \(\{w\in V_k:f(w)>f(v)\}\). Note that every edge of the form uw where \(w\not \in V_k^+\) has sum label at most \(f(u)+f(v)\), and all these labels are distinct, and likewise every edge of the form vw where \(w\not \in V_k^-\) has sum label at least \(f(u)+f(v)\), and all these labels are distinct. The only label which may appear in both lists is \(f(u)+f(v)\), if uv is an edge. Consequently, combining these gives a set of at least \(d(u)-|V_k^+|+d(v)-|V_k^-|-1\) edges with distinct labels. This is at least \(\delta _{k}(G)+\delta _{k+1}(G)-|V_k|-1\), as required.\(\square \)

We immediately obtain a new result: the precise sum index of the prism graphs. The difference index of these graphs was already known [7, Theorem 3.1, Corollary 3.13].

Corollary 1

For each \(n\ge 3\), the prism graph \(\Pi _n=C_n\square K_2\) satisfies \({\text {sum}}(\Pi _n)=5\).

Proof

Since \(\Pi _n\) is 3-regular, Theorem 4 gives \({\text {sum}}(\Pi _n)\ge 5\), but also \({\text {sum}}(\Pi _n)\le 5\) by [7, Corollary 2.13].\(\square \)

We can now give a simple example where the difference index exceeds the conjectured bound. Let \(\hat{K}_n\) be the complete graph on \(n\ge 4\) vertices with one edge subdivided.

Corollary 2

For each \(n\ge 4\) we have \({\text {dif}}(\hat{K}_n)=\lceil {\text {sum}}(\hat{K}_n)/2\rceil +1\).

Proof

Let w be the new vertex of degree 2, and let u and v be the two neighbours of w.

By Theorem 3, with \(k=1\), we have \({\text {dif}}(\hat{K}_n)\ge n-1\), and this is an equality as shown by any labelling \(f_1:V(\hat{K}_n)\rightarrow \{0,\ldots ,n\}\) with \(f_1(u)=0\) and \(f_1(v)=n\), for which the difference labelling takes values \(1,\ldots ,n-1\).

By Theorem 4, with \(k=2\), we have \({\text {sum}}(\hat{K}_n)\ge 2n-4\), and this is also an equality as shown by any labelling \(f_2:V(\hat{K}_n)\rightarrow \{0,\ldots ,n\}\) with \(f_2(u)=n-1\), \(f_2(v)=n\) and \(f_2(w)=0\), for which the sum labelling takes values \(3,\ldots , 2n-2\). Consequently \({\text {sum}}(\hat{K}_n)/2=n-2={\text {dif}}(\hat{K}_n)-1\).\(\square \)

We will improve this construction to give graphs where the difference index exceeds the conjectured bound by an arbitrarily large amount, although the relative error will be small. Let \(\hat{K}_n^{(k,k)}\) be the graph obtained from the complete graph on \(n\ge 2k\) vertices \(v_1,\ldots ,v_n\) by subdividing all edges \(v_iv_j\) where \(i,j\le k\) and all edges \(v_iv_j\) where \(i,j>n-k\) (that is, we subdivide the edges of two disjoint cliques of order k). Figure 2 shows the case \(k=2\), \(n=2k+\left( {\begin{array}{c}k\\ 2\end{array}}\right) =5\). The motivation for this construction is that a vertex labelling f for \(K_n\) achieves the sum index if and only if its values are in arithmetic progression, and the same is true for the difference index. For such a labelling, the 2k least frequent labels of \(f^+\) occur on the edges of two disjoint cliques (whose vertices have the k highest and k lowest labels), whereas the 2k least frequent labels of \(f^-\) occur on a subset of the edges of a \(K_{k,k}\) (with the same vertices). In what follows, we refer to the vertices \(v_1,\ldots ,v_k\) as the branch vertices.

Fig. 2
figure 2

The graph \(\hat{K}_5^{(2,2)}\), with a labelling demonstrating that its sum index is 5

Theorem 5

For each \(k\ge 2\) and \(n\ge \left( {\begin{array}{c}k\\ 2\end{array}}\right) +2k\), we have

$$\begin{aligned}{\text {sum}}\bigl (\hat{K}_n^{(k,k)}\bigr )= 2n-2k-1\end{aligned}$$

and

$$\begin{aligned}{\text {dif}}\bigl (\hat{K}_n^{(k,k)}\bigr )\ge n-2k/3-1=\bigl \lceil {\text {sum}}\bigl (\hat{K}_n^{(k,k)}\bigr )/2\bigr \rceil +k/3-1.\end{aligned}$$

Proof

For the sum index, we first prove the lower bound. Let \(f_1\) be any vertex labelling, and let i and j be the indices with \(f_1(v_i)\) as small as possible and \(f_1(v_j)\) as large as possible. For the corresponding sum labelling, there are at least \(n-k\) edges from \(v_i\) to other branch vertices, each of which have different labels of at most \(f_1(v_i)+f_1(v_j)\), and there are at least \(n-k-1\) edges from \(v_j\) to other branch vertices which are not \(v_i\), each of which have different labels exceeding \(f_1(v_i)+f_1(v_j)\). Thus \({\text {sum}}\bigl (\hat{K}_n^{(k,k)}\bigr )\ge 2n-2k-1\). If \(f_1\) is chosen such that \(f_1(v_i)=i\), the subdivision vertices between two vertices of small index receive labels \(n+1,\ldots ,\left( {\begin{array}{c}k\\ 2\end{array}}\right) \), and the subdivision vertices between two vertices of high index receive labels \(1-\left( {\begin{array}{c}k\\ 2\end{array}}\right) ,\ldots ,0\) then, since \(n\ge \left( {\begin{array}{c}k\\ 2\end{array}}\right) +2k\), the sum labelling uses only labels from \(\{k+2,\ldots ,2n-k\}\), giving the corresponding upper bound. See Fig. 2 for an example labelling.

Now suppose \({\text {dif}}\bigl (\hat{K}_n^{(k,k)}\bigr )< n-2k/3-1\), and let \(f_2\) be a vertex labelling achieving the difference index. Write \(S=\{k+1,\ldots ,n-k\}\), and \(T=[n]\setminus S\), i.e. a branch vertex \(v_i\) is adjacent to all other branch vertices if and only if \(i\in S\). The condition on n ensures that S is nonempty. Choose \(i\in S\) such that \(f_2(v_i)\) is as small as possible, and \(j\in [n]\) so that \(f_2(v_j)\) is as large as possible. Set

$$\begin{aligned} A&=\left\{ a\in [n]:f_2(v_a)<f_2(v_i)\right\} ,\\B&=\left\{ b\in [n]:f_2(v_b)>f_2(v_i)\right\} . \end{aligned}$$

Since \(i\in S\) there is an edge \(v_iv_b\) for each \(b\in B\), and all these edges get different labels which are at most \(f_2(v_j)-f_2(v_i)\). For each \(a\in A\) such that \(v_jv_a\) is an edge, \(v_jv_a\) gets a different label which is greater than \(f(v_j)-f(v_i)\). Since \(|A|+|B|=n-1\), there must be more than 2k/3 values \(a\in A\) for which \(v_jv_a\) is not an edge; i.e., without loss of generality, \(j\in [k]\) and \(\bigl | A\cap [k]\bigr |>2k/3\).

Now choose \(h\in [n]\setminus [k]\) so that \(f_2(v_h)\) is as large as possible. Set

$$\begin{aligned}C=\left\{ b\in B:f_2(v_b)\le f_2(v_h)\right\} .\end{aligned}$$

This choice of h ensures that \(B\setminus C\subseteq B\cap [k]\), and since \(\bigl | A\cap [k]\bigr |>2k/3\) we have \(\bigl | B\cap [k]\bigr |<k/3\), meaning that \(|A|+|C|> n-1-k/3\). Now for each \(c\in C\) the edge \(v_iv_c\) has label at most \(f_2(v_h)-f_2(v_i)\), and for each \(a\in A\cap [n-k]\) there is an edge \(v_hv_a\) with label exceeding \(f_2(v_h)-f_2(v_i)\), with all these labels being distinct. Since fewer than \(n-2k/3-1\) labels are used by assumption, we have

$$\begin{aligned}n-2k/3-1&>\bigl | A\cap [n-k]\bigr |+|C|\\&=|A|+|C|-\bigl | A\cap \{n-k+1,\ldots , n\}\bigr |\\&> n-1-k/3-\bigl | A\cap \{n-k+1,\ldots , n\}\bigr |,\end{aligned}$$

and so \(\bigl | A\cap \{n-k+1,\ldots ,n\}\bigr |>k/3\). Consequently \(|A\cap T|>k\).

Now choose \(i'\in S\) so that \(f_2(v_{i'})\) is as large as possible, and set

$$\begin{aligned}A'=\left\{ a\in [1,n]:f_2(v_a)>f_2\left( v_{i'}\right) \right\} .\end{aligned}$$

By a similar argument, we have \(|A'\cap T|>k\). Since A and \(A'\) are disjoint, this gives

$$\begin{aligned}\bigl | \left( A\cup A'\right) \cap T)\bigr |>2k=|T|,\end{aligned}$$

a contradiction.\(\square \)

Choosing the smallest value of n for each k in Theorem 5, we have \({\text {sum}}\bigl (\hat{K}_n^{(k,k)}\bigr )=\Theta (k^2)\) and so \({\text {dif}}\bigl (\hat{K}_n^{(k,k)}\bigr )=\bigl \lceil {\text {sum}}\bigl (\hat{K}_n^{(k,k)}\bigr )/2\bigr \rceil +\Omega \bigl ({\text {sum}}\bigl (\hat{K}_n^{(k,k)}\bigr )^{1/2}\bigr )\).

4 Graphs with Sum Index Far from Exclusive Sum Number

In this section we give a constructive proof of Conjecture 3 by giving explicit graphs \(G_N\) satisfying \(\epsilon (G_N)-{\text {sum}}(G_N)\ge N\) for any fixed N; in fact \(|G_N|=O(N)\) so the two invariants differ by a constant proportion. Recall, however, that a much stronger form of Conjecture 3 follows from known, but non-constructive, results.

Our proof will use a stability result from additive combinatorics. For sets of integers (all sets we consider will be finite and nonempty) A and B we write \(A+B\) for the sumset \(\{a+b\mid a\in A, b\in B\}\). It is easy to verify that \(|A+B|\ge |A|+|B|-1\), with equality if and only if A and B are arithmetic progressions with the same common difference. A natural question is whether this structural constraint is robust when replacing equality with near-equality. Stanchescu [14], building on earlier work by Freĭman [2] and by Lev and Smeliansky [9], showed that it is robust in the following sense. For a nonempty finite set X of integers, write \(\ell (X)=\max (X)-\min (X)\). Given two such sets A and B, let d(AB) be the greatest common divisor of \(\{a-a'\mid a,a'\in A\}\cup \{b-b'\mid b,b'\in B\}\). We write \(\delta _{ij}\) to mean the Kronecker delta.

Theorem 6

([14, Corollary 2]) Let A and B be two finite sets of integers. If \(|A+B| < |A|+|B|+ \min (|A|,|B|)-2-\delta _{\ell (A)\ell (B)}\) then \(\ell (A)/d(A,B) \le |A+B|-|B|\) and \(\ell (B)/d(A,B) \le |A+B|-|A|\).

Note that, writing \(d=d(A,B)\), we may find arithmetic progressions \(A'\) and \(B'\) of order \(1+\ell (A)/d\) and \(1+\ell (B)/d\) respectively, each having difference d, such that A is contained in \(A'\) and B is contained in \(B'\). Theorem 6 implies that if \(A+B\) is close to minimal size then \(A'\) and \(B'\) are also not much larger than A and B.

Next we give the construction used in our proof. Fix positive integers \(k\ge 3\) and \(n\ge 3k-6\). Take a complete bipartite graph \(K_{n,k}\) and let U and W be the classes of order n and k respectively. Add three additional vertices \(v_1,v_2,v_3\), each adjacent to exactly \(n-k+2\) vertices of U, in such a way that the three sets given by \(U\setminus N(v_i)\) are disjoint. This is possible since each set has size \(k-2\) and \(n\ge 3k-6\). Denote the resulting graph by \(G_{n,k}\). Figure 3 shows the case \(k=4\) and \(n=3k-6=6\).

Fig. 3
figure 3

The graph \(G_{6,4}\) with a labelling demonstrating \({\text {sum}}(G_{6,4})\le 10\)

Theorem 7

The graph defined above satisfies \({\text {sum}}(G_{n,k})\le n+k\) and \(\epsilon (G_{n,k})\ge n+2k-3\).

Remark 2

In particular, taking \(n=3k-6\) gives a sequence of graphs with unbounded sum index satisfying \({\text {sum}}(G)\le \frac{4\epsilon (G)+6}{5}\).

Proof

The first statement arises from a bijective labelling \(f:V(G_{k,n})\rightarrow [n+k+3]\) satisfying the following conditions.

  • \(f(v_1)=n+1\) and \(f(v_3)=n+k+3\);

  • \(f(u)=1\) for some \(u\in U\setminus N(v_1)\);

  • \(f(u')=n\) for some \(u'\in U\setminus N(v_3)\);

  • and \(f(U)=[n]\).

In this case the smallest value of \(f_+(e)\) for \(e\in E(G_{k,n})\) will be \(n+2\) and the largest will be \(2n+k+2\). See Fig. 3 for an example.

Now we bound the exclusive sum number using Proposition 1. Suppose we can express \(G_{n,k}\) as \(G_+(S,T)\) for some sets ST with \(|T|\le n+2k-4\). Fix an isomorphism \(\phi :V(G_{n,k})\rightarrow S\), write \(A=\phi (U)\) and \(B=\phi (W)\), and set \(d=d(A,B)\). By definition of \(G_{n,k}\) and \(G_+(S,T)\) we must have \(a+b\in T\) for each \(a\in A, b\in B\).

We have \(|A+B|\le |T|=n+2k-4\); write \(t=n+2k-4-|A+B|\). Since \(|A|=n\), \(|B|=k\), and the conditions on k and n imply \(k\le n\), we have \(|A+B|<|A|+|B|+\min \{|A|,|B|\}-3\). Consequently, by Theorem 6 we have \(\ell (A)/d\le n+k-4-t\) and \(\ell (B)/d\le 2k-4-t\). Also, since \(\ell (A+B)=\ell (A)+\ell (B)\), we have

$$\begin{aligned}\ell (A+B)/d\le 2|A+B|-n-k\le |A+B|+k-4-t.\end{aligned}$$

It follows that there are arithmetic progressions \(A'\supseteq A\), \(B'\supseteq B\) and \(C\supseteq A+B\), all with difference d, such that each of \(A'\setminus A\), \(B'\setminus B\) and \(C\setminus (A+B)\) has size at most \(k-3-t\). All elements of \(B'\) are congruent modulo d; write \(B^*\) for the set of all integers congruent to elements of \(B'\) modulo d.

Write \(r_i=\phi (v_i)\) for each \(i\in [3]\). We claim that each \(r_i\in B^*\setminus B'\). First, if \(r_i\not \in B^*\) then we have \(r_i+a\not \in A+B\) for each \(a\in A\). For \(n-(k-2)\) choices of a, the vertex associated with a is a neighbour of \(v_i\), meaning \(r_i+a\in T\). This would imply \(|T|\ge |A+B|+n-k+2\ge 2n+1\), a contradiction, so we must have \(r_i\in B^*\). Secondly, if \(r_i\in B'\) then \(r_i+a\in C\) for each \(a\in A\), and since \(|C\setminus (A+B)|\le k-3-t\) there are at most \(k-3-t\) choices of \(a\in A\) for which \(r_i+a\not \in T\). But there are \(k-2\) vertices in U not adjacent to \(v_i\), again giving a contradiction. So \(r_i\in B^*\setminus B'\).

Now, for each i either \(r_i>\max (B')\) or \(r_i<\min (B')\), and so one of these inequalities must hold for at least two of the three possible values of i; assume without loss of generality that \(r_1,r_2>\max (B')\). Note that there must be exactly \(k-2\) choices of \(a\in A\) such that \(a+r_1\not \in T\). There are at most \(k-3-t\) choices of \(a\in A\) for which \(a+r_1\in C\setminus (A+B)\), so there are at least \(t+1\) choices with \(a+r_1\not \in C\cup T\). Also, since \(T\setminus C\subseteq T\setminus (A+B)\), there are at most t choices \(a\in A\) such that \(a+r_1\in T\setminus C\). Note that since \(r_1>\max (B')\), the \(a\in A\) with \(a+r_1\not \in C\) are precisely the s largest elements of A for some s. Since these s contain at least \(t+1\) choices of a with \(a+r_1\not \in T\) and at most t choices of a with \(a+r_1\in T\), it follows that at least \(t+1\) of the \(2t+1\) largest elements of A satisfy \(a+r_1\not \in T\), i.e. are images under \(\phi \) of vertices of U which are not adjacent to \(v_1\). However, similarly, at least \(t+1\) of these \(2t+1\) elements are images under \(\phi \) of vertices of U which are not neighbours of \(v_2\), and so at least one must be \(\phi (u)\) for some \(u\in U\) not adjacent to \(v_1\) or \(v_2\), giving a contradiction.\(\square \)

5 Open Questions

These results raise several natural questions. Notice that all the counterexamples we obtain to Conjecture 1 are non-bipartite. For Sect. 2 this is necessarily the case, since \({\text {dif}}(G)\ge \lceil {\text {sum}}(G)/2\rceil \) for bipartite graphs [6]. In the original version of this paper we asked whether a bipartite counterexample to Conjecture 1 in the other direction exists. In [7] (the updated version of [6]), a counterexample is given which not only is bipartite but in fact is a tree. However, this example only has a discrepancy of 1.

Question 1

If G is bipartite, can \({\text {dif}}(G)-\lceil {\text {sum}}(G)/2\rceil \) be arbitrarily large?

We would also be interested to know by how far \({\text {dif}}(G)\) can exceed \(\lceil {\text {sum}}(G)/2\rceil \) in general. In Sect. 3 we showed that the absolute discrepancy can be arbitrarily large, but the relative discrepancy of our examples is small. Is it possible to improve our results to give a constant relative discrepancy?

Question 2

Is there a constant \(\alpha >1\) for which there are graphs with arbitrarily large sum index satisfying \({\text {dif}}(G)\ge (1+\alpha )\lceil {\text {sum}}(G)/2\rceil \)?

We conjecture that, even if the answer to Question 2 were positive, the results of Sect. 3 could not be improved any further than that. Recall that Harrington et al. proved that no bipartite graph has larger difference index than sum index [7]; we expect this relationship to hold more generally.

Conjecture 4

Every graph G satisfies \({\text {dif}}(G)\le {\text {sum}}(G)\).

Finally, we turn to the results of Sect. 4. By non-constructive arguments mentioned in Sect. 1, we know there are graphs with \({\text {sum}}(G)=o(\epsilon (G))\). However, we cannot currently rule out the possibility that much more is true in the sense of Theorem 2.

Question 3

Do there exist graphs with arbitrarily large exclusive sum number and bounded sum index?