Abstract 1 Introduction 2 The framework 3 The algorithm for disks 4 Extension to fat triangles 5 Concluding remarks References

An 𝑢⁒(𝒏⁒π₯𝐨𝐠⁑𝒏) Algorithm for Single-Source Shortest Paths in Disk Graphs

Mark de Berg ORCID Department of Mathematics and Computer Science, TU Eindhoven, The Netherlands Sergio Cabello ORCID Faculty of Mathematics and Physics, University of Ljubljana, Slovenia
Institute of Mathematics, Physics and Mechanics, Slovenia
Abstract

We prove that the single-source shortest-path problem on disk graphs can be solved in O⁒(n⁒log⁑n) expected time, and that it can be solved on intersection graphs of fat triangles in O⁒(n⁒log3⁑n) time.

Keywords and phrases:
shortest path, geometric intersection graph, disk graph, fat triangles
Funding:
Mark de Berg: Supported by the Dutch Research Council (NWO) through Gravitation-grant NETWORKS-024.002.003.
Sergio Cabello: Funded in part by the Slovenian Research and Innovation Agency (P1-0297, N1-0218, N1-0285). Funded in part by the European Union (ERC, KARST, project number 101071836). Views and opinions expressed are however those of the authors only and do not necessarily reflect those of the European Union or the European Research Council. Neither the European Union nor the granting authority can be held responsible for them.
Copyright and License:
[Uncaptioned image] © Mark de Berg and Sergio Cabello; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation β†’ Design and analysis of algorithms
Related Version:
Full Version: https://arxiv.org/abs/2506.07571 [11]
Editors:
Anne Benoit, Haim Kaplan, Sebastian Wild, and Grzegorz Herman

1 Introduction

Finding shortest paths in graphs is a classic topic covered in all basic courses and textbooks on algorithms. In the most basic setting, which is the setting we consider here, the graph is unweighted and the length of a path refers to the number of edges in the path. In the single-source shortest-path (SSSP) problem, the task is to compute shortest paths from a given vertex, the source, to all other vertices of the graph. The solution is represented using a so-called shortest-path tree.

The SSSP problem for a graph with n vertices and m edges can be solved in O⁒(n+m) time by breadth-first search, which is optimal if the graph is given as a collection of vertices and edges. In this paper we will consider the SSSP problem for implicitly defined graphs. In particular, we consider (planar) intersection graphs: graphs whose node set corresponds to a set π’Ÿ of n objects in the plane and that contain an edge (D,Dβ€²) between two distinct objects D,Dβ€²βˆˆπ’Ÿ iff D and Dβ€² intersect. If the objects in π’Ÿ are disks then the intersection graph, which we denote by 𝒒×⁒[π’Ÿ], is called a disk graph – see Figure 1 – and if all disks have unit radius then it is called a unit-disk graph. Disk graphs are arguably the most popular and widely studied intersection graphs. One can solve the SSSP problem on intersection graphs by first constructing 𝒒×⁒[π’Ÿ] explicitly and then running breadth-first search. In the worst case, however, this requires Ω⁒(n2) time. This raises the question: is it possible to solve the SSSP problem on intersection graphs in subquadratic time in the worst case?

Figure 1: A set π’Ÿ of five disks (left) and their intersection graph (right).

Given the basic nature of the SSSP problem and the prominence of (unit-)disk graphs, it is not surprising that this question has already been considered for such graphs. For unit disks, Roditty and Segal [24] noticed that the dynamic data structure of Chan [6] for nearest-neighbor queries can be used to solve the problem in O⁒(n⁒polylog⁑n) expected time. Cabello and Jejčič [4] gave an O⁒(n⁒log⁑n) algorithm and showed that this is asymptotically optimal in the algebraic decision-tree model. They remarked that Efrat noted that the semi-dynamic data structure of Efrat, Itai and Katz [14] also gives an algorithm with running time O⁒(n⁒log⁑n). Finally, Chan and Skrepetos [8] provided a simpler O⁒(n⁒log⁑n) algorithm. The above algorithms either use Delaunay triangulations [4] or fixed-resolution grids [8, 14]; these approaches are not applicable for disks of arbitrarily different sizes.

For arbitrary disks graphs, Kaplan et al. [20] and Liu [22] presented algorithms running in O⁒(n⁒log4⁑n) time. This was recently improved by Klost [21], who presented a general framework for solving SSSP problems in intersection graphs. She used the framework to obtain an O⁒(n⁒log2⁑n) algorithm for the SSSP problem on disk graphs, and to obtain an O⁒(n⁒log⁑n) algorithm for intersection graphs of axis-aligned squares.

Our results.

Our main result in this paper is an algorithm for the SSSP problem in disk graphs that runs in O⁒(n⁒log⁑n) expected time. We obtain this result using a version of the framework proposed by Klost [21]; our specialized framework and its relation to Klost’s framework are discussed in detail in Section 2. A core ingredient in the framework is a clique-based contraction of the intersection graph 𝒒×⁒[π’Ÿ]: a graph obtained from 𝒒×⁒[π’Ÿ] by contracting certain cliques to single nodes. To compute such a clique-based contraction in O⁒(n⁒log⁑n) time, we combine shifted quadtrees [5] and skip quadtrees [15] – powerful and beautiful concepts that we believe deserve more attention – with standard techniques for stabbing fat objects.

Our algorithm for computing a clique-based contraction not only applies to disk graphs but also to intersection graphs of fat triangles, that is, triangles all of whose internal angles are lower bounded by a fixed constant α>0 [2]. By combining this with a novel intersecting-detection data structure for fat triangles, we obtain an O⁒(n⁒log3⁑n) algorithm for the SSSP problem on intersection graphs of fat triangles. We are not aware of previous work on the SSSP problem for fat triangles. The all-pairs shortest-path (APSP) problem, however, has been considered for fat triangles, by Chan and Skrepetos [9]. The algorithm they present runs in O⁒(n2⁒log4⁑n) time, under the condition that the fat triangles have roughly the same size. (They also present an O⁒(n2⁒log⁑n) algorithm for the APSP problem for arbitrary disk graphs, and an O⁒(n2) algorithm for unit-disk graphs [8].) Running our new SSSP algorithm n times, once for each input triangle as the source, we obtain an APSP algorithm for arbitrarily-sized fat triangles that runs in O⁒(n2⁒log3⁑n) time. This is faster and more general than the algorithm of Chan and Skrepetos. (The improvement for the APSP problem is mainly because of our new intersection-detection data structure for fat triangles; using this data structures in the existing algorithm [9] would also give an O⁒(n2⁒log3⁑n) algorithm.)

In the full version of this work [11] we provide two enhancements: we obtain a deterministic O⁒(n⁒log⁑n) algorithm for the SSSP problem in disk graphs and we reduce the running time for the SSSP problem on intersection graphs of fat triangles to O⁒(n⁒log2⁑n). The basic structure of the algorithms is the same as here, but we improve some of the subroutines that we use.

On the model of computation.

We use the real-RAM model – this is the standard model in computational geometry, which allows us for example to check in O⁒(1) time if two disks intersect – extended with an additional operation that allows us to compute a compressed quadtree on a set of n points in O⁒(n⁒log⁑n) time. This extension is common when working with quadtrees; see the book by Har-Peled [19].

