Bounded Degree Spanners of the Hypercube

In this short note we study two questions about the existence of subgraphs of the hypercube $Q_n$ with certain properties. The first question, due to Erd\H{o}s--Hamburger--Pippert--Weakley, asks whether there exists a bounded degree subgraph of $Q_n$ which has diameter $n$. We answer this question by giving an explicit construction of such a subgraph with maximum degree at most 120. The second problem concerns properties of $k$-additive spanners of the hypercube, that is, subgraphs of $Q_n$ in which the distance between any two vertices is at most $k$ larger than in $Q_n$. Denoting by $\Delta_{k,\infty}(n)$ the minimum possible maximum degree of a $k$-additive spanner of $Q_n$, Arizumi--Hamburger--Kostochka showed that $$\frac{n}{\ln n}e^{-4k}\leq \Delta_{2k,\infty}(n)\leq 20\frac{n}{\ln n}\ln \ln n.$$ We improve their upper bound by showing that $$\Delta_{2k,\infty}(n)\leq 10^{4k} \frac{n}{\ln n}\ln^{(k+1)}n,$$where the last term denotes a $k+1$-fold iterated logarithm.

One particular distance-preserving property that has received much attention in the past is that of an additive spanner. We say a subgraph G ⊂ Q n is a k-additive spanner if dist G (x, y) ≤ dist Qn (x, y) + k for any two vertices x, y ∈ {0, 1} n . Constructions of additive spanners with few edges and/or low maximum degree have attracted considerable attention in computer science in the past, see e.g. [1,9,10,11,12,16,15] and the many references therein.
Arizumi-Hamburger-Kostochka [3] denoted by ∆ k,∞ (n) the minimum possible maximum degree of a kadditive spanner of Q n . Note that since Q n is bipartite, by deleting edges the distance can only grow by an even amount. They showed that for k ≥ 2 and n ≥ 21 we have n ln n e −4k ≤ ∆ 2k,∞ (n) ≤ 20 n ln n ln ln n.
Their lower bound is a short argument given by counting the vertices of a certain distance from a fixed vertex, and their upper bound is an explicit construction. Our second result is an improvement of their upper bound on this problem. Theorem 1.3. For all n sufficiently large and k ∈ N, there exists a 2k-additive spanner of the hypercube with maximum degree at most 10 4k n ln (k+1) n ln n .
Note here that ln (k+1) n is the k + 1-times iterated logarithm, defined by ln (1) n = ln n and ln j+1 n = ln ln (j) n .
We prove Theorem 1.2 in Section 2 and prove Theorem 1.3 in Section 3. Some open questions and further directions of study are given in Section 4.

