Abstract 1 Introduction 2 SSSP on Disk Graphs of Bounded Radius Ratio 𝚿 3 SSSP on Disk Graphs of Arbitrary Radius Ratio References

Single-Source Shortest Path Problem in Weighted Disk Graphs

Shinwoo An ORCID Pohang University of Science and Technology, South Korea Eunjin Oh ORCID Pohang University of Science and Technology, South Korea Jie Xue ORCID New York University Shanghai, China
Abstract

In this paper, we present efficient algorithms for the single-source shortest path problem in weighted disk graphs. A disk graph is the intersection graph of a family of disks in the plane. Here, the weight of an edge is defined as the Euclidean distance between the centers of the disks corresponding to the endpoints of the edge. Given a family of n disks in the plane whose radii lie in [1,Ψ] and a source disk, we can compute a shortest path tree from a source vertex in the weighted disk graph in O(nlog2nlogΨ) time. Moreover, in the case that the radii of disks are arbitrarily large, we can compute a shortest path tree from a source vertex in the weighted disk graph in O(nlog4n) time. This improves the best-known algorithm running in O(nlog6n) time presented in ESA’23.

Keywords and phrases:
Disk graphs, shortest path problem, compressed quadtrees
Copyright and License:
[Uncaptioned image] © Shinwoo An, Eunjin Oh, and Jie Xue; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Computational geometry
Related Version:
Full Version: https://arxiv.org/abs/2504.06534
Funding:
The work by Ah and Oh was supported by Institute of Information & Communications Technology Planning & Evaluation (IITP) grant funded by the Korea government (MSIT) (No.RS-2024-00440239, Sublinear Scalable Algorithms for Large-Scale Data Analysis) and the National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (No.RS-2024-00358505).
Editors:
Oswin Aichholzer and Haitao Wang

1 Introduction

Geometric intersection graphs are a fundamental class of graphs representing spatial relationships among geometric objects. In this paper, we focus on the intersection graph of disks in the plane. More formally, for a set P of n points in the plane, where each point vP has an associated radius rv, the disk graph G of P is defined as the graph where each vertex corresponds to a point P, and two vertices u and v of P are connected by an edge if and only if the disks with center u,v and radii ru,rv intersect. For an edge-weighted disk graph, the weight of an edge uv is defined as |uv|. In the special case that all radii are the same, the disk graph is also called a unit disk graph. Disk graphs can be used as a model for broadcast networks: The disks of P represent transmitter-receiver stations with transmission power. One can view a broadcast range of a transmitter as a disk.

In this paper, we consider the single-source shortest path (SSSP) problem for edge-weighted disk graphs: Given a set P of points associated with radii and a specified point sP, compute a shortest path tree of the edge-weighted disk graph of P rooted at s. One straightforward way to deal with a disk graph is to construct the disk graph explicitly, and then run algorithms designed for general graphs. However, a disk graph might have complexity Θ(n2) in the worst case even though it can be (implicitly) represented as n disks. Therefore, it is natural to seek faster algorithms for a disk graph implicitly represented as its underlying set of disks. Besides the SSSP problem, many graph-theoretic problems have much more efficient solutions in disk graphs than in general graphs [1, 2, 4, 7, 10, 13, 15, 17].

Related work.

As the single-source shortest path problem is fundamental in computer science, there are numerous work on this problem and its variant for unit disk graphs [5, 6, 8, 9, 11, 14, 16, 20]. In the case of unweighted unit disk graphs where all edge weights are one, the SSSP problem can be solved in O(nlogn) time, and this is optimal [6, 8]. For edge-weighted unit disk graphs, the best known exact algorithm for the SSSP problem takes O(nlog2nloglogn) time [5], and the best known (1+ε)-approximation algorithm takes O(nlogn+nlog2(1ε)) time [20]. For general disk graphs, the best known exact algorithms for the unweighted and weighted SSSP problem takes O(nlog2n) and O(nlog6n) time, respectively [13, 15].

Another variant of the problem is the reverse shortest path problem, where the input is an edge-weighted graph G, a start vertex, a target vertex, and a threshold value. The problem is to find a minimum value r such that the length of the shortest path from the start vertex to the target vertex in Gr is at most the threshold. Here, Gr is the subgraph of G consisting of edges whose weights are at most r. The problem was considered in various metrics in the weighted and unweighted cases. The best-known algorithms for both weighted and unweighted unit disk graph metric take O(n6/5) randomized time [13, 21]. In addition, the best-known algorithm for weighted disk graph metric takes O(n5/4) randomized time [13].

Our results.

In this paper, we present two algorithms for the SSSP problem for edge-weighted disk graphs with n vertices. The first algorithm runs in O(nlog2nlogΨ) time, where Ψ is the maximum radius ratio of P. The second algorithm runs in O(nlog4n) time. This improves the best-known algorithm for this problem running in O(nlog6n) time [13].

Model of computation.

In Section 3, our algorithm uses a compressed quadtree. To implement this efficiently, we need to extend the real RAM model [18] by an floor function that rounds a real number down to the next integer [12]. While the floor function is generally considered too powerful, it is widely regarded as reasonable for tasks such as finding the cell of a given level of the grid that contains a given point in constant time [12]. On the other hand, our algorithm in Section 2 operates within the standard real RAM model.

Preliminaries.

Throughout this paper, we let P be a set of n points in the plane, where each point vP has an associated radius rv, and G be the edge-weighted disk graph of P. We interchangeably denote vP as a point or as a vertex of G if it is clear from the context. Also, we let s be a source vertex of P. We assume that 1rv for all vP, and thus in the case of bounded radius ratio, all radii must come from the range [1,Ψ] for a constant Ψ. The length of a path of G is defined as the sum of the weights of the edges contained in the path. The distance between u and v is defined as the minimum length among all u-v paths of G. For a vertex vG, we simply let d(v) denote the distance between s and v.