2 The framework

Our framework for computing a shortest-path tree on an intersection graph 𝒒×⁒[π’Ÿ] is an instantiation of the framework of Klost [21]. We describe it in detail to keep the paper self-contained and make the required subroutines explicit; at the end of this section we discuss the correspondence of our approach to that of Klost. For convenience, we will from now on not distinguish between the objects in the set π’Ÿ and the corresponding nodes in 𝒒×⁒[π’Ÿ].

Let Dsrcβˆˆπ’Ÿ be the given source node, and let 𝒯sp be the shortest-path tree of 𝒒×⁒[π’Ÿ] that we want to compute for the given source. For an object Dβˆˆπ’Ÿ, let dist⁑[D] be the distance from Dsrc to D in 𝒒×⁒[π’Ÿ], and let Lβ„“:={Dβˆˆπ’Ÿ:dist⁑[π’Ÿ]=β„“}. Thus, Lβ„“ is the set of nodes at level β„“ in 𝒯sp. We follow the natural approach of computing 𝒯sp level by level. To be able to go from one level to the next, we need a subroutine for the following problem.

Bichromatic Intersection Testing. Given a set B of nB blue objects and a set R of nR red objects, report the blue objects that intersect at least one red object, and for each reported blue object, report a witness (a red object intersecting it).

A subroutine BIT-Subroutine that solves Bichromatic Intersection Testing allows us to compute Lβ„“+1 by setting R:=Lβ„“ and B:=π’Ÿcand, where π’Ÿcand is a set of candidate objects that should contain all objects from Lβ„“+1 and no objects from Lβ©½β„“, where Lβ©½β„“:=⋃i=0β„“Li. We could simply set π’Ÿcand:=π’Ÿβˆ–Lβ©½β„“, but this will not be efficient; we must keep the total size of the candidates sets over all levels β„“ under control. We do this using a so-called clique-based contraction, as defined next.

Let 𝒒=(V,E𝒒) be an (undirected) graph. We say that a graph β„‹=(π’ž,Eβ„‹) is a clique-based contraction of 𝒒 if

  • β– 

    each node Cβˆˆπ’ž corresponds to a clique in 𝒒 and the cliques in π’ž form a partition111In our application, it would also be sufficient to require that each node in V appears in O⁒(1) cliques, but we do not need this extra flexibility. of the nodes in V;

  • β– 

    there is an edge (C,Cβ€²)∈Eβ„‹ iff there are nodes v∈C and vβ€²βˆˆCβ€² such that (v,vβ€²)∈E𝒒.

Note that for each edge (v,vβ€²)∈E𝒒 there exists a clique Cβˆˆπ’ž that contains both v and vβ€², or there are cliques Cβˆ‹v and Cβ€²βˆ‹vβ€² such that (C,Cβ€²)∈Eβ„‹.

A clique-based contraction β„‹ of the intersection graph 𝒒×⁒[π’Ÿ] helps us to find good candidate sets. To see this, let π’žβ„“βŠ‚π’ž denote the set of cliques222With a slight abuse of terminology, we not only use the term clique to refer a complete graph, but also to refer to a set of geometric objects whose intersection graph is a clique. that contain at least one object from Lβ„“. Then any object D∈Lβ„“+1 must be part of a clique C that is either in π’žβ„“ itself or that is a neighbor in β„‹ of a clique in π’žβ„“. In other words, if D∈Lβ„“+1 then D∈C for some clique C∈Nℋ⁒[π’žβ„“], where Nℋ⁒[π’žβ„“] denotes the closed neighborhood of π’žβ„“ in β„‹. Moreover, the objects in a clique are in at most two levels in the shortest-path three 𝒯sp, which helps to control the total size of the candidate sets. The following pseudocode describes our framework in detail. It does not explicitly construct the shortest-path tree itself (it only constructs the levels), but this is easy to do using the witnesses reported by BIT-Subroutine.

Algorithm 1 SSSP-for-Geometric-Intersection-Graphs(π’Ÿ,Dsrc).

We obtain the following theorem.

Theorem 1.

Let π’Ÿ be a set of n constant-complexity objects in the plane. Suppose that

  1. (i)

    we can compute a clique-based contraction for 𝒒×⁒[π’Ÿ] in Tccg⁒(n) time,

  2. (ii)

    for any two subsets B,RβŠ‚π’Ÿ we can solve Bichromatic Intersection Testing in Tbit⁒(nB,nR) time, where nB:=|B| and nR:=|R|.

Then we can compute a shortest-path tree in 𝒒×⁒[π’Ÿ] for a given source node Dsrcβˆˆπ’Ÿ in O⁒(Tccg⁒(n)+Tbit⁒(n,n)) time.

Proof.

It is straightforward to prove by induction on β„“ that our algorithm correctly computes the levels Lβ„“ of the shortest-path tree. To prove the bound on the running time, observe that Steps 1–3 take O⁒(Tccg⁒(n)) time. It remains to bound the runtime of the while-loop.

For a clique Cβˆˆπ’ž, let dist⁑[C]:=minD∈C⁑dist⁑[D]. Note that for objects D,Dβ€² in cliques C,Cβ€²βˆˆπ’ž that are neighbors in β„‹, we have |dist⁑[D]βˆ’dist⁑[Dβ€²]|β©½3. Hence, D can only be in the candidate set π’Ÿcand in iterations of the while-loop where dist⁑[D]βˆ’3β©½β„“β©½dist⁑[C]βˆ’1. Thus, if we denote the size of π’Ÿcand in iteration β„“ by nβ„“, then the total time needed for Step 6 over all iterations is βˆ‘β„“Tbit⁒(nβ„“,|Lβ„“|), where βˆ‘β„“nβ„“β©½3⁒n and βˆ‘β„“|Lβ„“|β©½n. Since Tbit⁒(nB,nR) is at least linear in nB and nR (and at most quadratic), we have βˆ‘β„“Tbit⁒(nβ„“,|Lβ„“|)=O⁒(Tbit⁒(n,n)). This also bounds the total runtime of Steps 7–11 over all iterations.

To bound the total time for Step 5, note that a clique C is only considered in iterations where dist⁑[C]βˆ’2β©½β„“β©½dist⁑[C]+2. This implies that the total time to find the relevant cliques in Step 5 is O⁒(|Eβ„‹|). The total time to inspect those cliques in order to find the candidate sets, is O⁒(βˆ‘Cβˆˆπ’ž|C|). Thus, the total time for Step 5 over all iterations is O⁒(|Eβ„‹|+βˆ‘Cβˆˆπ’ž|C|), which can be bounded by O⁒(Tccg⁒(n)). β—€

β–ΆΒ Remark (relation to the framework of Klost).