Bounded degree subgraph preserving diameter
In the present paper, a perfect code will always mean a perfect 1-error-correcting code over the alphabet {0, 1} with codewords having length n. We say that C is a perfect 1-error-correcting code if any two codewords have Hamming distance at least three, and moreover the radius one Hamming balls centered on the codewords partition the whole space {0, 1} n . Note that the number of codewords in a perfect code C is |C| = 2 n n+1 . Perfect codes exist whenever n = 2 r − 1 for some r ∈ N, see e.g. [14]. We will use the fact that for all n = 2 r − 1, r ∈ N, it is possible to partition the space {0, 1} n into n + 1 perfect codes (see e.g. [14], p. 15.).
In this section we prove Theorem 1.2. We first need the following technical lemma.
Lemma 2.1. For all n there is a subset S of vertices of Q n with the following two properties.
• Every vertex of v is either in S or adjacent to a member of S.
• Every vertex of v is adjacent to at most 2 vertices in S.
We refer to such a subset of vertices S of Q n as a nearly perfect code.
Proof. Note that for n = 2 k − 1 the result follows from the existence of perfect codes. For other values of n let k be such that n is between 2 k − 1 and 2 k+1 − 1 and divide the n coordinates into 2 k − 1 buckets of size at most 2. Now take a perfect code C of Q 2 k −1 . We define S by taking the sum in F 2 of each bucket and take the points whose image under this transformation is in the perfect code of Q 2 k −1 . It is now straightforward to verify that S satisfies the necessary conditions. Indeed, given any w ∈ Q n , consider the word u ∈ Q 2 k −1 obtained from by by taking the sum in F 2 of each bucket. Then u is either in C or adjacent to some u ′ in C. In the first case w ∈ S and w is not adjacent to any other element of S. In the second case w is adjacent to exactly all those w ′ ∈ C which agree with w everywhere except on the block which corresponds to the bit in which u and u ′ differ. Moreover on this block w ′ has different parity from w. Since all blocks have length at most 2, we conclude that w is adjacent to at most two members of S.
We now proceed first by proving a weaker version Theorem 1.2 which only requires preserving the distance between antipodes. We say two vertices are antipodal if they differ on all n coordinates.
., and (0, . . . , 0, 1), i.e. all vertices with coordinates having all 0's and then followed by 1's or having all 1's and then followed by 0's . Note that these points form a cycle C of length 2n in Q n such that there are n pairs of antipodes along this cycle. In particular, if a vertex is on C then there is a path of length n from this vertex to its antipode using only edges of C.
The construction of H is to translate this 2n-cycle C by the appropriate nearly perfect code so that every vertex is contained in one of these cycles. By the above discussion, if some vertex is on a translate of C then so is its antipode and therefore their distance in H is n.
Let (e i ) n i=1 be the standard basis vectors in F n 2 and for 1 ≤ k ≤ n define f k as Note that the vectors f i form a basis of F n 2 and that the vertices of the cycle C are exactly 0, f 1 , . . . , f n , f n − f 1 , f n − f 2 , . . . , f n − f n−1 . Now consider a nearly perfect code S ′ in the basis of the f i vectors and all the translates s + C where s ∈ S ′ . First note that every element is contained in at least one cycle as we have translated 0 by a nearly perfect code in the f i basis and all basis vectors f 1 , . . . , f n are in the cycle. To see that no vertex however is in more than five cycles consider the element s ∈ S ′ so that v ∈ s + C. Then it follows that v = s, s + f j , or s + f n − f j for some j and therefore s = v, v − f j , or v − f n + f j . Thus s is either v, a neighbor of v, or a neighbor of v − f n and by the definition of nearly perfect codes we have that every vertex is either in the code or next to at most two other code words we have that every vertex is in at most 5 cycles and hence has degree at most 10.
We now use Lemma 2.2 to complete the proof of Theorem 1.2; note that the fact that the construction comes from a union of these antipodal cycles plays a critical role in Theorem 1.2.
Proof. For n ≤ 100 note that taking Q n suffices. Otherwise define n i such that n = 4 i=1 n i , n i = ⌊ n 4 ⌋ or n i = ⌈ n 4 ⌉, and n i ≥ n j for i ≤ j. Now associate Q n with its representation on {0, 1} n and divide the coordinates in blocks B 1 , B 2 , B 3 , B 4 with B i having block size n i . Finally for each vertex v define v i to be restriction of v to the block B i .
We first assign a vertex v its neighbors based only on its restrictions v i . Consider H i that is a subgraph of Q n i coming from Lemma 2.2. Now consider an almost equal partition, M i , of [n] \ B i into n i parts. As n ≥ 100, note that every part has size at most four. Now as one walks along each of the antipodal cycles of size 2n i in H i assign to each vertex a part of M i such that any path between antipodes covers all parts of the partition M i . (In order to do so simply order the partition M i and assign its parts cyclically along the cycles of H i .) We now define the neighbors of v by considering its restriction to v i for each i and keeping the neighbors in the directions which v i has in H i plus the neighbors in the directions of the part of the partition M i of [n] \ B i to which it was assigned. This is the desired subgraph G if the hypercube.
We first verify that the max degree of G is at most 120. First note that since the H i have max degree at most 10 and we have four parts the contribution to each vertex v ′ s degree from the H i is bounded by 40. Furthermore since each part of M i has size at most four, there are at most four edges outgoing from v due to this part. Since every vertex was on at most five cycles in H i , the total number of edges outgoing from v due to the partition of [n] \ B i into n i parts is at most 5 · 4 = 20. The only subtlety is now to account for edges incoming to v from each of the partitions of [n]/B i . But note that for such edges v to w we have v i = w i and therefore this relationship is in fact symmetric unlike the asymmetric description. Therefore the total degree count is 40 + 4(20) = 120.
Finally we demonstrate that G is diameter n. Consider two vertices v and w such that v i and w i match on exactly k i coordinates. Suppose that k 1 ≤ k 2 ≤ k 3 ≤ k 4 ; the other cases are handled in an analogous manner. In order to "fix" v we first proceed along the cycle in H 1 to v 1 's antipode in order to obtain x. Along the way we can adjust the coordinates in B 3 and B 4 so that x 3 = w 3 and x 4 = w 4 while x 2 is the antipode of w 2 . Note that we take n 1 steps along H 1 , k 2 to change the coordinates in B 2 appropriately, and n 3 − k 3 + n 4 − k 4 steps to fix B 3 and B 4 . We now walk from x 2 to w 2 along H 2 and along the way fix H 1 so that it now matches x 1 . This takes k 1 steps to fix B 1 to w 1 and n 2 to fix B 2 to w 2 . Therefore the total number of steps is 3 k-additive Spanner of the Hypercube The main goal of this section is to prove Theorem 1.3 by constructing a 2k-additive spanner of the hypercube with small maximum degree. For the sake of clarity various floor and ceiling symbols will be omitted.
The key idea is to essentially iterate the construction in [3] which achieves this result for the k = 1 case (with a slightly better constant).
Proof. We build the construction iteratively as k increases. We will maintain the following invariant for the 2k-additive spanners: for any pair of points which are distance ℓ apart there is a path connecting them of length at most ℓ + 2k whose vertices have at least ℓ 32 k+1 different coordinate sums. For k = 0 the construction is taking the entire hypercube graph Q n . This satisfies the necessary maximum degree condition and will serve as the base case for this induction on k. Note that in Q n between any two points at distance ℓ we may first flip all necessary zero coordinates to ones and then all required ones to zeros, ensuring the existence of a path of length ℓ whose vertices have at least ℓ/2 different coordinate sums. For the remainder of the proof we divide the coordinates into two groups.
• B 1 , . . . , B t will be an almost equal partition of the remaining n − q coordinates into t = ln n·ln (k) n 900(ln (k+1) n) 2 blocks.
We define an additional parameter s to be s = ln n 10 ln (k+1) n . The construction now has three distinct parts.
• Define H 1 to be subgraph created by including all edges in directions in B 0 for every vertex in Q n . That is, two adjacent vertices x, y ∈ Q n are connected by an edge in H 1 precisely if they differ in only one of the first q coordinates and nowhere else. Note that H 1 is a vertex-disjoint union of 2 n−q copies of Q q .
• We now define the subgraph H 2 . Since q = 2 r − 1, as remarked at the beginning of Section 2, we can partition each disjoint copy of Q q in H 1 into perfect codes D • We now define H 3 . First divide B 1 , . . . , B t into groups of size j = 500 k t s ; label these A 1 , . . . , A s/500 k . Now for each vertex x which belongs to a D i with i ≤ t s , let B x := B i 1 ∪. . .∪B is where {i 1 , . . . , i s } = f (D i ) as above. Next, let s x := i∈Bx x i . Take this coordinate sum s x mod s/500 k , call this s ′ , and for the vertex x only include edges in directions Note that in H 2 and H 3 the edges are (implicitly) "directed" from one vertex to another. However one can verify that the definitions are symmetric in both cases. First consider H 2 . Note that if a vertex y agrees with x on every coordinate outside of B x then in particular they agree on the first q coordinates used to define the sets D i . Therefore we have that x and y belong to the same D i and thus B x = B y . Hence in the construction of H 2 when we consider y we include the same 2(k − 1)-spanner construction on B x as we did when considering the vertex x.
Next consider H 3 . If x is connected to y in H 3 this implies that the coordinate on which y differ from x lies outside of B x and also outside of the set of the first q coordinates. Therefore, both x and y belong to the same set D i , B x = B y , and also s x = s y . So in both cases the value of s ′ is the same, hence in the construction of H 3 we included edges touching x and y in precisely the same directions.
The desired subgraph of Q n is simply H = H 1 ∪ H 2 ∪ H 3 . We first verify that the subgraph H 2 is well defined in that the desired bijection f indeed exists.
for all k and for n sufficiently large.
Proof. We proceed by induction on k. Note that for k = 0 this statement is trivial. For larger k note that the maximum degree in H 1 is at most √ n, the maximum degree in H 2 is upper bounded, using the induction hypothesis for the 2(k − 1)-spanner on (n − q) · s t coordinates, by The maximum degree in H 3 is at most 500 k n s for n sufficiently large. Now note that s t = 90 ln (k+1) n ln (k) n and so √ n + 10 4(k−1) n · s t ln (k) n · s t ln n · s t + 500 k n s ≤ 10 4k n ln (k+1) (n) ln(n) for n sufficiently large as desired.
We first prove that it suffices to consider pairs of vertices whose coordinates match along B 0 due the presence of the subgraph H 1 . Proof. Consider an arbitrary pair of vertices x and y. Let x ′ such that the first |B 0 | coordinates of x ′ match y and the rest match x. Note that d H (x, x ′ ) = d Qn (x, x ′ ) and that x ′ and y satisfy the condition of the hypothesis. Therefore and the result follows.
We now finally prove that H is a 2k-additive spanner. Recall that we are maintaining the invariant, that for any pair of points which are distance ℓ apart there is a path whose length is at most ℓ + 2k and whose points have at least ℓ 32 k+1 different coordinate sums. Furthermore note that the previous lemma does not interfere with this invariant; if the initial points differed in more than ℓ 2 coordinates in B 0 then by applying the above mentioned procedure of first flipping 0 to 1 and then 1 to 0 we get a path with whose vertices give at least ℓ 2 /2 = ℓ 4 different coordinate sums which is sufficient. Otherwise, the points differ by at least ℓ/2 coordinates outside of B 0 . Therefore it is enough to maintain the invariant that among points with coordinates that match in |B 0 | and are of distance ℓ, there is path of whose vertices give ℓ 16·32 k coordinate sums. We now consider two cases. Case 1: Suppose that x and y differ on at most s coordinates. Then there exist {i 1 , . . . , i s } such that the set of differences is contained inside B i 1 , . . . , B is . Let D := f −1 ({i 1 , . . . , i s }). First we go from x and y to the closest points, call these points x ′ and y ′ respectively, in the perfect code D using edges in H 1 . Note that since x and y agree in the coordinates in B 0 , so do x ′ and y ′ . Now walk from x ′ to y ′ using edges of the 2(k − 1)-spanner used to construct H 2 and adjust the necessary bits in B i 1 , . . . , B is . This can be done because x ′ and y ′ only differ in coordinates in B i 1 , . . . , B is and by the definition of 2(k − 1) spanner the length of this path is by at most 2(k − 1) larger than their distance in Q n . Therefore, the length of the path that we construct from x to y is at most d Qn (x, y) + 2(k − 1) + 2 = d Qn (x, y) + 2k. Moreover we can maintain the invariant regarding coordinate sums by invoking the inductive hypothesis and noticing that d Qn (x, y) = d Qn (x ′ , y ′ ).