2 SSSP on Disk Graphs of Bounded Radius Ratio 𝚿

In this section, we describe our algorithm for the SSSP problem on disk graphs. Given a set P of n points with associated radii in [1,Ψ], our goal is to compute a shortest path tree from a specified source vertex s in the edge-weighted disk graph G of P in O(nlog2nlogΨ) time. More precisely, our goal is to compute dist(v) and prev(v) for all vertices vP such that dist(v)=d(v), and prev(v) is the predecessor of t in the shortest s-t path.

2.1 Sketch of Our Algorithm

We review the well-known Dijkstra’s algorithm that computes a shortest path tree from a source vertex. Initially, the algorithm sets all dist-values to infinity except a source vertex, and sets Q=P. The algorithm sequentially applies the following steps until Q is empty.

  • (D1) Pick the vertex u with smallest dist-value.

  • (D2) For all neighbors vQ of u, update dist(v)min{dist(v),dist(u)+|uv|}.

  • (D3) Remove u from Q.

In the worst case, Dijkstra’s algorithm takes quadratic time since a disk graph can have Θ(n2) edges. In our algorithm, we simultaneously update the dist-values of several vertices by the Update subroutine that was introduced in [20]. For any two vertex set U and V of G, Update(U,V) does the following: For all vV,

  • (U1) Compute u:=argmin{dist(u)+|uv|} among all uU s.t. uv is an edge of G.

  • (U2) Update dist(v)min{dist(v),dist(u)+|uv|}.

That is, the subroutine updates the dist-values of all vertices of V using the dist-values of the vertices of U. The subroutine gets input U and V from a hierarchical grid. For each integer 0ilogΨ, we use Γi to denote a grid of level i, which consists of axis-parallel square cells of diameter 2i. Then we use Γ to denote the union of grid cells of Γi’s. For a grid cell cΓ, we use p(c) to denote the center of c, use |c| to denote the diameter of c, and use c to denote the axis-parallel square of diameter 69|c| centered at p(c). We use c to denote the set of grid cells of Γi1,Γi and Γi+1 which are contained in c. We say cΓi1 a child cell of c if c is nested in c. Throughout the paper, we assume that no points of P lie on the boundary of any grid cell. We define two sets of vertices contained in c as follows.

Pmid(c):={vPvc,rv[8|c|,16|c|)}; Psmall(c):={vPvc,rv[1,8|c|)}.

Intuitively, Pmid(c) consists of vertices contained in c with radii similar to |c| while Psmall(c) consists of vertices with radii smaller than that of Pmid(c). Note that Pmid(c) forms a clique in G. For a vertex v in P, we let cv be the (unique) cell such that Pmid(cv) contains v.

Regular edge and Irregular edge.

Let uv be an edge of G with rurv. We call uv a regular edge if rvru<2, and an irregular edge if rvru2. We can identify all edges of G efficiently by using c, Pmid(c) and Psmall(c).

Lemma 1.

Let uv be a regular edge. Then cucv. Symmetrically, cvcu.

Lemma 2.

Let uv be an edge and 2rurv. There is a cell ccv such that uPsmall(c).

Basic strategy of [20].

We utilize the strategic adaptation of Dijkstra’s algorithm in a cell-by-cell manner with Psmall() and Pmid(). This strategy was used in [20] to design an efficient algorithm for the weighted SSSP problem on unit disk graphs. For concreteness, we describe the details of the strategy below. Let v be the vertex with the smallest dist-value among all vertices not processed so far. As an invariant, we shall guarantee that all vertices of G which have been processed have correct dist-values, and v has a correct dist-value if its predecessor in the shortest s-v path has been processed. We want to process not only v but also all vertices in Pmid(cv) simultaneously. However, notice that, at this moment, the vertices in Pmid(cv) do not necessarily have correct dist-values.

Thus, as a first step, we compute the correct dist-values for all vertices in Pmid(cv). If the predecessor w of a vertex vPmid(cv) in the shortest s-v path already has the correct dist-value, we can simply update the dist-values of Pmid(cv) by considering all edges whose one endpoint is in Pmid(cv). However, it is possible that w has not been processed yet so far and does not have the correct dist-value. Fortunately, even in this case, we can show that w has a correct dist-value. To see this, let u be the predecessor of w in the shortest s-w path. Then uv cannot be an edge of the graph since otherwise u is the predecessor of v in the shortest s-v path. Therefore, |uv|>rv. As v,vPmid(cv), |uv|>rv>|vv|. Hence, d(u)=d(v)(|vw|+|wu|)d(v)|vu|<d(v)|vv|d(v). The last inequality follows since the concatenation of vv and the shortest s-v path is longer than the shortest s-v path. Now u must have been processed since v is the vertex with the smallest dist-value among all vertices not processed so far. Due to the invariant, w must have the correct dist-value. Consequently, we can update the dist-values of all vertices of Pmid(cv) by applying Update(N(cv),Pmid(cv)) where N(cv) denotes the set of neighbors of Pmid(cv) in G.

The second step is to transmit the correct dist-values of Pmid(cv) into their neighbors in order to satisfy the second invariant. Lastly, we remove Pmid(cv) from the graph.

Main obstacles and lazy update scheme.