The framework presented above is an instantiation of the framework of Klost [21]: she also computes the shortest-path tree level by level as described above – this natural approach was also taken by earlier papers on the SSSP problem on (unit-)disk graphs [4, 8, 9, 21] – and she also keeps the size of the candidate sets under control using an auxiliary graph. Klost uses a so-called shortcut graph 𝒒s⁒c as auxiliary graph. The nodes in 𝒒s⁒c correspond to the objects in π’Ÿ, and the edge set Es⁒c is a superset of the edge set of 𝒒×⁒[π’Ÿ] such that for any edge (D,Dβ€²)∈Es⁒c we have that the distance between D and Dβ€² in 𝒒×⁒[π’Ÿ] is O⁒(1). As Es⁒c is a superset of the edge set of 𝒒×⁒[π’Ÿ], the size of Es⁒c can be quadratic, so 𝒒s⁒c needs to be constructed implicitly. Our clique-based contraction β„‹=(π’ž,Eβ„‹) provides such an implicit shortcut graph, by defining Es⁒c:={(D,Dβ€²): D and Dβ€² are part of the same clique in π’ž or of neighboring cliques}.

3 The algorithm for disks

In this section we implement the framework presented above for the case where the input π’Ÿ is a set of n disks in the plane. We first explain how to create the cliques in our clique-based contraction β„‹ of 𝒒×⁒[π’Ÿ], and how to compute the edge set of β„‹. Using known results on Bichromatic Intersection Testing for disks we then obtain our final result.

Finding the cliques.

Our algorithm to create the set of cliques is related to a recent construction by Chan and Huang [7, Section 3] of 3-hop spanners for disk graphs; we comment more on the similarities and differences later. The construction is based on so-called shifted quadtrees, introduced by Chan [5], which we describe next.

We start by defining hierarchical grids, a concept closely related to quadtrees; the connection will be made clear below. Let o=(ox,oy) be any point in the plane. A cell in the hierarchical grid centered at o is any square of the form

σ⁒(o,β„“,i,j):=[ox+iβ‹…2β„“,ox+(i+1)β‹…2β„“)Γ—[oy+jβ‹…2β„“,oy+(j+1)β‹…2β„“)

for integers i,j,β„“βˆˆβ„€. Note that σ⁒(o,β„“,i,j) is a translation of the square [0,2β„“)Γ—[0,2β„“) by the vector o+(iβ‹…2β„“,jβ‹…2β„“), and that the set Σ⁒(o,β„“):={σ⁒(o,β„“,i,j):i,jβˆˆβ„€} forms a regular grid. Moreover, the grid Σ⁒(o,β„“βˆ’1) is a refinement of the grid Σ⁒(o,β„“), obtained by partitioning each cell of Σ⁒(o,β„“) into four quadrants. We define the hierarchical grid centered at o, denoted by Γ⁒(o), to be the (infinite) collection {Σ⁒(o,β„“):β„“βˆˆβ„€} of nested grids.

Define the size of any object D, denoted by size⁑(D), to be the side length of a smallest enclosing (axis-parallel) square of D. Thus size⁑(Οƒ)=2β„“ for any cell ΟƒβˆˆΞ£β’(o,β„“). We say that an object D is c-aligned with a hierarchical grid Ξ“, for a given constant c>0, if there exists a cell Οƒ in Ξ“ such that DβŠ‚Οƒ and size⁑(Οƒ)β©½cβ‹…size⁑(D). Note that whether or not D is c-aligned with Ξ“ only depends on the choice of the center o of the hierarchical grid. The definition of being c-aligned trivially implies the following.

Observation 2.

Let D be an object that is c-aligned with a hierarchical grid Ξ“, and let Οƒ be a cell of Ξ“ such that D intersects the boundary βˆ‚Οƒ of Οƒ. Then size⁑(D)β©Ύ(1/c)β‹…size⁑(Οƒ).

Let π’Ÿ be a finite set of objects. In general, it is impossible to choose the center of a hierarchical grid Ξ“ such that each object Dβˆˆπ’Ÿ is c-aligned with Ξ“. However, Chan [5] has shown that, surprisingly, it is possible to pick a small number of different centers such that each object Dβˆˆπ’Ÿ is c-aligned with at least one of the resulting hierarchical grids, for a suitable constant c. Even more surprisingly, we can select these centers independently of π’Ÿ. The following lemma follows directly from Lemma 3.2 in Chan’s paper.333Chan uses the term shifted quadtree in his lemma. To stress the fact that the shifts are independent of any input set on which one might build a quadtree, we prefer to use the term hierarchical grid.

Lemma 3 ([5]).

There is a collection Ξ of three hierarchical grids, each centered at a different point, with the following property: for any object D contained in the square [0,1)Γ—[0,1) there is a hierarchical grid Ξ“βˆˆΞž such that D is 6-aligned with Ξ“.

Let P be a set of points, let Ξ“ be a hierarchical grid centered at a given center o, and let Οƒ0 be a cell of Ξ“ that contains P. Then we can construct a quadtree on P – see Figure 2(i) – whose root node corresponds to Οƒ0. Any node in this quadtree corresponds to a cell of Ξ“. Let 𝒬=𝒬⁒(Οƒ0,P) be the corresponding compressed quadtree [19]. Each internal node Ξ½ of 𝒬 corresponds to a cell σν of Ξ“ and each leaf node ΞΌ corresponds to a region σμ that is either a cell of Ξ“ or a donut cell; see Figure 2(ii). (A donut cell is the difference Οƒ1βˆ–Οƒ2 of two cells Οƒ1 and Οƒ2 of Ξ“ with Οƒ2βŠ‚Οƒ1.) The subdivision defined by the compressed quadtree 𝒬 is the set of regions corresponding to the leaves of 𝒬; this subdivision is a decomposition of Οƒ0.

Figure 2: (i) A quadtree subdivision for a set P of points. (ii) The compressed-quadtree subdivision for P, with its donut cells marked. (iii) The ordering of the points to construct a skip quadtree.

Our algorithm to efficiently compute the cliques in the clique-based contraction combines the hierarchical grids of Lemma 3 with skip quadtrees [15], as explained next.

Skip quadtrees, defined by Eppstein, Goodrich, and Sun [15] are defined as follows. Let P be a set of n points inside a given starting cell Οƒ0 of a hierarchical grid Ξ“. We start by sorting the points in P in Z-order, as follows. First, order the points according to the quadrants from Οƒ0 they fall in: put the points in the nw-quadrant first, then those in the ne-quadrant, then those in the sw-quadrant, and finally those in the se-quadrant. Next, recursively sort the points in each quadrant. Let p1,…,pn be the resulting sorted list of points; see Figure 2(iii). We now create a sequence P=P0βŠƒP1βŠƒβ‹―βŠƒPt, where Pi is obtained from Piβˆ’1 by deleting every other element (starting with the first element) and |Pt|=1. From the sequence P0βŠƒP1βŠƒβ‹―βŠƒPt we construct a sequence of compressed-quadtree subdivisions 𝒬0,𝒬1,…,𝒬t, each based on the same starting cell Οƒ0. The sequence 𝒬0,𝒬1,…,𝒬t has the following properties, as illustrated in Figure 3:

  • β– 

    𝒬t is equal to the square Οƒ0.

  • β– 

    𝒬i is a refinement of 𝒬i+1 for all 0β©½i<t, that is, each region in 𝒬i is contained in a unique region in 𝒬i+1. Moreover, each region in 𝒬i+1 contains O⁒(1) regions from 𝒬i.

  • β– 

    Each region in 𝒬0 contains at most one point from P.

