Manuscript Offprint
arXiv:2611.06747Fixed-Radius Neighbourhoods in Three-Dimensional Unit-Cube Graphs
Abstract
We prove Conjecture 4 of Chan, Chang, Gao, Kisfaludi-Bak, Le, and Zheng (SoCG 2026): for every fixed integer , the radius- neighbourhoods of a unit-cube graph in have bounded VC-dimension. Our bound is , independent of the number of vertices. The main ingredient is a VC-dimension bound for reachability through arbitrary fixed-length sequences of three-dimensional generalized dominance relations. Its proof uses groups ordered in two coordinates, with neighbouring groups acting as barriers that preserve this invariant when one layer is removed. Combining these bounds with the existing interval-representation framework, we obtain a Las Vegas algorithm that, for every fixed integer , decides whether a graph given by cube centres has diameter at most in expected time, for an explicit constant . Finally, for every integer , we construct unit-cube graphs with rational centres whose radius- neighbourhoods have VC-dimension .
Keywords and phrases Unit-cube graphs, VC-dimension, graph diameter, geometric range searching
1 Introduction
The diameter of a graph is the largest distance between two of its vertices. For geometric intersection graphs, the input is a collection of objects, and two vertices are adjacent when their objects intersect. Such a graph may have quadratically many edges. A truly subquadratic algorithm must therefore avoid constructing all edges.
Recent work has established a close connection between diameter computation and the VC-dimension of graph neighbourhoods. Chang, Gao, and Le [4] proved a bound of four for the distance VC-dimension of pseudo-disk graphs and used it to obtain an additive approximation for the diameter of unit-disk graphs. Chan, Chang, Gao, Kisfaludi-Bak, Le, and Zheng [2] subsequently gave truly subquadratic algorithms for exact diameter in unit-disk graphs and intersection graphs of axis-aligned squares. Their framework combines bounds on VC-dimension with implicit representations of reachable sets.
In three dimensions, the known hardness results leave open the fixed-threshold regime. Bringmann, Kisfaludi-Bak, Künnemann, Nusser, and Parsaeian [1] proved conditional quadratic lower bounds for diameter in unit-cube graphs using a construction whose diameter grows with the input size. This leaves room for a truly subquadratic algorithm for each fixed threshold. The authors in [3] obtained such algorithms for thresholds two and three and proved bounded VC-dimension for radius-two and radius-three neighbourhoods. Conjecture 4 of their paper asks whether bounded VC-dimension persists for every fixed radius. We answer this question by giving a reachability bound that applies to an arbitrary fixed number of layers.
Fixed-Radius Neighbourhoods in Unit-Cube Graphs
with distance infinity between different components. Write
A family shatters a set if its traces comprise every subset of . Its VC-dimension is the largest size of a shattered set. Throughout, the radius is fixed when defining the neighbourhood set system.
► Theorem 1 (Resolution of Conjecture 4 in [3]). For every fixed integer , the radius- neighbourhoods of three-dimensional unit-cube graphs have bounded VC-dimension. More precisely, , independently of the number of vertices.
The bound yields an algorithm for every fixed diameter threshold.
► Theorem 2. For every fixed integer , there is a Las Vegas algorithm that, given cube centres, decides whether in expected time
on the real RAM, for an explicit constant .
After handling directly, applying this decision algorithm to the thresholds computes the exact diameter of graphs whose diameter is at most a fixed constant . Our results extend the bounded-VC-dimension and truly subquadratic decision results of [3] from radii and thresholds two and three to every fixed radius and threshold. For thresholds two and three, the specialized algorithms in [3] are faster. Our final result quantifies the dependence of VC-dimension on the radius.
► Theorem 3. For every integer , there exists a unit-cube graph with rational cube centres containing a set of
vertices shattered by its radius- neighbourhoods. Consequently, .
Explicit bounds.
For , define
The proof of Theorem 1 gives . Also, . For Theorem 2, we may take
For example, , and threshold four can be decided in expected time . Appendix C gives the arithmetic for these explicit estimates.
Proof ideas.
Our main technical contribution is a VC-dimension bound for reachability through arbitrary fixed-length sequences of generalized dominance relations in three dimensions. The grid reduction of [3] turns cube intersection between two fixed unit cells into such a relation. A prescribed cell path then gives a layered system, with one relation for each step. We prove a stronger statement for groups of starting points that are strictly ordered in two coordinates. This formulation lets us remove the first layer and treat the possible successors as new groups.
In each group, we choose a point minimizing the remaining coordinate. After passing to a monotone subsequence of representatives, we retain the even groups. The odd groups act as barriers: if none of them can reach an endpoint, a first step on a path to that endpoint must lie in two specified coordinate intervals. The relevant successors are covered by three fixed families, one for each coordinate pair. Each family has two ordered coordinates, so induction and trace counting apply. Section 2 gives the full argument and the reduction to cube neighbourhoods.
Applying the interval-representation approach of [2] with these reachability bounds gives the fixed-threshold diameter algorithm. For each starting cell, one order of its vertices serves all cell paths and all their prefixes. The reversed reachability bound controls membership patterns and hence the total interval complexity in this order. Coloured orthogonal range queries propagate the intervals exactly. Section 3 gives the implementation and the explicit exponent, with the data structures proved in Appendix D.
For the lower bound, we use the label-encoding mechanism of [1] on a three-dimensional branching tree with many equal-depth leaves. At scale , this tree has leaves and depth . The labels produce one witness for each subset of the leaves, and the common depth makes all witnesses use the same radius. Section 4 explains the geometric realization and the exact distances. Appendix E gives its complete verification.
2 Reachability through dominance relations
We first study paths whose successive edges are defined by coordinate comparisons. These are the generalized dominance relations used in [3]. The main step is an induction for groups of starting points that are ordered in two coordinates.
2.1 Layered systems and ordered groups
A layered system of length consists of finite sets and relations between and , for . Each relation is the conjunction of three coordinate conditions. In each coordinate, the condition is one of , , , , or the condition that is always true, denoted by . The choices are fixed for each relation. Points in different layers are regarded as distinct copies, even if their coordinates agree. We write if there are points with , , and for every . For , this means .
Let be fixed groups of points. They have two ordered coordinate bands if there are distinct coordinates with the following property. For each , either
or all these inequalities are reversed. The directions in coordinates and may differ. Empty groups are allowed. Each endpoint defines a range on the group labels,
Fixed-Radius Neighbourhoods in Unit-Cube Graphs
We use three elementary facts. The first permits us to work with strict comparisons. The other two provide the counting step of the induction: the Sauer–Shelah–Perles bound [7, 8] and the Erdős–Szekeres monotone subsequence lemma [6]. Coordinate normalization and the classical trace bound are proved in Appendices A and B. We give the remaining counting arguments here.
► Lemma 4 (Coordinate normalization). A finite layered system can be represented so that the point values in each coordinate are distinct and every coordinate condition is strict or , while preserving every adjacent-layer relation. Any prescribed strict coordinate orders within a layer can also be preserved. If , we can further make the first relation strict dominance, if and only if for all three coordinates . This last operation preserves ordered bands, possibly reversing their directions.
The lemma has two stages. The perturbation preserves prescribed strict coordinate orders. The subsequent normalization of the first relation uses translations and reflections. It preserves the ordered-band property, although a reflection may reverse its direction. Both stages preserve every adjacent-layer relation, and hence every layered path.
► Lemma 5 (Trace counting). Let be an integer. A set family of VC-dimension at most has at most traces on any elements. If , the unions obtained by choosing one set from each of three fixed families of VC-dimension at most do not shatter 18g elements.
Proof of the three-family assertion. Fix a sample of elements. Since for , the trace bound and the binomial theorem give at most
traces for each family. For the strict inequality, use
Indeed, for , with strict inequality for , and . A union of three sets is determined by the ordered triple of their traces. The three families therefore produce fewer than unions on the sample. Since , this is less than . Hence the unions cannot shatter the sample.
► Lemma 6 (Monotone subsequences). For every integer , a sequence of more than distinct real numbers has a strictly increasing or strictly decreasing subsequence of length .
Proof. At each position, record the lengths of the longest increasing and decreasing subsequences ending there. Consider two positions, with the first preceding the second. If the second value is larger, an increasing subsequence ending at the first position extends to the second, so the increasing length strictly grows. If the second value is smaller, the decreasing length strictly grows instead. The pairs at distinct positions are therefore distinct. If no monotone subsequence has length , both entries belong to . There would then be at most positions, a contradiction.
2.2 The induction on two ordered bands
Taking the first step replaces a starting point by a set of possible successors. We therefore formulate the induction for groups of starting points. The invariant is that the groups are strictly ordered in two coordinates. In three dimensions this leaves one free coordinate, in which we choose a minimizing representative from each group. The barrier argument covers the relevant successors by three fixed families, one for each coordinate pair. Each family satisfies the same invariant after the first layer is removed.
Define and for . The resulting closed forms are
Lemma 7. In a layered system of length , let have two ordered coordinate bands. Then the family of label ranges in (1) has VC-dimension at most .
Proof. We proceed by induction on . When , different nonempty groups are disjoint because they are strictly ordered in a coordinate. An endpoint therefore belongs to at most one group. Every label range has size at most one, so the VC-dimension is at most .
Suppose that and the assertion holds for . Write and . Assume for a contradiction that a set of K labels is shattered, where
We restrict to those labels and retain their order. All their groups are nonempty. Apply Lemma 4 so that the first relation is strict dominance and all coordinates are distinct. The two ordered bands remain ordered. Let c denote the third coordinate.
Representatives and barriers
For each , choose a representative minimizing coordinate . This representative is an actual point of . Its minimum property has the following useful direction: if , then for every . The values are distinct. By Lemma 6 and (3), they have a monotone subsequence of length . The representatives in this subsequence are also strictly monotone in each of the other two coordinates, by the ordered-band condition. Restrict to this subsequence and relabel its groups as . Each of the three coordinate sequences of representatives is now strictly monotone.
We keep the even groups and use the odd groups as barriers. The retained label represents the original group . For every , shattering gives an endpoint whose trace on the selected labels is exactly . In particular, no odd group reaches . It is this nonreachability that makes the odd groups barriers: their representatives cannot be predecessors of a point on a path to . For each retained label , let
for every coordinate . For a fixed coordinate, the intervals are strictly ordered in one direction. Consecutive intervals share an endpoint, but one contains that endpoint and the other does not. Thus any point in one interval is strictly ordered with respect to every point in the next interval.
Recovering two ordered coordinate bands
We next show that a path from a retained group to enters at least two of these bands in its first step. Let and consider such a path, with first step , where and
Fixed-Radius Neighbourhoods in Unit-Cube Graphs

