On the structure of additive systems of integers

A sum-and-distance system is a collection of finite sets of integers such that the sums and differences formed by taking one element from each set generate a prescribed arithmetic progression. Such systems, with two component sets, arise naturally in the study of matrices with symmetry properties and consecutive integer entries. Sum systems are an analogous concept where only sums of elements are considered. We establish a bijection between sum systems and sum-and-distance systems of corresponding size, and show that sum systems are equivalent to principal reversible cuboids, which are tensors with integer entries and a symmetry of ‘reversible square’ type. We prove a structure theorem for principal reversible cuboids, which gives rise to an explicit construction formula for all sum systems in terms of joint ordered factorisations of their component set cardinalities.


Introduction
The present paper concerns the relationship between sum-and-distance systems and sum systems, and their general structure, including a construction method for all such systems. Roughly speaking, a sum-and-distance system consists of several component sets of natural numbers such that the sums comprising one element, or its negative, of each set generate a prescribed target set, specifically an arithmetic progression. More simply, a sum system consists of several sets of non-negative integers such that the sums formed by choosing exactly one term from each set generate a sequence of consecutive integers. For the precise definitions, see Sect. 2 below.
Two-component sum-and-distance systems arise naturally when we consider square arrays of consecutive integers with certain symmetry properties. The algebraic properties of square matrices with different types of symmetries were recently explored in [4], also giving construction formulae for the various types. In that paper, the matrix entries were assumed to be general real numbers, allowing the symmetry classes to form direct summands in a Z 2graduation of the matrix algebra over R. However, an additional level of complication is introduced when we require the matrix entries to be integers or, more specifically, a consecutive sequence of integers, such as in a magic square or a principal reversible square [7].
A reversible square M is an n × n matrix with the properties of column and line reversal symmetry (R) and the vertex sum property (V) (see [4] and Eqs. (4.7), (4.1) in Sect. 4 below). Such a matrix also has the associated symmetry that any two entries in diametrically opposite positions with respect to the centre of the matrix add up to the same constant 2w (see [4], Lemma 7.1). Subtracting w from each matrix entry, we obtain a reversible square M 0 whose entries sum up to 0. If n = 2ν is even, it is then of the form ( [4] Theorem 7.2) where 1 ν ∈ R ν is the vector with all entries equal to 1, J ∈ R ν×ν is the matrix which has entries 1 on the anti-diagonal and 0 elsewhere, and a, b ∈ R ν are arbitrary vectors. If the reversible square M is to contain exactly the integers 1, . . . , n 2 , then the weight w can be found as the average of all entries, w = (n 2 + 1)/2; hence the weightless reversible square M 0 will have as entries the numbers − n 2 − 1 2 , − n 2 − 1 2 + 1, . . . , Considering that multiplication by J on the left or right just inverts the order of the rows or columns of a matrix, respectively, we find from (1.1) that the sums ± a j ± b k , with j, k ∈ {1, . . . , ν} and independently chosen signs, must generate each odd number from −n 2 + 1 to n 2 − 1 exactly once. In other words, the sets of entries of the vectors a and b form a two-component non-inclusive sum-and-distance system as defined in Sect. 2 below. If n = 2ν + 1 is odd, then the weightless reversible square M 0 will have the form ([4] Theorem 7.2) with vectors a, b ∈ R ν , and by the same reasoning as above, we find that, for the reversible square M to contain the integers 1, . . . , n 2 , the sums ± a j ± b k , where j, k ∈ {1, . . . , ν} and the signs are chosen independently, taken together with the entries ± a j , ± b j ( j ∈ {1, . . . , ν}), must generate exactly the integers 1, 2, . . . , (n 2 − 1)/2 and their negatives.
In other words, the sets of entries of the vectors a and b form a two-component inclusive sum-and-distance system, as defined in Sect. 2 below. As shown in Lemma 3.1 and Theorem 4.1 of [4] a 2ν ×2ν matrix M will have all rows and columns adding up to the same number, and also the associated symmetry described above, if, after subtracting the weight w, it has the form with matrices V , W ∈ R ν×ν whose rows add up to 0. Specifically, if ν is even and we choose vectors v, w with entries ± 1 which, for each vector, add up to 0, and further vectors a, b ∈ R ν , and set V = a v T , W = b w T , then the resulting matrix M (after adding the weight w = (n 2 + 1)/2) will be an associated magic square with entries 1, . . . , n 2 if and only if the sets of entries of a and b form a two-component non-inclusive sum-and-distance system. As a final example, we mention most perfect squares; these are square matrices of even dimensions which, in addition to having all rows and columns adding up to the same number, have the properties that all 2 × 2 submatrices have the same sum of entries, and that all pairs of entries half the matrix size apart on any diagonal add up to the same number. By [4] Theorem 6.2 any 2ν × 2ν most perfect square, with even ν, is, after subtracting the weight from each entry, of the form where a, b ∈ R ν are any vectors and § ν = (1, −1, 1, −1, . . . , 1, −1) T ∈ R ν . Again we see that M will have entries 1, . . . , (2ν) 2 if and only if the sets of entries of the vectors 2a and 2b form a two-component non-inclusive sum-and-distance system. Sum systems are conceptually simpler. They are directly related to reversible cuboids, the multidimensional analogues of reversible squares and rectangles, as shown in Theorem 4.5 below. Further, it is one of the results of the present study that sum systems are in one-to-one correspondence with sum-and-distance systems (Theorems 3.4, 3.5).
We remark that sum systems can be interpreted as discrete local coordinate systems for a set of consecutive integers, generalising the base q decimal representation. Indeed, the integers 0, 1, . . . , q m − 1 can be uniquely represented in the form m j=1 a j q j−1 , where a j ∈ {0, 1, . . . , q − 1}, so the sets form an m-component sum system in the sense defined in Sect. 2 below. Using this system as a basis, the m entries, one taken from each component set, which add up to a given number can be considered as that number's discrete coordinates. In general, sum systems will have a considerably more complicated structure than the above simple arithmetic progressions, and it is one of the main results of the present paper to provide a constructive description of the general sum system (see Theorem 6.7).
Research on some related topics has been undertaken previously, including the study of arithmetic progressions arising in the sum of two sets of integers [1,3]; comparing the sizes of the sum set and the difference set of a set with itself [5,6,8]; for an overview of this subject, see [2]. However, it seems that despite the simplicity of the concepts, sum systems and sumand-distance systems, as studied here, have not attracted much attention in the mathematical literature, and our present results are new.
The paper is organised as follows. After giving the definitions of sum-and-distance systems and sum systems in Sect. 2, we use a polynomial factorisation method to show in Sect. 3 that there is a one-to-one relationship between sum-and-distance systems and sum systems of suitable size. It is fairly straightforward to see that a sum-and-distance system generates a corresponding sum system, but the fact that every sum system arises in this way is not obvious. In Sect. 4, we explore the connection between m-component sum systems and m-dimensional principal reversible cuboids, which are generalisations of Ollerenshaw and Brée's principal reversible squares [7] from square matrices to more general order m tensors. This shows that the structure of sum systems (and hence, by means of the bijection, of sum-and-distance systems) can be fully understood in terms of the construction of principal reversible cuboids. In Sect. 5, we establish that the structure of the latter is essentially recursive, in the sense that any principal reversible cuboid arises from glueing offset copies of a maximal principal reversible subcuboid together. Finally, in Sect. 6 we show that, due to this recursive property, every principal reversible cuboid can be constructed by means of a chain of building operators with parameters arising from a joint ordered factorisation of the cuboid's dimensions, thus linking the structure of principal reversible cuboids with number theoretic properties of their sizes. As a result, we obtain the general structure of the component sets of sum systems as nested arithmetic progressions. We conclude with some examples which illustrate how sum systems and sum-and-distance systems arise from joint ordered factorisations.