We can view 𝒬t,…,𝒬1,𝒬0 as the levels of a tree 𝒯, where a node Ξ½ at level i corresponds to a region RΞ½ of the subdivision 𝒬i. In particular, the root of 𝒯 corresponds to the starting square Οƒ0 and the leaves of 𝒯 correspond to the regions in 𝒬0 (which is the compressed-quadtree subdivision for the whole point set P with root Οƒ0). We call this tree structure444The skip quadtree defined by Eppstein, Goodrich, and Sun is slightly more complicated, as it stores more information than just the compressed-quadtree subdivisions. Since we do not need our structure to be dynamic, the simple hierarchy described above suffices. a skip quadtree for P with root Οƒ0. It can be constructed in O⁒(n⁒log⁑n) time [15].

Figure 3: Example of the three compressed-quadtree subdivisions for a set of five points, and the resulting skip quadtree. Colors indicate the correspondence between regions and nodes.

Without loss of generality, we will assume henceforth that all the disks of π’Ÿ are fully contained in the unit square [0,1)Γ—[0,1). Let Ξ be the collection of three hierarchical grids given by Lemma 3. Each disk D of π’Ÿ is 6-aligned with some hierarchical grid Ξ“βˆˆΞž, and we can find such a hierarchical grid for D in constant time.

Now consider a hierarchical grid Ξ“ from the collection Ξ. Let π’Ÿβ’(Ξ“)βŠ‚π’Ÿ be the set of disks that are 6-aligned with Ξ“, where we put a disk that is 6-aligned with multiple grids into an arbitrary one of the corresponding sets π’Ÿβ’(Ξ“). We create a set π’žβ’(Ξ“) of cliques, as follows.

  1. 1.

    Construct a skip quadtree 𝒯⁒(Ξ“) on the set P⁒(Ξ“) of centers of the disks in π’Ÿβ’(Ξ“), where the starting square Οƒ0 of the skip quadtree is a cell of Ξ“ that contains all the disks in π’Ÿβ’(Ξ“).

  2. 2.

    For each disk Dβˆˆπ’Ÿβ’(Ξ“), follow a path in 𝒯⁒(Ξ“) consisting of nodes ΞΌ whose region RΞΌ contains the center of D, until a node Ξ½ is reached such that D intersects βˆ‚RΞ½ or a leaf is reached. Assign D to that node or leaf.

  3. 3.

    Let π’ŸΞ½βŠ‚π’Ÿβ’(Ξ“) be the set of disks assigned to an (internal or leaf) node Ξ½ in 𝒯⁒(Ξ“). For each node Ξ½, partition π’ŸΞ½ into a set π’žΞ½ of O⁒(1) cliques, as follows. If Ξ½ is a leaf and RΞ½ contains a disk – note that a leaf can contain at most one disk – then we create a singleton clique for that disk. Now suppose Ξ½ is an internal node. First, suppose RΞ½ is a square region. Because the disks in π’ŸΞ½ are 6-aligned with Ξ“, we know that size⁑(D)β©Ύ16β‹…size⁑(RΞ½) for all Dβˆˆπ’ŸΞ½ intersecting βˆ‚RΞ½. Hence, we can create a set of O⁒(1) points such that each disk D is stabbed by at least one of them, which we use to create π’žΞ½. If RΞ½ is a donut we proceed similarly, where we treat the disks intersecting the boundary of the hole of the donut – this hole can be much smaller than the donut – separately from the disks that only intersect the outer boundary of the donut. Finally, set π’žβ’(Ξ“):=β‹ƒΞ½βˆˆπ’―β’(Ξ“)π’žΞ½.

Each clique that is generated by our algorithm is a so-called stabbed clique, that is, for each clique Cβˆˆπ’žβ’(Ξ“) there is a point stabbing all disks in C. We refer to the union of all the disks in C as a flower, which we denote by F⁒(C), and we let ℱ⁒(Ξ“):={F⁒(C):Cβˆˆπ’žβ’(Ξ“)} be the set of flowers corresponding to the cliques in π’žβ’(Ξ“). Define ply⁑(S), the ply of a set S of objects in the plane, to be the maximum, over all points qβˆˆβ„2, of the number of objects in S containing q. The following lemma states a property of our algorithm that will be crucial to efficiently compute the edges in the clique-based contraction.

Lemma 4.

The algorithm above constructs in O⁒(n⁒log⁑n) time a partition of π’Ÿβ’(Ξ“) into a set π’žβ’(Ξ“) of stabbed cliques such that ply⁑(ℱ⁒(Ξ“))=O⁒(log⁑n).

Proof.

Step 1 of the algorithm, constructing the skip quadtree 𝒯⁒(Ξ“) on the set P⁒(Ξ“) of the centers of the at most n disks in π’Ÿβ’(Ξ“), can be done in O⁒(n⁒log⁑n) time [15]. The depth of the skip quadtree is O⁒(log⁑n), and so Step 2 takes O⁒(log⁑n) time per disk and O⁒(n⁒log⁑n) time in total. Step 3 takes βˆ‘vβˆˆπ’―β’(Ξ“)O⁒(1+|π’Ÿv|) time, which is O⁒(n) because each disk is assigned to exactly one node. Hence, the total time for the algorithm is O⁒(n⁒log⁑n).

To bound ply⁑(ℱ⁒(Ξ“)), consider an arbitrary point qβˆˆβ„2. Recall that for each node Ξ½ in 𝒯⁒(Ξ“) we created O⁒(1) stabbed cliques and, hence, O⁒(1) flowers. Thus, it suffices to prove the following claim: at each level of the skip quadtree 𝒯⁒(Ξ“) there are only O⁒(1) nodes Ξ½ such that q∈D for some disk D assigned to Ξ½. To prove this claim, follow the search path of q in 𝒯⁒(Ξ“), that is, the path consisting of nodes ΞΌ such that q∈RΞΌ. Let Dβˆˆπ’Ÿ be a disk that contains q, let Ξ½ be the node to which D is assigned, and let ΞΌ be the parent of Ξ½. Then ΞΌ must lie on the search path of q. Indeed, D is fully contained in RΞΌ – otherwise D would have been assigned to ΞΌ – and so q∈DβŠ‚RΞΌ. Since any node in a skip quadtree has O⁒(1) children, this implies the claim. β—€

β–ΆΒ Remark (relation to the spanner construction of Chan and Huang).

In their algorithm for constructing a 3-hop spanner for 𝒒×⁒[π’Ÿ], Chan and Huang [7] create a collection of cliques in a similar way as we create our cliques. As they are only concerned with the size of the spanner, however, they do not analyze the time needed to construct it. The differences between our approach and theirs mainly stem from the necessity to construct the clique-based contraction β„‹ in O⁒(n⁒log⁑n) time, as discussed next.