Figure 1 The two failed comparisons constrain coordinates of the first-step endpoint . Here , , and . Open and filled endpoints indicate the intervals (min, max]. The picture represents coordinate inequalities, not physical obstacles to a path.
. Let be the coordinates in which the representatives increase with their labels, and let be the coordinates in which they decrease. For , we have
For an ordered-band coordinate, the first inequality holds for every point of . For the free coordinate , it follows from . Similarly, for we have
Here the free-coordinate case uses .
Neither nor can hold. Indeed, either relation would extend along the suffix of our path to give a path from an odd group to . By (5), the failed comparison for must occur in a coordinate . For that coordinate,
By (6), the failed comparison for must occur in a coordinate . It gives
The coordinates and are distinct. If either or were empty, one of the two required failed comparisons would be impossible, so the path could not exist. We have proved that every such first-step endpoint lies in at least two of its three intervals . Figure 1 shows the two coordinate constraints.
Fixed successor groups and trace counting
Different first-step endpoints may require different coordinate pairs. We therefore use all three families. They need not be disjoint. For each coordinate pair , define
These groups depend only on the original groups, their representatives, and the first relation. They are independent of and , so the induction hypothesis will apply to three fixed set families. For a fixed , the groups have two ordered bands, one in each coordinate of . Let be their label range after the remaining relations. We claim that for every ,
For the inclusion from right to left, take a path from some to . Its starting point has a predecessor in by (7). Prepending that edge shows that reaches , and hence . For the other inclusion, take a path from to with . The preceding barrier argument places its first-step endpoint in for at least one pair . The suffix then shows that .
By induction, each of the three fixed families has VC-dimension at most . Lemma 5 says that their unions cannot shatter the retained labels. This contradicts (8). The VC-dimension is consequently at most . Finally, and , which completes the induction.
2.3 Arbitrary starting points
► Theorem 8. For every layered system of length , the family has VC-dimension at most . It has at most traces on any starting points. The same bounds hold when all layers and relations are reversed. In particular, the forward-reachability family
on ground set also has VC-dimension at most and at most traces on any endpoints.
Proof. For , every range is a singleton, and suffices. For , apply the coordinate perturbation in Lemma 4. Suppose that starting points are shattered. Sort them by coordinate . Their coordinates are distinct, so Lemma 6 gives a subsequence of points that is monotone in coordinate . Make each of these points a singleton group. The groups have two ordered bands, in coordinates and , and their labels remain shattered. This contradicts Lemma 7. The trace bound follows from Lemma 5, with the empty sample contributing one trace. Reversing the layer order and reversing each coordinate comparison gives another layered system of length . Applying the same argument to that system proves the final assertion.
The two orientations count different patterns. With endpoints indexing ranges on , we count how a fixed sample of starting points reaches an endpoint. With starting points indexing ranges on , we count the membership patterns of starting points in a fixed sample of endpoint ranges. The latter form will be used to order starting points in Section 3.
2.4 Unit-cube neighbourhoods
We now apply Theorem 8 to the graph .
► Theorem 9. Let be an integer and put
For every finite and every of size ,
Proof. Partition into the half-open cells , for . Write each point as , where . If , then the cell indices differ by at most one in every coordinate. Fix two such cells and a coordinate . If , the
Fixed-Radius Neighbourhoods in Unit-Cube Graphs
intersection condition in coordinate is . If the cell index decreases by one, it is . If the indices agree, the condition always holds. Thus intersection between any fixed pair of cells is a generalized dominance relation on the fractional coordinates. Weak inequalities retain intersections on cube boundaries.
A cell path of length is a sequence of cells whose consecutive indices differ by at most one in each coordinate. Cells may repeat, and consecutive cells may coincide. For a fixed cell path, make one layer from the points in each cell and use these relations between consecutive layers. A repeated point in consecutive layers represents a stationary step. Any graph path of length at most can be extended to steps by staying at its final vertex. Conversely, deleting stationary steps from a layered path gives a graph walk of length at most . Thus the union over all cell paths describes precisely the radius- neighbourhood.
Fix the endpoint cell. There are at most cell paths ending there, since each preceding cell has at most 27 possible indices. For one such path, apply Theorem 8 to the sample points in its first cell. It gives at most traces. If that cell contains no sample point, it contributes only the empty trace. Each endpoint's neighbourhood trace is determined by one trace for each cell path. The number of traces obtained from this endpoint cell is therefore at most
An endpoint with a nonempty trace is at graph distance at most from a sample point. Its cell index differs from that sample point's cell index by at most in each coordinate. There are consequently at most endpoint cells with a nonempty trace. All remaining cells contribute just the empty trace. With and , we obtain
For the last inequality, use , , and . This is the claimed bound.
From traces to VC-dimension.
For an integer , put . The inequality follows by induction: it is an equality for , and doubling gives . Consequently,
Multiplying by gives , and hence . Theorem 9 with therefore rules out a shattered set of size . This proves and resolves Conjecture 4 of [3]. For radius zero, every neighbourhood is a singleton, so two points cannot be shattered. A graph with two vertices can shatter one point, giving . For , using gives the sharper bound . Appendix C verifies this estimate and the corresponding algorithmic exponent. Lemma 4 is used in the structural proof. The algorithm below works with the original weak comparisons derived from the grid cells, so intersections on cube boundaries are retained.
3 A subquadratic algorithm for every fixed diameter threshold
Fix an integer . We apply the interval-representation approach of [2] using the reachability bounds from Section 2. Low-crossing orders are a standard tool in geometric range searching [9]. The analysis must control intermediate reachable sets as well as final neighbourhoods. For each starting cell, we therefore order its vertices once for the labelled ranges of all cell paths, including their prefixes. The total interval bound then accounts for the representations used at every stage of the computation. Write for a bound that suppresses polylogarithmic factors, and set
Constants in this section may depend on .
We first state two tools that follow this approach. We give self-contained forms for the weak generalized dominance relations and labelled ranges used here. Their full proofs and the range-searching structures appear in Appendix D. An integer interval is represented by its two endpoints. The first tool computes each next-layer range from its predecessors without enumerating all pairs of points satisfying the relation.
► Lemma 10 (Propagating interval representations). Let be a fixed generalized dominance relation in whose coordinate conditions belong to . There are descriptors , where is an integer interval, and query points. Let be the sum of the input interval lengths and the total number of maximal intervals in the sets . For any integer , all these sets can be computed in
time.
To see the role of , divide the ordering into blocks of positions. For an interval that covers a whole block, store its point in the block's dominance structure. A query tests whether at least one such interval contributes to . Within a partially covered block, give each position its own colour. A coloured dominance query tests whether the contributing intervals cover every colour in that block. Each input interval contributes to at most two partial blocks, using copies of its point. The full blocks account for copies in total. For a query interval that cuts a block, test its positions individually. Only the two end blocks require these tests. These structures test whether an interval is covered by . A separate orthogonal query tests whether it is disjoint from . Starting from , split an interval only when neither test succeeds. The resulting covered intervals yield the exact union. Appendix D.3 gives the construction and charges the splits to boundaries of output intervals.
The second tool constructs one ordering in which the total interval complexity of a labelled range family is small in expectation.
► Lemma 11 (A common ordering). Let be a set of at most elements, and let contain labelled ranges on . Suppose any ranges induce at most distinct membership vectors on , and one range can be listed in time. For any integer , an ordering of can be constructed in time such that the total number of maximal intervals representing the labelled ranges satisfies
Equal ranges with different labels are counted separately.
Fixed-Radius Neighbourhoods in Unit-Cube Graphs
When , the construction samples range labels independently with replacement. It groups points with the same membership vector on the sampled ranges and places each group consecutively. There are at most groups. For any fixed pair of points, let be the number of original range labels that separate them. The probability that the sampled membership vectors agree is . A pair with therefore agrees with probability at most . Taking a union bound over at most pairs, with probability at least every within-group adjacency crosses at most range labels. There are at most such adjacencies and at most adjacencies between groups. Each between-group adjacency crosses at most range labels. Since a range has at most one more maximal interval than crossings, this event gives
For every sample, . The complementary event thus contributes at most to the expectation. This proves the stated expected interval bound. Appendix D.4 gives the full implementation and treats empty families.
Cell paths and their ranges.
If , we return yes. If the spread in any coordinate exceeds , we return no, since one edge changes each coordinate by at most one. Otherwise, place the origin of a half-open unit grid at the coordinatewise minimum of . At most cells contain input points. Cell assignment uses comparisons with integer offsets of the origin.
Fix a nonempty starting cell , and put and . Enumerate all cell paths starting at with at most steps. Each step changes each cell index by , or , so there are at most paths. For an endpoint in the last cell of , let be the set of points of that reach along this cell path. Use the exact weak comparisons from Section 2.4. The length-zero ranges are the singletons of . Together these labelled ranges form a family of size . Labels are pairs , so equal sets arising from different paths remain separate members of the family. Every prefix is itself one of the enumerated paths and contributes its endpoint ranges to this same family.
Consider selected range labels. Let be the number of selected range labels associated with . For a fixed path of length , membership vectors of the starting points are traces of the reversed -step system on its selected endpoints. Theorem 8 bounds their number by . Multiplying over the fixed paths gives at most
One range can be listed in time. Start with its endpoint and move backwards through its layers. At each step, an orthogonal emptiness structure on the marked points finds all points in the preceding layer with a marked successor. There are at most steps, each involving at most points.
Propagation through the prefix tree.
Ignoring polylogarithmic factors, we balance and in Lemma 11. This gives , since . Sample from the list of labels of and let be the resulting ordering of . Listing the samples and forming their membership vectors takes time. We represent every range for this starting cell in the same ordering. The cell paths form a rooted tree under the prefix relation. At the root, each vertex of has its singleton interval. Suppose the ranges at a parent path have been computed. For each parent endpoint , create a descriptor for each maximal interval of . For a child path and every endpoint in its last cell, apply Lemma 10 to compute
This determines all ranges by induction on the path length.
For each vertex , merge the intervals from all length- paths ending in its cell. Their union is exactly : graph paths specify cell paths, and shorter paths can be extended by staying at their endpoint. Such stationary steps satisfy the weak comparisons within a cell. Conversely, removing stationary steps from a layered chain gives a graph walk with at most edges. Return no if this union differs from for some . Repeat for every nonempty starting cell, and return yes if all tests pass. Every pair of vertices is tested in the iteration containing its first vertex, so the answer is correct.
Running time.
Let count the maximal intervals in all ranges of . Each path has at most 27 children. Thus the total number of input descriptors over all applications of Lemma 10 is at most 27K. The maximal intervals of one range are disjoint and have total length equal to the size of that range, which is at most . Copying them to at most 27 children gives total input interval length at most 27ma. There are at most queries, with at most output intervals in total. For any fixed , propagation and final merging therefore take
time. Our choice of satisfies and . Lemma 11 and (11) therefore give . The propagation bound is linear in , so we may take its expectation for this same sampled ordering. We now balance and , choosing . Including the sampling cost , the expected time is
where the equality uses . There are only starting cells. Absorbing the polylogarithmic factor into proves Theorem 2. Sampling affects only the ordering and the time bound. All propagated ranges are exact for every ordering, so the algorithm is Las Vegas.
4 A cubic lower bound
For the lower bound in Theorem 3, we construct a rooted tree whose leaves have the same depth. We replace each tree vertex by a clique whose vertices carry subset labels. Between adjacent cliques, an edge joins two vertices exactly when their labels agree. At each leaf, we retain the labels that contain that leaf and add a target vertex. Let be the common leaf depth, let be the target at leaf , and let be the root vertex with subset label . The encoding will give the exact distances
Fixed-Radius Neighbourhoods in Unit-Cube Graphs