Case 2:
Suppose that x and y differ on more than s, say ℓ, coordinates. Then find sets B i 1 , . . . , B is such that x and y differ by at least s coordinates in B i 1 ∪ . . . ∪ B is . We consider two separate situations.
• Suppose that B i 1 , . . . , B is contain more than ℓ 5 of the coordinate differences. In this case again we first move from x and y to the closest points x ′ and y ′ (respectively), in the perfect code D = f −1 (i 1 , . . . , i s ) using edges in H 1 . Then we use the edges in H 2 and the path given by the inductive hypothesis to change coordinates of x ′ so that it agrees with y ′ on B i 1 ∪ . . . ∪ B is .
However when we visit the vertices which give us the first ℓ 10·32 k coordinate sums out of the ℓ 5·32 k which is guaranteed by the inductive hypothesis, we keep them to satisfy the inductive hypothesis regarding coordinate sums, and we use the vertices with the remaining ℓ 10·32 k coordinate sums to access all the blocks outside of B i 1 ∪ . . . ∪ B is and use the subgraph H 3 to fix the differences between x ′ and y ′ . More precisely, every time we take a step using H 2 in a direction in B i 1 ∪ . . . ∪ B is to reach the point whose sum of the coordinates gives us a new residue modulo s/500 k we check if there are any coordinates we can fix using H 3 , and fix them. As ℓ 10·32 k ≥ s 500 k we will see all the residues modulo s/500 k and so eventually we will be able to fix all the blocks using H 3 . Note here that we only lost distance 2 in moving to x ′ and y ′ and distance 2(k − 1) in making x ′ equal to y ′ on B i 1 ∪ . . . ∪ B is . We did not lose any distance anywhere else.
• Finally suppose that B i 1 , . . . , B is contains less than ℓ 5 of the differences. In this case we have that x and y differ on at least 4ℓ/5 coordinates outside of B i 1 ∪ . . . ∪ B is . Again, we first move into the points x ′ and y ′ in the perfect code D = f −1 (i 1 , . . . , i s ) and start fixing the coordinates in B i 1 ∪ . . . ∪ B is using H 2 and the path given by the inductive hypothesis. Since x and y differ on at least s coordinates in B i 1 ∪ . . . ∪ B is , the vertices of this path have at least s/32 k different coordinate sums. We fix the coordinates outside of B i 1 ∪ . . . ∪ B is in a similar way as in the previous case: after every step we take in H 2 we try to fix as many coordinates as possible using edges in H 3 . However the one difference in this case is, that during the stretch of s 32 k ≥ 2 · s 500 k different coordinate sums we encounter while walking in H 2 , we use the first half of them to fix all those coordinates where x is zero and y is one, and we use the second half to map all 1 to 0. At least one of these halves has length greater than 2ℓ 5 , let us assume without loss of generality that it is the half where we change the zeros in x to ones. During these at least 2ℓ 5 steps, the sum of coordinates increases by +1 each time. However, we have no control over the steps that we take in H 2 , they can both increase and decrease the coordinate sum by 1. We have taken at most ℓ 5 + 2(k − 1) steps in H 2 , so this part of the path has to give at least 2ℓ 5 − ℓ 5 + 2(k − 1) ≥ ℓ 10 different coordinate sums. This allows us to maintain the desired invariant and walk between x and y in the required length.