A first difference is that Chan and Huang use a centroid decomposition of a compressed quadtree instead of a skip quadtree. This is not a crucial difference – possibly we could have used a centroid decomposition as well, although working with a skip quadtree is more convenient. Another difference is that they work with a collection Ξ of hierarchical grids – they call them shifted quadtrees – such that, for each pair D,Dβ€²βˆˆπ’Ÿ, there is at least one hierarchical grid Ξ“βˆˆΞž such that both D and Dβ€² are aligned with Ξ“. This allows them to construct their spanner by applying the following procedure to each quadtree 𝒬 defined by the hierarchical grid Ξ“: (i) take a centroid node Ξ½ in a compressed quadtree 𝒬 and partition the set π’ŸΞ½ of disks intersecting βˆ‚ΟƒΞ½ into O⁒(1) cliques, (ii) for each clique C, add a star graph on that clique to the spanner, (iii) for each disk D and each clique C intersected by D, add an edge (D,Dβ€²) to the spanner, where Dβ€²βˆˆC is an arbitrary disk intersected by D, and (iv) recursively construct 3-hop spanners for the disks inside and outside σν. The crucial difference lies in step (iii), where they add an edge from every disk D to a neighboring disk in each clique (if such a neighboring disk exists). It seems difficult to do this in O⁒(n⁒log⁑n) time in total over all recursive calls. We therefore proceed differently: we first recursively construct cliques on the disks not intersecting βˆ‚ΟƒΞ½, and then we only add a single edge between two cliques if the corresponding flowers intersect. Such an approach would increase the spanning ratio if we were to use it to construct a spanner, but this is of no concern to us. The advantage of being more conservative is that we can compute the edges in our clique-based contraction in O⁒(n⁒log⁑n) time, as explained next.

Computing the edges in the clique-based contraction.

Let π’ž:=β‹ƒΞ“βˆˆΞžπ’žβ’(Ξ“) be the set of cliques generated by applying the procedure above to each hierarchical grid Ξ“ in the collection Ξ given by Lemma 3. Let β„±:=β‹ƒΞ“βˆˆΞžβ„±β’(Ξ“) be the corresponding flower set. Note that ply⁑(β„±)=O⁒(log⁑n) by Lemma 3. To construct the edge set Eβ„‹ of the clique-based contraction β„‹=(π’ž,Eβ„‹), we must find all pairs F,Fβ€²βˆˆβ„± that intersect. Next we show how to do this in O⁒(n⁒log⁑n) time.

Consider a flower F defined by some clique C. The boundary βˆ‚F of F is comprised of maximal pieces of the boundaries of the disks in C that show up on βˆ‚F. We call these pieces boundary arcs and we denote the set of boundary arcs of a flower F by ℬ⁒(F). For a set β„± of flowers, we define ℬ⁒(β„±):=⋃Fβˆˆβ„±β„¬β’(F) to be the set of boundary arcs of the flowers in β„±.

Lemma 5.

Let β„± be a set of flowers that consist of n disks in total. Then the number of intersections between the boundary arcs in ℬ⁒(β„±) is O⁒(nβ‹…ply⁑(β„±)).

Proof.

First, observe that |ℬ⁒(F)|=O⁒(nF), where nF is the number of disks defining a flower Fβˆˆβ„±, since the union of a set of disks has linear complexity. Hence, |B⁒(β„±)|=O⁒(n).

Now consider a boundary arc Ξ²βˆˆβ„¬β’(F) of some flower Fβˆˆβ„±. We assume for simplicity that the angle spanned by the circular arc Ξ² is at most Ο€/2; if this is not the case we can split Ξ² into at most four sub-arcs, and work with the sub-arcs instead. Let D be the disk that contributes the arc Ξ², let c be the center of D, and let s1 and s2 be the segments that connect c to the endpoints of Ξ². Together with Ξ², these two segments bound a (convex) circular sector. Let ZF be the set of such circular sectors created for the arcs in ℬ⁒(F); see Figure 4(i).

Figure 4: (i) The set ZF of circular sectors defined by the boundary arcs of a flower F. Some boundary arcs have been cut into sub-arcs to ensure they span an angle of at most Ο€/2. (ii) If |p⁒x|<|p′⁒x| then p∈Dβ€²; otherwise pβ€²βˆˆD. (iii) The modified sectors.

We say that two sectors z,zβ€² are non-overlapping if their interiors are disjoint.

⊳ Claim 0.

The sectors in the set ZF are pairwise non-overlapping.

Proof.

Consider two sectors z,zβ€²βˆˆZF. Let D,Dβ€² be the disks whose boundaries define z and zβ€², respectively, and let c and cβ€² be their centers. If D=Dβ€² then obviously z and zβ€² do not overlap, so assume that Dβ‰ Dβ€². Since a sector in ZF cannot be fully contained in another sector in ZF by construction, the sectors z,zβ€² can only overlap if there is a proper intersection between their boundaries. Such an intersection can only happen between a segment s connecting c to an endpoint p of some boundary arc Ξ²βŠ‚βˆ‚D and a segment sβ€² connecting cβ€² to an endpoint pβ€² of some boundary arc Ξ²β€²βŠ‚βˆ‚Dβ€². But then, by the triangular inequality, either p∈Dβ€² or pβ€²βˆˆD – see Figure 4(ii) for an illustration – contradicting that p and pβ€² are both points on βˆ‚F. ⊲ Now consider a circular sector z, defined by some arc Ξ². Let x be the apex of z (which coincides with the center of the disk D contributing Ξ²). If the angle at apex x is large enough then z is fat, but if the angle is very small then this is not the case. We therefore proceed as follows: we move the apex x towards the midpoint of Ξ² until the angle at x is slightly larger than Ο€/2; see Figure 4(iii). It is easy to see that the modified region (which is no longer a circular sector) is fat and convex. Moreover, no two modified regions share an apex anymore. With a slight abuse of notation, from now on we use ZF to denote the set of modified regions created for a flower Fβˆˆβ„±.

Let Z⁒(β„±):=⋃Fβˆˆβ„±ZF. Note that |Z⁒(β„±)|β©½4β‹…|ℬ⁒(β„±)|=O⁒(n) and that ply⁑(Z⁒(β„±))β©½2β‹…ply⁑(β„±)=O⁒(log⁑n); the latter is true since the regions created for a single flower R are pairwise disjoint except at shared endpoints of boundary arcs. For each arc Ξ²βˆˆβ„¬β’(β„±), there is a region z∈Z⁒(β„±) such that Ξ²βŠ‚βˆ‚z. Hence, the number of intersections between the arcs in ℬ⁒(β„±) is upper bounded by the number of intersections between the regions in Z⁒(β„±).

⊳ Claim 0.

The number of intersections between the regions in Z⁒(β„±) is O⁒(|Z⁒(β„±)|β‹…ply⁑(Z⁒(β„±))).

Proof.

The proof is standard, but we sketch it for completeness. We charge the intersection between two regions z,zβ€² to the smaller of the two regions, and claim that each region is charged O⁒(ply⁑(Z⁒(β„±))) times. To see this, consider a region z∈Z⁒(β„±) and let b be the smallest enclosing disk of Z. Let bβ€² be the disk with the same center as b such that radius⁑(bβ€²)=2β‹…radius⁑(b). Due to the fatness of the regions in Z⁒(β„±), any region zβ€² that intersects z and is at least as large as z, will cover a constant fraction of the area of bβ€². Hence, there can be at most O⁒(ply⁑(Z⁒(β„±))) such regions zβ€². ⊲ This finishes the proof. β—€ Observe that two flowers F,Fβ€² intersect iff the following holds: a boundary arc of F intersects a boundary arc of Fβ€², or FβŠ‚Fβ€², or Fβ€²βŠ‚F. Thus we can find all intersecting pairs of flowers – and, hence, all edges of the clique-based contraction β„‹ – as follows. (The algorithm below may report a pair of intersecting flowers multiple times, but this is not a problem.)