Definition of sum-and-distance systems and sum systems
Arithmetic progressions play a central role in the present paper. We use the notation m := {0, 1, . . . , m − 1} for any m ∈ N, so the arithmetic progression with start value a, step size s and N terms can be expressed as s N + a (= {a, a + s, a + 2s, . . . , a + (N − 1)s}).
Note that we use the standard convention that A + B = {x + y : x ∈ A, y ∈ B} and a A + b = {ax + b : x ∈ A} for sets A, B ⊂ R and a, b ∈ R throughout. As usual, A − B = A + (−B). We write |M| for the cardinality of a finite set M. Definition 2.1 Let ν, μ ∈ N. We call a pair of sets {a 1 , . . . , a ν }, {b 1 , . . . , b μ } ⊂ N a (noninclusive) sum-and-distance system if The set of pairs is called an inclusive sum-and-distance system if The target set 2 2νμ + 1 = {1, 3, 5, . . . , 4νμ − 1}, for a non-inclusive sum-and-distance system, differs from 2νμ + ν + μ + 1 = {1, 2, . . . , 2νμ + ν + μ}, required for an inclusive sum-and-distance system, in that the former only has odd integers; this difference is motivated by the situations outlined above in which sum-and-distance systems arise, and the reason for it will be made transparent by Theorems 3.4, 3.5.
Sum-and-distance systems can be equivalently characterised by a target set of positive and negative numbers in the following way.
where the signs ± are chosen independently, so there are 8 elements of the set for each pair ( j, k).
Proof (a) The sums ± a j ± b k will give exactly the sums and absolute distances |a j ± b k | and their negatives −|a j ± b k |, so the resulting set will be the union of the target set of the non-inclusive sum-and-distance system with its negative; this can be written as the step-2 arithmetic progression on the right-hand side. (b) The sums ± a j ± b k give the same results as in (a), and including the elements ± a j and ± b k , we obtain the union of the target set of the inclusive sum-and-distance system with its negative. By adding the element 0 to the set, we can complete this to the arithmetic progression on the right-hand side.
The above lemma motivates the following generalisation.
We call a pair of sets A = {a 1 , . . . , a n 1 }, B = {b 1 , . . . , b n 2 } ⊂ N 0 a sum system if i.e. in explicit form, More generally, we call a collection of m sets Since the number 0 in the target set can only arise as a sum of 0s, as all numbers in the sets are non-negative, it follows that each component set of a sum system contains the number 0.