The complexity of this strategy primarily depends on the cost of searching all neighbors of Pmid(cv). This was not a big deal in [20], as in a unit disk graph, each cell interacts with only a constant number of other cells. In the case of disk graphs, however, a vertex with radius Θ(Ψ) can be adjacent to vertices in Pmid(c) for O(Ψ2) distinct grid cells c. To avoid polynomial dependency on Ψ, we handle regular edges and irregular edges separately. More specifically, we can search all regular edges by considering Pmid(c) for all ccv by Lemma 1. Since cv consists of O(1) cells, we can avoid the polynomial dependency on Ψ through the appropriate use of the Update subroutine.

However, the same approach cannot be used to search all irregular edges as up to Θ(Ψ2) sets of Pmid() may interact with Pmid(cv) in the worst case. We address this issue with a novel approach, which we call lazy update scheme. We say w is a small neighbor of a vertex u if uw is an irregular edge and ru>rw. Furthermore, we say w is a small neighbor of a cell c if there is a vertex uPmid(c) forming an irregular edge with w and ru>rw. In the basic strategy, we transmit the correct dist-value of v to all neighbors whenever we process v. In the lazy update scheme, we postpone the transmission to Pmid(c) for all cells c such that v is a small neighbor of c. We handle several postponed update requests at once at some point. More specifically, let Vx be the set of small neighbors of c whose dist-values are in the range [x,x+2|c|]. We transmit the dist-values of Vx into Pmid(c) right after all vertices of Vx have been processed. Due to the following lemma, we can bound the number of lazy updates into O(1) for each cell c, and this enables us to avoid the polynomial dependency on Ψ.

Lemma 3.

Let u and u be small neighbors of c. Then |d(u)d(u)|65|c|.

However, this may cause an inconsistency issue during the first step. When we process the vertices of Pmid(cv), now the first update does not transmit the dist-values of the small neighbors of cv. If a predecessor w of vPmid(cv) in the shortest s-v path is a small neighbor of v, it is possible that the lazy update has not occurred even though w has already been processed. We show that this cannot happen using the following geometric lemma.

Lemma 4.

Let us be the predecessor of v in the shortest s-v path. Then |uv||rvru| unless rv<ru and v is a leaf in the shortest path tree.

By this lemma, d(w)+2|cv|<d(w)+14rv<d(w)+|rwrv|<d(w)+|wv|=d(v). Subsequently, roughly speaking, the lazy update that transmits dist-values of w into v occurs in advance when we process the vertices of Pmid(cv).

2.2 Algorithm

We present our algorithm for the SSSP problem on disk graphs with radius ratio Ψ. The goal is to compute d(v) for all vP. Initially, we set dist(v), the dist-value of v, as infinity for all vertices other than a source vertex s, and set dist(s)=0. Eventually, the algorithm will modify dist(v) into d(v) for all vP. In addition, for each nonempty Pmid(c) for cΓ, we maintain a value alarm(c) initialized to . These alarm values will take care of the moment of the lazy update. We set R by the set of points of P that has not been processed yet.

Pre-processing.

We compute d(v) for all vP adjacent to s in G and set dist(v) to |sv|. Furthermore, for each grid cell c, let L¯(c) be the set of grid cells c where Pmid(c) contains a small neighbor of c. For technical reasons, we compute a superset L(c) of L¯(c) which contains all cells c with |c|<|c| such that there is an edge between a vertex of Pmid(c) and a vertex of Pmid(c). Furthermore, we set L(cs) as an empty set where cs is the grid cell such that the source s is contained in Pmid(cs). We will use the information of L(c) to deal with the lazy update. Then the algorithm consists of several rounds. In each round, we check dist(v) for all vR and alarm(c) for all cΓ. Subsequently, we find the minimum value k among these values, and proceed depending on the type of k. The algorithm terminates when R becomes empty. We utilize Update(U,V) subroutine for both cases.

Algorithm 1 Update(U,V).

Intuitively, if uU has correct dist-values and u is the predecessor of vV in the shortest s-t path, then all such v gets the correct dist-values after the subroutine Update(U,V). The rest of this section is devoted to giving detailed instructions on case studies of k.

Algorithm 2 SSSP(P).

Case 1: 𝒌=dist(𝒗) for a vertex 𝒗𝑹.

In this case, we first apply the subroutine Update(ccvPmid(c),Pmid(cv)). Interestingly, we will see later that after this, all vertices in Pmid(cv) have the correct dist-values. Then using the correct dist-values of Pmid(cv), we update the dist-values of the neighbors of the vertices in Pmid(cv). This is done by applying Update(Pmid(cv),ccvPmid(c)Psmall(c)) and setting alarm(c)=dist(v)+2|c| for all cL(cv) with alarm(c)=, where the former takes care of the neighbors of the vertices in Pmid(cv) connected by regular edges and the small neighbors of cv, and the latter takes care of the other neighbors. Finally, we remove Pmid(cv) from R.

Case 2: 𝒌=alarm(𝒄) for a grid cell 𝒄𝚪.

In this case, we shall correct the dist-values of all vPmid(c) such that the predecessor of v is a small neighbor of v. This is done by applying Update(ccPsmall(c),Pmid(c)). After this, we reset alarm(c) to .

2.3 Correctness

In this section, we show that the algorithm correctly computes a shortest path tree. For a vertex v, we use prev(v) to denote the predecessor of v in the shortest path tree. We shall maintain a simple invariant during the algorithm: d(v)dist(v) for every vP. The following lemma is the simple corollary of Lemma 4.

Corollary 5.

Suppose the shortest s-v path contains an irregular edge uv and us. Then |uv|12rv unless ru>rv and v is a leaf on the shortest path tree.

Then we prove the key invariant of our algorithm.

Lemma 6.