First, we construct the arrangement π’œβ’(β„±) induced by the flower set β„±. Next, for each vertex of π’œβ’(β„±) that is the intersection of the boundaries of some pair of flowers F,F, we report that pair. Finally, we need to find the pairs of flowers F,Fβ€² such that FβŠ‚Fβ€². To this end, we traverse the dual graph of π’œβ’(β„±), maintaining a list β„’ of flowers containing the face we are currently in. Whenever we enter a flower F for the first time, we report the pairs (F,F⁒’) for the faces F⁒’ that are currently in the list β„’.

We obtain the following lemma.

Lemma 6.

Let π’Ÿ be a set of n disks in the plane. Then we can compute a clique-based contraction for 𝒒×⁒[π’Ÿ] in O⁒(n⁒log⁑n) expected time.

Proof.

Computing the collection π’ž of cliques takes O⁒(n⁒log⁑n) time by Lemma 3. It remains to analyze the time needed to compute the edge set Eβ„‹ of the clique-based contraction.

For each clique Cβˆˆπ’ž, we can compute the corresponding flower F⁒(C) in O⁒(|C|⁒log⁑|C|) time using a simple divide-and-conquer algorithm. Since each disk is part of only clique, this implies that the flower set β„± can be computed in O⁒(n⁒log⁑n) time. Moreover, the total number of boundary arcs of the flowers is O⁒(n) because the complexity of a single flower is linear. Hence, we can construct the arrangement π’œβ’(β„±) in O⁒(n⁒log⁑n+k) expected555We cannot use the deterministic algorithm for line-segment intersection by Chazelle and Edelsbrunner [10] because it does not work for curves. The deterministic algorithm for line-segment intersection by Balaban [3] also works for curves, but that algorithm does not seem to give enough information to construct the arrangement. time, where k is the number of intersections between the boundary arcs, using a randomized incremental algorithm by Mulmuley [23]. Since k=O⁒(n⁒log⁑n) by Lemmas 3 and 3, constructing the arrangement thus takes O⁒(n⁒log⁑n) expected time. The traversal of the dual graph, including the maintenance of β„’ takes O⁒(n⁒log⁑n) time. Since the size of the list β„’ is O⁒(log⁑n) at any time – this is because the ply of the flower set is O⁒(log⁑n) – we report at most O⁒(n⁒log⁑n) pairs in total during the traversal. Thus, the total time to compute Eβ„‹ is O⁒(n⁒log⁑n). β—€

Putting it all together.

Lemma 3 gives us the first ingredient we need to apply Theorem 1. The second ingredient is an algorithm that solves Bichromatic Intersection Testing for disks. As observed in previous papers [9, 21] this can be done in O⁒((nB+nR)⁒log⁑nR) time, as follows. First, compute the additively weighted Voronoi diagram Vor⁒(R) on the centers of the set R of red disks, where the weight of a center is equal to the radius of its corresponding disk. Next, query with the center of each blue disk D in Vor⁒(R) to find the red disk Dβ€² closest to D. Now D intersects ⋃R, the union of the red disks, iff D intersects Dβ€². Since Vor⁒(R) can be computed in O⁒(nR⁒log⁑nR) time [17], after which it can be preprocessed for logarithmic-time point location in O⁒(nR⁒log⁑nR) time [13], we can solve Bichromatic Intersection Testing in O⁒((nB+nR)⁒log⁑nR) time. We thus obtain our main result.

Theorem 7.

Let π’Ÿ be a set of n disks in the plane. Then we can compute a shortest-path tree in 𝒒×⁒[π’Ÿ] for a given source disk Dsrcβˆˆπ’Ÿ in expected O⁒(n⁒log⁑n) time.

In the full version [11] we present a (slightly more complicated) deterministic algorithm to compute the edges of the clique-based contraction for 𝒒×⁒[π’Ÿ] in O⁒(n⁒log⁑n) time. Using that algorithm instead of Lemma 3, we obtain an algorithm to compute shortest-path trees on disks graphs deterministically in O⁒(n⁒log⁑n) time.

4 Extension to fat triangles

A triangle Ξ” is called Ξ±-fat if its minimum angle is at least Ξ±. Let π’Ÿ={Ξ”1,…,Ξ”n} be a set of Ξ±-fat triangles, where Ξ±>0 is some fixed absolute constant. From now on, we simply refer to the triangles in π’Ÿ as fat triangles and we refer to Ξ± as the fatness constant.

Constructing the clique-based contraction.

Our approach to construct a clique-based contraction for fat triangles is similar to the algorithm for disks. We now go over the various ingredients and explain how to adapt them, if necessary.

We first observe that Lemma 3.2 from Chan’s paper [5] actually holds for any type of objects. Hence, our Lemma 3 also holds for any type of objects. To construct the skip quadtree, the set P⁒(Ξ“) of disk centers is replaced by a set P⁒(Ξ“) that contains an arbitrary point in each object. Constructing the cliques can therefore be done in exactly the same way as before. Indeed, the crucial property was as follows: any set of disks intersecting the boundary of a region RΞ½ and whose size is at least 16β‹…size⁑(RΞ½), can be stabbed by O⁒(1) points. This property also holds for fat objects.

Now let C be a stabbed clique of fat triangles. We refer to the union of the triangles in C as a spiky flower, and we denote it by F⁒(C). As before, we let π’žβ’(Ξ“) denote the set of cliques created by our algorithm, and we define ℱ⁒(Ξ“):={F⁒(C):Cβˆˆπ’žβ’(Ξ“)} to be the corresponding set of spiky flowers. Then Lemma 3 also holds for fat triangles – we can follow the proof verbatim, only replacing occurrences of β€œdisk” by β€œfat triangle.”

It remains to prove the equivalent of Lemma 3 for fat triangles. To keep the terminology similar to the case of disks, we will refer to the edges of a spiky flower F as boundary segments, and we denote the set of boundary segments of a flower F by ℬ⁒(F). Furthermore, we let β„±:=β‹ƒΞ“βˆˆΞžβ„±β’(Ξ“) denote the set of spiky flowers created by our algorithm, and we define ℬ⁒(β„±):=⋃Fβˆˆβ„±β„¬β’(F).

Lemma 8.

Let β„± be a set of spiky flowers that consist of n fat triangles in total. Then the number of intersections between the boundary segments in ℬ⁒(β„±) is O⁒(nβ‹…ply⁑(β„±)).

Proof.

We apply the same proof technique as in the proof of Lemma 3: we cover the boundary segments of each spiky flower F by a set ZF of non-overlapping fat β€œsectors” contained in the flower, as explained below, from which the lemma follows.

The number of boundary segments of a spiky flower is O⁒(nF), where nF is the number of triangles defining F [1, Section 3.2]. We create the set ZF for a spiky flower F as follows. For each boundary segment Ξ² of F, we create an isosceles triangle zβŠ‚F whose angles at the endpoints of Ξ² are Ξ±/3, where Ξ± is the fatness constant of the triangles; see Figure 5.

Figure 5: (i) The set ZF of sectors defined by the boundary segments of a spiky flower F. (ii) The point p lies in D, which in turn lies inside the expanded sector.

