A WSPD, Separator and Small Tree Cover for -Packed Graphs
Abstract
The -packedness property, proposed in 2010, is a geometric property that captures the spatial distribution of a set of edges. Despite the recent interest in -packedness, its utility has so far been limited to Fréchet distance problems. An open problem is whether a wider variety of algorithmic and data structure problems can be solved efficiently under the -packedness assumption, and more specifically, on -packed graphs.
In this paper, we prove two fundamental properties of -packed graphs: that there exists a linear-size well-separated pair decomposition under the graph metric, and there exists a constant size balanced separator. We then apply these fundamental properties to obtain a small tree cover for the metric space and distance oracles under the shortest path metric. In particular, we obtain a tree cover of constant size, an exact distance oracle of near-linear size and an approximate distance oracle of linear size.
Keywords and phrases:
Well-separated pair decomposition, separator, tree cover, distance oracles, realistic graphsFunding:
Joachim Gudmundsson: This research was partially funded by the Australian Government through the Australian Research Council (project number DP240101353).Copyright and License:
2012 ACM Subject Classification:
Theory of computation Computational geometryFunding:
This research was partially funded by the Australian Government through the Australian Research Council (project number DP240101353).Editors:
Pat Morin and Eunjin OhSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
The study of graphs and their properties is a cornerstone of theoretical computer science. A wide variety of graph properties have been proposed in the literature, such as planarity [34], treewidth [4] and doubling dimension [23]. By assuming these graph properties, one can often obtain better algorithmic or data structure solutions to graph theoretic problems.
The -packedness property [14], proposed in 2010, is a geometric property that captures the spatial distribution of the edges in a graph. A graph is -packed if, for any positive real and any ball of radius , the length of the edges contained in the ball is at most . Driemel, Har-Peled and Wenk [14] introduced the -packedness property for polygonal curves, and showed that one can compute the Fréchet distance between a pair of -packed curves in near-linear time. In 2013, Gudmundsson and Smid [21] adapted the -packedness definition to graphs, and proposed a Fréchet distance data structure on -packed trees with long edges that decides if there is a path in the tree with small Fréchet distance to a query curve. In 2023, Gudmundsson, Seybold and Wong [20] generalised the result of [21] by proposing a Fréchet distance data structure for all -packed graphs.
Despite the recent interest in -packedness, its utility so far has been limited to Fréchet distance problems. Moreover, the fundamental properties of -packed graphs are not well studied, thereby limiting the number of problems that can be solved efficiently on -packed graphs. An open problem is whether -packed graphs have applications beyond Fréchet distance problems.
1.1 Our Results
We show that -packed graphs lie in the intersection of two important graph classes, that is, doubling metrics and bounded treewidth graphs. Using the properties of doubling metrics and bounded treewidth graphs, one can obtain, for -packed graphs, a linear-size well-separated pair decomposition, a linear-size exact distance oracle, a linear-size approximate distance oracle, and a constant-size tree cover. However, these constructions have processing times that are either randomised, depend on the spread of the -packed metric, or are exponential in the treewidth. See Table 1, Column 3111A reviewer pointed us to the tree-like properties of the graph and the possibility of adapting the work by Chazelle [10]. However, such adaptations would be likely to incur an exponential dependency on ..
We provide the first deterministic constructions that are independent of the spread of the -packed metric, for the aforementioned structures. Moreover, our preprocessing times and data structure sizes are polynomial in both and , whereas previous constructions are not.
We summarise the main results of our paper. First, we show that any -packed graph in admits a well-separated pair decomposition (WSPD) of size , where is the separation constant of the WSPD. Note that we avoid the factor that appears in the sizes of many other WSPD constructions [7, 25]. Then, we show that any -packed graph in admits an -size separator. We use this separator to show that -packed graphs have treewidth, and admits an exact distance oracle (EDO) of size . Finally, we combine our WSPD and the EDO to construct a distortion tree cover with trees. Our tree cover implies an approximate distance oracle (ADO) of size and query time. We summarise our results in Table 1.
| Previous | New | ||||||
| Preprocessing | Size | Source | Preprocessing | Size | Source | ||
| WSPD | [38] | Thm 3 | |||||
| Rand. | [25] | ||||||
| EDO | [9]+[15] | Thm 18 | |||||
| Tree cover | [3] + [38] | Thm 5 | |||||
| ADO | [3] + [38] | Thm 6 | |||||
1.2 Related work
The -packedness property is a popular model for realistic curves. A wide range of Fréchet distance problems have been studied on -packed curves, including map matching [11], the mean curve [27], the shortcut Fréchet distance [13], subtrajectory clustering [5, 18] and the approximate nearest neighbour data structure [12]. However, -packed graphs are less well understood [20, 21], despite often being used as a vital stepping stone towards a related property called -low density, which was also introduced by Driemel and Har-Peled [13]. Low density graphs have been studied in map matching [11, 6]. The well-separated pair decomposition of [22] has size polynomial in and , but its disadvantage over those stated in Table 1 is that it has size .
Well-Separated Pair Decompositions (WSPD) are used for compact representation of the quadratic distances between pairs of points in the metric. For metrics that allow for a sub-quadtratic size WSPD, they have therefore been used as fundamental tools to approximate solutions to a range of proximity problems that require looking at the distances between all pairs of points, such as nearest neighbour, diameter, stretch and minimum spanning tree. Not all metrics allow for a WSPD of subquadratic size, an example of which is the metric induced by a star tree with unit weight on all edges. For this metric, any WSPD requires a quadratic number of pairs. For a point set in , where is considered a constant, Callahan and Kosaraju [7] showed that there exists a WSPD with separation factor of size that can be computed in time. In contrast to this, we show that for -packed graphs, the size of the WSPD is not exponential in , while maintaining that the size is linear. For graphs with bounded doubling dimension (), Har-Peled and Mendel [25] designed a expected time randomised algorithm to construct a WSPD of linear size with logarithmic query time. They also designed a deterministic construction which incurs a logarithmic dependency on the aspect ratio of the metric space. In the full version of this paper we show that a -packed graph has doubling dimension . However, in contrast to previous results, our deterministic construction of the WSPD is, to the best of our knowledge, the first that does not depend on the aspect ratio of the metric space and does not incur any factors exponential in the dimension, assuming constant dimension.
Distance oracles are shortest path data structures for graphs. For planar graphs, Lipton and Tarjan [34, 35] proved the planar separator theorem, which states that any planar graph with vertices has a balanced separator of size . Using the separator to build a separator hierarchy, they constructed an exact distance oracle of size . Thorup [39] and Klein [30] independently presented -approximate distance oracles for planar graphs of size , for any constant . Subsequent works [28, 29, 41, 33] improved the preprocessing time, space, and query time. Dvořák and Norin [15] showed that if a graph admits a small size balanced separator, it also has small treewidth. Combined with our separator results this implies that -packed graphs have treewidth . Chaudhuri and Zaroliagis[9] designed an exact distance oracle whose preprocessing time is single exponential in the treewidth of the graph. In contrast to these results, our algorithms do not incur any terms exponential in .
Approximate distance oracles have been studied on non-planar graphs. Thorup and Zwick [40] constructed a -approximate distance oracle of size on any general graph, and showed that the size bound is optimal under the Erdös girth conjecture. Gudmundsson, Levcopoulos, Narasimhan and Smid [19] provided a -approximate distance oracle of size on any -spanner, assuming are constants. Gao and Zhang [16] constructed a -approximate distance oracle of size for any unit-disk graph, assuming is a constant.
Balanced separators of sublinear size have been found for planar graphs [34], graphs of bounded genus [17], graphs that exclude a fixed minor [1], and graphs that are the 1-skeletons of simplicial complexes in 3-dimensions [36]. They have been used as a fundamental tool in devising efficient algorithms for graphs [1, 17, 35] and in numerical analysis [32, 36]. Randomized balanced separators can be found in expected linear time for -packed graphs [26].
Metric embeddings approximate harder metric spaces by simpler, well-structured metric spaces, such as tree metrics. A tree cover for a finite metric space is a small number of trees such that the distance between any two points in the metric is preserved with low distortion in at least one of the trees. Tree covers with -distortion and a constant number of trees have been found for Euclidean metrics [2], doubling metrics [3] and planar metrics [8].
2 Preliminaries
Let be a geometric graph in consisting of the point set and edge set . In this paper, we consider graphs in a fixed -dimensional space that satisfy -packedness. We denote the graph distance between two nodes as , and their Euclidean distance as . We first define a Well-Separated Pair Decomposition [7] for Euclidean point sets, followed by its counterpart for geometric graphs.
Definition 1 (Geometric Well-Separated Pair).
Let be a real positive number, and let and be two finite sets of points in . We say that and are well-separated with respect to if the distance between the bounding boxes and of and , respectively, is at least .
Here refers to the radius of , which is half its diameter.
Definition 2 (Geometric Well-Separated Pair Decomposition (WSPD)).
Let be a set of points in , and let be a real positive number. A well-separated pair decomposition (WSPD) for , with respect to , is a sequence of pairs of nonempty subsets of , for some integer , such that (i) for each with , and are well separated w.r.t. , and (ii) for any two distinct points and of , there is exactly one index with , such that and , or vice versa.
The notion of well-separated pairs and WSPD can easily be extended to graphs. For the graph version we will simply replace all the geometric distances with the distances in the graph. We will refer to a WSPD in a graph as WSPDG.
3 Technical Overview
In Section 3.1, we describe our deterministic WSPDG construction. In Section 3.2, we discuss our separator theorem. Finally, in Section 3.3 we show how to use the WSPDG and the exact distance oracle to construct a -distortion tree cover of size for -packed metrics. Due to space limitation, all omitted proofs are available in the full version of the paper on ArXiv.
3.1 A Well-Separated Pair Decomposition for -packed Graphs
Split trees [7] or quadtrees [37] are commonly used in the construction of a geometric WSPD of a point set. An essential property of these is that the maximum Euclidean distance between two points contained in the same cell is always bounded by a function of the diameter of the cell. We construct a tree that fulfills a similar purpose to the trees above but for graph distances between points. We call this new type of tree a -connected tree (-CT). Each cell, corresponding to a cube , of the -connected tree is a -connected set, meaning that points contained in the cell are within a graph distance of at most from one another. To construct the -CT, we use a bottom up approach. The leaves of the compressed quadtree are already -connected sets. At higher levels of the compressed quadtree, we consider the -connected sets of its children, and merge together pairs of previously -connected sets that are also a -connected set in the higher level. To obtain an efficient running time, we make two observations. First, when computing the -connected sets for a higher level, it suffices to maintain a vertex representative for each -connected set of the lower level. Second, to check if a pair of sets are -connected, it suffices to check whether their representatives are path-connected in the cube centred at the cell but with double its radius.
To upper bound the graph diameter of the -connected set in each cell of the -CT we compute the length of intersection of edges with the cell and the surrounding cells in a canonical grid. To do this efficiently, we note that not all edges intersecting with a cell can contribute to a -connected component inside the cell. We therefore construct a data structure that can be queried for the total length of all edges that can contribute to a -connected component contained in a cell.
Combining these ideas obtains the following theorem. For details refer to Section 4.2.
Theorem 3.
Given a -packed graph in , for fixed , one can construct a WSPDG with separation factor of size in time, using space.
3.2 A Separator Theorem for -packed Graphs
We prove that every -packed graph admits a balanced vertex separator of size . We start with the ring separator of Har-Peled and Mendel [25], which states that for a point set in , one can efficiently compute a pair of balls so that of the points are inside the inner ball, and of the points are outside the outer ball, where is the doubling constant of . Using the ring separator, we construct a max-flow instance in a similar fashion to Gudmundsson et al. [20] to locate a cut of size . This cut -separates the graph, in that it separates the graph into two components each with at most points. We obtain the following theorem, for details refer to Section 5.
Theorem 4.
Given a -packed graph in , where is fixed, with vertices, one can find a separator of size that -separates , in time.
3.3 A Small Tree Cover for -packed Graphs
Our approach follows that of the celebrated “Dumbbell Theorem” [2] for Euclidean metrics. For -packed graphs, we construct a linear number of dumbbells from the WSPDG, which is constructed using the graph distances. The dumbbells are partitioned into groups, each of which satisfies the length-group property and the empty-region property with respect to the graph distance. The -packedness property enables us to partition the dumbbells into a small number (depending only on the packedness value and the separation ratio of WSPDG) of groups, each of which satisfies the empty-region property. The main difficulty is proving the packing lemmas required for establishing the empty-region property. A dumbbell tree, which connects the dumbbells in a group hierarchically, is built for each group of dumbbells. The -packedness property and the -CT also enable us to do range searching and efficiently build the dumbbell trees. The dumbbell trees together constitute a tree cover for the -packed metric. We obtain the following theorem. For details refer to the full version of the paper.
Theorem 5.
Given a -packed graph in of fixed and any . In time, one can construct dumbbell trees, each of size , such that the dumbbell trees constitute a -distortion tree cover for the graph metric induced by .
The tree cover of Theorem 5 immediately implies a -approximate distance oracle for the -packed metric.
Corollary 6.
Given a -packed graph in of fixed , and any , one can preprocess it in time, using space, to answer a -approximate distance query between any two vertices in in time.
4 A Well-Separated Pair Decomposition for -packed Graphs
Given a -packed graph in dimensions, where is fixed, and a positive constant , we show how to deterministically construct a linear-size WSPDG with separation factor (Section 4.2). Section 4.1 introduces some important terminology. In Section 4.2 we show that one can construct such a well-separated pair decomposition in time.
4.1 Notation and Preliminaries
Given a geometric graph and cube in , we define the diameter of to be the length of a diagonal and denote it as . We define the radius of to be half the diameter and denote it as . We define to be the subset of vertices of within . We will need the following definitions.
Definition 7 (-Connected Set).
Given a geometric graph and a cube in . Let be the concentric cube with twice the diameter. Two vertices are -connected if there is a path between and that lies within and has length at most . We say that a set of vertices is a -connected set with respect to if all pairs of vertices in are -connected, and no vertex in is -connected to a vertex in .
Definition 8 (Partition into -Connected Sets).
Let be a cube in . A partition of into -connected sets is a set of disjoint subsets of that satisfies the following properties:
-
1.
.
-
2.
For all s.t. , is a -connected set with respect to .
4.2 Constructing a WSPD for -packed graphs
Split trees [7] or quadtrees [37] are commonly used in the construction of a geometric WSPD of a point set. An essential property of these is that the Euclidean distance between two points contained in the same cell is always bounded by the diameter of the cell. In order to construct a WSPDG we construct a new type of tree, which we will refer to as a -connected tree (-CT). This tree will satisfy the similar property, but relative to graph distances between the points in the graph, rather than their Euclidean distances. The main difference is that cells in a -connected tree may overlap. We formally define this tree below.
Definition 9 (-Connected Tree (-CT)).
Given a connected geometric graph in and a quadtree of , a -connected tree of is a rooted tree, where every node stores a cube , corresponding to a cell of , and a representative point of a -connected set with respect to . The root of stores the cube corresponding to the cell stored in the root of , and every leaf contains a single point in . In particular, the leaves contained in the subtree rooted at contain the points in that are represented by the point stored at .
Once we have a -CT, it remains to upper bound the graph diameter of the -connected set represented in each cell. With this upper bound, one can then follow a standard approach to compute a WSPDG with separation factor from the -CT.
In Subsection 4.2.1 we show how to construct a -CT, , of a -packed graph . In Subsection 4.2.2 we then show how to upper bound the diameter of the -connected set represented in each cell of . In Subsection 4.2.4 we analyze the complexity of the construction.
4.2.1 Constructing a -Connected Tree
The algorithm to compute a -CT takes as input a -packed graph , as well as its corresponding compressed quadtree . Without loss of generality we assume that the cell representing the root of is a unit cube. The level value of a node in is said to be if the cell/cube stored at has side length . The root of has level value .
We are now ready to construct a -CT, . Initially, every leaf in becomes a leaf in , and are then deleted from . Assume w.l.o.g. that the number of distinct level values in the remaining compressed quadtree is and let be the level values sorted in decreasing order. Let be the set of nodes in having level value , .
Next, we iteratively process the values in in decreasing order. For each value in we will build a graph from . Initially we set .
Set . For each node , let be a concentric cube of twice the diameter of . The algorithm picks an arbitrary point in and merges all nodes in that are path-connected to in within the cube . For all edges , if both and have been merged, we remove the edge. If only one endpoint has been merged, we move this endpoint to and redefine the length of the edge to be the Euclidean distance between this point and . Finally, we remove any parallel edges. Note that all changes are made to , while stays unaffected. The surviving node is the representative point in of the merged set of nodes in . A node is added to storing and its children are the nodes in storing the points that were merged into . The algorithm repeats this process until all the points in have been merged into representative points and the process has been complete for each .
In the next iteration, we let . The nodes in are now processed using as input to merge the nodes in . This continues until all the level values in have been processed. The process for iteration of the algorithm is visualised in Figure 1.
The proof of Lemma 10 can be found in the full version of the paper.
Lemma 10.
Given a -packed graph the above algorithm produces a valid -connected tree of .
4.2.2 Bounding the Graph Diameter of a Cell in the -CT
In order to construct the well-separated pairs, it is necessary to upper bound the graph diameter of the -connected set represented in each cell of the -CT, , constructed above. Let be a node in . Denote the corresponding canonical cube as , and a concentric cube of twice its diameter as . We call a connected subgraph of a connected component of a cell if it is fully contained within , with at least one vertex inside . To compute an upper bound on the graph diameter of the -connected set we instead give an upper bound on any connected component of . This upper bound can then be copied across during the construction of . We show how to compute this upper bound below.
Observe that in order for an edge to contribute to a connected component of , its length can be at most twice the diameter of . Let us call the set of edges of length at most twice the diameter, which overlap with , relevant edges w.r.t. (see Figure 2).
Let be the set of neighboring canonical cubes on a grid (note that not all members of may correspond to cells in ). Observe that all edges in any connected component associated with must be a subset of the union of the relevant edges w.r.t. , and all the relevant edges w.r.t. cubes in . We refer to the total overlapping length of with relevant edges w.r.t. as REL(). The above observation allows us to upper bound the graph diameter of any connected component associated with by .
It thus remains to compute, for all , REL() and REL() for all . Let denote the length of an edge . For all we compute the canonical cubes of size such that . Denote this set of canonical cubes as . For each cube , store the length of the overlap of the edge with the cube. Note that this correctly gives us the value REL() for all . One can now use Lemma 2.11 from [24] to compute a compressed quadtree from . For any cell in whose corresponding cube is not in , initialize its value . Next, one can use a bottom-up approach to compute, for every cell in its relative edge length. For each parent, simply add the relative edge lengths stored in the children to its current value. In order to perform efficient searching on we preprocess it into a finger tree, , using similar techniques to Theorem 2.14 in [24]. We are now ready to compute, for each cell , an upper bound on the graph diameter of any connected component. For each , search for the largest cell in whose corresponding cube is fully contained within , and return the relative edge length stored at the cell. If such a cell does not exist, return zero. Repeat the search for each and add up the results. The resulting value is our upper bound on the graph diameter of any connected component of the cell . We call this value .
When constructing the -CT from using the algorithm in Section 4.2.1, we upper bound the graph diameter of any connected component of by .
The proof of Lemma 11 can be found in the full version of the paper.
Lemma 11.
The value for any cell in upper bounds the graph diameter of the connected subgraph represented in the cell .
We are now ready to describe the construction of a WSPDG for -packed graphs.
4.2.3 Constructing the WSPDG
Construct a compressed quadtree and compute, for each cell , using the techniques described in Section 4.2.2. Next, construct a -CT, , from using the algorithm described in Section 4.2.1 and store, for each cell , created from , as an upper bound on the graph diameter of the connected component represented in . Apply the algorithm of [24] (Section 3.1.1) to compute a WSPDG from . To determine whether a pair of nodes is well-separated we use the upper bound on the graph diameter and the Euclidean distance between their representatives.
To bound the size of the resulting WSPDG we first bound the size of by observing that each cell contains at most -connected sets w.r.t. .
Lemma 12.
For all , , each vertex in within represents a -connected component in with respect to .
Proof.
We argue the algorithm maintains this property by induction on the number of iterations. The algorithm initially uses as input the -packed graph . After the first iteration of the algorithm, for each node , each surviving point in represents a set of points in that were connected to within . Since is -packed, we can conclude that the distance between and any point merged into is at most times the radius of , and therefore times the diameter of .
Assume that the algorithm maintains the invariant for iterations 1 to . Note that the graph , used as input for iteration , is no longer guaranteed to satisfy -packedness. However, observe that after each merge step, the representative nodes in always correspond to original nodes present in . Since the process of merging each connected set into a single node can only reduce the length of the paths between the remaining representatives, the graph distances between the remaining nodes in can only have decreased in comparison to their original graph distance in . We therefore maintain the property that, for every node , for each representative point in within , the points in that it represents can be at most times the diameter of apart in . With the help of Lemma 12 one can bound the size of .
Lemma 13.
For every node , the number of nodes added to is at most .
Proof.
From Lemma 12 we know that each node in must represent a valid -connected set in . We now observe that one can upper bound the number of -connected sets in by the number of -connected sets in . This observation follows from the fact that for any , was constructed by merging -connected sets w.r.t. in , for every . Note that the argument used in the proof of Lemma 12 shows that this process, for every , can only cause the length of the paths between surviving nodes to become smaller. Since the position of surviving nodes does not change from their original position in , it follows that the number of -connected components in within can only be smaller than that in within . It thus remains to argue that the number of -connected components within each , for all is at most . To this end, note that in order for any pair of points in to be disconnected within , every path between them must contain a subpath which intersects the boundaries of and and therefore has length at least , as shown in Figure 3. From the -packedness of we conclude there cannot be more than such paths in . We conclude there can be at most -connected sets found by the algorithm.
With the help of the above lemma we can analyse the size of the resulting WSPDG using a simple charging argument inspired by the one used in [24].
Lemma 14.
The resulting WSPDG, , is -well separated and is of size .
Proof.
The fact that is -well separated follows from our use of the Euclidean distance as a lower bound on the distance between two representatives, and our use of dubG (Section 4.2.2) as upper bound on the graph diameter, to determine whether a pair is -well separated.
To prove the size of we use a simple charging argument. For a pair , let denote the parent of in . Assume the last call to the algorithm in [24] (Section 3.1.1) was via . We charge the pair to and argue any node can be charged at most times. Since the pair was considered not well-separated by the algorithm, it follows that Consider a geometric ball of radius centered at . Note that the connected set in represented by must be fully contained inside . By -packedness, there can be at most candidates for . Since can have at most children, it follows that there are candidates for . We conclude a node can be charged at most in this way. By Lemma 13 there are nodes in . This concludes the lemma.
We now argue the runtime and space complexity of our construction.
4.2.4 Complexity analysis
In Lemma 15 the runtime of the construction of the -CT is analysed, as well as the size of the resulting tree. We then analyse the runtime and space complexity for computing the upper bound on the graph diameter of the subgraph represented in each cell of the -CT in Lemma 16. Finally, with the help of these lemmas we analyse the construction time and space complexity of our WSPDG in Theorem 3. The proofs of Lemma 15 and Lemma 16 can be found in the full version of the paper.
Lemma 15.
Given a -packed graph , one can construct a -CT of size in time.
Lemma 16.
Let be a -packed graph and its corresponding compressed quadtree. One can compute an upper bound on the graph diameter of any -connected component contained in , for all , in time, using at most space.
With the help of the above lemmas we obtain the following theorem. See 3
Proof.
Constructing the compressed quadtree requires time and space. Upper bounding the diameter using the techniques introduced in Section 4.2.2 can be done in time, using space (Lemma 16). We conclude from Lemma 15 that we can construct a -CT, , from in time, using space. Finally, using the construction from [24] we can compute the WSPDG from in time using space. This concludes the proof.
5 A Separator Theorem for -packed Graphs
A subset of vertices of a graph with vertices is called a (balanced) separator if the remaining vertices can be partitioned into two sets and such that there are no edges between and , with and for some constant . The subset is said to -separate the graph.
In this section we show how to compute a separator of size for any -packed graph that -separates the graph. The constant is the doubling constant of .
We have the following separating lemma.
Lemma 17.
Given a set of points in , where is fixed, one can compute a ball , which is centered at and has radius , such that contains at least points of , where is the doubling constant of , and of twice the radius contains at most points of . The running time of the algorithm is .
Proof.
Let be the radius of the smallest ball enclosing points of . Har-Peled and Mazumdar [24] gave an algorithm for computing a -enclosing ball with radius at most in time. As a result, one can compute a -enclosing ball in time.
Now one can prove that contains at most points. Since , by the doubling property, can be covered by at most balls of radius . Note that any ball of radius contains strictly less than points. Thus contains at most points. This concludes the proof of the lemma.
Based on Lemma 17, we can show that one can construct separators of size that -separate -packed graphs, as shown in Theorem 4.
Theorem 4. [Restated, see original statement.]
Given a -packed graph in , where is fixed, with vertices, one can find a separator of size that -separates , in time.
Proof.
First we construct a separator . Then we prove that satisfies the required properties. Finally we analyze the running time of the algorithm.
Let be the vertices of -packed graph and run the algorithm described in Lemma 17. Let be the computed ball that contains at least vertices of . Let be the vertices of contained in and let be the vertices of lying outside . See Figure 4 for an illustration.
Now set up a max-flow instance. A similar construction was used in Lemma 11 of [20]. Set the capacity of each edge of to 1. Let the vertices in be the sources, and let the vertices in be the sinks. Run the Ford-Fulkerson algorithm ( [31], Chapter 7) on the instance. According to the max-flow min-cut theorem ( [31], Chapter 7), the max-flow of the instance is equal to its min-cut. Let be a min-cut and let be the set of edges from to , where and let . Choose one endvertex for each edge in and add it to ( is initially empty). Let and let . This finishes the construction of .
Next we show that (i) has size , and (ii) -separates . Property (ii) follows from being a min-cut. Since contains at least vertices of and , contains at least vertices of . Since contains at least vertices of and , contains at least vertices of . Property (i) follows from -packedness. In the max-flow instance, the value of the max-flow is . Since all the edges have capacity 1, there are edge-disjoint paths from to . Each such path pierces both the inner and the outer boundaries of the -dimensional spherical shell . Due to -packedness, the length of edges inside the spherical shell is at most . Since the width of the spherical shell is , there are at most edge-disjoint paths from to . Therefore .
Finally we analyze the running time of the algorithm. Running the algorithm in Lemma 17 on the vertices of takes time. We use the Ford-Fulkerson algorithm to solve the max-flow instance. The running time of the algorithm is proportional to the number of edges in times the value of the max-flow. Since and there are edges in , solving the max-flow instance takes time. Since , the overall running time of the algorithm is .
Putting the above results together gives us an exact distance oracle. We refer the reader to the full version of the paper for further details.
Theorem 18.
Given any -packed graph with vertices, using preprocessing time and space, a distance query between any two vertices in can be answered in time.
This enables us to obtain Theorem 5 and Corollary 6 (see the full version of the paper for details).
References
- [1] N. Alon, P. D. Seymour, and R. Thomas. A separator theorem for graphs with an excluded minor and its applications. In Proceedings of the 22nd Annual ACM Symposium on Theory of Computing (STOC), pages 293–299, 1990.
- [2] S. Arya, G. Das, D. M. Mount, J. S. Salowe, and M. H. M. Smid. Euclidean spanners: short, thin, and lanky. In Proceedings of the 27th Annual ACM Symposium on Theory of Computing (STOC), pages 489–498, 1995.
- [3] Y. Bartal, O. N. Fandina, and O. Neiman. Covering metric spaces by few trees. J. Comput. Syst. Sci., 130:26–42, 2022. doi:10.1016/J.JCSS.2022.06.001.
- [4] U. Bertele and F. Brioschi. Nonserial dynamic programming. Academic Press, Inc., 1972.
- [5] F. Brüning, J. Conradi, and A. Driemel. Faster approximate covering of subcurves under the Fréchet distance. In Proceedings of the 30th Annual European Symposium on Algorithms, (ESA), volume 244 of LIPIcs, pages 28:1–28:16, 2022. doi:10.4230/LIPICS.ESA.2022.28.
- [6] K. Buchin, M. Buchin, J. Gudmundsson, A. Popov, and S. Wong. Map matching queries under Fréchet distance on low-density spanners. In Proceedings of the 40th Annual Symposium on Computational Geometry (SoCG), 2024.
- [7] P. B. Callahan and S. R. Kosaraju. A decomposition of multidimensional point sets with applications to -nearest-neighbors and -body potential fields. J. ACM, 42(1):67–90, 1995. doi:10.1145/200836.200853.
- [8] H. Chang, J. Conroy, H. Le, L. Milenkovic, and C. Than. Covering planar metrics (and beyond): O(1) trees suffice. In Proceedings of the 64th IEEE Annual Symposium on Foundations of Computer Science (FOCS), pages 2231–2261, 2023.
- [9] S. Chaudhuri and C. D. Zaroliagis. Shortest paths in digraphs of small treewidth. part I: sequential algorithms. Algorithmica, 27(3):212–226, 2000. doi:10.1007/S004530010016.
- [10] B. Chazelle. Computing on a free tree via complexity-preserving mappings. Algorithmica, 2:337–361, 1987. doi:10.1007/BF01840366.
- [11] D. Chen, A. Driemel, L. J. Guibas, A. Nguyen, and C. Wenk. Approximate map matching with respect to the Fréchet distance. In Proceedings of the 13th Workshop on Algorithm Engineering and Experiments (ALENEX), pages 75–83, 2011.
- [12] J. Conradi, A. Driemel, and B. Kolbe. (1+)-ANN data structure for curves via subspaces of bounded doubling dimension. Comput. Geom. Topol., 3(2):6:1–6:22, 2024. URL: https://www.cgt-journal.org/index.php/cgt/article/view/45.
- [13] A. Driemel and S. Har-Peled. Jaywalking your dog: Computing the Fréchet distance with shortcuts. SIAM Journal on Computing, 42(5):1830–1866, 2013. doi:10.1137/120865112.
- [14] A. Driemel, S. Har-Peled, and C. Wenk. Approximating the Fréchet distance for realistic curves in near linear time. Discret. Comput. Geom., 48(1):94–127, 2012. doi:10.1007/S00454-012-9402-Z.
- [15] Z. Dvorák and S. Norin. Treewidth of graphs with balanced separations. J. Comb. Theory B, 137:137–144, 2019. doi:10.1016/J.JCTB.2018.12.007.
- [16] J. Gao and L. Zhang. Well-separated pair decomposition for the unit-disk graph metric and its applications. SIAM J. Comput., 35(1):151–169, 2005. doi:10.1137/S0097539703436357.
- [17] J. R. Gilbert, J. P. Hutchinson, and R. E. Tarjan. A separator theorem for graphs of bounded genus. J. Algorithms, 5(3):391–407, 1984. doi:10.1016/0196-6774(84)90019-1.
- [18] J. Gudmundsson, Z. Huang, A. van Renssen, and S. Wong. Computing a subtrajectory cluster from -packed trajectories. In Proceedings of the 34th International Symposium on Algorithms and Computation (ISAAC), volume 283 of LIPIcs, pages 34:1–34:15, 2023. doi:10.4230/LIPICS.ISAAC.2023.34.
- [19] J. Gudmundsson, C. Levcopoulos, G. Narasimhan, and M. H. M. Smid. Approximate distance oracles for geometric spanners. ACM Trans. Algorithms, 4(1):10:1–10:34, 2008. doi:10.1145/1328911.1328921.
- [20] J. Gudmundsson, M. P. Seybold, and S. Wong. Map matching queries on realistic input graphs under the Fréchet distance. In Proceedings of the 34th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1464–1492, 2023.
- [21] J. Gudmundsson and M. H. M. Smid. Fast algorithms for approximate Fréchet matching queries in geometric trees. Comput. Geom., 48(6):479–494, 2015. doi:10.1016/J.COMGEO.2015.02.003.
- [22] J. Gudmundsson and S. Wong. A well-separated pair decomposition for low density graphs. CoRR, abs/2411.08204, 2024. doi:10.48550/arXiv.2411.08204.
- [23] A. Gupta, R. Krauthgamer, and J. R. Lee. Bounded geometries, fractals, and low-distortion embeddings. In Proceedings of the 44th Annual Symposium on Foundations of Computer Science (FOCS), pages 534–543, 2003.
- [24] S. Har-Peled. Geometric Approximation Algorithms. American Mathematical Society, 2011.
- [25] S. Har-Peled and M. Mendel. Fast construction of nets in low-dimensional metrics and their applications. SIAM J. Comput., 35(5):1148–1184, 2006. doi:10.1137/S0097539704446281.
- [26] S. Har-Peled and K. Quanrud. Approximation algorithms for polynomial-expansion and low-density graphs. SIAM J. Comput., 46(6):1712–1744, 2017. doi:10.1137/16M1079336.
- [27] S. Har-Peled and Benjamin Raichel. The Fréchet distance revisited and extended. ACM Trans. Algorithms, 10(1):3:1–3:22, 2014. doi:10.1145/2532646.
- [28] K. Kawarabayashi, P. N. Klein, and C. Sommer. Linear-space approximate distance oracles for planar, bounded-genus and minor-free graphs. In Proceedings of the 38th International Colloquium on Automata, Languages and Programming (ICALP), volume 6755 of Lecture Notes in Computer Science, pages 135–146, 2011. doi:10.1007/978-3-642-22006-7_12.
- [29] K. Kawarabayashi, C. Sommer, and M. Thorup. More compact oracles for approximate distances in undirected planar graphs. In Proceedings of the Twenty-Fourth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 550–563, 2013.
- [30] P. N. Klein. Preprocessing an undirected planar network to enable fast approximate distance queries. In Proceedings of the 13th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 820–827, 2002.
- [31] Jon M. Kleinberg and Éva Tardos. Algorithm design. Addison-Wesley, 2006.
- [32] R. Kyng, R. Peng, R. Schwieterman, and P. Zhang. Incomplete nested dissection. In Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 404–417, 2018.
- [33] H. Le and C. Wulff-Nilsen. Optimal approximate distance oracle for planar graphs. In Proceedings of the 62nd IEEE Annual Symposium on Foundations of Computer Science (FOCS), pages 363–374, 2021.
- [34] R. J. Lipton and R. E. Tarjan. A separator theorem for planar graphs. SIAM J. Appl. Math, 36(2):177–189, 1979.
- [35] R. J. Lipton and R. E. Tarjan. Applications of a planar separator theorem. SIAM J. Comput., 9(3):615–627, 1980. doi:10.1137/0209046.
- [36] G. L. Miller and W. P. Thurston. Separators in two and three dimensions. In Proceedings of the 22nd Annual ACM Symposium on Theory of Computing (STOC), pages 300–309, 1990.
- [37] G. Narasimhan and M. H. M. Smid. Geometric spanner networks. Cambridge University Press, 2007.
- [38] K. Talwar. Bypassing the embedding: algorithms for low dimensional metrics. In László Babai, editor, Proceedings of the 36th Annual ACM Symposium on Theory of Computing (STOC), pages 281–290, 2004.
- [39] M. Thorup. Compact oracles for reachability and approximate distances in planar digraphs. J. ACM, 51(6):993–1024, 2004. doi:10.1145/1039488.1039493.
- [40] M. Thorup and U. Zwick. Approximate distance oracles. J. ACM, 52(1):1–24, 2005. doi:10.1145/1044731.1044732.
- [41] C. Wulff-Nilsen. Approximate distance oracles for planar graphs with improved query time-space tradeoff. In Proceedings of the 27th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 351–362, 2016.