The following statements hold during the execution of Algorithm 2.

  1. (1)

    At the onset of line 5, dist(v)=d(v).

  2. (2)

    After line 5, dist(u)=d(u) if uPmid(cv) is not a leaf on the shortest path tree.

  3. (3)

    After line 12, dist(u)=d(u) if uPmid(c), prev(u)ccPsmall(c), and prev(u)R.

Proof sketch..

We apply induction on the index i of the round. For the base case, the first round of the algorithm is a round of Case 1 of k=dist(s), where s is a source vertex. The shortest s-u path with uPmid(cs) is su and dist(u)=d(u) due to the pre-processing.

Now we assume that Lemma 6 holds up to the (i1)-th round. Suppose the i-th round performs line 5. First we show (1). Let x be the closest vertex to v along the shortest s-v path such that d(x)=dist(x). Note that xs because all children of s have correct-dist values due to the pre-processing. If x=v, we are done. Otherwise, xR since d(x)<d(v). Then by induction hypothesis on the round which removes x from R, a child y of x satisfies d(y)=dist(y) unless x is a small neighbor of y. If x is a small neighbor of y, alarm(cy) was at most d(x)+2|cy| after that round. Since yPmid(cy), 8|cy|ry. Hence, alarm(cy)d(x)+14ry<d(x)+|xy|=d(y) due to Corollary 5. Thus, d(y)=dist(y) by induction hypothesis (3) on the round of k=alarm(cy). This contradicts the choice of x.

Next we show (2). We may assume u is not a source vertex s. Let w=prev(u). We show that d(w)=dist(w). If w=s or ws is an edge of G, we are done by the preprocessing. Hence, we may assume that x:=prev(w) exists and x is not a source vertex s. Note that the proof of (1) implicitly says that for any vertex v with d(v)k, d(v)=dist(v) at the onset of line 5. Hence, we are enough to consider the case that d(w)>d(v). Notice that xu is not an edge of G since otherwise, x is the predecessor of u. Then d(x)<d(x)+|xu|rurx<d(x)+|xw|+|wu|ru=d(u)ru<d(v), where the last inequality comes from u,vPmid(cv). Hence, d(x)=dist(x) and therefore xR due to the choice of v. Thus, by induction hypothesis on the round which removes x from R, d(w)=dist(w) unless x is a small neighbor of w and k<d(x)+2|cw|. If x is a small neighbor of w, alarm(cw) is set to at most d(x)+2|cw| after that round. After a similar computation as we did in (1), we can derive d(x)+2|cw|<d(v) using the facts that d(u)14rv<d(v) and Corollary 5. Now d(w)=dist(w) due to induction hypothesis (3).

Hence, for all cases, d(w)=dist(w). Since u is not a leaf on the shortest path tree, |wu|12ru due to Corollary 5. The only problematic case occurs when w is a small neighbor of u and the lazy update from w to Pmid(cu) has not occurred. In this case, d(w)+2|cu|>d(v) due to induction hypothesis (3). Then d(v)<d(w)+2|cu|d(w)+14rud(w)+|wu|14ru=d(u)14ru<d(v) leads to a contradiction. Finally, (3) is followed by (2) and the fact that prev(u)R due to the choice of k.

Figure 1: Illustrating some points in the proof of Lemma 6-(2). (a) An edge xu is not an edge of G. (b) If w is a small neighbor of u. alarm(cv) rings before the round of k=dist(v).
Lemma 7.

Algorithm 2 returns a shortest path tree rooted at s.

2.4 Time Complexity

In this section, we show that Algorithm 2 can be implemented in O(nlog2nlogΨ) time. For convenience, we assume that the subroutine Update(U,V) takes O((|U|+|V|)log2n) time (see the full version), and analyze the overall running time based on this assumption.

Lemma 8.

The subroutine Update(U,V) takes O((|U|+|V|)log2n) time.

Pre-processing.

In the pre-processing step, we compute dist(v) for all neighbors v of s, and L(c) for all grid cells c. Here, L(c) denotes the set of cells c such that Pmid(c) contains a small neighbor of c. The former part takes O(n) time by checking |sv|rsrv for all vP. We do not use the floor function on the real RAM model to implement the hierarchical grid.

Lemma 9.

One can compute a hierarchical grid Γ, and Pmid(c) and Psmall(c) for all cells cΓ in O(n(logn+logΨ)) time on the real RAM model.

Lemma 10.

If Pmid(c) contains a small neighbor of c, cL(c). Furthermore, one can compute L(c) for all cells c in O(nlognlogΨ) time.

Time complexity of all rounds of Case 1.

Let ni be the number of vertices involved in Pmid(cv)ccv(Pmid(c)Psmall(c)) in the i-th round of line 5-6. If i-th round is a round of Case 2, we set ni to 0. The time complexity of this part is then ΣiO(nilog2n). We show that each Pmid(c) and Psmall(c) appears in O(1) rounds. First, since we remove Pmid(cv) from R after the round k=dist(v), each Pmid(c) appears exactly once in the term Pmid(cv). Suppose cc. Then c is contained in axis-parallel square of diameter 64|c| centered at p(c) and |c|2|c|. Conversely, c is contained in the axis-parallel square of diameter 65|c| centered at p(c). Therefore, the number of different c with cc is O(1) for a fixed c. Hence, each Pmid(c) and Psmall(c) appears O(1) rounds through the term ccv(Pmid(c)Psmall(c)). Note that each vertex v is contained in one Pmid(c) and O(logΨ) Psmall(c) for cΓ. Thus,

ΣiO(nilog2n)=ΣcO(|Pmid(c)|+logΨ|Psmall(c)|)×O(log2n)=O(nlog2nlogΨ). (1)