Correspondence between sum-and-distance systems and sum systems
Given a finite set M ⊂ N 0 , we can associate with it the polynomial More generally, for a finite set M ∈ Z, we have an associated Laurent polynomial (3.1) which may include negative powers. Specifically for the arithmetic progression M = s N + a, where s, N ∈ N and a ∈ N 0 , we find Clearly this polynomial has root 0 with multiplicity a; it is also evident that 1 is not a root, nor are the other sth roots of unity. Hence, to find the further roots of this polynomial, we may assume x s = 1 and observe that which shows that the non-zero roots of p s N +a are exactly the (s N )th roots of unity which are not sth roots of unity; in particular, they all lie on the complex unit circle.
The results of this section will rely on the following key observation.

Lemma 3.2 Let p be a polynomial with real coefficients and with all its roots situated on the complex unit circle. (a) If all roots of p are non-real, then p is palindromic and of even degree. (b) If all roots of p are non-real except for the simple root −1, then p is palindromic and of odd degree.
Proof (a) As the polynomial has real coefficients, its (non-real) roots come in complex conjugate pairs, say {r j , r j | j ∈ {1, . . . , m}}. Thus with 2m the degree of the polynomial, so p is palindromic. (b) The polynomial p can be factorised as p(x) = (x + 1)p(x), wherep only has non-real roots situated on the unit circle. Writing where d is the degree of the polynomial p, a straightforward calculation gives and hence it follows by recursion thatα j ∈ R ( j ∈ {0, . . . , d − 1}), since p has real coefficients. Therefore we can apply part (a) to find thatp is palindromic of even degree, . Hence p is of odd degree, and we deduce from so p is palindromic.
Using this result, we can show that the component sets of sum systems always have a palindromic structure, too, in the following sense.
Moreover, if all component sets A j have odd cardinality, then max A j is even for every j ∈ {1, . . . , m}; if at least one component set has even cardinality, then max A j is odd for exactly one j ∈ {1, . . . , m}.
Proof Denoting the elements of the set A j by a where we used the sum system property m k=1 A k = d in the penultimate step. This shows that the polynomials p A j form a factorisation of the polynomial on the right-hand side of (3.3). Now we distinguish between two cases.
if all d j are odd, then the polynomial on the right-hand side of (3.3) has no real roots; its roots are the non-real dth roots of unity. Hence, for any j ∈ {1, . . . , m}, p A j has only non-real roots situated on the complex unit circle, and it has real coefficients (in fact, coefficients in {0, 1}). Hence, by Lemma 3.2 (a), p A j has even degree and is palindromic, which gives the stated property for A j .
2nd case If at least one of the component set cardinalities d j is even, then d is even, so −1 is a (simple) root of the polynomial on the right-hand side of (3.3). Therefore exactly one of the polynomials p A j has the root −1; w.l.o.g. we may assume that p A 1 is this polynomial. Then for any j ∈ {2, . . . , m}, the same reasoning as in the first case shows that p A j has even degree and is palindromic, while, by Lemma 3.2 (b), p A 1 is palindromic of odd degree.
This observation allows us to establish the following bijection between sum-and-distance systems and sum systems.