With a slight abuse of terminology, we refer to these isosceles triangles as sectors.

⊳ Claim 0.

The sectors in the set ZF are pairwise non-overlapping.

Proof.

Each sector z has one edge that corresponds to a boundary segment of F; we call this the external edge of z. The two other edges, which make an angle Ξ±/3 with the external edge, are called internal edges.

Now assume for a contradiction that two sectors z,zβ€² overlap. Since the external edge of any sector cannot properly intersect an (external or internal) edge of any other sector, there must be a crossing between an internal edge of z and an internal edge of zβ€². Let x be this crossing, and let e and eβ€² be the external edges of z and zβ€², respectively; see Figure 5(ii). Assume without loss of generality that the distance from x to e is at least the distance from x to eβ€². Let p be the point on eβ€² nearest to x, and let D be the disk centered at x and touching e. Then p is contained in D. Moreover, D is contained in the triangle Ξ”βˆˆπ’Ÿ contributing e to the boundary of the spiky flower F. Indeed, if we were to expand the sector z by making the angles at the endpoints of e equal to 2⁒α/3 then DβŠ‚z, and this expanded sector is contained in Ξ”. Thus, pβˆˆΞ”, which contradicts that p lies on an external edge. ⊲ As in the proof of Lemma 3, it now follows that the number of intersections between the sectors in Z⁒(β„±) is O⁒(|Z⁒(β„±)|β‹…ply⁑(Z⁒(β„±))), which proves the lemma. β—€ As before, we have the following corollary. Its proof is the same as the proof of Lemma 3; the only difference is that we can now use the algorithm by Chazelle and Edelsbrunner [10] to construct the arrangement defined by the flowers, thus avoiding the use of randomization.

Corollary 9.

Let π’Ÿ be a set of n fat triangles in the plane. Then we can compute a clique-based contraction for 𝒒×⁒[π’Ÿ] in O⁒(n⁒log⁑n) time.

Bichromatic Intersection Testing for fat triangles.

The final ingredient that we need is an efficient algorithm for Bichromatic Intersection Testing for a set B of nB blue triangles and a set R of nR red triangles, where all triangles in BβˆͺR are fat. Such an algorithm can be developed using standard machinery, as described next.

Let A:={iβ‹…(Ξ±/2):0β©½i⩽⌊4⁒π/Ξ±βŒ‹} be a set of O⁒(1/Ξ±)=O⁒(1) canonical directions, where Ξ± is the fatness constant of the triangles. Define a canonical segment to be a segment whose direction is canonical, and define a canonical chord of a fat triangle Ξ” to be a canonical segment that connects a vertex of Ξ” to its opposite side; see Figure 6(i).

Figure 6: (i) The set A of canonical directions and the canonical chords of a triangle. (ii) Chord s intersects two sides of Ξ”β€² so it intersects a canonical chord of Ξ”β€². (iii) All canonical chords of Ξ” miss Ξ”β€², so Ξ”β€² must have a vertex inside Ξ”.

Note that each vertex of Ξ” admits a canonical chord. Let S⁒(Ξ”) be a set of three canonical chords of Ξ”, one per vertex of Ξ”, and let P⁒(Ξ”) be the endpoints of these chords (including the vertices of Ξ”).

Observation 10.

If a fat triangle Ξ” intersects a fat triangle Ξ”β€² then at least one of the following conditions holds:

  1. (i)

    Ξ” contains a vertex of Ξ”β€²;

  2. (ii)

    a point from P⁒(Ξ”) lies inside Ξ”β€²;

  3. (iii)

    a canonical chord from S⁒(Ξ”) intersects a canonical chord from S⁒(Ξ”β€²).

Proof.

Suppose that condition (ii) does not hold. Then there is a canonical chord s∈S⁒(Ξ”) that intersects two edges of Ξ”β€², or all canonical chords in S⁒(Ξ”) are disjoint from Ξ”β€². In the former case, s separates a vertex v of Ξ”β€² from its opposite side, which implies that s intersects the canonical chord of v; see Figure 6(ii). Thus, condition (iii) holds in this case. In the latter case, Ξ”β€² must have a vertex inside Ξ” and condition (i) holds; see Figure 6(iii). β—€ Observation 4 implies the following lemma.

Lemma 11.

Let R be a set of n fat triangles. There exists a data structure of O⁒(n⁒log2⁑n) size such that we can decide in O⁒(log3⁑n) time if a fat query triangle Ξ” intersects any triangle in R and, if so, report a witness triangle. The data structure can be built in O⁒(n⁒log3⁑n) time.

Proof.

The data structure consists of three separate data structures, each handling one of the conditions in Observation 4.

For condition (i) we need a data structure for range searching with fat triangles in a set V of 3⁒n points, namely the vertices of the triangles in R. As observed by Gray [18, page 14], such queries can be answered in O⁒(log3⁑n) time with a structure of size O⁒(n⁒log2⁑n) that can be built in O⁒(n⁒log3⁑n) time.

For condition (ii) we use a union tree on the triangles in R. This is a binary tree 𝒯 whose leaves correspond to the triangles in R, and whose internal nodes store the union of the triangles in their subtree, preprocessed for point-location queries. Checking if a query point q is contained in any triangle in R can be done in O⁒(log⁑n) by performing a point location at the root of 𝒯. If this is the case, then we can find a witness triangle in O⁒(log2⁑n) time by walking down 𝒯, always proceeding to a child whose union contains q. Since the union complexity of n fat triangles is O⁒(n⁒logβˆ—β‘n) [2], the total amount of storage is O⁒(n⁒logβˆ—β‘n⁒log⁑n). Note that the union at a node Ξ½ can be computed in O⁒(nν⁒logβˆ—β‘nν⁒log⁑nΞ½) time from the unions of its two children by a simple plane-sweep algorithm, where nΞ½ is the number of triangles in the subtree of Ξ½. Hence, the total preprocessing time is O⁒(n⁒logβˆ—β‘n⁒log2⁑n).

To handle condition (iii) we proceed as follows. Let SR:{s∈S⁒(Ξ”):Ξ”βˆˆR} be the set of canonical chords of the triangles in R. We will build O⁒(1/Ξ±) different data structures on SR, one for each of the O⁒(1/Ξ±) possible directions of the query chord. To construct a data structure for a fixed direction of the query chord, we partition SR into O⁒(1/Ξ±) classes, one for each canonical direction in A, and we build a separate substructure for each class Ai. Assume wlog that the query chord is vertical and that the chords in Ai are horizontal. Then we can use an interval tree [12, Section 10.1] to answer queries in O⁒(log⁑n), using O⁒(n) space and O⁒(n⁒log⁑n) preprocessing. (Using a point-location structure on the vertical decomposition of the chords in Ai is another option.) Thus the total amount of storage is O⁒(n/Ξ±)=O⁒(n), the total preprocessing is O⁒((n/Ξ±)⁒log⁑n)=O⁒(n⁒log⁑n), and the total query time is O⁒((1/Ξ±)⁒log⁑n)=O⁒(log⁑n).

Since all data structure work within the claimed bounds, the lemma follows. β—€ We can now solve Bichromatic Intersection Testing for fat triangles in O⁒((nB+nR)⁒log3⁑(nB+nR)) time, by querying with each triangle Ξ”βˆˆB in the data structure provided by Lemma 4. This leads to the following theorem.