Time complexity of all rounds of Case 2.

Let ni be the number of vertices involved in Pmid(c)cc(Psmall(c)) in the i-th round of line 12. If i-th round runs a round of Case 1, we set ni to 0. The time complexity of this part is then ΣiO(nilog2n). Since alarm(c) always set to d(v)+2|c| for some vP and by Lemma 3, each cell c is referenced by line 11 O(1) times. Again, there are O(1) grid cells c such that c contains a fixed cell c, and each v is contained in one Pmid(c) and O(logΨ) Psmall(c) sets. Thus, the total time complexity is

ΣiO(nilog2n)=ΣcO(|Pmid(c)|+logΨ|Psmall(c)|)×O(log2n)=O(nlog2nlogΨ). (2)

Priority queue.

We maintain two priority queues, one of which stores vertex vR with priority dist(v), and the other queue stores cell cΓ with priority alarm(c). Once the algorithm performs line 3, we peek an element with minimum priority for each queue, and then choose k as the minimum value among them. The total cost of the queue operations is dominated by the total cost caused by Update subroutines.

Theorem 11.

There is an O(nlog2nlogΨ)-time algorithm that solves the single-source shortest path problem on disk graphs with n vertices and radius ratio Ψ.

3 SSSP on Disk Graphs of Arbitrary Radius Ratio

In this section, we extend the approach of Section 2 to devise an O(nlog4n)-time algorithm for the SSSP problem on disk graphs with arbitrary radius ratio. Basically, the O(nlog2nlogΨ) term in Theorem 11 came from the total size of Pmid() and Psmall(), which depends on the height (=Θ(logΨ)) of the hierarchical grid. In the case of an arbitrary radius ratio, we cannot bind the height of the grid. To resolve this, we follow the approach presented in [2]. More specifically, we use a compressed quadtree (See Section 3.1) instead of a hierarchical grid. The height of the compressed quadtree might be Θ(n), which is still large. Hence, we use a heavy path decomposition (See Section 3.1) to compute O(n) vertical paths in the compressed quadtree, which we call canonical paths, such that every root-node path of the compressed quadtree can be uniquely represented by the concatenation of O(logn) canonical paths. In this way, we can encode the edge information using near-linear time and space.

This approach has been applied to design efficient algorithms on disk graphs of arbitrary radius ratios, such as the dynamic connectivity problem [2] and the unweighted SSSP problem [15]. By integrating this approach with our lazy update scheme in a more sophisticated way, we can design an O(nlog4n)-time algorithm for the SSSP problem on weighted disk graphs with arbitrary radius ratios.

Throughout this section, we alternatively define the notions of Pmid(c),c,c, and regular/irregular edges. Let h=210 and α>2π/arcsin(1100) be the integer constants.

Definition 12.

For a grid cell c in 𝒬,

  • Pmid(c):={vc:rv[h|c|,2h|c|)}.

  • c:= Axis-parallel square of diameter 8h2|c| centered at p(c).

  • c:= {c𝒬:cc,|c|[1h|c|,h|c|]}.

Definition 13.

For an edge uv of G with rurv, uv is a regular edge if rvru<h, and an irregular edge otherwise.

Lemma 14.

Let uv be a regular edge. Then cucv.

3.1 Preliminaries: technical tools

In this section, we first briefly introduce technical items. Klost [15] implemented an efficient breadth-first search using these components. In contrast, our goal is to implement Dijkstra’s algorithm over weighted graphs, which requires more sophisticated update strategies. We conclude this section by outlining the modified lazy update scheme that plays the central role in our algorithm for arbitrary radius ratios in Section 3.2.

Compressed quadtree.

For an integer i0, let Γi be a grid of level i, which consists of axis-parallel square cells of diameter 2i. Among all grid cells of iΓi, let c be the grid cell of the smallest level that contains P. A compressed quadtree 𝒬 is a rooted tree defined as follows. We start from c as the root of the tree and iteratively expand the tree. More specifically, whenever we process cΓi, we stop the expansion if c contains exactly one point of P. Otherwise, we compute at most four cells of Γi1 that are nested in c, and contain at least one point of P. If there is exactly one such child c, we remove c and connect c to the parent node of c. Then we move on to children of c.

Lemma 15 ([12]).

In O(nlogn) time, one can compute a compressed quadtree 𝒬 having O(n) nodes and O(n) height.

For our purpose, the compressed quadtree is extended to contain all grid cells of cv for all vP. It also takes an O(nlogn) time to compute the extended tree [2].

Heavy path decomposition and canonical paths.

As the height of 𝒬 is O(n), the direct use of Algorithm 2 is expensive: each vertex may be contained in Θ(n) grid cells, which was O(logΨ) in Section 2. Our goal is to compute a path system in 𝒬 such that every root-node path of 𝒬 can be represented by the concatenation of O(logn) paths in the path system. We say an edge cc𝒬 is heavy if c is the first child of c in the order of children, where we give an order by the total number of nodes in the subtree rooted at c among all children of c. We say cc light otherwise. A heavy path of 𝒬 is the maximal path on 𝒬 that consists of only heavy edges. The heavy path decomposition is the collection of all heavy paths in 𝒬.

Lemma 16 ([19]).

Let 𝒬 be the tree of n nodes. Then,

  1. 1.

    every root-leaf path of 𝒬 contains O(logn) light edges,

  2. 2.

    every node of 𝒬 lies on exactly one heavy path, and

  3. 3.

    the heavy path decomposition can be computed in O(n) time.