Theorem 3.4 Let m ∈ N and suppose the non-empty sets
then the sets A 1 , A 2 , . . . , A m form an m-part non-inclusive sum-and-distance system.

Proof
We find for the set sum as the sum of the largest elements of the component sets of a sum-and-distance system gives the largest element of its target set.
For the converse, we note that for each j ∈ {1, . . . , m}, the component setÃ j of the sum system has palindromic symmetry by Theorem 3.3, i.e. its ordered elements satisfy Hence as required.
Proof In analogy to the proof of Theorem 3.4, we find the set sum For the converse, we use the fact that for each j ∈ {1, . . . , m}, the component setÃ j of the sum system has palindromic symmetry by Theorem 3.3, which gives (bearing in mind that α 1 = 0), and in particular 2α ν j +1 = α 2ν j +1 . Thus α 2ν j +1 = maxÃ j is even, which also follows from Theorem 3.3, as all component sets of the sum system have odd cardinality. Hence {1, . . . , ν}). Consequently, proving the claim.

Remark 3.6
Note that sum systems with odd cardinality throughout correspond to inclusive sum-and-distance systems, and the tight target set (containing consecutive integers) of the latter is related to the fact that the maximum of each component set of the sum system is even, as apparent from the proof of Theorem 3.5. However, sum systems with even cardinality do not have this property, and hence their corresponding non-inclusive sum-and-distance systems have a more sparse target set containing consecutive odd integers only. Thus the discrepancy between inclusive and non-inclusive sum-and-distance systems resolves into the simple dichotomy between odd and even cardinality of the component sets when considering the sum systems.
We remark further that at the level of sum systems, there is no reason to require that the components have all odd or all even cardinality. A sum system with mixed parity will, by the transforms given in Theorems 3.4 and 3.5, correspond to a hybrid inclusive/non-inclusive sum-and-distance system, but we do not pursue this correspondence further in the present study.

Principal reversible cuboids and sum systems
In this section we shall extend the definition of reversible square matrices, which can be considered as order 2 tensors, to general order m tensors. We use multiindex notation, i.e. tensor components are indexed by coordinate vectors k ∈ N m , which have a partial ordering given by The root element of the tensor (corresponding to the top left entry of a matrix) has index 1 m = (1, 1, . . . , 1) ∈ N m . We shall also use the standard unit vectors e j ∈ N m ( j ∈ {1, . . . , m}), where (e j ) l = δ jl ( j, l ∈ {1, . . . , m}), i.e. e j has jth entry 1 and all other entries 0.
For j < m, we call any subtensor where m − j indices are fixed while the remaining j indices vary in the range determined by n an order j slice of M.

Remark 4.2
Strictly speaking, the order of the tensor is |{ j ∈ {1, . . . , m} : n j > 1}| ≤ m, so it has order at most m. The order will be exactly m if n ∈ (N + 1) m . However, we allow n ∈ N m for ease of reference later.
The following is an extension of the vertex-cross sum property (V) of matrices which states that the two pairs of diagonally opposite corners of any rectangular submatrix add up to the same number [4].
Then the sets A 1 , A 2 , . . . , A m ⊂ N 0 , form an m-part sum system.

