Single-Source Shortest Paths and Strong Connectivity in Dynamic Planar Graphs 1

We give a fully dynamic single-source shortest paths data structure for planar weighted digraphs with (cid:101) O ( n 4 / 5 ) worst-case update time and O (log 2 n ) query time. Here, a single update can either change the graph by inserting or deleting an edge, or reset the source s of interest. All known non-trivial planarity-exploiting exact dynamic single-source shortest paths algorithms to date had polynomial query time. We then extend our approach, obtaining a data structure that can maintain a planar digraph under edge insertions and deletions, and is capable of returning the identiﬁer of the strongly connected component of any query vertex. The worst-case update and query time bounds are the same as for our single-source distance oracle. To the best of our knowledge, this is the ﬁrst fully dynamic strong-connectivity algorithm achieving both sublinear update time and polylogarithmic query time for an important class of digraphs.


Introduction
The dynamic shortest paths problem seeks for a data structure that maintains a graph under updates and supports querying for shortest paths and/or distances.Depending on the set of supported updates, we call such a graph data structure fully dynamic if both edge insertions and deletions are allowed, incremental if only edge insertions (or edge weight decreases) are supported, or decremental if only edge deletions (or weight increases) are allowed.In the all-pairs variant of dynamic shortest paths problem one has to support shortest path queries between any pair of vertices of the graph.In the single-source variant all shortest paths queries have to originate in a fixed distinguished vertex and the only input to a query is the target vertex.
For the most general setting where one requires exact answers, Demetrescu and Italiano [2] gave a fully dynamic algorithm (improved slightly by Thorup [3]) recomputing the all-pairs shortest paths matrix in nearly optimal O(n 2 ) amortized time even if real edge weights are allowed. 2Note that the distance matrix can be recomputed from scratch in O(nm) time [4].Fully dynamic all-pairs shortest paths data structures with subcubic worst-case update bounds are also known [5,6,7].There exist faster algorithms if the input graph is unweighted and partially dynamic (i.e., incremental or decremental) [8,9,10].However, none of the known results improves upon a trivial, recompute-from-scratch algorithm with O(mn) update time and O(1) query time if the graph is sparse, i.e., m = O(n).For the single-source variant, all known non-trivial exact dynamic shortest paths algorithms [11] are partially dynamic and yield no improvement over the respective recompute-from-scratch algorithm in the sparse case either.
The lack of progress on obtaining an exact fully dynamic single-source shortest paths algorithms with O(n3− ) initialization time, O(m 1− ) amortized update time and O(n 1− ) query time at the same time can be explained by a matching lower bound conditional on the (static) APSP conjecture [12].In fact, breaking this barrier even in the partially dynamic setting for undirected unweighted graphs would be a large breakthrough [13].
Similarly, dynamic shortest paths problems have also been studied for important graph classes like planar graphs [32,33,34,35,36,37] or low-treewidth graphs [33,38].The primary reason why faster dynamic shortest paths algorithms in these cases are possible is the existence of non-trivial distance oracles for these classes.A distance oracle is a compact representation of the graph's shortest paths such that the distance (or a distance estimate) between any pair of vertices can be retrieved efficiently.For general graphs, such non-trivial distance oracles exist only for undirected graphs and assuming an approximation ratio of at least 3 [39,40,41].On the contrary, for planar graphs many non-trivial exact distance oracles have been proposed [42,43,44,34,35,36,45,46]. The first exact oracles with polylogarithmic query time and subquadratic space have been obtained only recently [47,48,49,50], following Cabello's breakthrough of employing Voronoi diagrams for the planar diameter problem [51].In addition, near-optimal (in terms of query time, construction time, and used space) (1 + )-approximate distance oracles have been known for nearly two decades [52,53], and a lot of effort has been put to push the known bounds as close to optimal as possible [54,55,56,57].
Dynamic shortest paths in planar graphs.In this paper our focus is on computing shortest paths in dynamic planar graphs and applications.Klein and Subramamian were the first to give a planarity-exploiting dynamic shortest paths algorithm [37] -their data structure worked for undirected graphs, was fully dynamic, (1 + )approximate and had O(n 2/3 ) update and query time bounds.A data structure with the same bounds (up to polylogarithmic factors), but for exact distances in directed graphs was obtained in the breakthrough work of Fakcharoenphol and Rao [34] (later extended and slightly improved in [58,59,60,35,36]).Abraham et al. [32] gave a faster (1 + )-approximate dynamic algorithm for undirected graphs with O(n 1/2 ) update and query times.Karczmarz [38] matched this bound for directed planar graphs, albeit only in the (1 + )approximate decremental setting. 3Abboud and Dahlgaard [61] showed that by the APSP conjecture, one should not expect an exact dynamic all-pairs shortest paths data structure for planar graphs with strongly sublinear 4 product of update time and query time.However, no exact data structure with strongly sublinear update time and near-linear product of update time and query time is known.
The single-source scenario is much less studied for dynamic planar graphs.Karczmarz [38] showed a decremental (1 + )-approximate single-source shortest paths algorithm for minor-free (and thus also planar) digraphs with O(n 1/2 ) update time and O(1) query time.Although not explicitly stated in the literature, the all-pairs data structure of [36] can be easily converted to a fully dynamic exact single-source distance oracle with O(n/x) update time and O(x) query time for any parameter x ∈ [1, n 1/3 ] (we formally show this in Section 3).However, no fully dynamic single-source shortest paths algorithm for planar graphs to date has been able to achieve sublinear update time and at the same time either support queries in polylogarithmic time or at least break through the O(n) update-query time product barrier, even in the approximate setting.
Recall that for general graphs, Roditty and Zwick [12] proved a lower bound for the dynamic single-source shortest paths problem, conditional on the conjectured hardness of the (static) APSP problem.