Then we use the approach of [2] as a black box. That is, we define a set Π of O(n) canonical paths, such that every root-node path of 𝒬 can be uniquely represented by the concatenation of O(logn) disjoint canonical paths. Also, each canonical path is a subpath of a heavy path, and each node of 𝒬 is contained in O(logn) canonical paths. We can compute Π in O(nlogn) time using standard data structures. See [2] for details.

Handling irregular edges.

We primarily follow the notion of a proxy graph as presented in [2, 15], with slight modifications to the notation for our purpose. For an irregular edge uv with ru<rv, we call u a small neighbor of v, and v a large-neighbor of u. For a canonical path π, we use cπ to denote the lowest cell of π. Also, we use |π|(=|cπ|) and |πt| to denote the diameter of the lowest cell and the topmost cell of π, respectively. We then define a set 𝒞π of α congruent cones of radius 3h|πt|, all sharing the same apex at p(cπ). Let Λ be the set of all pairs (cπ,C) for all canonical paths π and all cones C𝒞π. See Figure 2(a-b).

We say an irregular edge uv is redundant if |uv|<|rurv|. Due to Lemma 4, if a redundant edge uv appears on the shortest path tree, then one endpoint, say u, is a leaf on the tree. Therefore, we can postpone the correction of dist(u) until the last, as no shortest s-w(u) path intersects u. In fact, our algorithm handles these edges during post-processing.

For a pair λ=(c,C)Λ, let r(C) be the radius of C. For a vertex vP, recall that cv is a grid cell such that vPmid(cv). Let c¯v be the smallest grid cell on the root-cv path in 𝒬 whose diameter is at least h|cv|. We let Πv be the set of O(logn) consecutive canonical paths representing the root-c¯v path. We define three subsets of P with respect to λ. Here, p(c) is the center point of c.

Psmall(λ) :={vcπΠv s.t. the lowest cell of π is c}, (3)
Plarge(λ) :={vCrv[h|c|,23r(C)] and |rv|vp(c)||<5|c|}, and (4)
Ppost(λ) :={vCrv[h|c|,23r(C)] and 5|c|rv|vp(c)|}. (5)

Intuitively, for any irregular edge uv, some λ encodes uv as uPsmall(λ) and vPlarge(λ)Ppost(λ). Moreover, vPlarge(λ) if uv is a non-redundant. Later, our algorithm runs Dijkstra’s algorithm in a cell-by-cell manner w.r.t. Pmid(),Psmall(), and Plarge().

Figure 2: (a) Canonical path π. (b) Illustration of λ=(c,C). (c) A disk of Ppost(λ) (green) contains the disks of Psmall(λ) (red), while a disk of Plarge(λ) (blue) may not.
Lemma 17.

Suppose v is a small neighbor of u. There exists a pair λΛ such that vPsmall(λ) and uPlarge(λ)Ppost(λ). Moreover, if uv is non-redundant, uPlarge(λ).

Corollary 18 (Corollary of Lemma 4).

Suppose the shortest s-v path contains an irregular edge uv and v is not a leaf. Then |uv|(11h)rv.

Lemma 19.

λΛ|Psmall(λ)|=O(nlogn) and λΛ|Plarge(λ)|+|Ppost(λ)|=O(nlogn).

Two-way lazy update scheme.

Recall that Algorithm 2 updates small neighbors of v once it corrects the dist-values of Pmid(cv), whereas it postpones the update to (informal) large neighbors of v. In this section, we apply the lazy update scheme for both large and small neighbors of v. The main reason is as follows. Due to Lemma 6-(2), all vertices of Pmid(cv) simultaneously get correct dist-values after the call of line 5. This property heavily relies on the geometric property of Pmid(cv) such that for any u,wPmid(cv), |uw|18ru. However, this property no longer holds for Plarge(λ). More specifically, once we handle vPlarge(λ), there might be a vertex uPlarge(λ) whose predecessor in the shortest s-u has not been processed, and therefore, we cannot get correct dist-values of Plarge(λ) at this point.

Hence, one might consider a lazy update scheme to resolve this issue: delay the transmission of dist-values of Plarge(λ) in the range [x,x+f(λ)] for some function f of λ until all dist-values smaller than x+f(λ) have been processed. Unfortunately, this naive approach itself is not useful. Recall that for vPlarge(λ) with λ=(c,C), rv is in range [h|c|,23r(C)] and r(C)/|c| can be very large. Hence, we cannot partition the dist-values of Plarge(λ) into a constant number of ranges [x,x+f(λ)], and the number of updates from Plarge(λ) to Psmall(λ) might be Θ(n), which leads to quadratic running time in total. We reduce the running time using the following geometric observation. See also Figure 3. Let λ=(c,C).

Lemma 20.

Let v,vPlarge(λ), u,uPsmall(λ), rv>rv, the shortest s-u path contains vu, and vu is an edge of G. Then d(w)<d(v)+rv6|c| where wPlarge(λ) is a predecessor of u in the shortest s-u path.

Figure 3: Illustration of some points in the proof of Lemma 20. (a) If rvrv, v is contained in a disk of radius rv6|c| centered at v. (b) If rw>>rv, d(w)<<d(v) since the asymptotic lengths of the (shortest) blue path and the red path are d(w)+rw and d(v)+rv+rv, respectively.