Proof
The statement follows from Lemma 4.4 when we note that the identity (4.2) will turn into and that the set of entries of M is equal to the target set for the sum system.
Conversely, given an m-part sum system and choosing the entries on the coordinate axes of M such that they satisfy (4.5) and M 1 m = 0, it is clear that defining the remaining entries via (4.6) will result in an order m tensor with property (V). In fact, M can be considered as an m-dimensional tabular representation of the sum system with a certain arrangement of the elements of each component set.
There is some freedom of choice in assigning the elements of the component sets of a sum system to tensor entries so as to satisfy (4.5), with only the constraint that M 1 m = 0. In order to establish a bijection, we introduce the following generalisation of Ollerenshaw and Brée's definition of a principal reversible square [7]. Definition 4. 6 We call an order m tensor M ∈ N n 0 , n ∈ (N + 1) m , m ∈ N , a principal reversible m-cuboid if M has property (V), its set of entries is and for every j ∈ {1, . . . , m}, every row in the jth direction is arranged in strictly increasing order, i.e. M k < M k+le j (k ∈ N m , 1 ≤ l ≤ n j − k j ).
Putting the elements of the sum system component A j onto the jth coordinate axis of M, we obtain the following relationship by virtue of Theorem 4.5.

Corollary 4.7 Let m ∈ N.
There is a bijection between the principal reversible m-cuboids with dimension vector n ∈ (N + 1) m and the m-part sum systems A 1 , . . . , A m with cardinalities |A j | = n j ( j ∈ {1, . . . , m}).
In conjunction with Theorem 3.3, this shows that principal reversible m-tensors also have a generalised form of the row and column reversal symmetry (R) defined for matrices [4], as follows. 2) The following observation shows that for any subcuboid (containing the root element) M If the cuboid in Lemma 5.2 arises by truncating a principal reversible subcuboid in one direction only, the smallest missing integer must appear on the axis of the direction of truncation, since the other directions would lead outside the larger enclosing principal reversible subcuboid.
The following statement gives an extension of this beyond the confines of the principal reversible subcuboid.
Then μñ +k 0 e j = a j,k 0 + m i=1ñ i .
Proof By definition, μñ +k 0 e j is the smallest positive integer not in the set {Mn :n ≤ñ+k 0 e j }. Since, by Lemma 5.1, {Mn :n ≤ñ} = m i=1ñ i , we have in fact that μñ +k 0 e j is the smallest positive integer not in the set using (5.2) in the first and the hypothesis of the Lemma in the second equality. Taking the minimum on both sides, we find μñ +k 0 e j = μñ +(k 0 −ñ j )e j + m i=1ñ i . Corollary 5.3 gives μñ +(k 0 −ñ j )e j = a j,k 0 , and the statement follows.
The following lemma provides the key to understanding the structure of principal reversible cuboids. Essentially it shows that, starting from a principal reversible subcuboid, finding the entry of M giving the next integer in sequence and adding the slice in the corresponding direction to the subcuboid, and continuing in this way, the next integer in sequence will always be found in the same direction as the previous one, until the addition of slices has completed a larger principal reversible subcuboid (or exhausted M). Thus the next integer in sequence can only appear in a new direction if the starting point is a complete principal reversible subcuboid, not a general subcuboid.
Proof Applying Lemma 5.4 recursively to k 0 ∈ {1, . . . , K }, we find that a j,ñ j +K −1 = μñ +(K −1)e j = a j,K −1 + Hence the slice of M with indicesn i ≤ñ i (i = j),n j =ñ j + K has entries ⎫ ⎬ ⎭ using (5.2). Now suppose that μñ +K e j = a j,ñ j +K . By Lemma 5.2, there is then l ∈ {1, . . . , m}, l = j, such that μñ +K e j = a l,ñ l . This means [again by (5.2)] that the slice of M with indicesn i ≤ñ i (i = l),n l =ñ l + 1 has entries As the index sets appearing in the definitions of S 1 and S 2 are disjoint and all entries of M are different, it follows that Settingk j :=ñ j − 1 − k j ∈ ñ j , this equation can be written in the form By the reversal symmetry of the principal reversible subcuboid M [ñ] (Theorem 4.8), the numbers 0 = a j,0 < a j,1 < · · · < a j,ñ j −1 have the property a j,ñ j −1 = a j,r − a j,ñ j −1−r (r ∈ ñ j ), so in particular a j,ñ j −1−k j = a j,ñ j −1 − a j,k j and a j,ñ j −K = a j,ñ j −1 − a j,K −1 . Hence Eq. (5.4) is equivalent to Taking into account (5.3), we hence find S 2 a l,ñ l + a j,k j = μñ +K e j + a j,k j = a j,K −1 + m r =1ñ This contradicts the fact that S 1 and S 2 are disjoint. By minimality of M [ñ] , the principal reversible cuboid M must be composed of a number of complete offset copies of it to contain a complete arithmetic sequence. Hence it follows thatñ j is a divisor of n j .
6 Building operators and joint ordered factorisations Theorem 5.7 has shown that every principal reversible cuboid, except the trivial (0) ∈ N 1 m 0 , is composed of shifted copies of a smaller principal reversible cuboid, stacked in one of the m directions. By recursion, this observation gives a description of principal reversible cuboids which can be used to construct them. In order to make the construction more transparent, we introduce building operators which describe the stacking process.
We shall use the following notation. For k ∈ N, we denote the arithmetic progression vector by Moreover, for m ∈ N and any multiindex n ∈ N m , we write 1 [n] for the cuboid with dimension vector n and all entries equal to 1.
If m = 1, then this product turns into the standard Kronecker product of the vectors v ∈ N k 0 and w = M ∈ N n 1 0 , i.e.
This product is obviously bilinear.