Theorem 12.

Let π’Ÿ be a set of n fat triangles in the plane. Then we can compute a shortest-path tree in 𝒒×⁒[π’Ÿ] for a given source triangle Ξ”srcβˆˆπ’Ÿ in O⁒(n⁒log3⁑n) time.

In the full version [11] we provide a better data structure for the range-query problem considered in Lemma 4: its construction time is O⁒(n⁒log2⁑n) and each query is then answered in O⁒(log2⁑n) time. Using this data structure, we obtain an O⁒(n⁒log2⁑n) algorithm to compute shortest-path trees on the intersection graph of fat triangles.

5 Concluding remarks

We presented the first algorithm for the SSSP problem in disk graphs that runs in O⁒(n⁒log⁑n) (expected) time. We extended the algorithm to intersection graphs of fat triangles, where we obtain a worst-case running time of O⁒(n⁒log3⁑n). In the full version [11] we provide a deterministic O⁒(n⁒log⁑n) algorithm for the SSSP problem in disk graphs and improve the running time for intersection graphs of fat triangles to O⁒(n⁒log2⁑n).

A natural question is whether the algorithm for fat triangles can be further improved. Another natural question is whether an O⁒(n⁒polylog⁑n) algorithm is possible for intersection graphs of non-fat objects such as line segments. This is unlikely, however, because Hopcroft’s problem – given a set L of n lines and a set P of n points, decide if any of the points lies on any of the lines – can be reduced to the SSSP problem for segments, and Hopcroft’s problem has an Ω⁒(n4/3) lower bound [16] in a somewhat restricted model of computation.

References

  • [1] Pankaj K. Agarwal, Matthew J. Katz, and Micha Sharir. Computing depth orders for fat objects and related problems. Comput. Geom., 5:187–206, 1995. doi:10.1016/0925-7721(95)00005-8.
  • [2] Boris Aronov, Mark de Berg, Esther Ezra, and Micha Sharir. Improved bounds for the union of locally fat objects in the plane. SIAM J. Comput., 43(2):543–572, 2014. doi:10.1137/120891241.
  • [3] Ivan J. Balaban. An optimal algorithm for finding segments intersections. In Proc. 11th Symposium on Computational Geometry (SoCG), pages 211–219, 1995. doi:10.1145/220279.220302.
  • [4] Sergio Cabello and Miha Jejčič. Shortest paths in intersection graphs of unit disks. Comput. Geom., 48(4):360–367, 2015. doi:10.1016/j.comgeo.2014.12.003.
  • [5] Timothy M. Chan. Polynomial-time approximation schemes for packing and piercing fat objects. J. Algorithms, 46(2):178–189, 2003. doi:10.1016/S0196-6774(02)00294-8.
  • [6] Timothy M. Chan. A dynamic data structure for 3-d convex hulls and 2-d nearest neighbor queries. J. ACM, 57(3):16:1–16:15, 2010. doi:10.1145/1706591.1706596.
  • [7] Timothy M. Chan and Zhengcheng Huang. Constant-hop spanners for more geometric intersection graphs, with even smaller size. In Proc. 39th International Symposium on Computational Geometry (SoCG), volume 258 of LIPIcs, pages 23:1–23:16, 2023. doi:10.4230/LIPICS.SoCG.2023.23.
  • [8] Timothy M. Chan and Dimitrios Skrepetos. All-pairs shortest paths in unit-disk graphs in slightly subquadratic time. In Seok-Hee Hong, editor, Proc. 27th International Symposium on Algorithms and Computation (ISAAC), volume 64 of LIPIcs, pages 24:1–24:13, 2016. doi:10.4230/LIPICS.ISAAC.2016.24.
  • [9] Timothy M. Chan and Dimitrios Skrepetos. All-pairs shortest paths in geometric intersection graphs. J. Comput. Geom., 10(1):27–41, 2019. doi:10.20382/JOCG.V10I1A2.
  • [10] Bernard Chazelle and Herbert Edelsbrunner. An optimal algorithm for intersecting line segments in the plane. J. ACM, 39(1):1–54, 1992. doi:10.1145/147508.147511.
  • [11] Mark de Berg and Sergio Cabello. An O⁒(n⁒log⁑n) algorithm for single-source shortest paths in disk graphs, 2025. doi:10.48550/arXiv.2506.07571.
  • [12] Mark de Berg, Otfried Cheong, Marc J. van Kreveld, and Mark H. Overmars. Computational Geometry: Algorithms and Applications (3rd Edition). Springer, 2008. doi:10.1007/978-3-540-77974-2.
  • [13] Herbert Edelsbrunner, Leonidas J. Guibas, and Jorge Stolfi. Optimal point location in a monotone subdivision. SIAM J. Comput., 15(2):317–340, 1986. doi:10.1137/0215023.
  • [14] Alon Efrat, Alon Itai, and Matthew J. Katz. Geometry helps in bottleneck matching and related problems. Algorithmica, 31(1):1–28, 2001. doi:10.1007/S00453-001-0016-8.
  • [15] David Eppstein, Michael T. Goodrich, and Jonathan Z. Sun. Skip quadtrees: Dynamic data structures for multidimensional point sets. Int. J. Comput. Geom. Appl., 18:131–160, 2008. doi:10.1142/S0218195908002568.
  • [16] Jeff Erickson. New lower bounds for Hopcroft’s problem. Discret. Comput. Geom., 16(4):389–418, 1996. doi:10.1007/BF02712875.
  • [17] Steven Fortune. A sweepline algorithm for Voronoi diagrams. Algorithmica, 2:153–174, 1987. doi:10.1007/BF01840357.
  • [18] Chris Gray. Algorithms for Fat Objects: Decompositions and Applications. PhD thesis, TU Eindhoven, 2008. URL: https://pure.tue.nl/ws/portalfiles/portal/3256691/200811208.pdf.
  • [19] Sariel Har-Peled. Geometric approximation algorithms, volume 173 of Mathematical Surveys and Monographs. American Mathematical Society, 2011. doi:10.1090/surv/173.
  • [20] Haim Kaplan, Wolfgang Mulzer, Liam Roditty, Paul Seiferth, and Micha Sharir. Dynamic planar Voronoi diagrams for general distance functions and their algorithmic applications. Discret. Comput. Geom., 64(3):838–904, 2020. doi:10.1007/S00454-020-00243-7.
  • [21] Katharina Klost. An algorithmic framework for the single source shortest path problem with applications to disk graphs. Comput. Geom., 111:101979, 2023. doi:10.1016/j.comgeo.2022.101979.
  • [22] Chih-Hung Liu. Nearly optimal planar k nearest neighbors queries under general distance functions. SIAM Journal on Computing, 51(3):723–765, 2022. doi:10.1137/20M1388371.
  • [23] Ketan Mulmuley. A fast planar partition algorithm, II. J. ACM, 38(1):74–103, 1991. doi:10.1145/102782.102785.
  • [24] Liam Roditty and Michael Segal. On bounded leg shortest paths problems. Algorithmica, 59(4):583–600, 2011. doi:10.1007/S00453-009-9322-3.