Suppose we know the subset P(λ) of Plarge(λ) whose dist-values have been corrected, and our algorithm will transmit dist-values of P(λ) to Psmall(λ) right after all dist-values smaller than d(v)+rv6|c| have been processed for some vP(λ). Then, Lemma 20 guarantees that P(λ) contains all vertices of Plarge(λ) whose radii are smaller than rv. Furthermore, after the lazy update, all vertices of Psmall(λ) adjacent to uPlarge(λ) with rurv will have correct dist-values. Hence, the following procedure works.

  • Step 1. Maintain a priority queue that stores vP(λ) with priority d(v)+rv6|c|.

  • Step 2. Once we handle the lazy update caused by d(v)+rv6|c|, we update dist-values of the vertices of Psmall(λ) which are adjacent to a vertex vP(λ) with rvrv.

  • Step 3. After the update, we remove the updated vertices from Psmall(λ).

Recall that the running time of Update(U,V) is O((|U|+|V|)log2n) time. Although there might Θ(n) calls of Update for (Plarge(λ),Psmall(λ)), the total size of |V| can be bounded by O~(n) due to Step 3 and Lemma 19. Notice that U always corresponds to a subset P(λ) of Plarge(λ), which starts as an empty set and grows as the algorithm progresses. Hence, we implement incremental data structures with near-linear construction time by carefully dynamizing Update subroutine, inspired by the spirit of [3].

Definition 21.

Let Update-Inc(W) be the incremental data structure with respect to W that supports the following operations:

  • Initialize: set U=,

  • Insert(v): add a vertex vW into U together with a dist-value d(v), and

  • Query(V): given a set V of vertices, perform Update(U,V).

Lemma 22.

There is a data structure Update-Inc(Plarge(λ)) that supports insert operation O(nlog4n) time in total, and supports query operation on V in |V|O(log3n) time.

Remark.

We introduced an incremental data structure to handle the Θ(n) updates from Plarge(λ) to Psmall(λ). However, due to a similar reason, the number of lazy updates from Psmall(λ) to Plarge(λ) might be Θ(n). Fortunately, we can implement this direction of lazy update using solely Update subroutine carefully.

3.2 Algorithm

In this section, we present an O(nlog4n)-time algorithm for the SSSP problem on disk graphs of arbitrary radius ratio. Due to the lack of space, we mainly focus on the differences from Algorithm 2 in Section 2. During the pre-processing, we maintain two alarms alarm-up(λ), alarm-down(λ) together with a priority queue Q(λ) for each pair λΛ. Furthermore, we compute the set L1(v) (and L2(v)) of pairs λΛ where vPsmall(λ) (and vPlarge(λ)) and v has a neighbor in Plarge(λ) (and Psmall(λ)) for each vP. In each round, we check dist(v) for all vR and alarm-up(λ),alarm-down(λ) for all λΛ. Then we find the minimum value k among them and proceed depending on the type of k. The algorithm moves to the post-processing step when R becomes empty. The algorithm utilizes the Update subroutine from Section 2.

Case 1: 𝒌=dist(𝒗) for a vertex 𝒗𝑹.

After correcting the dist-values of Pmid(cv) except those are leaves on the shortest path tree, we update the dist-values of the neighbors of Pmid(cv) through one direct update and two-way lazy updates. This is done by executing subroutine Update(Pmid(cv),ccvPmid(c)), setting alarm-up(λ)=dist(v)+14v(λ) for every λL1(v) with alarm-up(λ)=, and inserting u with the priority dist(u)+ru6|c| into Q(λ) and inserting u into Update-Inc(Plarge(λ)) for every uPmid(cv) and every λL2(u). Here, v(λ) is the smallest radius of the vertex of Plarge(λ) forming an edge with Pmid(cv). Intuitively, the subroutine takes care of the neighbors connected by regular edges, and alarm-up() and alarm-down() take care of large neighbors and small neighbors of the vertices of Pmid(cv), respectively.

Case 2: 𝒌=alarm-up(𝝀) for a pair 𝝀𝚲.

In this case, we shall correct the dist-values of all vPlarge(λ) whose predecessor u is in Psmall(λ) with d(u)<k. This is done by applying Update(Usmall(λ,k),Ularge(λ,k)) where Usmall(λ,k) and Ularge(λ,k) are carefully computed subsets of Psmall(λ) and Plarge(λ), respectively. See the exact computation of Usmall(λ,k),Ularge(λ,k) and its correctness in the full version.

Case 3: 𝒌=alarm-down(𝝀) for a pair 𝝀𝚲.

We shall correct the dist-values of all vPsmall(λ) which are adjacent to uPlarge(λ) with ruruk, where uk is the vertex stored in Q(λ) with minimum priority. This is done by the query operation on Dsmall(λ,k) to Update-Inc(Plarge(λ,k)). Here, Dsmall(λ,k) denotes the set of vertices in Psmall(λ) such that (i) form an edge with uPlarge(λ) with ruruk, and (ii) have not been considered in a preceding round of k=alarm-down(λ). After the update, we modify Q(λ) appropriately.

Algorithm 3 SSSP2(P).

Post-processing.

In the post-processing step, we correct the dist-values for the remaining vertices. We execute Update(Ppost(λ),Psmall(λ)) for every pair λ in Λ.

3.3 Correctness and Time Complexity

Lemma 23.

The correctness of Algorithm 3 mainly follows from the following lemma, which is a counterpart to Lemma 7 from Section 2. The following statements hold during the execution of Algorithm 3.

  1. (1)

    At the onset of line 5, dist(v)=d(v) unless v is a leaf.

  2. (2)

    After line 5, dist(u)=d(u) if uPmid(cv) and u is not a leaf.

  3. (3)

    After line 17, dist(u)=d(u) if uPlarge(λ), prev(u)Psmall(λ), and d(prev(u))<k.

  4. (4)

    After line 20, let v be the vertex in Q(λ) with minimum priority. Then dist(u)=d(u) if uPsmall(λ) and u is adjacent to vPlarge(λ) with rvrv.

Lemma 24.