Concluding remarks and open questions
The effect of the removal of a set of vertices or edges from computer networks, corresponding to broken connections, processors or inaccessible agents, are of major interest in the study of vulnerability of networks. Parameters that measure changes given by such breakdowns lead to many interesting open problems [4,5], from which we only mention a few here.
The integrity I(Q n ) of the hypercube is defined as where m(H) denotes the number of vertices in the largest connected component of H. It is known (see [7,8]) that c 2 n √ n ≤ I(Q n ) ≤ C 2 n √ n log n, and determining the precise asymptotics would be of interest.
The second problem we have already hinted at in the introduction.
Question 4.1 (Erdős-Hamburger-Pippert-Weakley [13]). What is the least possible number of edges in a graph G ⊂ Q n that has diameter n?
They observed that there is such a graph G ⊂ Q n with 2 n + n ⌊n/2⌋ − 2 edges: between each pair of consecutive layers [n] k and [n] k+1 of the hypercube, fix a matching covering the larger layer. We have the following lower bound on Question 4.1: Proposition 4.2. If G ⊂ Q n has diameter n then e(G) ≥ 2 n + Θ 2 n n .
Proof. Let G ⊂ Q n be a subgraph with diameter n. First we show that G has minimum degree at least 2. Indeed assume v is a leaf, connected only to vertex u. Let u ′ denote the antipodal vertex to u. Then the distance of v and u ′ in G is at least n + 1, contradicting the fact that G has diameter n.
Next, fix an arbitrary vertex v and consider a BFS tree T rooted at v. Since G has diameter n, the tree T has at most n + 1 layers (the first layer being the single vertex v) and hence has a layer L of size at least 2 n −1 n . Note that below each vertex of L there is a distinct leaf, so T has at least 2 n −1 n leaves. Since in G every vertex has degree at least two, there must exist at least 2 n −1 2n edges that are in G but not in T . Hence e(G) ≥ e(T ) + 2 n − 1 2n = 2 n + 2 n − 1 2n − 1.
A question in the same spirit as Question 4.1 concerns 2-additive spanners. Denote by f 2 (n) the fewest possible edges in a graph G ⊂ Q n that is a 2-additive spanner, that is, d G (x, y) ≤ d Qn (x, y) + 2 for all x, y.