: 8 terminals, depth 3

: 64 terminals, depth 9
Figure 2 The base trees and before subdivision, with 8 and 64 leaves at depths 3 and 9, respectively. Roots are orange and designated terminals are blue. All terminals of have depth . Label cliques and target vertices are not shown.
Thus one fixed radius distinguishes membership in every subset of the targets. This use of cliques, equal-label matchings, and coordinate bits appears in the diameter lower bounds of [1]. Here we place the cliques on a branching tree in three dimensions. The tree has leaves at depth , which gives the cubic dependence on the radius.
An equal-depth grid tree.
We construct a tree from axis-parallel unit grid edges. At scale , a three-level branching structure joins the origin to eight translated copies of the construction at scale . The copies lie in disjoint octants and meet the branching structure only at their roots. Each of the three branching levels contributes edges to a root-to-copy path. Consequently, the common depth satisfies and . Solving this recurrence gives , while the number of leaves is . Figure 2 shows the first two trees. We double the coordinates and insert the midpoint of every edge. Original vertices then have only even coordinates, and each midpoint has exactly one odd coordinate. A pair at distance one must consist of a midpoint and one of its two endpoints. The resulting grid representation is therefore induced, and every point has at most one odd coordinate. A path of length attached at the root gives a tree of leaf depth . The recursive tree and these two modifications are proved in Appendices E.1 and E.2.
Realizing the labels with cubes.
We apply the linear map
On our grid points, two distinct images have distance at most 1 if and only if their preimages are adjacent in the tree. The parity condition is essential here. Indeed, an integer vector mapped by into is either zero, a unit grid direction, or one of . The last two vectors cannot be differences of points that each have at most one odd coordinate. All nonadjacent pairs consequently have image distance at least two. Appendix E.3 verifies these cases.
Put and . Number the subset labels by integers , with binary digits , and write . Choose the rational parameters
At base point , label has centre , where . Every base point other than a designated leaf carries all labels. At leaf , retain exactly the labels with and put . If is the root, then , denoted by in Appendix E.
All offsets lie in , so centres at one base point form a clique. For adjacent base points , every coordinate of is 1 or -1, and both signs occur. Writing for the difference of two offsets, we obtain
Equal labels give distance . Unequal offsets differ by at least , so they give distance at least . For nonadjacent base points the distance is at least . Offset zero occurs only at designated leaves, whose coordinates are all even. Two such base points cannot be adjacent, so no base point adjacent to a target's base point carries offset zero. The neighbours of are therefore exactly the retained labels at its own leaf. These statements classify all edges, including edges incident to targets; Appendix E.4 gives the complete verification.
Distances and the choice of radius.
Project a path in the cube graph to its base points. Each edge either traverses an edge of the base tree or leaves the base point unchanged. Every path from to therefore uses at least edges between cliques and one final edge inside the leaf clique. When , following label along the tree and then taking the target edge gives length . A path of this length has no other edge inside a clique. All its first edges preserve the label, so its penultimate vertex has label at leaf . That vertex is present exactly when . If , one change of label at the root gives a path of length . This proves (13); see also Appendix E.5. Thus the targets are shattered at radius . For an arbitrary integer , take
The choice of gives and , and the added root path makes . Moreover, , so cubing gives . Every witness and target is present in this one rational construction and uses the same radius . Appendix E.6 gives the full parameter calculation for Theorem 3.
5 Conclusion
We establish bounded VC-dimension for every fixed radius in three-dimensional unit-cube graphs. Combined with the interval-representation approach, this yields truly subquadratic diameter decision algorithms for every fixed threshold. The cubic lower bound shows that dependence on the radius is necessary. A natural next question is whether the doubly exponential upper bound can be replaced by a polynomial one.
Fixed-Radius Neighbourhoods in Unit-Cube Graphs
References
1 Karl Bringmann, Sándor Kisfaludi-Bak, Marvin Künnemann, André Nusser, and Zahra Parsaeian. Towards Sub-Quadratic Diameter Computation in Geometric Intersection Graphs. In Xavier Goaoc and Michael Kerber, editors, 38th International Symposium on Computational Geometry (SoCG 2022), volume 224 of Leibniz International Proceedings in Informatics (LIPIcs), pages 21:1–21:16, Dagstuhl, Germany, 2022. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. URL: https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.SoCG.2022.21, doi:10.4230/LIPIcs.SoCG.2022.21.
2 Timothy M. Chan, Hsien-Chih Chang, Jie Gao, Sándor Kisfaludi-Bak, Hung Le, and Da Wei Zheng. Truly Subquadratic Time Algorithms for Diameter and Related Problems in Graphs of Bounded VC-dimension. In 2025 IEEE 66th Annual Symposium on Foundations of Computer Science (FOCS), pages 2728–2765. IEEE, 2025. URL: https://arxiv.org/abs/2510.16346, doi:10.1109/FOCS63196.2025.00140.
3 Timothy M. Chan, Hsien-Chih Chang, Jie Gao, Sándor Kisfaludi-Bak, Hung Le, and Da Wei Zheng. Charting the Diameter Computation Landscape of Intersection Graphs in 3D and Above. In Hee-Kap Ahn, Michael Hoffmann, and Amir Nayyeri, editors, 42nd International Symposium on Computational Geometry (SoCG 2026), volume 367 of Leibniz International Proceedings in Informatics (LIPIcs), pages 29:1–29:15, Dagstuhl, Germany, 2026. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. URL: https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.SoCG.2026.29, doi:10.4230/LIPIcs.SoCG.2026.29.
4 Hsien-Chih Chang, Jie Gao, and Hung Le. Computing Diameter+2 in Truly-Subquadratic Time for Unit-Disk Graphs. In Wolfgang Mulzer and Jeff M. Phillips, editors, 40th International Symposium on Computational Geometry (SoCG 2024), volume 293 of Leibniz International Proceedings in Informatics (LIPIcs), pages 38:1–38:14, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. URL: https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.SoCG.2024.38, doi:10.4230/LIPIcs.SoCG.2024.38.
5 Mark de Berg, Otfried Cheong, Marc van Kreveld, and Mark Overmars. Computational Geometry: Algorithms and Applications. Springer, Berlin, Heidelberg, 3rd edition, 2008. URL: https://link.springer.com/book/10.1007/978-3-540-77974-2, doi:10.1007/978-3-540-77974-2.
6 P. Erdős and G. Szekeres. A combinatorial problem in geometry. Compositio Mathematica, 2:463–470, 1935. URL: https://numdam.org/item/CM_1935_2_463_0/.
7 N. Sauer. On the density of families of sets. Journal of Combinatorial Theory, Series A, 13(1):145–147, 1972. URL: https://www.sciencedirect.com/science/article/pii/0097316572900192, doi:10.1016/0097-3165(72)90019-2.
8 Saharon Shelah. A combinatorial problem; stability and order for models and theories in infinitary languages. Pacific Journal of Mathematics, 41(1):247–261, 1972. URL: https://msp.org/pjm/1972/41-1/p21.xhtml, doi:10.2140/pjm.1972.41.247.
9 Emo Welzl. Partition trees for triangle counting and other range searching problems. In Proceedings of the Fourth Annual Symposium on Computational Geometry, SCG '88, pages 23–33. ACM, 1988. URL: https://dl.acm.org/doi/10.1145/73393.73397, doi:10.1145/73393.73397.
A Coordinate normalization
We give the full proof of Lemma 4. All points in this argument retain their layer labels.
Proof of Lemma 4. Perturbing coordinates.
First fix one coordinate. We assign a distinct integer offset to each layer . If the comparison from to is , require . If it is , require . A condition imposes no constraint. For each requirement, direct an edge from the layer with the smaller required offset to the layer with the larger required offset. These requirements orient some edges of the path on layer indices . The resulting directed graph is acyclic. Assigning consecutive distinct integers in a topological order satisfies every requirement.
Choose distinct auxiliary numbers for all layer-labelled points. For a point , replace its coordinate by
where is sufficiently small. There are finitely many coordinates and prescribed strict orders. We can therefore choose so that every comparison between originally unequal coordinates, and every prescribed strict order, retains its sign. If two originally equal coordinates are in different layers, their new order is determined by the distinct offsets . If they are in the same layer, their new order is determined by the distinct numbers . Thus all coordinates become distinct.
Consider an originally equal pair in two consecutive layers. For a condition, the left offset is larger, so the new strict comparison is false, as before. For a condition, the left offset is larger, so replacing by gives a true comparison, as before. For a condition, the left offset is smaller, and the new comparison remains false. For a condition, the left offset is smaller, so replacing by gives a true comparison. The coordinate perturbation therefore preserves all adjacent-layer conditions. Perform it separately in each of the three coordinates. After replacing the weak comparison symbols as described, the represented layered system has only strict comparisons and .
Normalizing the first relation.
Now suppose that . For each coordinate whose first relation is , translate all points in together far enough in the positive direction that every point of has a smaller coordinate than every point of . We may choose the translation to avoid the finitely many values that would create coordinate equalities with . Replacing this first condition by preserves all its truth values. Every later relation has both endpoints translated by the same amount, so its truth values are also preserved. Finally, reflect any coordinate whose first comparison is , simultaneously in all layers, and reverse the comparison symbol in that coordinate in every relation. All first comparisons are now . The translations do not change the groups in , and a reflection only reverses the common direction of an ordered band. Thus both the represented relations and the ordered-band property are preserved.
B Counting lemmas
This appendix proves the trace bound in Lemma 5 using the Sauer–Shelah–Perles argument [7, 8]. The three-family bound and the monotone subsequence lemma are proved in Section 2.
Fixed-Radius Neighbourhoods in Unit-Cube Graphs
Proof of the trace bound in Lemma 5. We first prove the bound . It suffices to consider a family of distinct subsets of an -element ground set. For , the family contains at most one set. For , two distinct sets would shatter any point in their symmetric difference, so again the family contains at most one set. These are the base cases.
For , choose a ground-set element and define two families on the other elements:
Their union is the family of all traces after deleting , so its VC-dimension is at most . Their intersection has VC-dimension at most . To see this, suppose that it shattered a set of size . Each trace on would then be realized both by a set of containing and by one excluding . Thus would shatter , contrary to its VC-dimension bound. By induction on ,
As usual, a binomial coefficient is zero when its lower index exceeds its upper index. For the further bound, encode a subset of of size at most g by its increasing list of elements, padded at the end with zeros to length g. This is an injection into , giving at most subsets.
C Explicit numerical bounds
Section 2.4 derives the general bound and proves . Here we verify the explicit radius-four estimates stated after Theorems 1 and 2.
For radius four,
Here , , and . We verify the bounds and with integer arithmetic. Let . Since
raising to the sixth power and multiplying by gives . For every positive integer , . Therefore
where the last inequality follows from . Also,
It follows that
Now put . Since , we have
The trace bound is strictly smaller than , so no set of vertices is shattered. This proves the bound . Finally, the inequality gives
which yields the stated explicit exponent in Theorem 2.
D Data structures and sampling for the diameter algorithm
We give the data structures used in Section 3 and prove Lemmas 10 and 11. The interval coverage and coloured-query approach follows [2]. We give complete proofs for the boundary conventions and labelled ranges needed in our application. We first construct orthogonal and coloured dominance structures, then use them for interval propagation in Appendix D.3. Appendix D.4 proves the sampled-ordering bound. Appendix D.5 verifies the implementation and accounts for all intermediate ranges. Throughout this appendix, interval lengths count integer positions. All logarithms in running-time bounds may be replaced by . Thus empty sets and sets of size one cause no exceptional logarithmic terms.
D.1 Orthogonal counting
We use the standard recursive range-tree construction (see [5, Chapter 5]). The proof below records its treatment of strict bounds and multiplicities.
► Lemma 12. For fixed , a multiset of points in can be preprocessed in time and space to support orthogonal prefix counting in time. Each coordinate bound may be strict or weak. The same bounds hold for emptiness queries.
Proof. In one dimension, sort the points and store the number of points in each prefix, counting multiplicities. Binary search finds the last coordinate below a strict threshold, or the last coordinate at most a weak threshold. The prefix count is then available in constant additional time.
For , build a balanced binary tree on the first coordinates. At each node, recursively store a -dimensional structure for the points below that node. The first-coordinate prefix of a query decomposes into disjoint node sets. Query their associated structures on the other coordinates and add the counts. Induction gives query time .
At each tree depth, the node sets are disjoint and contain points in total. There are depths. Induction on therefore bounds both the space and construction time by times a fixed power of , with a constant-size representation when . Testing whether the resulting count is zero gives an emptiness query.
Lower bounds on a coordinate are changed into upper bounds by reflection. Consequently the lemma also supports any conjunction of fixed coordinate comparisons. In particular, it supports the generalized dominance queries used below.
Fixed-Radius Neighbourhoods in Unit-Cube Graphs
D.2 Coloured dominance in three dimensions
► Lemma 13. Let points of have colours from a prescribed set of required colours. After preprocessing, a query point can be tested in time for whether it dominates a point of every required colour. Only the value of and the colours present in the input need to be stored.
Proof. A point is dominated by a query precisely when the query belongs to
We first process the points of one colour. Sort them by , breaking ties in any fixed order. In the -plane, maintain the union of the quadrants already inserted. This union has the form
where is a nonincreasing step function and may take the value . Store its finite breakpoints in a balanced search tree ordered by . After redundant breakpoints are removed, their heights strictly decrease. At a breakpoint the new, lower height applies.
Consider the insertion of . If , monotonicity gives for all , so the new quadrant adds no points. Otherwise, its new part is
Traverse the old staircase from until its height first becomes at most . For each old constant-height interval met by this traversal, output the nonempty rectangle
where is the old height and is the traversed part of that interval. The last interval may be unbounded. These rectangles partition (15) exactly. The left endpoint is included and the right endpoint is excluded, as required by the definition of the staircase.
The update replaces the traversed part of the staircase by height . It introduces at most one new breakpoint. Apart from at most a constant number of rectangles at the ends, every rectangle can be charged to a breakpoint deleted by this update. Each input point introduces at most one breakpoint, and each breakpoint is deleted at most once. The total number of rectangles is therefore linear in the number of points of this colour. Predecessor searches, insertions, and deletions take time each, so the entire sweep takes time over all colours.
Extend each rectangle created at sweep coordinate to a box
The -projections of boxes of one colour are pairwise disjoint. Indeed, a rectangle is created only for points outside the old union, and the union only increases during the sweep. For a fixed covered by some quadrant, the unique rectangle containing it was created when that point first became covered. Its sweep coordinate is the smallest of an input point with and . It follows that the boxes of this colour have exactly the same union as its three-dimensional upper orthants. They are also pairwise disjoint. Ties in do not affect this conclusion, because all boxes created at that coordinate include their first-coordinate boundary.
Construct these boxes for every colour. There are boxes in total. A query lies in at most one box of each colour, and it lies in such a box exactly when it dominates an input point of that colour. Thus the number of boxes containing the query is the number of colours hit.
Represent a box (16) by the five-dimensional point
.
The query belongs to the box exactly when
Lemma 12 counts these points with a mixed strict and weak prefix query. Infinite endpoints can be represented by ordered sentinels, since query coordinates are finite. Compare the count with . If a required colour has no input point, it contributes no box and the count cannot reach . If , the answer is yes. This proves both the claimed query time and the treatment of absent colours.
For a generalized dominance relation, reflect coordinates that have the opposite direction. A coordinate with the predicate can be replaced by zero in every input and query point. The comparisons between neighbouring grid cells are weak, so this gives exactly the queries required by the diameter algorithm. Strict comparisons in the auxiliary counting structures are handled by Lemma 12.
D.3 Covering, avoiding, and extracting integer intervals
We prove Lemma 10. Assume , since for every output is empty. Reflect coordinates so that all nontrivial conditions in are upper dominance conditions. Let the input descriptors be , and let
The same point may occur in several descriptors. Each occurrence keeps its own interval.
Block structures
Partition into consecutive blocks of length , with a possibly shorter last block. For every block fully contained in , place one copy of in the block's full-coverage structure. A dominance emptiness query in this structure tests whether one selected input interval covers the entire block. An input interval contains at most full blocks, where the extra one accounts for the last, shorter block. The total number of copies is therefore .
Every input interval meets at most two further blocks without containing them. For each such partial block and each integer position in its intersection with , insert a copy of with colour into that block's partial coverage structure. The required colours are all positions of the block. Also insert into a single-colour structure associated with position . There are at most copies of each kind. Build the block structures by Lemma 13, and the single-colour structures by Lemma 12. Only nonempty structures are stored. A lookup for a missing structure returns the empty answer. The required number of colours of a block is its length, even if some of its positions never occur in the partial input. Thus missing colours are counted correctly without allocating a structure for every position. The total preprocessing time and space are
Fixed-Radius Neighbourhoods in Unit-Cube Graphs
Coverage queries.
For an integer interval , we test whether . Visit the blocks meeting . In one such block, first ask whether a selected full-coverage descriptor exists. If it does, all positions of in this block are covered. If it does not and the whole block belongs to , query the block's partial coverage structure for all its required colours. If it does not and only part of the block belongs to , query the single-colour structure for each position of in that block. These tests are exact: each descriptor meeting a block either covers it fully or was included among its partial descriptors.
There are at most two partially queried blocks, contributing at most single-position queries. There are blocks in total. The coverage query therefore takes
time, including when .
Avoidance queries.
For , we test whether . An input interval intersects exactly when and . Together with the three coordinate comparisons of , these are five dominance conditions on . Lemma 12 gives an emptiness structure with preprocessing and query time. It answers the avoidance query exactly.
Extraction.
Start with . For a current interval , output it if it is covered by . Discard it if it avoids . Otherwise, split it into two consecutive intervals of nearly equal length and recurse. A singleton is either covered or avoided, so this process terminates. The output consists of disjoint covered intervals whose union is . Sort them by their left endpoints and merge adjacent intervals to obtain its maximal intervals.
Let be the number of these maximal intervals. A node at which the recursion continues contains both a covered and an uncovered integer position. It therefore contains a transition between consecutive positions with different membership in . There are at most such transitions. At any fixed depth, the current intervals are disjoint, so at most nodes continue the recursion. Every queried nonroot node is a child of a continuing node. There are consequently
queries altogether, including the cases and . At one depth, the queried intervals have total length at most . Over all depths their total length is . Summing (18) over these intervals gives extraction time
Avoidance queries and the final merging fit in this bound. Summing over the query points, and adding (17), gives
where . This proves Lemma 10.
D.4 A common random ordering
We now prove Lemma 11. If , choose any fixed ordering and return it. There are no represented ranges, so . The same conclusion holds if is empty. Assume henceforth that and .
Independently sample range labels, uniformly with replacement from . List each sampled range and record the -bit membership vector of each element of . Group equal vectors and place every group consecutively in the ordering. Use any fixed order within and between the groups. The number of groups is at most by hypothesis. Repeated samples do not add distinct membership patterns, so the hypothesis also applies when sampled labels repeat. Listing the ranges costs . Recording and sorting the vectors takes additional time, which is covered by the same bound.
For , let be the number of range labels whose range contains exactly one of . The probability that the two sampled membership vectors are equal is
If , this probability is at most . There are at most pairs. With probability at least , every pair in one sampled group therefore satisfies
This estimate also holds when the threshold exceeds , since then there is no pair violating it.
Call two consecutive elements of the final ordering a crossing of a range if exactly one of them belongs to that range. On the event (19), the at most adjacencies inside sampled groups contribute at most crossings in total over all range labels. There are at most adjacencies between groups, each contributing at most crossings. The number of maximal intervals in one range is at most its number of crossings plus one. Hence, on this event,
For every sample, we also have . The contribution of the complementary event to the expectation is at most . Combining the two estimates proves
This completes the proof of Lemma 11.
D.5 Implementing and accounting for the cell-path computation
We spell out how the preceding lemmas apply to the algorithm in Section 3. After the coordinate-spread test, all nonempty cells have indices in relative to the chosen origin. The comparisons with the grid boundaries use the half-open convention, including points whose coordinate is exactly an integer offset. No floor operation on unbounded real numbers is needed. For neighbouring cells, their local coordinates give the weak generalized dominance relation derived in Section 2.4. These local coordinates are used as geometric objects in the interval structures.
Fixed-Radius Neighbourhoods in Unit-Cube Graphs
Labels and sampling.
For the fixed starting cell , form a list containing the pair for each cell path of length at most and each vertex in its last cell. This list has length and can be generated in time. The root path contributes one label for every vertex of . In particular, in this application. Two labels are retained even if their ranges happen to be identical. Uniform sampling in Lemma 11 is from this list of labels.
For selected labels belonging to one path, repeated endpoint labels impose repeated membership coordinates. Deleting these repetitions cannot increase the number of membership vectors. The reversed-system trace bound therefore gives whether or not selected endpoints repeat. Different paths remain different groups in the product (11). This proves the required dual pattern bound for the full labelled family.
Listing one sampled range.
Let , with , and let its endpoint be . Mark just in layer . For , build an orthogonal emptiness structure on the marked points of layer . For each point in layer , mark if there is a marked point with . For a query , these are reflected orthogonal comparisons on the stored points , so Lemma 12 applies. An empty marked layer yields empty marks in every preceding layer.
By backward induction, a point marked in layer has a path to through the remaining prescribed cells, and every such point is marked. The final marked set is therefore . Each layer has at most points, and there are at most layers. The total cost is . For , simply return the singleton . Listing all sampled ranges thus costs .
Exact propagation.
Process all cell paths in increasing order of length. At the root, the range of is the singleton containing its position in . Suppose every parent range has already been computed exactly. A starting point reaches a child endpoint precisely when it reaches some parent endpoint with . Replacing each parent range by its maximal intervals gives exactly the descriptor union in Lemma 10. Its output is therefore the child range by (12). Induction proves exactness at every path node. Repeated visits to a physical cell use its points as a fresh layer with the same coordinates. The weak comparisons permit a physical vertex to remain in place between consecutive equal cells.
Total input size.
Let be the number of maximal intervals of . Then
A parent path has at most 27 children. Its endpoint intervals are copied once for each child, so the sum of all descriptor counts is at most 27K. Maximal intervals of a single range are disjoint. Their lengths therefore sum to that range's cardinality, and the sum of all input interval lengths is at most 27ma. Every nonroot label is queried only at its own path node. Thus the total number of queries is at most , and the total number of output intervals is at most . There are at most nodes, including empty paths. The constant additive cost in Lemma 10, summed over them, is .
Adding its bounds over all nodes yields
For the last step, , , and absorb the constant term. For a fixed vertex , concatenate the interval lists of the length- paths ending at . Sorting by endpoints and merging adjacent or overlapping intervals takes time over all vertices. Vertices with no such label have the empty union. Checking whether the union is then takes constant time per vertex.
Expected time
The parameters of Section 3 satisfy
For , we have
Also . Lemma 11, with , now gives . The bound for propagation is linear in once is fixed, so taking its expectation is valid for this same sampled ordering. Sampling and propagation together take expected time
Here follows from . For each fixed , the suppressed factor is a fixed power of . It is , which gives the stated bound.
Finally, the sampled ordering changes only the representation lengths. For every sample, each range query and each interval union is exact. The completed length- ranges cover every graph path of at most edges, including a path padded by stationary steps. Conversely, every layered chain gives a graph walk after stationary steps are removed. The final answer is therefore correct for every sample. The expectation concerns running time alone, as required for a Las Vegas algorithm.
E The cubic lower-bound construction
We give the full construction for Theorem 3. For integers , , and , we construct a finite set . It contains targets and witnesses such that, for
the distance from to is if the st bit of is 1, and if that bit is 0. All distances are in the unit-cube graph of the constructed point set.
E.1 An equal-depth tree in the integer grid
We first construct a geometric tree . Its vertices are integer points on specified axis-parallel segments. Its edges join consecutive integer points along those segments. At this stage, an edge is included only when it belongs to a specified segment.
Fixed-Radius Neighbourhoods in Unit-Cube Graphs
Let consist of the origin, which is both its root and its single designated terminal. For , put and take the following segments:
We call their union the skeleton. For each , set and attach a translated copy . The root of is the origin. Its designated terminals are the designated terminals in the eight translated copies.
► Lemma 14. For every integer , the following properties hold.
-
The geometric realization of lies in .
-
Its only point in the plane x = 0 is the root.
-
The segments meet only at the prescribed attachment points, and is a tree.
-
It has designated terminals, each at distance from the root. For , these terminals are exactly its leaves.
Proof. All four properties hold for . Suppose that they hold for , and write . By the first induction hypothesis, the copy rooted at lies in the box
Every coordinate of a point in has the sign of the corresponding coordinate of , and its absolute value is at least 1. If and have different sign triples, some coordinate of lies in while that coordinate of lies in . Thus the eight boxes are pairwise disjoint.
The - and -segments of the skeleton lie in the plane . They do not meet any box . A -segment at can meet only the two boxes whose first two signs are and . In the local coordinates of either translated copy, this segment lies on . The second induction hypothesis says that the copy meets the plane only at its root. Consequently, the segment meets that copy only at the attachment point . This accounts for all possible intersections between the skeleton and the copies.
The skeleton itself is a tree. Start with its x-segment and attach a y-segment at each endpoint. These two y-segments are disjoint and each meets the x-segment only at its attachment point. Next attach a z-segment at each of the four endpoints of the y-segments. These four segments have distinct pairs of x, y coordinates. Each meets the earlier segments only at its attachment point. Every attachment therefore preserves connectedness and creates no cycle. The eight copies of are trees by induction. Each shares exactly its root with the skeleton and is disjoint from the other copies. Attaching them preserves connectedness and cannot create a cycle. This proves the third property.
The path from the origin to any attachment point traverses an -segment, a -segment, and a -segment, using edges in each coordinate direction. Its length is . The distance from to a designated terminal in its copy is by induction. Hence every designated terminal has depth
The copies are disjoint, so their terminal sets are disjoint and contain terminals in total. If , the eight attachment points are precisely the leaves of the skeleton. If , the root of every attached copy has degree at least two within the copy. After attachment it is not a leaf. All other vertices retain their degrees, and every leaf of the copy is a designated terminal. The skeleton has no remaining leaf outside the copies. This proves the fourth property.
The skeleton lies in . Each box lies in , which proves the first property. Every translated copy has . Every - or -segment of the skeleton has . The -segment meets the plane only at the origin. This proves the second property and completes the induction.
E.2 Subdivision and a path at the root
We next turn the chosen grid edges into all grid adjacencies among the constructed points. For a finite subgraph of the three-dimensional integer grid, define
Thus we double every vertex coordinate and insert the midpoint of each doubled edge.
Lemma 15. Join two points of when their distance is 1. The resulting graph is exactly the graph obtained by subdividing each edge of once. Every point of has at most one odd coordinate.
Proof. Every original point has three even coordinates. If is an edge in coordinate direction , its midpoint has an odd th coordinate and two even coordinates. In particular, a midpoint is distinct from every original point. Its odd coordinate determines the direction of the edge, and the two neighbouring even points in that direction determine the endpoints. Different edges therefore have different midpoints.
Two original points cannot have distance 1, since each coordinate difference is even. Consider two midpoints. If their odd coordinates have the same position, each coordinate difference is even, so their distance is not 1. If the odd coordinates have different positions, at least two coordinate differences are odd. Their distance is then at least 2.
It remains to consider a midpoint and an original point . Suppose that their distance is 1. The only changed coordinate must be the odd coordinate of . Increasing or decreasing that coordinate by 1 gives exactly or . Thus a midpoint is adjacent only to the two endpoints of its own doubled edge. Conversely, its distance to each of these endpoints is 1. These cases include every pair of distinct points in , proving the claim.
Apply Lemma 15 to , and write . With adjacency defined by distance 1, this is a tree whose designated terminals are twice those of . Their common depth is
For an integer , define
We use o as the new root and keep the designated terminals from .
▶ Lemma 16. For , the graph on with adjacency defined by distance 1 is obtained by attaching a path of length t to the root of . Each designated terminal is at distance from the new root o. Every point of has at most one odd coordinate.
Fixed-Radius Neighbourhoods in Unit-Cube Graphs
Proof. The only segments of that have a point with belong to its root -segment. All other segments have , by the construction and Lemma 14. After doubling and subdivision, the only point of with is the origin, and its only points with are and . Every remaining point of has .
For , the new point has distance from each of and . Its distance from any old point with is at least 2. Its distance from the origin is , so it is adjacent to the origin exactly when . Two new points and are adjacent exactly when . Thus the new points form a path that meets the old tree only through the edge to the origin. The depth of every designated terminal increases by . Only the third coordinate of a new point can be odd, proving the final assertion.
For the remainder of the construction, the base tree is the graph on from Lemma 16. In particular, its edges are precisely the pairs at distance 1. Its designated terminals are leaves, and the new root is distinct from all of them.
E.3 From grid adjacency to cube adjacency
Define the invertible linear map
Its inverse is
Let be the standard basis vectors in .
Lemma 17. Let be distinct points, each with at most one odd coordinate. Then
All remaining pairs satisfy .
Proof. Suppose that has norm at most 1. Each of is an integer in . Since is an integer vector, the sums , and are all even. Hence have the same parity.
If they are all even, then and , contrary to the hypothesis. Otherwise, each is either 1 or -1. Four of the eight cases are
and the other four are their negatives. The cases would require b and c to have different parity in all three coordinates. This is impossible: the set of coordinates where their parities differ is the symmetric difference of their sets of odd coordinates, and has size at most 2. The six unit grid directions are the only remaining possibilities.
Conversely,
and these vectors and their negatives all have norm 1. Finally, is an integer vector. If its norm is greater than 1, the norm is at least 2.
Each image of a unit grid direction contains both a positive and a negative coordinate. We use this fact to realize the equal-label matchings between neighbouring base points.
E.4 The rational coordinates
Fix , , and . Choose any designated terminals of and call them . Let
The label represents the subset of given by its binary digits. Write for its st bit. Let and put
At every base point , include all points . At a selected terminal , include exactly when . Also include the target
Their union is . Every coordinate is rational, with the explicit formulas
The new root is not a selected terminal, so it carries every label. For each , define the witness
The empty-subset witness has offset . All labelled points have positive offsets, whereas the targets have offset zero.
Let be the unit-cube graph of . Thus distinct centres are adjacent exactly when . For a constructed centre, its base point is the point used in its definition.
Lemma 18. The points of are pairwise distinct, and their adjacencies in G are as follows.
-
All centres at the same base point form a clique.
-
Between adjacent base points, two centres are adjacent exactly when their offsets agree.
-
There is no edge between distinct nonadjacent base points.
-
The neighbours of a target are exactly the retained labelled points at .
Proof. Regard a target as a centre with offset zero. All offsets lie in
At the same base point, two centres differ by a multiple of 1. Their distance is the absolute difference of their offsets, which is less than 1/4. Their offsets are different, so the centres are distinct and adjacent.
Fixed-Radius Neighbourhoods in Unit-Cube Graphs
Next consider adjacent base points . Their difference is one of the six unit grid directions. By Lemma 17, every coordinate of is 1 or -1, and both signs occur. If the offsets of two centres differ by , their distance is therefore
For equal offsets this is . For unequal offsets we have , giving distance at least . This proves the second assertion. It also shows that centres at adjacent base points are distinct.
Now let be distinct nonadjacent base points. They satisfy the parity condition of Lemma 17, by Lemma 16. Since they are not adjacent in the base tree, their difference is not a unit grid direction. Thus . The reverse triangle inequality gives
These centres are distinct and nonadjacent, proving the third assertion.
Finally, offset zero occurs only at the selected terminal base points . Every is twice a vertex of , so all its coordinates are even. Two distinct selected terminals cannot differ by a unit grid direction and hence are not adjacent in the base tree. A target therefore has no equal-offset centre at an adjacent base point. By the second and third assertions, it has no neighbour at any other base point. By the first assertion, it is adjacent to every retained labelled point at its own base point. This proves the fourth assertion and completes the classification.
E.5 Exact distances and shattering
Let
We now determine the distance from every witness to every target.
Lemma 19. For every and every ,
Proof. The unique path in the base tree from to has length . No internal vertex of this path is a selected terminal, since every selected terminal is a leaf. Thus every internal base point, as well as , carries all labels.
Suppose first that . Then is present. Follow the base-tree path from to , keeping label at every base point. By Lemma 18, each consecutive pair of centres is adjacent. This gives a path of length from to . One further edge reaches . Hence .
For a lower bound, consider any path in from to . Project each centre to its base point. By Lemma 18, each edge either projects to an edge of the base tree or leaves the base point unchanged. Delete all unchanged steps from the projected walk. The remaining walk joins to in the base tree, so it uses at least edges. The last edge of the original path is inside the clique at , because every neighbour of has base point . Every path from to therefore has length at least .
Suppose that such a path has length . It must use exactly D edges between base points and exactly one edge within a base point. The latter is the last edge. Every preceding edge preserves the offset, by Lemma 18. The path starts with the positive offset , so its penultimate vertex must be . This point exists exactly when . We conclude that the distance is when , and is at least when .
It remains to give a path of length in the latter case. Choose a label with . Since , the labels and are different. Both root centres are present, and one edge inside the root clique joins to . Follow label for steps to , then take the final edge to . The resulting path has length , proving the formula.
By Lemma 19, the closed radius-r neighbourhood of satisfies
As ranges from 0 to , these intersections give every subset of . All witnesses and targets belong to the same point set , and every witness uses the same radius . Thus the radius- neighbourhood system of has VC-dimension at least .
E.6 The bound for every integer radius
Proof of Theorem 3. Let be an integer, and choose
The assumption gives , so . The inequality gives . All three parameters are integers, and they satisfy
The preceding construction therefore gives a finite rational point set whose radius-r neighbourhood system shatters targets. Consequently,
The definition of also gives . Hence , and cubing this inequality yields
In particular, choosing gives for every .
E.7 Size of the construction
For completeness, we count the points in the construction. Let be the number of unit grid edges of . The skeleton has 2a edges in its x-segment, 4a edges in its two y-segments,
Fixed-Radius Neighbourhoods in Unit-Cube Graphs
and 8a edges in its four z-segments. The attached copies share no edges with the skeleton or with one another. Therefore
Solving this recurrence gives
Indeed, the formula is zero for , and substituting it at gives
The tree has vertices. Subdivision adds one vertex for each edge, and the root path adds vertices. Thus
Every unselected base point contributes centres. At a selected terminal, exactly labels have the required bit equal to 1, and there is one additional target. The total number of centres is consequently