Conjecture 1 (APSP Conjecture
).There exists no algorithm for solving the all-pairs shortest paths problem in general weighted graphs in time O(n 3− ) for any constant > 0.
Abboud and Dahlgaard [61] proved a lower bound, also conditional on the APSP conjecture, for singlesource, single-sink dynamic distance oracles for planar graphs.
Theorem 2 ([61, Theorem 5]).The APSP conjecture implies that there is no algorithm that maintains a planar graph of size n under edge insertions and deletions in u(n) amortized time per update and answers distance queries from a fixed source s to a fixed sink t in q(n) amortized time, such that u(n ).This holds even if the planar embedding of the graph never changes.
Our results.In this paper we show the first exact dynamic single-source shortest paths algorithm for planar graphs with strongly sublinear update time and polylogarithmic query time.Our algorithm, summarized by the following theorem and described in Section 3, is deterministic and can be easily extended to report the corresponding shortest path.Theorem 3. Let G be a real-weighted planar digraph with a source s ∈ V (G).There exists an O(n log n)space data structure maintaining G under edge insertions, edge deletions, and source changes with worstcase update time O(n To the best of our knowledge, this result constitutes the first known application of additively weighted Voronoi diagrams machinery (first introduced by Cabello [51]) in dynamic graph algorithms.More specifically, it is obtained by combining fully dynamic maintenance of r-divisions [37,62], the multiple-source shortest paths data structure [36,63], the shortest paths algorithm for dense distance graphs [34], the recent efficient construction of dual Voronoi diagrams [48] via FR-Dijkstra [34], and the efficient point location data structure for Voronoi diagrams [50].
We now provide a brief overview of the data structure underlying Theorem 3. We maintain distances in G from the source vertex s to each boundary vertex of each piece of an r-division of G using FR-Dijkstra.For each piece of the r-division, we maintain an additively weighted Voronoi diagram augmented with a point location data structure, with weights equal to the distances from s. Upon a query for dist G (s, v), we perform a point location query on the Voronoi diagram of a piece of the r-division that contains v.
It is worth noting that our data structure (and in fact all data structures obtained in this paper) works in the most general model of dynamic planar graphs where we only require that G remains planar after each update.Note that one can test whether each issued update violates the planarity of the graph in O(log 3 n) amortized time per update [65].Some fully dynamic planar graph algorithms assume a weaker plane model (e.g., [66,67,60]) where some plane embedding of G is fixed and we only allow inserting edges connecting vertices that lie on a common face of (that embedding of) G.
We also generalize our single-source data structure to the case when, instead of a single source s, a set of facilities F ⊆ V is given, and our goal is to locate the closest (i.e., minimizing dist G (f, v)) facility f ∈ F for a given query vertex. 5We show that maintaining such a data structure under edge updates issued to G, or updates to the facilities set F , is possible using O(n 3/4 • |F | 1/4 + n 4/5 ) worst-case update time.The query time remains O(log 2 n).Note that even though multiple-source shortest paths or maximum flow problems can be typically easily reduced to the single-source case by adding a super-source, such a reduction does not preserve planarity and indeed handling multiple sources tends to be challenging in planar graphs (cf.e.g., [68,69]).Our generalized data structure handles up to O(n 1/5 ) sources as efficiently as the singlesource case.Moreover, the update time remains strongly sublinear unless the number of facilities is not strongly sublinear.
Surprisingly, we show that the same framework that we use to prove Theorem 3 can be applied to obtain interesting results not directly related to the shortest paths problem.Namely, in Section 4 we show a fully dynamic strong-connectivity algorithm for planar graphs, encapsulated in the following theorem.Theorem 4. Let G be a planar digraph.There exists an O(n log n)-space data structure maintaining G under edge insertions and deletions with O(n 4/5 log 2 n) worst-case update time that can compute the identifier of the strongly connected component of any We now sketch the main ideas behind our fully dynamic strong-connectivity algorithm.As in Subramanian's dynamic all-pairs reachability algorithm [62], the base of our data structure is a graph X, called a reachability certificate, that sparsifies the reachability information between boundary vertices ∂R of a fully dynamic r-division R with few holes.Naively recomputing the strongly connected components of X gives us the restriction of the strongly connected components of G to the boundary vertices ∂R.The main challenge, of course, is to compute the identifier of a strongly connected component (SCC) of an arbitrary non-boundary vertex v of G, internal to some piece P of the r-division R. To this end, we use the following observation: suppose b 1 , . . ., b k are some vertices of G lying in distinct strongly connected components of G.Then, v is strongly connected to some b j if and only if b j is in the topologically earliest SCC of G reachable from v and b j is in the topologically latest SCC of G that can reach v. Roughly speaking, this observation applied to the boundary vertices of P labeled using the topological order of their respective SCCs in the certificate X, allows us to identify the SCC of v using two point location queries on the Voronoi diagram of piece P .Each such point location query, computes, instead of the nearest site of v, the highest (or lowest) priority site that can reach v (that v can reach, resp.), and can be simulated using a standard point location query on a Voronoi diagram [50].
Whereas maintaining strongly connected components is a well-studied problem in partially dynamic settings [70,71,72,73,29], we are not aware of any non-trivial fully dynamic strongly connected components data structures designed specifically for this problem for any digraph class -note that one could use a fully dynamic transitive closure data structure for this task: for example, the dynamic plane transitive closure data structure of [66] which has O(n 1/2 ) update and query time.Such a strongly connected components data structure (i.e., with both update and query bounds O(n 1− )) for general graphs is in fact ruled out by a conditional (on SETH) lower bound [74].As a result, to the best of our knowledge, we obtain the first fully dynamic strongly connected components algorithm to achieve sublinear update-query time product for any important class of digraphs.
The undirected counterpart of the dynamic strongly connected components problem, the dynamic connectivity problem, is very well-studied.Near-optimal deterministic amortized update bounds [75,76,77] and randomized worst-case update bounds [78,79] (see also [80]) are known for fully dynamic general graphs.An almost optimal deterministic worst-case update bound was very recently achieved [81,82].For fully dynamic planar graphs polylogarithmic worst-case update bounds are known to be achievable even deterministically [64].

Preliminaries
Throughout the paper we consider as input a simple, directed and weighted planar graph G with n vertices, and no negative weight cycles.We call a planar graph G plane if some embedding of G is assumed.We use |G| to denote the number of vertices of G. Since simple planar graphs are sparse, |E(G)| = O(|G|) as well.
We use the terms weight and length for edges and paths interchangeably throughout the paper.For any two vertices u, v ∈ V (G), we denote by dist G (u, v) the length of some shortest u → v path in the graph G.
Multiple-source shortest paths.The multiple-source shortest paths (MSSP) data structure [63,36] represents all shortest path trees rooted at the vertices of a single face f in a weighted plane digraph using a persistent dynamic tree.It can be constructed in O(n log n) time, requires O(n log n) space, and can report any distance between a vertex of f and any other vertex in the graph in O(log n) time.MSSP can be augmented to also return the first edge of this path (and each of its subsequent edges) in O(log log n) time (cf.[35]).
An alternative implementation of MSSP due to Long and Pettie [47], that uses Euler Tour trees instead of Link-Cut trees, can be constructed in time n 1+o (1) , takes space n 1+o (1) , and answers all queries we are interested in within log o (1) n time.
Throughout the paper, we use the MSSP data structure of [63,36].Substituting the one of [47] would improve the query times in Theorems 3 and 4 to log 1+o (1) n at the cost of a multiplicative n o (1) factor in each of the other measures of efficiency: update time, space, and initialization time.
Separators and recursive decompositions.Miller [83] showed how to compute, in a triangulated plane graph with n vertices, a simple cycle of size 2 √ 2 √ n that separates the graph into two subgraphs, each with at most 2n/3 vertices.Simple cycle separators can be used to recursively separate a planar graph until pieces have constant size.The authors of [84] show how to obtain a complete recursive decomposition tree T (G) of a triangulated graph G using cycle separators in O(n) time.T (G) is a binary tree whose nodes correspond to subgraphs of G (pieces), with the root being all of G and the leaves being pieces of constant size.We identify each piece P with the node representing it in T (G).We can thus abuse notation and write P ∈ T (G).The boundary vertices ∂P of a non-leaf piece P are vertices that P shares with some other piece Q ∈ T (G) that is not P 's ancestor.For convenience we define the boundary set ∂L of a leaf piece L to be its entire vertex set V (L).We assume P to inherit the embedding of G.The faces of P that are faces of G are called natural, whereas the faces of P that are not natural are the holes of P .The construction of [84] additionally guarantees that for each piece 1) holes containing precisely the vertices ∂H.Throughout, to avoid confusion, we use nodes when referring to T (G) and vertices when referring to G or its subgraphs.It is well-known [85,50,73,84] that by suitably choosing cycle separators one can also guarantee that ( 1) The recursive decomposition algorithm of [84] works with no changes and maintains all the properties of T (G) even if the initial graph G has a predefined set of boundary vertices ∂G of size O( |G|) located on O(1) of G's faces.These faces are predefined as holes of G and are the only faces of G that are allowed to be non-triangular.
An r-division [86] R of a planar graph, for r ∈ [1, n], is a decomposition of the graph into O(n/r) pieces, each of size O(r), such that each piece P has O( √ r) boundary vertices (denoted ∂P ), i.e., vertices shared with some other piece of R. We denote by ∂R the set P ∈R ∂P .If additionally all pieces are connected, and the boundary vertices of each piece P of the r-division R are distributed among O(1) faces of P (also called holes6 of P ), we call R an r-division with few holes.
In [84] it was shown that for every r larger than some constant, T (G) admits an r-division with few holes, i.e., there exists a subset of nodes of T (G) forming an r-division with few holes of G. Using this property, it is shown in [84] that an r-division with few holes of a triangulated graph can be computed in linear time.More generally, given a geometrically decreasing sequence of numbers (r m , r m−1 , . . ., r 1 ), where r 1 is a sufficiently large constant, r i+1 /r i ≥ b for all i for some b > 1, and r m = n, we can obtain r i -divisions with few holes for all i in time O(n) in total.For convenience, we define the only piece in the r m -division to be G itself.These r-divisions satisfy the property that a piece in the r i -division is a -not necessarily strict -descendant (in T (G)) of a piece in the r j -division for each j > i.We also call such sequence of r i -divisions obtained from T (G) a recursive (r m , . . ., r 1 )-division of G.
We assume for simplicity that all holes we ever encounter are simple cycles.Unfortunately, this is not true in general.However, non-simple holes do not pose a significant obstacle, and can be avoided by suitably extending the graphs, as discussed numerous times in the past, see e.g., [48,35,73,87].Roughly speaking, for each non-simple part of each hole, we perform an incision along this part, we duplicate the vertices and edges we cut along, and add zero-length edges between the two copies of each duplicated vertex.
Dense distance graphs and FR-Dijkstra.For a plane digraph H with weights from R ≥0 ∪ {∞} and a distinguished set ∂H ⊆ V (H) of boundary vertices lying on O(1) faces of H, we denote by DDG H the complete weighted graph on ∂H whose edge weights represent distances between all pairs of vertices of ∂H in H. DDG H can be computed in O (|H| + |∂H| 2 ) log n time using MSSP [36].In particular, dense distance graphs for all pieces H ∈ T (G) can be computed in O(n log 2 n) time.
Lemma 5 (FR-Dijkstra [34,59]).Given all DDG Hi , one can compute a single-source shortest paths tree from any source We next state some fairly standard definitions and lemmas about representing distances between some vertices of G of interest using unions of dense distance graphs of a recursive decomposition's (or r-division's) pieces (for instance cf.[58]), adapted to our notation.We include their proofs for completeness, but the reader may safely skip them.For example, Lemma 7 captures the well-known observation of [34] that in order to compute a shortest path between any pair of vertices of G, it is enough to compute a shortest path in a union of dense distance graphs from T (G) with only O( √ n) vertices in total.
Lemma 6.Let Q be some collection of pieces from T (G) such that: Proof.Let us note that if for some H ∈ T (G) no ancestor of H belongs to Q, then ∂H ⊆ V (DDG(Q)).We prove this claim by induction on the level8 of piece H.For = 0, we get . We now prove that there is a path of length at most dist G (u, v) in DDG(Q).Let P be some shortest u → v path in G. Let H be a piece of T (G) of minimum level that contains P .We prove our claim by induction on the level of H.
First note that by property 1 of Q, if H ∈ Q or no descendant of H belongs to Q, then H has a nearest ancestor H * (possibly So we can assume that H / ∈ Q and some descendant of H belongs to Q.Note that then we have ≥ 1 and thus H is not a leaf.By property 2 of Q, we have that no ancestor of H belongs to Q.So for any child H i of H, no ancestor of H i belongs to Q.We have proved that this implies ∂H i ⊆ V (DDG(Q)).Let us split P into maximal subpaths P 1 , . . ., P k such that each Let L be some leaf of T (G).We define the cone of L, denoted cone G (L), to be the collection of pieces of T (G) containing L, all ancestors of L, and all siblings of (weak) ancestors of L. For some collection L of leaf pieces of T (G), we define cone G (L) = L∈L cone G (L).
Proof.To obtain item 1 it is enough to note that cone G (L) satisfies the requirements posed on the collection Q in Lemma 6.Let A be the set containing all ancestors of all the leaf pieces L ∈ L. We show item 2 by bounding the sum X = H∈A |∂H|.Since the number of boundary vertices of a piece is bounded by the sum of numbers of boundary vertices of its parent and its sibling, the sum H∈cone G (L) |∂H| of our interest can be larger from X only by a constant factor.
Recall that T (G) admits an r-division for any r ∈ [1, n], i.e., there exists such r-division R that R ⊆ T (G) and the boundary of each piece of R equals the boundary of that piece in T (G).Let us split A into two parts: let A 1 contain those H ∈ A that are descendants of some piece P ∈ R, and let Since each L ∈ L is a descendant of a unique piece P ∈ R, we now bound the sum of |∂H| over all ancestors of L that are descendants of P .Recall (Section 2) that if H is a piece in a recursive decomposition of an n-vertex graph, then On the other hand, it is known that the sum of boundary nodes of all (weak) ancestors of the pieces that constitute R is O( the discussion after Corollary 5.1 in [50]) and thus this is also an upper bound on X 2 .So we obtain X Let R be an r-division with few holes of G and T (P ) be a recursive decomposition of P ∈ R with the root boundary set to ∂P .For any v ∈ V (G) \ ∂R, let L v be some leaf containing v in the unique piece Lemma 8 ([58, 34]).Let X ⊆ V (G) be non-empty.Then:

2.
H∈cone R (X Proof sketch.The proof is completely analogous to that of items 1 and 2 of Lemma 7. It is enough to glue the individual decompositions T (P ) into a single decomposition T (G) such that the root has O(n/r) children instead of just 2: the individual pieces of R. Then item 1 follows by Lemma 6.
Fully dynamic r-divisions.Many dynamic algorithms for planar graphs maintain r-divisions and useful auxiliary data structures under dynamic updates.The exact set of supported updates to G varies; e.g., [34,36,35] support only edge weight changes, [60] assumes embedding-preserving insertions, whereas [37,62] only assume that the graph G remains planar at all times.We stick to the last, most general setting.The core of the construction behind the following theorem is due to Klein and Subramanian [37,62].
Let us slightly generalize the definition of an r-division to non-planar graphs.An r-division R of a (not necessarily planar) graph, for r ∈ [1, n], is a decomposition of the graph into O(n/r) pieces, each of size O(r), such that each piece P is plane and has O( √ r) boundary vertices (denoted ∂P ), i.e., vertices shared with some other piece of R. The definitions of ∂R and r-divisions with few holes remain unchanged.The reason for this generalization will become clear in the following theorem, where we show how to maintain an r-division with few holes for a dynamic planar graph, augmented with some infinite-weight edges that might violate planarity, but not affect any other properties of the graph that we care about.

Theorem 9. Let G = (V, E) be a weighted planar graph that undergoes edge deletions and edge insertions (assumed to preserve the planarity of G). Let r ∈ [1, n].
There is a data structure maintaining an r-division with few holes R of some G + , where G + can be obtained from G by adding infinite-weight edges 9 , such that each piece P ∈ R: 1. has all its faces except its holes triangular, and 2. is accompanied with some auxiliary data structures that can be constructed in T (r) time given P and use S(r) space.
The data structure uses O n + n r • S(r) space and can be initialized in O n + n r • T (r) time.After each edge insertion/deletion, it can be updated in O(r + T (r)) worst-case time.
Proof.On initialization, we first connect and triangulate G using infinite-weight edges, thus obtaining G + .Then, we compute an r-division R with few holes of G + in linear time [84] and subsequently initialize the auxiliary data structures.Let h ≥ 2 and c ≥ 8 be constants such that a single piece of the computed r-division has at most c √ r boundary vertices distributed over no more than h holes.We will guarantee at all times that for any single piece P ∈ R, |∂P | ≤ 3c √ r, and there exist at most 3h faces of P such that any v ∈ ∂P lies on one of these faces, called holes of P .Moreover, each edge of G + is contained in at most two pieces of R: this is satisfied initially since the r-division of [84] forms a partition of faces of G + .
Suppose that the removal of an edge e = uv is issued to G. We then replace e in each of the at most two pieces P containing it with an infinite-weight edge.If, on the other hand, a new edge e = uv is inserted, we add a new piece P e consisting of a single edge e to R. Adding P e may cause an endpoint of e, say u, to become a boundary vertex of R. If u was not a boundary vertex before the insertion, it had to be a vertex of a single piece P u .At this point, since a new boundary vertex emerges in P u , we might have ∂P u > 3c √ r or ∂P might no longer lie on at most 3h faces of P u .However, there surely exist some 3h + 1 faces whose vertices include the whole set ∂P u , and To fix our invariants, we first compute a cycle separator C of P u wrt. the boundary vertices of P u in O(r) time, and replace P u with two pieces P u,1 , P u,2 -the two subgraphs of P u induced by vertices weakly on one side of C. Clearly, the vertices of C become new boundary vertices afterwards.Subsequently, we similarly break each of P u,1 , P u,2 further into two parts using a cycle separator wrt. the holes of this piece (see [84] for details).Each of the at most four resulting pieces has at most 2 3 (3c Finally, observe that our data structure can be modified in a standard way (see e.g., [5]) to have O(r + T (r)) worst-case update time bound instead of just an amortized one.This is possible since our update procedure actually takes O(r + T (r)) worst-case time apart from once every k = Ω(n/r) updates when the whole data structure is rebuilt in O n + n r • T (r) worst-case time.To this end we apply the time-slicing technique.We use two copies of our data structure switching their roles every k/2 updates.One copy is for handling at most k/2 updates and answering queries, and another is being gradually reinitialized in chunks of Ω(r + T (r)) time (of either initialization or updates replayed) in the background.
Additively weighted Voronoi diagrams.Let G be a directed planar graph of size n with real edge-lengths, and no negative-length cycles.Assume that all faces of G are triangles except, perhaps, a single face f .Let S be the set of vertices that lie on f , called sites, i.e., S = V (f ).Let us assign to each site s ∈ S a weight ω(s) ∈ R ≥0 ∪ {∞}.The additively weighted distance dist ω G (s, v) between a site s ∈ S and a vertex v ∈ V (G) is defined as ω(s) + dist G (s, v).
The additively weighted Voronoi diagram of (S, ω) within G, denoted by VD(S, ω), is a partition of V (G) into pairwise disjoint sets, one set Vor(s) for each site s ∈ S. The set Vor(s), which is called the Voronoi cell of s, contains all vertices in V (G) that are closer (wrt.dist ω G ) to s than to any other site in S. In the following and throughout, whenever we work with Voronoi diagrams we assume that (1) G is strongly connected, (2) shortest paths in G are unique, and (3) additively weighted shortest paths in G are unique, i.e., for each v ∈ V (G) there is a unique site s minimizing dist ω G (s, v).Note that these assumptions make the Voronoi cells well-defined and simply connected, and guarantee that they indeed form a partition of V (G).We will explicitly ensure that these requirements are met for G, S and the weight function whenever we define a Voronoi diagram on G.
There is a dual representation VD * (S, ω) of Voronoi diagram VD(S, ω) as a tree of constant degree with O(|S|) vertices and edges [50].An efficient FR-Dijkstra based algorithm for computing VD * (S, ω) was presented by Charalampopoulos et al. [48].

Theorem 10 ([48]
). Suppose that we have at hand a recursive decomposition T (G) of G, with the only hole of G being f and S = V (f ).Further suppose that we have DDG H computed for each piece H ∈ T (G).

Then, we can compute VD
Remark 11.The algorithm underlying Theorem 10 implicitly assumes that Vor(s) is non-empty for all s ∈ S. We will explicitly ensure that this is the case whenever employing the above lemma.
In a point location query for some Voronoi diagram VD(S, ω), we are given a vertex v ∈ V (G) and are requested to find the site s ∈ S such that v ∈ Vor(s) and also the value of dist ω G (s, v).Gawrychowski et al. [50] showed the following result.
Theorem 12 ([50]).Suppose that we have at hand an MSSP data structure for G with sources the vertices that lie on face f .Given some dual representation VD * (S, ω), we can preprocess it in O(|S|) time, so that point location queries for VD(S, ω) can be answered in O(log 2 n) time.

Fully Dynamic Single-Source Shortest Paths
In this section we show our single-source exact distance oracle for planar graphs with O(n 4/5 log 2 n) update time and O(log 2 n) query time and thus prove Theorem 3.For simplicity, let us assume for now that G is non-negatively weighted.We will describe how to handle negative edges in Section 3.1; we treat them the same way as Kaplan et al. [35].

Theorem 3. Let G be a real-weighted planar digraph with a source s ∈ V (G). There exists an O(n log n)space data structure maintaining G under edge insertions, edge deletions, and source changes with worstcase update time
The base of our data structure is a dynamic r-division R with few holes, as given in Theorem 9. Note that in our shortest paths problem, indeed adding infinite-weight edges to G does no harm.Hence, in the following we work with the graph G + from Theorem 9 when computing distances, but identify it, without loss of generality, with our original graph G.
For technical reasons, related with the uniqueness of shortest paths, we would like to avoid dealing with infinite weights in some of our data structures handling individual pieces.In the real-weighted fully dynamic setting, however, we cannot fix a sufficiently large finite number, larger than all edge weights that will ever appear in the future graph G, beforehand.Instead, we do the following.For each P ∈ R, let M P be a sufficiently large finite number, e.g., larger than the sum of finite edge weights in P .Consider M P to be an auxiliary data structure of P as in Theorem 9. We will use M P to simulate infinite edge weights in P , and also for detecting paths non-existent in the original graph G (but having infinite weight in G + ∩ P ).As a result, below we assume that each infinite weight in P (or any auxiliary data structure related to P ) is replaced by M P in all the computations performed locally on the piece P , whereas globally (when performing some computation for many pieces at once, like the shortest paths algorithm of Lemma 5) we treat all edge or path weights in P that are at least M P as infinite.
For each piece P ∈ R we store the following additional data structures.
We store the recursive decomposition T (P ) with the initial boundary set to ∂P , and also DDGs for all the pieces H ∈ T (P ).
For each hole h of P , let P h be the piece P after applying the following standard augmentations.First, P is extended into a graph P h using O(r) vertices and edges of weight M P embedded inside either the piece or other (than h) holes of P that would make P strongly connected and triangulated (except for the hole h) without changing the distance between any pair of reachable vertices in P .The graph P h is in turn obtained from P h by changing P h 's edge weights into O(1)-size vectors as described in [88] so that there is a unique shortest path (wrt.the lexicographical order on path weights, defined as the coordinate-wise sum of the path's individual edge weights) between any u, v ∈ V (P h ) with cost of the form (dist P h (u, v), •).As proven in [88], one can compute P h from P deterministically in linear time.
The O(1)-size vector weights, in turn, can be easily packed into usual positive single-number weights.
For each P h , we store an MSSP data structure initialized for the hole h.Recall that an MSSP data structure can be computed in O(r log r) time.Moreover, we store a recursive decomposition T (P h ) of P h with the boundary ∂P h of the root piece set to ∂P ∩ V (h) of size O( √ r).For each node (piece) H ∈ T (P h ), we also store DDG H . Since the sum of sizes of all the pieces of T (P h ) is O(r log r), computing all these dense distance graphs takes O(r log 2 r) time (see Section 2).
Note that computing piecewise auxiliary data structures defined so far takes O(r log 2 r) time.So, by Theorem 9, they can be updated in O(r log 2 r) worst-case time after G undergoes an update.
We also perform the following computations.We compute the values dist G (s, b) for all b ∈ ∂R in O n/ √ r • log 2 n time by running the single-source shortest paths algorithm of Lemma 5 (FR-Dijkstra) on the graph DDG(cone R (s)) -the correctness follows by Lemma 8. We also compute dist Ps (s, u) for all u ∈ P s , where P s is an arbitrary piece containing s using Dijkstra's algorithm in O(r log r) time.
Consider a query dist G (s, v).If the shortest s → v path in G does not go through ∂R, then it is fully contained in P s and therefore v ∈ P s and dist G (s, v) = dist Ps (s, v), i.e., we have dist G (s, v) already computed.Otherwise, let P v be an arbitrary piece containing v. Observe that we have dist G (s, v) = min b∈∂Pv {dist G (s, b)+dist Pv (b, v)} where the minimizer b corresponds to a boundary vertex on some shortest s → v path in G.
Let us first consider a preliminary solution.Recall that we have already computed dist G (s, b) for all b ∈ ∂P v ⊆ ∂R.Then, we can find the minimum by iterating over all O( √ r) vertices b ∈ ∂P v , computing dist Pv (b, v) using one of the MSSP data structures stored for P v in O(log n) time.This yields the following result, as updates are processed in O(r log 2 r + n/ √ r • log 2 n) time, queries are answered in O( √ r log n) time, while the space usage per piece is O(r log r).

Proposition 13.
Let G be a real-weighted planar digraph with a source s ∈ V (G).For any x ∈ [1, n 1/3 ], there exists an O(n log n)-space data structure maintaining G under edge insertions, edge deletions, and source changes with worst-case update time

Remark 14.
The update time in Theorem 3 dominates the update time of the data structure underlying the above proposition for x = Ω(n 1/5 ).Further, note that the data structure underlying Proposition 13 is essentially the same as Klein's all-pairs dynamic distance oracle for planar graphs [36], with part of the query procedure offloaded to the update procedure.
Next, we will employ the efficient construction algorithm of dual Voronoi diagrams of [48] and the efficient point location mechanism of [50], in order to be able to compute the minimizer b ∈ ∂P v in O(log 2 n) time, while keeping the update time strongly sublinear.
After the initialization and each update, once R and all auxiliary data structures are updated, and we have run FR-Dijkstra from s, we compute for each P ∈ R a point location data structure.Proof.Since ∂P is a union of O(1) sets ∂P h , we can compute the desired minimum over each ∂P h separately and then take the minimum over all h.
Let us first note that negative values of ω are not a problem.We can turn negative weights into nonnegative by adding some common large value to the weights of all sites.We can thus suppose wlog.that all values of ω are non-negative.
If all the weights are infinite, the queries can be answered trivially in O(1) time.So in the following assume that there is at least one site whose weight is finite.
Let S = ∂P h = {s 1 , . . ., s k } be the set of sites.Recall that P h has finite positive real weights, is strongly connected, has unique shortest paths, and has a single face h that is possibly non-triangular that contains all the sites S.
First, let us take care of the possibility that there are empty Voronoi cells and ensure that additively weighted shortest paths are unique.Consider a site s that belongs to the Voronoi cell of a different site s .We will substitute ω(s) by dist ω P h (s , s) and consider s as a proxy for s , i.e., whenever we find that some vertex v belongs to the Voronoi cell of s, we will know that in effect v belongs to the Voronoi cell of s and return s instead.We do this as follows.Let a be an artificial vertex with k outgoing edges: for i ∈ [1, k], edge e i = as i with weight ω(s i ).We run FR-Dijkstra on {DDG P h , e 1 , . . ., e k } with source a in O( √ r log 2 r) time.Since P h is strongly connected and contains only finite-weight edges, and at least one additive weight is finite, all computed distances are finite.For each i, denote the computed distance from a to s i by d(s i ).
We then consider a new weight function ω(s i ) = min{ω(s i ), d(s i )}.A site s with ω(s) > d(s) is then a proxy for its ancestor at depth one in the computed shortest paths tree.Finally, we will break ties wrt.dist ω in favor of sites with larger additive weights.Let r(i) = |{j : j = i, ω(j) > ω(i)}|.We will break ties by considering (ω(s i ), r(i)) instead of ω(s i ) as the weight of site s i , adding a second coordinate to each edge weight in P h , set to 0, and comparing additively weighted distances lexicographically.Clearly, this extension does not break any of the properties of P h .Since all edge-weights in P h are positive, this guarantees that each site belongs to its own Voronoi cell and that for each v ∈ V (P h ) there is a unique site s minimizing dist ω P h (s, v).Therefore, we can invoke Theorem 10 to construct the dual representation VD * (S, ω) of the Voronoi diagram VD(S, ω).This requires O r|∂P h | log 2 n = O r 3/4 log 2 n time.
Then, we construct the point location data structure of Theorem 12 for VD * (S, ω) in O(|∂P h |) = O( √ r) time.Note that we have an MSSP data structure for P h for hole h and hence point location queries can then be answered in O(log 2 n) time.
We invoke Lemma 15 with weight function ω(b) := dist G (s, b) in order to construct L(P ) for each P ∈ R.This requires O n/r 1/4 • log 2 n time in total.Now, we can compute dist G (s, v) for a query vertex v as follows.If the shortest s → v path in G does not go through ∂R, then as explained before it has already been computed.Otherwise, recall that we have dist G (s, v) = min b∈∂Pv {dist G (s, b) + dist Pv (b, v)}.This case can be reduced to a single query to the data structure L(P v ).Each query can be thus answered in O(log 2 n) time.
The worst-case update time is O(r log 2 r + n r 1/4 log 2 r).By setting r = n 4/5 we get O(n 4/5 log 2 n) worstcase update time.Since the space usage per piece is O(r log r), we need O(n log n) space.
Remark 16.Our data structure can be extended to report, following the computation of dist G (s, v), a shortest s → v path Q in time nearly linear in the number of edges of Q.This follows easily by the fact that the MSSP data structure [36] can report shortest paths efficiently (see e.g., [35] for details).Therefore, we can efficiently expand the used edges of dense distance graphs and the shortest b → v path into actual edges.
Remark 17.The source-change operation in Theorem 3 can be easily simulated using a single edge insertion and a single edge deletion.For this, it suffices to add a fixed super-source s to G, with a single outgoing edge to the actual source s of G.

Handling Negative Edges
Recall that p : A feasible price function is guaranteed to exist if H contains no negative-cost cycle.It is well-known that, provided that a graph H is strongly connected, a vector of distances from any vertex of H constitutes a feasible price function of H.
As in the fully dynamic all-pairs algorithm of [35], we maintain functions φ : ∂R → R and φ P : ∂P → R, where P ∈ R, such that φ is some feasible price function of G restricted to ∂R, and each φ P is a feasible price function of P .
Since single-source shortest paths in planar graphs with negative weights can be computed in O(n log 2 n) time [89,90], each φ P can be seen as an accompanying data structure of piece P computable in O(r log 2 r) time and maintained by the fully dynamic r-division algorithm.The functions φ P allow to treat individual graphs P and P h as non-negatively weighted when computing all the needed DDGs and MSSP data structures, and also point location data structures L(P ).
It is known [35,59] that the FR-Dijkstra algorithm (as in Lemma 5) can handle negative weights in DDG(H) with no asymptotic overhead if a feasible price function on DDG(H) is provided.Therefore, we would like to have a feasible price function on DDG(cone R (s)) to compute distances from s in DDG(cone R (s)) needed by the update algorithm.We can extend φ from ∂R to all vertices in DDG(cone R (s)) as follows.Note that all pieces in cone R (s) except of those in R have their parents also in cone R (s).We call those pieces H ∈ cone R (s) for which we know the value of φ on all of ∂H processed.Initially, only the pieces P ∈ R are processed by the definition of φ.While there are still unprocessed pieces, we take any unprocessed piece H whose parent A ∈ T (P ) has already been processed.Let H be the sibling of H in T (P ).Observe that φ P is a feasible price function of A as well.We extend φ to boundary vertices of H, H by computing shortest paths on DDG({H, H }) from vertices ∂A, with the initial distance to each v ∈ ∂A set to φ(v), and using FR-Dijkstra (Lemma 5) with price function φ P .This way, only the initial distances of ∂A are possibly negative from the point of view of FR-Dijkstra.This does not constitute a problem for either Dijkstra's algorithm or FR-Dijkstra though (see [35]; one can treat the initial distances as weights of edges going out of a super-source; these weights can be all increased by the same large value to be made positive).One can show from the definition of φ that the values of φ on ∂A will not be altered and the computed distances form a feasible price function on ∂H ∪ ∂H in G. Hence, given that ∂A ⊆ ∂H ∪ ∂H , we can process the children H, H of a processed piece A in O((|∂H| + |∂H |) log 2 n) time.Summing over all pieces, we obtain by Lemma 8 that extending φ to all V (DDG(cone R (s))) takes O(n/ √ r log 2 n) time.This cost is therefore negligible.
The "global" price function φ : ∂R → R is recomputed from scratch in O(n log 2 n) time (by running the algorithm of [89] on the entire G) every time R is reinitialized (i.e., once per each O(n/r) updates).Note that an edge deletion or weight increase cannot break the feasibility of φ.We might need to recompute φ only upon insertion or weight decrease of some edge uv.As shown by Kaplan et al. [35], the new "global" price function φ (or a negative cycle) can be found by computing distances from v to ∂R ∪ {u} in DDG(cone R (u, v)) (before applying the insertion) using FR-Dijsktra and the old price function φ.This can be done in O(n/ √ r log 2 n) time by first extending the old φ to V (DDG(cone R (u, v))) as described above and then running the single-source shortest paths algorithm of Lemma 5.

A Dynamic Closest Facility Data Structure
We can generalize the dynamic single-source shortest paths data structure as follows.Suppose we replace a single source vertex s with a set of facilities F ⊆ V .Given F , for a query vertex v we would like to compute min f ∈F {dist G (f, v)}, and also possibly f ∈ F minimizing this expression.A dynamic update would consist of either an edge update or changing the set F .In other words, such a problem can be seen as dynamic point location in a Voronoi diagram wrt.F , where each update either changes the graph or resets the Voronoi diagram of interest.
In this setting, we consider the following simple generalization of the single-source data structure.Let the update procedure first compute the distances d(b) = min f ∈F {dist G (f, b)} for all b ∈ ∂R.Note that by Lemma 8 this can be achieved by computing single-source shortest paths in the graph DDG(D F ), where D F = cone R (F ), extended with 0-weight edges sf , where s is an auxiliary super-source.By Lemma 5 this can be done in O(( n|F | + n/ √ r + |F |) log 2 n) time.By using weights ω := d in the individual point-location data structures L(P ), P ∈ R, a single point location query on L(P v ) (recall that P v is some piece containing v) would compute the desired closest facility f v minimizing dist G (f v , v) unless the sought (weighted) shortest f v → v does not go through a boundary vertex of R. We could in principle handle such paths by proceeding as in the single-source case and computing shortest paths naively in each piece containing a facility.However, this could take time Ω(r • min(n/r, |F |)).Recall that the other components of our update procedure take time O(r + n|F | + n/r 1/4 ) which is O( n|F | + n 4/5 ) if we again set r = n 4/5 .The update time would then be linear in n even for moderately large facility set sizes, e.g., |F | = Ω(n 1/5 ).
To improve upon this simple approach, we proceed as follows.Let (ρ m , . . ., ρ 1 ) be such a sequence of integers that ρ m = r, ρ 1 = O(1) and ρ i+1 /ρ i = 2 for all i < m.For each P ∈ R we store a recursive (ρ m , . . ., ρ 1 )-division consisting of pieces of T (P ) (cf.Section 2).Let R P,i be the ρ i -division of P .All R P,i can be computed in linear time given T (P ) [84].Note that R i , defined as the union of R P,i over all pieces P ∈ R, actually forms an ρ i -division with few holes of the entire graph G.In particular, we have R m = R.
We store the extended pieces Q h (recall how we obtained extended pieces P h with unique shortest paths from P in the single-source case) plus their recursive decompositions T (Q h ), DDGs, and an MSSP data structure for all pieces Q of all T (P ) instead of just the pieces of R m = R as we did in the single-source case.However, we stress that these auxiliary components for a piece Q ⊆ P where P ∈ R, are counted as accompanying data structures of the piece P .So, we compute O(1) fresh recursive decompositions T (Q h ) for each piece Q ∈ T (P ) -computing each of them takes O(|Q| log 2 n) time.As a result, by the bound Let us now bound this sum.First, let us consider the sum restricted to the pieces H ∈ D F ∩ R j , i.e., the pieces of the ρ j -division R j of G. Since ρ j = Ω(n/|F |) or ρ j = Ω(r) we get: , where f ∈ F \ ∂R j , P f is the unique piece of R j containing f , and L f is some leaf of T (P f ) containing f .For a fixed f , by the definition of cone P f (L f ), there are O(log n) pieces H satisfying this, at most two per each level i of T (P f ).Hence, the sum of |H| • |∂H| over such pieces can be bounded by Summing over all f , and using To conclude, the update time is O n 3/4 • |F | 1/4 + n r 1/4 log 2 n + r log 3 n .By setting r = (n/ log n) 4/5 we obtain the following theorem.

Fully Dynamic Strongly Connected Components
In this section we show that a strategy similar to that of Section 3 can be used to obtain a fully dynamic strong-connectivity algorithm.Again, we maintain an r-division R and some auxiliary data structures for all the individual pieces.Formally, using a dynamic r-division as in Theorem 9 may require introducing new infinite-weight edges to G which in turn may change the reachability relation in G.We circumvent this problem by setting the weights of the original edges of G to 0, and all auxiliary edges to plus infinity (simulated in the implementation by sufficiently large values M P inside individual pieces, as in Section 3).This way, u can reach v in G if and only if dist G (u, v) = 0, and otherwise dist G (u, v) = ∞.All known properties of reachability in plane graphs also extend to reachability using 0-weight paths (assuming nonnegative weights).In the following, whenever we say that v is reachable from u, or there exists a u → v path, we formally mean dist G (u, v) = 0.
As in Section 3, for each piece of R we store a recursive decomposition, dense distance graphs and MSSP data structures.All these data structures are also maintained for pieces of R with all edges reversed -for a piece P we call this graph the reverse of P and denote it by P rev .
Another ingredient is a collection of reachability certificates X P for all the pieces, as defined in the following lemma due to Subramanian [62], slightly adjusted to certify 0-weight paths.
Lemma 19 ([62]).Let P ∈ R be a (non-negatively weighted) piece.There exists a directed graph X P , where ∂P ⊆ V (X P ), of size O( √ r log r) satisfying the following property: for any u, v ∈ ∂P , dist P (u, v) = 0 if and only if there exists a u → v path in X P .The graph X P can be computed in O(r log r) time.
We include the reachability certificate in the set of auxiliary piecewise data structures.Since reachability certificates can be computed in O(r log r) time, maintaining them does not incur any additional asymptotic cost.The following lemma is a direct consequence of Lemma 19.
Lemma 20.For any u, v ∈ ∂R, u can reach v in G if and only if u can reach v in X = P ∈R X P .
Proof.Let u, v ∈ ∂R.Since each X P certifies the reachability between ∂P in P , clearly a u → v path in X implies existence of a u → v path in G. Now suppose there is a u fully contained in a single piece P i ∈ R. For each i, the endpoints a, b of Q i are contained in ∂P i and hence there exists a a → b path in X P ⊆ X.Consequently, there exist a u → v path in X.
To handle an edge update, after R and auxiliary data structures are updated, we compute the strongly connected components of X (defined as in Lemma 20)  We also define and maintain similar SCC-identifiers s P for individual pieces P , i.e., for u, v ∈ V (P ), s P (u) = s P (v) implies u, v are strongly connected in P , whereas s P (u) < s P (v) implies there is no v → u path in P .Clearly, the identifiers s P can be recomputed in O(r) time given P , so we also include them into the set of auxiliary per-piece data structures.
For any Q ∈ {X} ∪ R, let S Q be the set of used identifiers of the form s Q (•).Observe that we can easily guarantee that the sets S Q are pairwise disjoint, e.g., by using disjoint integer ranges for different sets S Q .
The final component of our data structure, is, again a collection of per-piece point location data structures.For each P ∈ R, we have two point location data structures L(P rev ) and L(P ) of Lemma 15.After each edge update, L(P rev ) is computed for P rev with weight function ω = s X .On the other hand, L(P ) is initialized with weight function ω = −s X .As in Section 3, all these point location data structures are recomputed in O(n/r 1/4 • log 2 n) time (over all pieces).
We now describe how our data structure handles a query for an SCC identifier of a vertex v.The returned identifier always comes from the set Q∈{X}∪R S Q .Let P v be some piece containing v. Let s min be the value computed by L(P rev v ) for vertex v. Let s max be minus the value computed by L(P v ) for v.If either of s min , s max equals ±∞ or s min = s max holds, we return s Pv (v).Otherwise, we return s min ∈ S X .The following lemma establishes the correctness of this query procedure.
Lemma 21.Let u, v ∈ V (G) and let s u , s v be the respective identifiers returned by the query procedure.Then, s u = s v if and only if u and v are strongly connected in G.
Proof.Suppose s u = s v .If s u ∈ S P for some piece P , then s u = s v implies that u and v are strongly connected in P and thus also in G.So suppose s v ∈ S X .Take any b ∈ ∂R such that s v = s X (b).We now prove that v and b are strongly connected in G. Similarly we prove that u and b are strongly connected in G.By transitivity it will follow that u and v are indeed strongly connected.
Let P v , s min , s max be defined as in the query procedure's description.Recall that s v ∈ S X implies that s min , s max are finite and s v = s min = s max .Since all edges of P v have weight 0, and s max is finite, s max in fact represents the maximum value s X (a) among those a ∈ ∂P v such that a path a → v exists in P v .Similarly, observe that s min represents the minimum value s X (c) among those c ∈ ∂P v such that a path c → v exists in P rev v , i.e., such that a path v → c exists in P v .Let us denote by a and c the respective vertices of ∂P v attaining the maximum and minimum values of s X .Since s X (a) = s X (c), there exists a path c → a in G.However, by the definition of a and c, paths a → v and v → c also exist in G, and hence a, v and c are strongly connected in G. Since a is clearly strongly connected to b by s X (a) = s X (b), indeed v and b are strongly connected in G. Now let us move to proving the " ⇐= " direction.Suppose u and v are strongly connected in G. First consider the case when there exists some vertex b ∈ ∂R located in the same strongly connected component of G as u and v.In this case we prove that s v = s X (b).An analogous proof that s u = s X (b) will establish s u = s v .Since v and b are strongly connected, there exist some paths Let v 1 be the first vertex on Q 1 such that v 1 ∈ ∂P v -note that v 1 necessarily exists since b ∈ ∂R.Similarly set v 2 to be the last vertex on Q 2 such that v 2 ∈ ∂P v .Observe that the subpaths v → v 1 and v 2 → v of Q 1 and Q 2 respectively lie entirely inside P v .Hence, s min and s max are finite and we have s max ≥ s X (v 2 ) and s min ≤ s X (v 1 ).Recall that there exists a walk v → v 1 → b → v 2 → v, so in fact v 1 , v 2 , b are strongly connected, i.e., s X (v 1 ) = s X (v 2 ) = s X (b).Thus, we obtain s min ≤ s X (b) ≤ s max .
On the other hand, let a ∈ ∂P v be such that a path a → v exists in P v and s max = s X (a) (a exists by s max = ±∞).Similarly, let c ∈ ∂P v be such that a path v → c exists in P v and s min = s X (c).Since a path a → c through v exists in P v (so also in G), we have that s max ≤ s min by the fact that the identifiers S X respect the topological order of the SCCs of X. Recall that we have already proved s min ≤ s X (b) ≤ s max so in fact we have s min = s max = s X (b), and consequently s v = s X (b).
Finally, suppose there is no vertex of ∂R in the SCC of G containing u and v. First, this implies that u, v / ∈ ∂R and all u → v and v → u paths are contained in a single, unique piece P .This implies that s P (u) = s P (v).Hence it is sufficient to prove s u = s P (u) and s v = s P (v).We prove the latter equality; proving the former is analogous.Recall that s v is not set to s P (v) only if both s min , s max are finite and s min = s max .This can only happen if there exists vertices a, c ∈ ∂P such that a can reach v in P , v can reach c in P and s X (c) = s min = s max = s X (a), i.e., a and c are strongly connected in G.But this implies that a, c and v are strongly connected in G, which contradicts the fact that the SCC of v in G does not contain vertices of ∂R.
The running time analyses of both the update and query procedures are identical to the analyses of Section 3. Hence, we have proved the following theorem.

boundary vertices, and at most 2 3 •
(3h + 1) + 1 ≤ 2h + 2 ≤ 3h holes.Observe that a single edge update can introduce O(1) new pieces of size O(r) in the maintained rdivision, and the sizes of the existing pieces do not increase.For each of the affected pieces we recompute the auxiliary data structures in T (r) time.As a result, after O(n/r) updates, there are still O(n/r) pieces, each of size O(r) and with O( √ r) boundary vertices distributed over O(1) holes of that piece.Consequently, after every Ω(n/r) updates, we reinitialize R for the current graph G in O n + n r • T (r) time.Hence, the amortized time to update R is O(r + T (r)).

Lemma 15 .
Given a weight function ω : ∂P → R ∪ {∞}, one can compute in O(r 3/4 log 2 r) time a data structure L(P ) answering the following queries in O(log 2 r) time: given any v ∈ V (P ), compute the value min b∈∂P {ω(b) + dist P (b, v)} along with the minimizer b.
Q∈T (P ) |Q| = O(|P | log |P |), the time to compute accompanying data structures of piece P increases to O(r log 3 n).Given the set of facilities F , let j be such that ρ j = Θ min n |F | , r .Redefine D F = cone Rj (F ).Again, let us compute distances d(b) = min f ∈F {dist G (f, b)} (and the closest facilities) for all b ∈ H∈D F |∂H| using FR-Dijkstra on DDG(D F ) extended with a super-source s and auxiliary edges sf , f ∈ F .This takes O n|F | + n/ √ ρ j log 2 n = O n|F | log 2 n time by Lemmas 5 and 8.It only remains to show how to handle computation of closest facilities for v ∈ V \ H∈D F ∂H. Recall that the pieces D F cover the entire G. Let H v be the lowest piece D F that contains v.By the definition of D F , no facility f is an internal (non-boundary) vertex of H v .Consequently, by Lemma 15, the closest facility to v can be found in O(log 2 n) time using a single query to the data structure L(H v ).For this to be possible, upon update we need to build the data structures L(H) for all H ∈ D F .By Lemma 15, this takes O H∈D F |H| • |∂H| log 2 n time.

Theorem 18 .
Let G be a real-weighted planar digraph with a set F ⊆ V of facilities.There exists an O(n log 2 n)-space data structure maintaining G under edge insertions, edge deletions, and changes of the facilities set F with O n 3/4 • |F | 1/4 + n 4/5 log 11/5 n worst-case update time that can compute min f ∈F {dist G (f, v)} along with the respective closest facility of v for any v ∈ V (G) in O(log 2 n) time.The initialization time is O(n log 3 n).
in O(|X|) = O(n/ √ r) time using any classical lineartime algorithm.For any b ∈ ∂R, let s X (b) denote an integer identifier of b's strongly connected component in X.By additionally sorting the SCCs of X topologically we can further assume that s X satisfies the following property: if a, b ∈ ∂R are not strongly connected, but a can reach b in X then s X (a) < s X (b).By Lemma 20, for a, b ∈ ∂R, we have s X (a) = s X (b) if and only if a and b are strongly connected in G; moreover, if a can reach b in G, then s X (a) ≤ s X (b).

Theorem 4 .
Let G be a planar digraph.There exists an O(n log n)-space data structure maintaining G under edge insertions and deletions with O(n 4/5 log 2 n) worst-case update time that can compute the identifier of the strongly connected component of any v ∈ V (G) in O(log 2 n) time.The initialization time is O(n log 2 n).
where d is the depth of H in that decomposition.Consider the subtree of T (G) rooted at P -it forms a recursive decomposition T (P ) of P with some initial boundary vertex set |∂P | of size O( √ r).So the sum of |∂H| over all ancestors of L that are descendants of P is actually equal to the sum of |∂H| over all ancestors H of L in T (P ).Since each ancestor has distinct integral depth, this sum is O(