Algorithm 3 returns the shortest path tree rooted at s.

Time Complexity.

The main bottleneck of Algorithm 3 comes from the incremental data structure Update-Inc(Plarge(λ)). Due to Lemmas 19 and 22, we conclude the following.

Theorem 25.

There is an algorithm to solve the single-source shortest path problem on disk graphs with n vertices in O(nlog4n) time.

References

  • [1] Shinwoo An, Kyungjin Cho, and Eunjin Oh. Faster algorithms for cycle hitting problems on disk graphs. In Algorithms and Data Structures Symposium: 18th International Symposium (WADS 2023), pages 29–42, 2023. doi:10.1007/978-3-031-38906-1_3.
  • [2] Alexander Baumann, Haim Kaplan, Katharina Klost, Kristin Knorr, Wolfgang Mulzer, Liam Roditty, and Paul Seiferth. Dynamic connectivity in disk graphs. Discrete & Computational Geometry, 71(1):214–277, 2024. doi:10.1007/S00454-023-00621-X.
  • [3] Jon Louis Bentley and James B Saxe. Decomposable searching problems i. static-to-dynamic transformation. Journal of Algorithms, 1(4):301–358, 1980. doi:10.1016/0196-6774(80)90015-2.
  • [4] Édouard Bonnet, Panos Giannopoulos, Eun Jung Kim, Pawel Rzazewski, and Florian Sikora. QPTAS and subexponential algorithm for maximum clique on disk graphs. In 34th International Symposium on Computational Geometry (SoCG 2018), pages 11–14, 2018.
  • [5] Bruce W Brewer and Haitao Wang. An improved algorithm for shortest paths in weighted unit-disk graphs. arXiv preprint arXiv:2407.03176, 2024. doi:10.48550/arXiv.2407.03176.
  • [6] Sergio Cabello and Miha Jejčič. Shortest paths in intersection graphs of unit disks. Computational Geometry, 48(4):360–367, 2015. doi:10.1016/J.COMGEO.2014.12.003.
  • [7] Sergio Cabello and Wolfgang Mulzer. Minimum cuts in geometric intersection graphs. Computational Geometry, 94:101720, 2021. doi:10.1016/J.COMGEO.2020.101720.
  • [8] Timothy M Chan and Dimitrios Skrepetos. All-pairs shortest paths in unit-disk graphs in slightly subquadratic time. In Proceedings of the 27th International Symposium on Algorithms and Computation (ISAAC 2016), pages 24:1–24:13, 2016. doi:10.4230/LIPICS.ISAAC.2016.24.
  • [9] Timothy M Chan and Dimitrios Skrepetos. Approximate shortest paths and distance oracles in weighted unit-disk graphs. Journal of Computational Geometry, 10(2):3–20, 2019. doi:10.20382/JOCG.V10I2A2.
  • [10] Jared Espenant, J Mark Keil, and Debajyoti Mondal. Finding a maximum clique in a disk graph. In 39th International Symposium on Computational Geometry (SoCG 2023), volume 258, page 30, 2023.
  • [11] Jie Gao and Li Zhang. Well-separated pair decomposition for the unit-disk graph metric and its applications. In Proceedings of the thirty-fifth annual ACM symposium on Theory of computing (STOC 2003), pages 483–492, 2003. doi:10.1145/780542.780613.
  • [12] Sariel Har-Peled. Geometric approximation algorithms, volume 173 of Mathematical Surveys and Monographs. American Mathematical Society, 2011.
  • [13] Haim Kaplan, Matthew J Katz, Rachel Saban, and Micha Sharir. The unweighted and weighted reverse shortest path problem for disk graphs. In the proceedings of the 31st Annual European Symposium on Algorithms (ESA 2023), pages 67:1–67:14, 2023. doi:10.4230/LIPICS.ESA.2023.67.
  • [14] Haim Kaplan, Wolfgang Mulzer, Liam Roditty, Paul Seiferth, and Micha Sharir. Dynamic planar voronoi diagrams for general distance functions and their algorithmic applications. In Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2017), pages 2495–2504, 2017. doi:10.1137/1.9781611974782.165.
  • [15] Katharina Klost. An algorithmic framework for the single source shortest path problem with applications to disk graphs. Computational Geometry, 111:101979, 2023. doi:10.1016/J.COMGEO.2022.101979.
  • [16] Chih-Hung Liu. Nearly optimal planar k nearest neighbors queries under general distance functions. SIAM Journal on Computing, 51(3):723–765, 2022.
  • [17] Daniel Lokshtanov, Fahad Panolan, Saket Saurabh, Jie Xue, and Meirav Zehavi. A framework for approximation schemes on disk graphs. In Proceedings of the 2023 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2023), pages 2228–2241, 2023. doi:10.1137/1.9781611977554.CH84.
  • [18] Franco P Preparata and Michael I Shamos. Computational geometry: an introduction. Springer Science & Business Media, 2012.
  • [19] Daniel D Sleator and Robert Endre Tarjan. A data structure for dynamic trees. In Proceedings of the thirteenth annual ACM symposium on Theory of computing (STOC 1981), pages 114–122, 1981.
  • [20] Haitao Wang and Jie Xue. Near-optimal algorithms for shortest paths in weighted unit-disk graphs. Discrete & Computational Geometry, 64(4):1141–1166, 2020. doi:10.1007/S00454-020-00219-7.
  • [21] Haitao Wang and Yiming Zhao. Improved algorithms for distance selection and related problems. In 31st Annual European Symposium on Algorithms (ESA 2023), volume 274, page 101, 2023. doi:10.4230/LIPIcs.ESA.2023.101.