Manuscript Offprint
arXiv:2610.32806Low-Crossing Spanning Paths via Quasi-Uniform Sampling and their Applications
Abstract
Given a set system , we consider the problems of constructing perfect matchings and spanning paths (also known as Welzl orders) of with low crossing numbers with respect to . Matchings with low crossing numbers were originally introduced in the late 1980s in the seminal works of Welzl [29, 30] and Chazelle-Welzl [7], who showed that any set system with bounded dual VC-dimension has a matching with crossing number , which is optimal.
Low-crossing matchings and spanning paths have found several applications outside of their initial realm of computational geometry, including algorithmic graph theory, model checking, and game theory. In many of these applications, is near-linear in , which motivated the search for an improved construction for this regime. However, the proposed new algorithms provided only average-case bounds or sub-optimal crossing number guarantees for [5, 12].
We propose a new quasi-uniform sampling based framework. This allows us to obtain a simple algorithm with expected running time of , which improves upon the previous-best running time of [9] when .
Our result has several immediate consequences, including new faster algorithms for constructing low-crossing spanning paths for set systems induced by balls, as well as for neighborhood set systems of graphs. Moreover, we get the first quadratic-time algorithm for combinatorial discrepancy, with nearly optimal discrepancy (up to a log factor), for bounded dual VC-dimension set systems. Beyond these applications, we believe that our idea could be applied to other algorithms that use the multiplicative weight update method.
2012 ACM Subject Classification Theory of computation → Randomness, geometry and discrete structures
Keywords and phrases Low-crossing spanning paths, Welzl orders, quasi-uniform sampling, VC-dimension
Digital Object Identifier 10.4230/LIPIcs...
AI usage The authors declare that they did not use generative AI tools to obtain their results or to write this article. An LLM was used to check the manuscript before submission, leading to minor technical and grammatical corrections.
© M. Csikós and N. H. Mustafa; licensed under Creative Commons License CC-BY 4.0 Leibniz International Proceedings in Informatics LIPICS Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany

XX:2 Low-Crossing Spanning Paths via Quasi-Uniform Sampling and their Applications
1 Introduction
Let be a set system (also known as hypergraph, concept class, or range space), where X is a finite set of n elements and S is a collection of m subsets of X. To distinguish the sets of S from arbitrary subsets of X, we will refer to the elements of S as ranges.
A perfect matching of a set is a partition of into disjoint pairs. Given a set system , we say that a set crosses a pair iff . The crossing number of a perfect matching with respect to is defined to be the maximum number of edges of crossed by any .
Matchings with low crossing numbers were originally introduced by Welzl [29, 30] for the special case where X is a set of points in and S is induced on X by half-spaces. Welzl's result was then generalized by Chazelle and Welzl [7] to a broader class of set systems using the notion of the dual shatter function.
▶ Definition (dual shatter function). For a set system , the dual shatter function of is defined as follows. For any , denotes the maximum number of equivalence classes on defined by a -element subfamily , where are equivalent w.r.t. iff belongs to the same sets of as .
Remark. The family of set systems with dual-shatter function bounded polynomially in includes set systems with bounded dual VC-dimension. In particular, a set system with dual VC-dimension at most has dual shatter function upper bounded by [27, 28]. It also includes most of the commonly-studied geometric set systems such as the primal and dual set systems induced by half-spaces, balls, intersections/unions of bounded complexity geometric objects and more generally, algebraic varieties (see [24]).
The method of Chazelle and Welzl, together with Haussler's packing lemma bound [18] led to the following fundamental theorem on the existence of matchings with low crossing numbers.
▶ Theorem A ([7, 18]). Let be a set system with , , and dual shatter function . Then there exists a perfect matching on with crossing number .
Theorem A has had numerous applications for geometric set systems, including range searching, low-discrepancy colorings, near-optimal sized epsilon-approximations, to name a few. We refer the reader to these books [6, 23, 26] for proofs and applications of Theorem A. Moreover, the generality of Theorem A makes possible applications in several other fields of computer science: communication complexity and learning theory [2], algorithmic graph theory [13], logic and verification [11], or game theory [19].
Low-crossing matchings are a key algorithmic tool, and improving their algorithmic complexity has been an active area of research [16, 4, 14, 9, 13, 10]. For geometric set systems, the current best algorithms rely on spatial partitioning tools such as cuttings [4] or polynomial partitioning [1]. However, these geometric techniques cannot give improved algorithms for
If is odd, then we partition X into disjoint pairs plus a singleton set.
In other words, the number of equivalence classes for a given , is the number of non-empty cells, with respect to , in the Venn diagram of the sets of .
XX:3
Theorem A in its abstract generality. For the general case of set systems with polynomially bounded dual shatter functions, the current-best algorithm for computing a matching of crossing number takes expected time [9]. One can get faster algorithms at the cost of a sub-optimal crossing number. In particular, Csikós and Mustafa [10] showed that for any , it is possible to compute matchings with crossing number in time . Recently, Dreier and Kuske [12] proposed an algorithm in the more restricted setting of set systems with primal and dual shatter functions in . Their guaranteed crossing number is , which is optimal if and the construction takes time , where .
Finally, we make several remarks about our setup and related problems.
Matchings vs paths vs trees. The equivalence of low-crossing spanning paths and trees is a classical result, see e.g. Chapter 15 in the book of Pach and Agarwal [26]. We also note that by iteratively constructing low-crossing matchings, one can obtain spanning paths with asymptotically the same crossing number guarantees (Appendix B.1).
Worst case vs amortized cost. A related problem is that of computing a tree (or a matching, path) that minimizes the sum of the crossings of the ranges, over all edges of the tree (instead of minimizing the maximum number of edges crossed by any set). This sum minimization problem can be reduced to the minimum spanning tree problem under the so-called crossing metric, which can be approximated in near-linear time for set systems induced by lines [20, 17]. Very recently, Chan et al. [5] proposed an -time algorithm to compute a spanning path with low average crossing number in general set systems, where is the time complexity of enumerating elements of a given range.
Input model. Low-crossing matchings and spanning paths have many applications in several domains, where the inputs have different representations. In order to encompass all these setups in one algorithmic framework, we assume that the input set system is given by a list of all elements in and ranges in together with a membership oracle, which tells us, for a given element and range whether in constant time.
▶ Theorem 1. Given a set system with dual-shatter function , one can compute a perfect matching of with crossing number in expected time .
▶ Remark. The parameter need not be an integer.
Theorem 1 gives the following corollary on low-crossing spanning paths (the proof is given in Appendix B.1).
▶ Corollary 2. Given a set system with dual-shatter function , one can compute a spanning path of with crossing number in expected time .
Our algorithm is almost linear in the input size and improves upon the previous-best method for the case , which is an important setting for fundamental combinatorial
XX:4 Low-Crossing Spanning Paths via Quasi-Uniform Sampling and their Applications
problems, as well as for geometric systems admitting small test-sets. We list some of the applications leading to improved running times in Section 2.1.
Like previous algorithms, we construct the matching iteratively, adding one edge at each iteration. What makes the problem computationally hard is that simply picking a uniformly random edge at each iteration fails. To avoid this problem, earlier algorithms fell into two categories: a) either they spend a lot of time to carefully choose the edge to add [7]; or b) they sample an edge according to a weight distribution maintained on all edges, which then has to be carefully updated at each iteration [9]. Besides being complicated, this becomes prohibitively expensive for computing a partition into k-sized sets instead of edges, where one would then need to track the weights of k-sized sets.
The new algorithm combines the best of both worlds, with an idea that was surprisingly missed in earlier works: we maintain weights only on S and at each iteration, we pick a random range in S according to these weights. Now, at iteration t, we simply pick a random cell of the Venn diagram induced by the t previously picked random ranges, and pick a uniform random edge from that cell. This idea allows for a fast and simple algorithm.
This new, quasi-random, way of selecting a good edge at each iteration avoids the problem of assigning weights to edges, and contains just enough non-randomness to guarantee a low-crossing matching. As a plus, the method can trivially be adapted to compute a low-crossing partition into sets of size , by picking a random -element subset from the selected cell of the Venn diagram. Indeed, Theorem 1 is an immediate consequence of a more general algorithm for constructing low-crossing balanced partitions. Given a set and a parameter , a balanced -partition of is a partition of into sets such that for all , we have or . We say that a range crosses a set if holds. The crossing number of a partition of is defined to be the maximum number of sets of the partition crossed by some . We can derive Theorem 1 from the following more general result (the method PARTITION is presented in Algorithm 1, Section 3).
▶ Theorem 3. Given a set system with dual-shatter function , and a positive integer , the algorithm PARTITION((X, ), ) returns a balanced -partition with expected crossing number
in expected time . In particular, setting , we get a balanced t-partition with expected crossing number , in expected time .
Remarks.
Theorem 3 immediately implies Theorem 1 by setting .
Theorem 3 gives balanced t-partitions with non-trivial crossing number (that is, crossing number ) for .
2.1 Algorithmic Consequences
Theorem 1 improves upon the previous-best running time of for the case when . In this section, we list several consequences, across different areas,
XX:5
which fall in this regime. The table below summarizes the main running time improvements.
| PROBLEM | PREVIOUS-BEST RUNNING TIME | OUR RESULT |
|---|---|---|
| Combinatorial discrepancy dual | (SoCG '21) [9] | (Corollary 4) |
| Distance-1 graph neighborhood cover | (FOCS '24) [11] | (Corollary 5) |
| Matchings w.r.t. balls in | (SoCG '21) [9] | (Corollary 6) |
| AMM supporting LMSR with | (SODA '25) [19] | (Corollary 9) |
We give the precise statements of the above table below; the proofs follow known techniques, and are presented in the Appendix.
Combinatorial discrepancy. Using Theorem 1 in a standard iterative halving scheme [25] gives the first quadratic time algorithm for combinatorial discrepancy for set systems with bounded dual shatter functions with optimal guarantees (up to a log factor).
▶ Corollary 4. Let , , , be a set system and be a constant such that . Then there is a randomized algorithm which constructs a coloring of with expected discrepancy , in expected time .
▶ Remark. For this setup, the previous-best algorithm with discrepancy guarantee had running time [9].
Graph theory. Given a graph , a distance-1 neighborhood cover of is a family of subsets of such that for each , there exists a set such that , where denotes the closed neighborhood of . A key theorem in a recent breakthrough in FO model checking [11] (FOCS 2024) stated that if the set system has primal shatter function for some , then there exists a distance-1-neighborhood cover of such that each vertex of lies in sets of and each set of has diameter at most 4. The proof used the original result of Chazelle and Welzl [7] to show that there exists a spanning path on such that for each , the set is the union of intervals of this path. Using Corollary 2, we improve the running time of of their algorithm to get the following theorem.
▶ Corollary 5. Given on vertices with its adjacency list or matrix, if the set system has primal shatter function for some , then one can construct a distance-1 neighborhood cover of , such that each vertex of lies in sets of and each set of has diameter at most 4, in expected time .
Combining Corollary 5 with the algorithmic framework of [11], we improve the running time of their main result [11, Theorem 1] from to expected time . We note that for a result similar to Corollary 5 was proved by Dreier and Kuske [12], who also obtained the same running time improvement for [11, Theorem 1].
XX:6 Low-Crossing Spanning Paths via Quasi-Uniform Sampling and their Applications
Geometry. Certain geometric families (e.g. half-spaces or balls) admit test-sets that are small-sized subfamilies such that if a matching has low crossing number with respect to this subfamily, then it is guaranteed to have low crossing number with respect to the whole family. In particular, Csikós and Mustafa observed that any set system induced by balls in admits a test-set of size [9, Lemma 17] (the precise statement is given in the Appendix). Combining this with their time algorithm, they achieved a running time of for balls in . Using the same test-set lemma, that is, applying Theorem 1 to , we obtain the following corollary.
▶ Corollary 6. Given a set of points in , one can compute a perfect matching of with crossing number in time for the set system induced by balls.
Subquadratic algorithms. Theorem 3 can be combined with a hierarchical method and uniform sampling to get an -time algorithm for matchings with sub-linear crossing numbers.
▶ Corollary 7. Let be a set system with dual-shatter function , where and are fixed. For every , there is a randomized algorithm that constructs a perfect matching of with expected crossing number and expected running time . In particular, if , choosing gives expected crossing number and expected running time . This running time is subquadratic for every fixed .
Game theory. In a prediction market, traders can buy and sell bets (formally called securities) that pay out based on the outcomes of future events. These markets can be modelled with a set system , where X denotes the set of possible outcomes and S contains the combinations of outcomes on which traders can place bets. Given a set system and a market state, an automated market maker's (AMM) task is to determine the prices of (combinations of) securities using a cost function and update the prices and market states after each trade. Some popular cost functions are the logarithmic market scoring rule (LMSR) and the quadratic scoring rule (QMSR), whose definitions are given in Appendix C.
Recently, Hossain, Wang, and Yu [19] (SODA 2025) showed that one can construct an AMM with sub-linear time complexity for a combinatorial prediction market with an LMSR cost function if and only if the corresponding set system has bounded VC-dimension.
In the case of bounded VC-dimension, a key algorithmic tool in [19] was a data-structure designed to maintain multiplicatively evolving weights on and to support a query operation, which returns the total weight of a range in . Formally, in the multiplicative range query and range update (RQRU) problem, given a set system and a weight function , we want to efficiently perform for any and :
= query(S): return ;
= update(S, w) : update W with
Hossain et al. [19] showed that one can construct a data-structure for the multiplicative RQRU problem with sub-linear time complexity per operation, using partition trees based on low-crossing spanning paths [7]. Theorem 3 together with their framework yields the following corollary.
XX:7
▶ Corollary 8. Given a set system with dual shattering dimension , one can construct a data-structure supporting multiplicative RQRU with time per operation and with an expected preprocessing time of .
Combining Corollary 8 with the framework of Hossain et al. [19], we get the following corollary.
▶ Corollary 9. Given a prediction market with associated set system with dual shattering dimension , one can construct an AMM supporting LMSR (or QMSR) cost function with running time with an expected preprocessing time of .
▶ Remark. For this setup, the previous-best algorithm with time per operation had preprocessing time [19].
We get improved preprocessing times in applied scenarios, with , for instance, TOP -CANDIDATES where traders can bet on the outcome of top candidates among candidates. There are a total of top securities and possible outcomes.
Organisation. We present the new algorithm in Section 3. The proof of Theorem 3 is presented in Section 4 and the proofs of the Corollaries are given in the Appendix.
3 The Algorithm
The key idea in the original proof of Welzl and Chazelle-Welzl (and its variations that have been developed in the past 36 years) is to iteratively construct a matching M edge-by-edge, guided by an exponential weight distribution on the ranges.
The initial algorithm of Chazelle and Welzl (1989) assigned a weight to each set of S, where had weight that exponentially increased with the edges of the current matching M crossed by S. Then at each iteration, it picked an edge into M that minimized the sum of the weights of the sets crossing that edge. The analysis crucially used the fact that in every iteration we picked a minimum edge, which turns out to be the algorithmic bottleneck.
Recent work was able to improve the running times by assigning a weight distribution on the edges [9], with the weight essentially based on the above function of Chazelle-Welzl. Then at each iteration, the new edge is picked by sampling from the edges according to this probability distribution. This simplified the selection of edges at each iteration, which resulted in faster running times.
In this paper, we make the first departure from this general scheme: to further speed up the algorithm, we will no longer track the weight of each individual edge in . Instead, we will maintain a partition of X into clusters and maintain (implicitly) a weight distribution on these clusters. Then at each iteration, we sample an edge from a quasi-uniform distribution: we first pick a cluster according to this weight distribution and then an edge spanned by points in that cluster uniformly at random. The key point here is that this distribution can be maintained more efficiently than earlier methods. The clusters will be adjusted incrementally after each iteration. In parallel, we maintain a weight distribution on S, following the classic exponential reweighing scheme with random updates (via martingale analysis), which will guarantee low crossing numbers.
XX:8 Low-Crossing Spanning Paths via Quasi-Uniform Sampling and their Applications
Algorithm 1 PARTITION
while do
return .
Algorithm 2 SUBALGO
for all
for all
while do
sample a range according to
sample a part according to
i.i.d. uniform random sample of with probability
define from by doubling the weight of each range in crossing
uniform distribution on
return
The proof is via a subtle charging argument: at each iteration, we refine the partition using a range picked according to the current weight distribution on . Thus no edge crossing will be picked in the future. This is then used to argue that the crossing number of the sets due to future edges is small.
Algorithm for general partitions
The previously highlighted ideas are formalized in the technical subroutine SUBALGO (Algorithm 2). We note that in SUBALGO, we will not maintain the distribution and its support explicitly. We give more details on the algorithmic way to maintain and sample from efficiently in the next section (proof of Theorem 3).
As we stated in the introduction, our main result on matchings with low crossing numbers is a special case of Theorem 3 that concerns low-crossing balanced t-partitions.
To avoid unnecessary repetitions, we present the algorithm for general -partitions, from which the algorithm for low-crossing matchings can easily be deduced via substituting . Furthermore, to keep the description simple, the algorithm PARTITION constructs (possibly more than ) parts of size and returns all the remaining points as the last part. To get exactly balanced parts, one can extend the algorithm to . If , with , the adapted algorithm would first build parts of size and then parts of size , stopping each phase once the required number of parts has been built.
XX:9
The main algorithm PARTITION that is used to establish Theorem 3 is presented in Algorithm 1. Here is a user-specified parameter that dictates the trade-off between the running time and the crossing number.
A challenge that comes with this approach is that, as the result of the refinement at each iteration, it may be that after iterations, each cluster of X contains only points (this follows from the dual shatter function bound). Thus we can no longer continue, and are forced to restart with the remaining points all in one cluster. However, we show that the losses due to this re-start form a geometric series which then gives the required bound at the end.
4 Proof of Theorem 3
Theorem 3 will be based on three key properties of SUBALGO, which we now state. The proof of these properties will be presented in later sections.
Let , and define the function as
The first property follows from the update rule of the weight functions 's.
▶ Property 1. Let be the stopping time of SUBALGO, with the returned parts . Then,
Note that Property 1 in fact provides an upper-bound on the overall crossing number of parts returned by a single call of SUBALGO.
By analysing the evolution of weights , we get the next property.
▶ Property 2. Let be the stopping time of SUBALGO and let be the ranges picked by SUBALGO. Then we have
The next property relates the above two in expectation.
▶ Property 3. Let and be the random variables corresponding to the parts and ranges picked by SUBALGO . Then for each , we have
where the above expectations are over the choices of .
XX:10 Low-Crossing Spanning Paths via Quasi-Uniform Sampling and their Applications
The above three properties are consequences of the weight management of the algorithm. In particular, they hold for any set system. The key point where we use the structural assumption on the set system (bounded dual shatter dimension) is in analysing the halting time of SUBALGO.
▶ Lemma 10. For any set system with dual-shatter function and an integer , the halting time of SUBALGO satisfies
That is, the union of parts returned by SUBALGO((X, S), a, p) covers elements of X.
Proof of Lemma 10. The algorithm SUBALGO continues as long as . In the beginning, has elements, and at iteration we remove the parts in that either
■ intersect , or
■ are crossed by the range .
As no element in can appear in any later part, we consider the elements in covered or removed, for all later iterations.
This means that after iterations, contains those -element subsets of the uncovered set of elements that are not crossed by . Observe that an -subset is not crossed by if and only if all of its elements belong to the same equivalence class w.r.t. . Therefore, it is sufficient to guarantee that at least one of these equivalence classes has at least elements which then implies that .
Since has dual-shatter dimension , the ranges define at most equivalence classes on . By the pigeonhole principle, there exists an equivalence class with at least elements. Thus, as long as we have , there will be an equivalence class with at least
elements and thus the algorithm SUBALGO continues. In conclusion, the stopping time T has to satisfy
Now we are ready to establish our main result – Theorem 3.
Assume that PARTITION made calls to the subroutine SUBALGO, resulting in the sub-partitions , and let be the number of parts returned by the -th run of SUBALGO. Further, let be the parts and be the ranges picked during the -th run.
XX:11
Bounding subroutine crossing number.
By Properties 1, 3, and 2 and substituting , we have for any ,
(2)
Bounding . We count the number of SUBALGO calls made by PARTITION in phases, where phase lasts as long as . Note that as , there are at most phases. Let denote the number of calls of SUBALGO in phase . By Lemma 10, each call in phase outputs a sub-partition covering at least
elements. Thus, can be bounded as
This gives the following bound on the total number of calls to SUBALGO:
Bounding total crossing number. Note that the crossing number of the partition R returned by PARTITION can be bounded as
where the ‘+1’ term corresponds to the last part added to R. Combining this with Equation (2), we get
Running time. Finally, we bound the running time of the algorithm PARTITION. It makes calls to SUBALGO and apart from that, it spends time in total to update X between the calls.
A key point is that in SUBALGO, we do not store and explicitly. Instead, we only maintain the equivalence classes on defined by , that we call cells for brevity. Each cell is stored in the form of a list of elements contained in the cell. To obtain , we go through the points of each list, and partition into two lists if crosses
XX:12 Low-Crossing Spanning Paths via Quasi-Uniform Sampling and their Applications
that cell. During the same pass, we also delete the elements contained in . This takes time at each iteration, assuming membership access.
Sampling a range from can be easily done in time .
Given the lists at the start of iteration , we can sample from in two steps. First, we choose a cell randomly according to the distribution
Second, we sample an -sized subset from the chosen list uniformly at random. Note that then a part of size belonging to , say lying in a cell , is picked with probability
i.e., the uniform distribution on .
The set of ranges can be computed in time . We have , and the weights of the ranges in can thus be updated in expected time . Thus the total expected overall time is for each iteration.
The total number of iterations throughout the whole run of PARTITION is t, therefore the expected time complexity of PARTITION is
In the remaining sections, we prove Properties 1 and 2. The proof of Property 3 is a standard double-counting argument, often used in the analysis of MWU algorithms, therefore it is deferred to Appendix A.
4.1 Proof of Property 1
▶ Property 1. Let T be the stopping time of SUBALGO((X, S), a, p), with the returned parts . Then,
Proof. For a random event , let denote the indicator random variable of .
We prove the property by analysing the total weight of ranges of S after T iterations. On one hand, the total weight can be lower-bounded by the maximum:
XX:13
On the other hand, we can examine the evolution of weights over the iterations as follows:
Putting the two bounds together and taking the logarithm, we get
If , then for all and , thus taking total expectation we obtain
which implies Property 1. Therefore let us assume that .
Observe that for each fixed iteration , the random variables and are independent, thus the expected value of the RHS of Equation (4) can be written as
(5)
Separating the two factors in the expectation of the LHS of Equation (4) is less straightforward. Our goal is to show that is close to . However, since we have a maximization, we cannot use linearity of expectation and so we need to be careful with the cross-iteration dependencies (in particular, depend on ). Instead, we observe that we only need to show that
Indeed, using this bound, Equations (4) and (6) give the following guarantee in expectation:
XX:14 Low-Crossing Spanning Paths via Quasi-Uniform Sampling and their Applications
which gives the statement of Property 1.
Hence, all that remains is to prove that Equation (6) holds. Observe that for any choice of functions , we have , which gives
(7)
We will prove the following claim about the probability of the RHS random variable exceeding . Let be a fixed upper bound on .
▷ Claim 11.
The proof of Claim 11 is a standard application of an Azuma-type inequality for martingales, its proof is deferred to Appendix A.
Applying Claim 11 and using that , we get
For each fixed range , consider the exponential of half its sum over iterations , setting all increments after iteration to zero. Conditional on the history just before is sampled, a crossing iteration contributes a factor with mean ; otherwise, including after stopping, the factor is 1. Applying conditional expectations successively over the fixed steps shows that each range's expected exponential is at most 1. Since the maximum of these exponentials is at most their sum, . Jensen's inequality and therefore give
This, together with Equation (7), proves Equation (6).
This concludes the proof of Property 1.
▶
XX:15
4.2 Proof of Property 2
▶ Property 2. Let be the stopping time of SUBALGO and let be the ranges picked by SUBALGO. Then we have
Proof. Recall that are uniform distributions on decreasing supports. In particular, there are sets of parts such that
Thus we can express the sum as follows:
Moreover, consists of those elements (parts) in that are
crossed by the range , or
■ intersected by the part .
Let denote the number of elements in crossed by , and let . Then, and
Thus,
The proof of Property 2 follows immediately from the next claim by substituting and .
▷ Claim 12. For any and any sequence such that and , we have
Proof. Observe that since and , the series has at most positive terms. Let be the number of positive terms and assume wlog that
XX:16 Low-Crossing Spanning Paths via Quasi-Uniform Sampling and their Applications
. Then we have that
Furthermore, observe that for any ,
Note that for each , the term appears precisely once over all , and so
This concludes the proof of Property 2.
References
1 P. K. Agarwal, J. Matoušek, and M. Sharir. On range searching with semialgebraic sets. II. SIAM Journal on Computing, 42(6):2039–2062, 2013.
2 N. Alon, S. Moran, and A. Yehudayoff. Sign rank versus VC dimension. In COLT, 2016.
3 N. Alon and J. H. Spencer. The probabilistic method. John Wiley & Sons, 2016.
4 T. M. Chan. Optimal partition trees. Discrete Comput. Geom., 47(4):661–690, 2012.
5 T. M. Chan, H.-C. Chang, J. Gao, S. Kisfaludi-Bak, H. Le, and D. W. 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, 2025.
6 B. Chazelle. The Discrepancy Method: Randomness and Complexity. Cambridge University Press, New York, NY, USA, 2000.
7 B. Chazelle and E. Welzl. Quasi-optimal range searching in spaces of finite VC-dimension. Discrete Comput. Geom., 4:467–489, 1989.
XX:17
8 Y. Chen and D. M. Pennock. A utility framework for bounded-loss market makers. In Ronald Parr and Linda C. van der Gaag, editors, UAI 2007, Proceedings of the Twenty-Third Conference on Uncertainty in Artificial Intelligence, Vancouver, BC, Canada, July 19-22, 2007, pages 49–56. AUAI Press, 2007.
9 M. Csikós and N. H. Mustafa. Escaping the Curse of Spatial Partitioning: Matchings with Low Crossing Numbers and Their Applications. In Proceedings of Symposium on Computational Geometry (SoCG 2021), volume 189, pages 28:1–28:17, 2021.
10 M. Csikós and N. H. Mustafa. An optimal sparsification lemma for low-crossing matchings and its applications to discrepancy and approximations. In 51st International Colloquium on Automata, Languages, and Programming, ICALP, pages 49:1–49:18, 2024.
11 J. Dreier, I. Eleftheriadis, N. Mählmann, R. McCarty, M. Pilipczuk, and Sz. Torunczyk. First-Order Model Checking on Monadically Stable Graph Classes. In 2024 IEEE 65th Annual Symposium on Foundations of Computer Science (FOCS), pages 21–30, Los Alamitos, CA, USA, October 2024. IEEE Computer Society.
12 J. Dreier and C. Kuske. Near-linear time computation of Welzl orders on graphs with linear neighborhood complexity, 2026. arXiv:2602.14625.
13 G. Ducoffe, M. Habib, and L. Viennot. Diameter computation on H-minor-free graphs and graphs of bounded (distance) VC-dimension. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1905–1922, 2020.
14 P. Giannopoulos, M. Konzack, and W. Mulzer. Low-crossing spanning trees: an alternative proof and experiments. In Proceedings of EuroCG, 2014.
15 R. Hanson. Combinatorial information market design. Inf. Syst. Frontiers, 5(1):107–119, 2003.
16 S. Har-Peled. Approximating spanning trees with low crossing number. arXiv, abs/0907.1131, 2009.
17 S. Har-Peled and P. Indyk. When crossings count—approximating the minimum spanning tree. In Proceedings of the sixteenth annual symposium on Computational geometry, pages 166–175, 2000.
18 D. Haussler. Sphere packing numbers for subsets of the Boolean n-cube with bounded Vapnik-Chervonenkis dimension. Journal of Combinatorial Theory, Series A, 69(2):217–232, 1995.
19 P. S. Hossain, X. Wang, and F.-Y. Yu. Designing automated market makers for combinatorial securities: A geometric viewpoint. In Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1329–1365, 2025.
20 P. Indyk and R. Motwani. Approximate nearest neighbors: towards removing the curse of dimensionality. In Proceedings of the thirtieth annual ACM symposium on Theory of computing, pages 604–613, 1998.
21 C. Koufogiannakis and N. E. Young. A nearly linear-time PTAS for explicit fractional packing and covering linear programs. Algorithmica, 70(4):648–674, 2014.
22 J. Matoušek. Efficient partition trees. Discrete & Computational Geometry, 8(3):315–334, 1992.
23 J. Matoušek. Geometric Discrepancy: An Illustrated Guide. Springer Berlin Heidelberg, 1999.
24 J. Matoušek. Lectures on discrete geometry, volume 212. Springer Science & Business Media, 2013.
25 J. Matoušek, E. Welzl, and L. Wernisch. Discrepancy and approximations for bounded VC-dimension. Combinatorica, 13(4):455–466, 1993.
26 J. Pach and P. K. Agarwal. Combinatorial Geometry. John Wiley & Sons, New York, NY, 1995.
27 N. Sauer. On the density of families of sets. Journal of Combinatorial Theory, Series A, 13:145–147, 1972.
28 S. Shelah. A combinatorial problem; stability and order for models and theories in infinitary languages. Pacific Journal of Mathematics, 41:247–261, 1972.
XX:18 Low-Crossing Spanning Paths via Quasi-Uniform Sampling and their Applications
29 E. Welzl. Partition trees for triangle counting and other range searching problems. In Proceedings of Annual Symposium on Computational Geometry (SoCG 1988), pages 23–33, 1988.
30 E. Welzl. On spanning trees with low crossing numbers. In Data Structures and Efficient Algorithms, Final Report on the DFG Special Joint Initiative, pages 233–249, 1992.
A Proofs of Claim 11 and Property 3
▷ Claim 11.
Proof. We use the following Azuma-type inequality for martingales.
▶ Lemma 13 ([21, Lemma 10]). Let and be sums of non-negative random variables, where is a random stopping time with finite expectation, for all , and
Then for any and , we have .
We apply Lemma 13 in the following way. For each and , consider the random variables
which are measurable with respect to and . For any and , we have . Furthermore, since is independent of , we have
as for any and .
Therefore, Lemma 13 with implies that for any and ,
Rearranging the terms and applying the union bound over all , we get
Setting , we conclude the proof of Claim 11.
◀
XX:19
▶ Property 3. Let and be the random variables corresponding to the parts and ranges picked by SUBALGO((X, S), a, p). Then for each , we have
where the above expectations are over the choices of .
Proof. The proof will follow by conditioning on the past choices of the algorithm. Let be one realization of all random variables used by the algorithm in iterations ; that is, and let denote the set of all such feasible tuples. We have
Observe that and are measurable with respect to , and thus for any , we have
Since we have equality for each , the total expectations are also equal.
B Proofs of Corollaries
B.1 Proof of Corollary 2
We will create a spanning path as a union of matchings, iteratively constructed on exponentially decreasing input point-sets.
Let be the matching given by Theorem 1 for the input . Let be a set of vertices obtained by keeping only one endpoint of each edge in . Now we apply Theorem 1 for the input and denote the resulting matching by . Observe that consists of disjoint paths of length 3 (plus at most one smaller component). We continue with which is a set of vertices obtained by keeping only one extremity of each path in . Applying Theorem 1 to , we obtain a matching such that consists of disjoint paths of length 7. We continue like that for iterations, after which is a single spanning path.
The crossing number of can be bounded by the sum of crossing numbers of the 's. Note that is the result of the iterative application of Theorem 1 where
XX:20 Low-Crossing Spanning Paths via Quasi-Uniform Sampling and their Applications
Algorithm 3 LOWDISCCOLOR((X, S))
for do // we skip this step if return
input is with . Therefore, by Theorem 1, the crossing number of w.r.t. (and equivalently w.r.t. ) is . Thus, the crossing number of can be bounded as
.
Similarly, the total running time can be bounded as
.
B.2 Proof of Corollary 4
There is a direct link between low-crossing matchings and low-discrepancy colorings.
▶ Lemma 14. Let be a set system, , , and let be a perfect matching of with crossing number with respect to and for each edge define
and . Then the expected discrepancy of is at most .
▶ Remark. A ‘high probability version’ of Lemma 14 is well-known [25, Lemma 2.5] and implies the above bound through basic probabilistic calculations. For completeness, we include the proof of Lemma 14 at the end of this section.
Lemma 14 naturally yields an algorithm to compute a low-discrepancy coloring of any set system with bounded dual-shatter dimension , see LOWDISCCOLOR (Algorithm 3).
Importantly, constructing the coloring can be done very easily while we construct a matching, therefore the running time of LOWDISCCOLOR and PARTITION are precisely the same. Therefore, Corollary 4 is an immediate consequence of Theorem 1 and Lemma 14.
Proof of Lemma 14. Let be a fixed range. We express the sum of colors over elements of as
,
XX:21
where . Since for any , is a sum of at most independent random variables. We use the following concentration bound from [3]
▷ Claim 15 (Theorem A.1.1 from [3]). Let be independent -valued random variables with . Then for any
Applying Claim 15, we get that for any fixed and ,
By the union bound, we get
Finally, we bound the expected discrepancy by applying Fubini's theorem
if . This concludes the proof of Lemma 14.
B.3 Proof of Corollary 5
We restate and prove Corollary 5 in a self-contained manner, taken from [11].
XX:22 Low-Crossing Spanning Paths via Quasi-Uniform Sampling and their Applications
▶ Corollary 16. Let be a graph on vertices, and be a parameter such that the primal shatter function for the set system is . Then there exists a family of subsets of such that
a) for each , there exists an such that ,
b) the diameter, w.r.t. distances in G, of each set of K is at most 4, and
c) each lies in sets of .
The family K can be computed in time .
Proof. We first give the construction and its running time. Then we prove that it satisfies the required three properties. For adjacency-list input, first build an adjacency matrix in time, so that closed-neighborhood membership tests take constant time.
Step 1. As the neighborhood set system is self-dual, we can apply Corollary 2 to get a low-crossing spanning path of , which gives an ordering of such that for each , the set can be written as a union of intervals of this ordering. Let be the set of these intervals for , and let . As there are ranges , Corollary 2 takes time . We do not construct explicitly.
Step 2. Construct a greedy covering as follows: add to an interval containing and covering the maximum number of other elements of . Say ends at . Next add to an interval that covers and the maximum number of remaining uncovered elements of . And so on from left to right until all elements of are covered. This can be done in time as follows: make a list of all vertices of that contain in their closed neighborhood. Then for the next vertex , throw away the vertices in that do not contain in their closed neighborhood. Continue as long as is non-empty. The vertex that stays the longest in gives the interval . If there are several such vertices, we take an arbitrary one. We can continue similarly from the next uncovered vertex. Processing each vertex in the ordering takes time, so in total we can construct in time . Note that if is the right endpoint of , then starts after ; otherwise it would have been a better choice than . Hence each vertex lies in at most two intervals of .
Step 3. For each , add the following one set to : .
For each , constructing takes time . The total time is , as each vertex of lies in at most two intervals of .
Property a) follows since we include for each in at least one set of , as the intervals in cover .
Property b) is due to the fact that from any , we can go to a vertex in in at most one step, and then to the common vertex that defined the interval in at most one more step. Thus any two vertices of are at distance at most 4.
Property c). Fix any . Due to the greedy construction of , an interval in can only intersect at most three intervals in . Indeed, if met both and with , it would contain and end after , contradicting the choice of . Since if and only if , can be contained in at most three sets for each interval of . As , the proof follows.
XX:23
B.4 Proof of Corollary 6
Test-sets are small-sized subfamilies (of half-spaces and balls) such that if a matching has low crossing number with respect to this subfamily, then it is guaranteed to have low crossing number with respect to any member of the family (of half-spaces and balls respectively). It is well known that for set systems induced by half-spaces, one can compute a linear-sized test set in linear time [22]. As it was observed recently [9], one can obtain test-sets for balls via a simple lifting argument, yielding the following guarantee.
▶ Lemma 17. [9, Lemma 17] Let X be a set of n points in . There exists a set of at most balls such that if a perfect matching of X has crossing number with respect to , then its crossing number with respect to any ball in is at most .
Applying Theorem 1 to the set system provided by Lemma 17, we conclude Corollary 6.
B.5 Proof of Corollary 7
We prove a more general statement on -partitions which implies Corollary 7 by substituting .
▶ Theorem 18. Given a set system with dual-shatter function , a positive integer , and a parameter , we can find a balanced -partition that has expected crossing number
in expected time , where and .
Proof. We will apply a divide-and-conquer approach to construct a partition.
First, we construct a balanced -partition using Theorem 3 with sampling probability . Then the idea is that for each , we can apply Theorem 3 again to construct a balanced -partition of , where denotes the set of those ranges in that cross . This then gives a partition with parts. By Theorem 3, any range crosses parts among and
within a part , crosses at most parts of .
(9)
As Property (9) holds for every , the expected value of the total crossing number is
XX:24 Low-Crossing Spanning Paths via Quasi-Uniform Sampling and their Applications
Algorithmically, the above procedure is too costly, as constructing the sets of ranges for each takes time overall. Instead, observe that we do not need to keep track of ‘small’ ranges in as the crossing number of any range with respect to any partition of is at most . In particular, if , then Property (9) is trivially satisfied for .
Therefore, after we have created a balanced -partition, for each , we call PARTITION , where
Note that does not need to store , only (a pointer to) the range . By the above discussion, the partition constructed this way still has the expected crossing number stated in Equation (10).
By Theorem 3, it takes time to construct the first partition. After this, we can recover every range in using an -net for the set system with parameter . As has dual shatter dimension bounded by a function of , the VC-dimension of is also bounded by a function of , and so a uniform random sample of size
is an -net with high probability (the constants in depend on ).
Now observe that if is a -net of , then only if it crosses . Therefore, we can call partition on the set . The advantage is that it is easier to find the elements of . Indeed it is sufficient to test for each and each whether which takes time for one part , and time in total. For each , let . By Theorem 3, it takes
time to build all the parts in . Recall that by construction, any range in crosses parts of the first partition, which implies
Therefore, the expected total running time can be bounded by
▶
XX:25
C Automated market makers for prediction markets
In this section we give precise definitions and prove Corollaries 8 and 9. We follow the exposition and techniques of [19].
C.1 Preliminaries
In a prediction market, traders can buy and sell bets (formally called securities) that pay out based on the outcomes of future events. These markets can be modelled with a set system , where X denotes the set of possible outcomes and contains the combinations of outcomes on which traders can place bets. Given a set system and a market state, an automated market maker's (AMM) task is to determine the prices of (combinations of) securities using a cost function and update the prices and market states after each trade.
For example, TOP L CANDIDATES [19] allows traders to bet on the outcome of top L candidates among candidates. Given a set with , a top L security for H is the set of permutations where the top L candidates are from H. There are a total of top L securities and possible outcomes.
Following [19], we consider automated market makers that determine security prices using a potential function , called a cost function. The market state is specified by a vector , where denotes the number of shares of security sold by the AMM for the outcome .
▶ Definition 19. Given a set system and a cost function , an AMM for a prediction market with cost function on securities takes an initial state , offers securities for all , and supports a sequence of price, cost, and buy operations taking one of the following forms: for any set , shares , and state ,
Price operation returns the current price of security for S, that is, price_C(S) = ;
Cost operation returns the current cost of s shares of security for S, that is,
Buy operation buy_C(S, s) updates the state .
In particular, we consider two examples of cost functions:
The logarithmic market scoring rule (LMSR) proposed by Hanson [15] is a popular cost-function-based market making mechanism. It uses the logarithmic scoring rule to interact with a sequence of traders to trade securities and maintain a probability distribution over an outcome space X of n points in an online manner.
where is the liquidity parameter. The market designer can choose to control how fast the price moves in response to trading and limit the worst-case loss of the market maker to .
XX:26 Low-Crossing Spanning Paths via Quasi-Uniform Sampling and their Applications
The quadratic scoring rule (QMSR) is another popular choice of proper scoring rule with the following cost function [8]
where is the liquidity parameter.
Hossain et al. [19] showed that designing efficient AMMs for the above two cost functions is equivalent to designing an efficient data-structure for the following two classical problems.
▶ Definition 20 (Multiplicative range query and range update). Given a set system and a weight function , the multiplicative range query and range update (multiplicative RQRU) problem asks for an algorithm that performs for any and the following operations:
query(S) : compute and return ;
update(S, w) : update W with
▶ Definition 21 (Additive range query and range update). Given a set system , , and a weight function , the additive range query and range update (additive RQRU) problem asks for an algorithm that performs for any and the following operations:
query(S) : compute and return ;
update(S, w) : update W with
C.2 Partition tree scheme
The key element in the data-structure constructed by Hossain et al. [19] is partition trees with low visiting numbers.
▶ Definition 22 (Partition tree and visiting number). Given a set system , a partition tree is a rooted tree where each node is associated with a canonical subset and a list of its children such that
for any non-leaf node v, its children's node-sets form a partition of its node-set;
the node-set of the root r is the base set, that is, ;
node-sets of leaves are singletons.
Given a canonical set , we say that the range crosses if there exist such that . We also say that visits node if either is the root of or crosses the node-set of 's parent. The visiting number of the partition tree is the maximum number of nodes visited by any single range in .
The next theorem summarizes some of the main results of Hossain et al. [19].
XX:27
▶ Theorem 23 (Theorems 3.2 and 4.1 in [19]). Given a set system and a partition tree with visiting number , there are algorithms that support
the query and update operations of the multiplicative (or additive) RQRU problem on with time complexity ;
price, cost, and buy operations for LMSR (or QMSR) with time complexity .
In fact, one can use low-crossing spanning paths to construct balanced partition trees of low visiting number.
▶ Lemma 24 (Chazelle and Welzl [7]). Given a set system and a spanning path of with crossing number , one can construct a balanced binary partition tree with visiting number at most in time .
Thus, Corollary 2 implies the following statement.
▶ Lemma 25. Given a set system with dual-shatter function , one can construct a balanced binary partition tree with visiting number in time .
Lemma 25 and Theorem 23 prove Corollaries 8 and 9.