Lemma 6.2
The direction j Kronecker product is associative, i.e. for k 1 Proof For anyn ≤ n and l = l 1 k 2 + l 2 ∈ k 1 k 2 , l 1 ∈ k 1 , l 2 ∈ k 2 , we find as required. Definition 6.3 Let k, m ∈ N, j ∈ {1, . . . , m}. Then we define the building operator B j,k as the operation which turns any cuboid M ∈ N n 0 , n ∈ N m , into The following observation shows that the composition of two building operators working in the same coordinate direction is just one building operator. Lemma 6.4 Let k 1 , k 2 , m ∈ N and j ∈ {1, . . . , m}.
using Lemma 6.2 in the penultimate line.
Applying this setup in conjunction with Theorem 5.7, we can deduce the following structure theorem for principal reversible cuboids.
Proof Using the building operator defined above, the statement of Theorem 5.7 can be paraphrased in the following way. There is some j ∈ {1, . . . , m} and f ∈ N, f |n j , such that is again a principal reversible cuboid. Unless this is the trivial cuboid (0) ∈ N 1 m 0 , we can again apply Theorem 5.7 to it, and thus recursively obtain the building operator chain in (6.1). The last statement reflects Lemma 6.4, which allows fusion of consecutive building operators in the same direction into one. Theorem 6.5 shows that principal reversible cuboids are obtained from building operator chains; the coefficients of such a chain arise from factorising the individual dimensions n j ( j ∈ {1, . . . , m}) of the principal reversible cuboid, and arranging the factors in a sequence such that consecutive factors in the sequence belong to different coordinate directions.
Note that in the special (and untypical) case m = 2, this condition (which corresponds to the last sentence in Theorem 6.5) enforces alternation of directions j 1 = 1, j 2 = 2, j 3 = 1, j 4 = 2, etc. (or the analogue starting with j 2 = 2), ending with either the same or the other direction depending on whether L is odd or even. If n 1 = n 2 and we start with j 1 = 1, this gives a building operator chain equivalent to Ollerenshaw and Brée's construction of principal reversible squares [7]. However, if m > 2, then the possible patterns are considerably more complex. Definition 6.6 Let m ∈ N and n ∈ N m . Then we call where L ∈ N, a joint ordered factorisation of n = (n 1 , . . . , n m ) if and j l = j l−1 (l ∈ {2, . . . , L}).
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.