Introduction
The s s s -t t t minimum cut is a textbook, fundamental graph problem in combinatorial optimization and algorithm design. It has attracted particular attention for planar graphs, as many real-world applications, including image segmentation [8 , 40 ] and network reliability [42 , 2 ] , naturally arise in such instances. Moreover, the planar setting is especially appealing due to the close relationship between cut problems and shortest-path problems, captured by the elegant mathematical work of planar duality . There has been a growing interest in designing efficient algorithms for planar minimum cut, dating back to the seminal work of Itai and Shiloach [33 ] in the 1970s, which gave an algorithm with running time O ( n 2 log n ) O(n^2 \log n) O ( n 2 log n ) . The currently best-known running time, O ( n log log n ) O(n \log\log n) O ( n log log n ) , was later achieved by Italiano, Nussbaum, Sankowski, and Wulff-Nilsen [31 ] .
We study the all-pairs minimum cuts on planar graphs in the online fully dynamic setting. Here, the goal is to preprocess a planar graph G G G so that we can efficiently support the following operations.
While the runtime complexity of planar s s s -t t t minimum cut is nearly settled in the static setting, as discussed above, the dynamic setting remains far less understood. When the goal is to maintain the minimum cut value exactly , Italiano, Nussbaum, Sankowski, and Wulff-Nilsen [31 ] obtained a dynamic algorithm with O ~ ( n 2 / 3 ) \widetilde{O}(n^{2/3}) O ( n 2/3 ) update time and O ~ ( n 2 / 3 ) \widetilde{O}(n^{2/3}) O ( n 2/3 ) query time.1 In two weaker models: (1) the incremental model, which allows only edge insertions, and (2) the offline dynamic model, in which the full update sequence is known in advance, the problem admits an algorithm with O ~ ( n 1 / 2 ) \widetilde{O}(n^{1/2}) O ( n 1/2 ) update and query time [19 ] , though only when the terminals s s s and t t t are fixed in advance and edge updates are restricted to weight changes. This update and query bound is essentially tight up to polylogarithmic factors by a conditional lower bound of Abboud and Dahlgaard [1 ] .2
A possible direction for breaking through the O ( n ) O(\sqrt{n}) O ( n ) barrier on update and query time is to pay a small approximation error in the size of the reported minimum cut. We take precisely this approach by addressing the following key open question in the dynamic planar graph algorithms literature:
Is there a fully dynamic algorithm for the planar all-pairs minimum cut problem that supports queries up to a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximation and can handle updates and queries in sub-square-root time?
In this work, we answer the above question positively, and even show that both update and query times can be made sub-polynomial , as formally stated in the theorem below.
Theorem 1.1. Let G G G be an n n n -vertex undirected planar graph undergoing edge insertions and deletions with capacities in [ 1 , n c ] [1,n^c] [ 1 , n c ] for some constant c c c at all times. Let 1 / poly ( log n ) < ε < 1 1/\operatorname{poly}(\log n)<\varepsilon<1 1/ poly ( log n ) < ε < 1 be an error parameter. Then, there is a deterministic data structure that supports edge updates and queries for the ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate minimum cut between any pair of vertices s , t ∈ V ( G ) s,t\in V(G) s , t ∈ V ( G ) in the current graph G G G . The data structure has an initialization time of O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) and an amortized update time and query time of n o ( 1 ) n^{o(1)} n o ( 1 ) .
One notable strength of the dynamic data structure in Theorem 1.1 is that it provides a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximation to the minimum cut value. In general graphs, however, achieving such a strong approximation guarantee in the fully dynamic setting appears to be substantially more difficult, despite significant recent efforts in the literature. More specifically, the best known dynamic algorithms for minimum cuts or maximum flows either (i) apply to the partially dynamic setting3 and require s s s and t t t to be fixed in advance [26 VDBLS23, 4 , 13 , 3 , 29 ] ; or (ii) work in the fully dynamic setting with a much weaker approximation guarantee, requiring at least a near-logarithmic approximation factor for the returned minimum cut [12 , 30 , 3 , 28 ] .
Our Construction of Static and Dynamic Planar Pattern Emulators. The starting point of our construction is the (distance) planar emulator of Chang, Krauthgamer, and Tan [15 ] . Given a weighted planar graph G G G and a subset of terminals T ⊆ V T\subseteq V T ⊆ V , we define an instance as a tuple ( G , T ) (G,T) ( G , T ) . We call an instance ( H , T ) (H,T) ( H , T ) a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate planar emulator of ( G , T ) (G,T) ( G , T ) if (i) the weighted graph H H H is a planar graph whose vertex set V ( H ) V(H) V ( H ) contains the terminals T T T and (i) graph H H H preserves pair-wise terminal distances up to a multiplicative factor of ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) . A long line of works considered the construction of such emulators [38 , 11 , 22 , 17 , 10 , 23 ] , which culminated in the recent breakthrough by Chang, Krauthgamer, and Tan [15 ] who showed an O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) time algorithm for constructing ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate planar emulators with ∣ H ∣ ≤ O ~ ( ∣ T ∣ / ε O ( 1 ) ) |H|\leq\widetilde{O}(|T|/\varepsilon^{O(1)}) ∣ H ∣ ≤ O ( ∣ T ∣/ ε O ( 1 ) ) .
In this paper, we consider a stronger variant of planar emulators, called planar pattern emulators , studied by Krauthgamer and Rika [39 ] , and recently revisited by Chen and Tan [18 ] . Informally, such emulators are defined similarly to planar emulators, except that the terminal distances must be preserved with respect to the faces that contain the terminals (see § 3 for a formal definition). Chen and Tan [18 ] proved that such emulators exist and provided a polynomial-time algorithm to construct them. One of our key technical and conceptual contributions is to show that a simpler and more streamlined construction can be obtained within the CKT framework [15 ] , together with Thorup’s and Klein’s ε \varepsilon ε -covers [44 , 35 ] . Moreover, we show that our algorithm for constructing such emulators can be implemented in near-linear time.4
Theorem 1.3. Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T\subseteq V(G) T ⊆ V ( G ) be a terminal set, and 0 < ε < 1 0<\varepsilon<1 0 < ε < 1 be an error parameter. Then, there is an algorithm that constructs a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate planar
pattern emulator ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) in time O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) with size ∣ H ∣ = O ~ ( ∣ T ∣ / ε O ( 1 ) ) |H| = \widetilde{O}(|T|/\varepsilon^{O(1)}) ∣ H ∣ = O ( ∣ T ∣/ ε O ( 1 ) ) . Moreover, ( H , T ) (H,T) ( H , T ) is aligned with ( G , T ) (G,T) ( G , T ) .5
By exploiting the planar duality between cuts and distances, Theorem 1.3 almost immediately implies a near-linear -time algorithm for constructing ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifiers for planar graphs with size O ~ ( ∣ T ∣ / ε O ( 1 ) ) \widetilde{O}(|T|/\varepsilon^{O(1)}) O ( ∣ T ∣/ ε O ( 1 ) ) that approximately preserves terminal minimum cuts (see Theorem 4.1 ). The main technical contribution of our paper is to show that the versatility of our static pattern emulator construction extends to the dynamic setting via the recent dynamic all-pairs shortest-paths data structure of Filtser, Goranci, Patel, and Probst Gutenberg [21 ] . Using cut-distance planar duality once more, we obtain a dynamic data structure that supports edge updates and queries in sub-polynomial time and returns ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximations to queried pairwise minimum cuts, thus proving our main result in Theorem 1.1. Our dynamic pattern emulator construction is summarized in the theorem below.
Theorem 1.4. Let ( G , T ) (G,T) ( G , T ) be a dynamic instance where G G G is an n n n -vertex planar graph undergoing edge insertions and deletions with weights [ 1 , n c ] [1,n^c] [ 1 , n c ] for a constant c c c at all times, and T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) is a terminal set of at most two vertices at any time. Let 1 ≤ τ ≤ n / log n 1 \le\tau\le n/\log n 1 ≤ τ ≤ n / log n be a target parameter and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter.
Then, there is a deterministic data structure that explicitly maintains a collection P \mathcal{P} P of paths in G G G that induces a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate planar pattern emulator ( M [ P ] , T ) (\mathcal{M}[\mathcal{P}],T) ( M [ P ] , T ) of instance ( G , T ) (G,T) ( G , T ) , such that for each batch B B B of updates in ( G , T ) (G,T) ( G , T ) (whether edge insertions or deletions in G G G , or terminal additions or removals in T T T ),6
Emulator Size: At any time, ∣ P ∣ = O ~ ( n τ / ε O ( 1 ) ) |\mathcal{P}| = \widetilde{O}(\sqrt{n\tau}/\varepsilon^{O(1)}) ∣ P ∣ = O ( n τ / ε O ( 1 ) ) , and
Emulator Recourse: The amortized number of paths added or deleted from P \mathcal{P} P after processing a batch update B B B is O ~ ( ∣ B ∣ / ε O ( 1 ) ) \widetilde{O}(|B|/\varepsilon^{O(1)}) O ( ∣ B ∣/ ε O ( 1 ) ) , and
Update Time: The amortized update time is O ~ ( n ∣ B ∣ / ( ε O ( 1 ) τ ) ) \widetilde{O}(n|B|/(\varepsilon^{O(1)}\tau)) O ( n ∣ B ∣/ ( ε O ( 1 ) τ )) .
The data structure has an initialization time of O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) . Moreover, ( M [ P ] , T ) (\mathcal{M}[\mathcal{P}],T) ( M [ P ] , T ) is aligned with ( G , T ) (G,T) ( G , T ) .
Related Works
Static Min-cut on Planar and General Graphs. We begin by reviewing some results for the s s s -t t t maximum flow problem, which is dual to the s s s -t t t minimum cut problem [20 ] . We denote by m m m the number of edges in the graph, where m = O ( n ) m = O(n) m = O ( n ) for planar graphs.
For general graphs, the O ~ ( m ) \widetilde{O}(m) O ( m ) time algorithm of Benczúr and Karger [6 ] constructs a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate (edge) cut sparsifier, which can be used to compute the s s s -t t t minimum cut value in O ~ ( n 2 ) \widetilde{O}(n^2) O ( n 2 ) time. Alternatively, using the near-linear time algorithm of Peng [41 ] for computing a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate s s s -t t t maximum flow, the s s s -t t t minimum cut value can be obtained in O ~ ( m ) \widetilde{O}(m) O ( m ) time. Using the exact maximum flow algorithm of [14 ] , one can compute the exact value of the s s s -t t t minimum cut in m 1 + o ( 1 ) m^{1+o(1)} m 1 + o ( 1 ) time.
For planar graphs, Itai and Shiloach [33 ] obtained an O ( n 2 log n ) O(n^2 \log n) O ( n 2 log n ) -time algorithm for the s s s -t t t minimum cut problem. Reif [43 ] later improved this to a near-linear O ( n log 2 n ) O(n \log^2 n) O ( n log 2 n ) -time algorithm using minimum weight separating cycles. Frederickson [25 ] managed to further improve the running time to O ( n log n ) O(n \log n) O ( n log n ) . More recently, Italiano, Nussbaum, Sankowski, and Wulff-Nilsen [31 ] achieved the state-of-the-art with an O ( n log log n ) O(n \log\log n) O ( n log log n ) -time algorithm.
Cut Oracles for Planar Graphs. A cut oracle is a data structure that, after preprocessing an input graph, returns the exact weight of the s s s -t t t minimum cut for any queried vertex pair s s s and t t t . A compact representation of the pairwise cut structure of a graph is given by the Gomory-Hu tree [27 ] , where the value of the s s s -t t t minimum cut corresponds to the minimum weight edge on the s s s -t t t path in the tree. Borradaile, Sankowski, and Wulff-Nilsen [7 ] showed an algorithm to construct a Gomory-Hu tree for planar graphs in O ( n log 4 n ) O(n \log^4 n) O ( n log 4 n ) time and O ( n log n ) O(n \log n) O ( n log n ) space, achieving constant query time for all-pairs s s s -t t t minimum cut.
Static and Dynamic Planar Emulators. There is a long line of work on constructing dense distance graphs (DDGs) for a planar graph G G G . A dense distance graph is the complete graph on a subset of vertices, where edge weights correspond to shortest-path distances in G G G . Fakcharoenphol and Rao [24 ] show how to construct DDGs in O ( n log 3 n ) O(n \log^3 n) O ( n log 3 n ) time and support all-pairs distance queries in O ( n log 2 n ) O(\sqrt{n} \log^2 n) O ( n log 2 n ) time. In the offline dynamic setting, Das, Gutenberg, and Wulff-Nilsen [19 ] design an algorithm for maintaining dense distance graphs, achieving near-optimal O ~ ( n ) \widetilde{O}(\sqrt{n}) O ( n ) worst-case update and query time for all-pairs distance queries.
Another line of research focuses on α \alpha α -distance approximating minors (α \alpha α -DAMs), which are minors of G G G that preserve the distances between every pair of terminals s , t ∈ T s,t \in T s , t ∈ T up to a factor α \alpha α . Although the majority of the literature we discuss in this section is concerned with the construction of ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate planar emulators, the resulting emulator may not necessarily be a minor of G G G . Krauthgamer, Nguyen, and Zondiner [38 ] introduced a straightforward construction for an exact DAM of size O ( ∣ T ∣ 4 ) O(|T|^4) O ( ∣ T ∣ 4 ) , which can be computed in O ( n ∣ T ∣ ) O(n|T|) O ( n ∣ T ∣ ) time. Since it is not possible to construct exact DAMs with sub-quadratic size [38 , 17 ] , introducing approximation becomes necessary to achieve smaller DAMs. In the ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) stretch regime, Cheung, Goranci, and Henzinger [11 ] provided a construction with size O ~ ( ∣ T ∣ 2 / ε 2 ) \widetilde{O}(|T|^2/\varepsilon^2) O ( ∣ T ∣ 2 / ε 2 ) . More recently, Chang and Conroy [9 ] achieved a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -DAM construction of size O ~ ( ∣ T ∣ / ε O ( 1 ) ) \widetilde{O}(|T|/\varepsilon^{O(1)}) O ( ∣ T ∣/ ε O ( 1 ) ) for polynomially bounded weights in near-linear time.
Directed Planar Graphs. Graph algorithms for directed planar graphs are generally more challenging, and as a result the literature is comparatively sparse. In the static setting, Borradaile and Klein [BK09] achieved an O ( n log n ) O(n \log n) O ( n log n ) -time algorithm for the directed s s s -t t t min-cut problem.
The dynamic setting remains largely unexplored. An exception is the recent work by Karczmarz [34 ] who designed a data structure that, for r ∈ [ 1 , n ] r \in[1,n] r ∈ [ 1 , n ] , can be constructed in O ~ ( n r ) \widetilde{O}(nr) O ( n r ) preprocessing time and answers exact s s s -t t t maximum flow values for queried s s s and t t t in O ~ ( n 3 / 2 / r 3 / 4 ) \widetilde{O}(n^{3/2}/r^{3/4}) O ( n 3/2 / r 3/4 ) query time for polynomially bounded weights. In the approximate setting, with near-linear preprocessing time, he achieves (1) a static oracle with an O ~ ( n 3 / 4 ) \widetilde{O}(n^{3/4}) O ( n 3/4 ) query time and (2) a dynamic oracle that supports edge capacity updates in G G G with an O ~ ( n 6 / 7 ) \widetilde{O}(n^{6/7}) O ( n 6/7 ) worst-case query time.
Technical Overview
This section is divided into two parts. First, in Subsection 2.1, we describe our near-linear-time construction of a static terminal cut sparsifier on planar graphs. Building on [18 ] , this construction reduces the problem to computing distance pattern emulators. Then, in Subsection 2.2, we show how to maintain such emulators dynamically using the fully dynamic all-pairs shortest paths data structure of [21 ] . Together, these yield our main result: a fully dynamic all-pairs s-t min-cut data structure for planar graphs.
Throughout this section, we use a tuple ( G , T ) (G,T) ( G , T ) , called an instance, where G G G is an n n n -vertex planar graph and T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) is a terminal set for which we aim to preserve the cut or distance information (more detailed definitions will be given below). We let H ( G , T ) \mathcal{H}(G,T) H ( G , T ) denote a minimal set of faces in G G G that cover all the terminals in T T T , and refer to each face in H ( G , T ) \mathcal{H}(G,T) H ( G , T ) as a hole of ( G , T ) (G,T) ( G , T ) . 7
Static Terminal Cut Sparsifier
In this subsection, for any ε > 0 \varepsilon> 0 ε > 0 , we explain how to construct a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier ( H , T ) (H,T) ( H , T ) for an instance ( G , T ) (G,T) ( G , T ) . Specifically, we construct H H H with the same terminal set as G G G , such that for every subset ∅ ⊂ R ⊂ T \varnothing\subset R \subset T ∅ ⊂ R ⊂ T of terminals, we have
mincut G ( R , T ∖ R ) ≤ mincut H ( R , T ∖ R ) ≤ ( 1 + ε ) mincut G ( R , T ∖ R ) . \operatorname{mincut}_{G}(R,T \setminus R) \le\operatorname{mincut}_{H}(R,T \setminus R) \le(1+\varepsilon)\operatorname{mincut}_{G}(R,T \setminus R). mincut G ( R , T ∖ R ) ≤ mincut H ( R , T ∖ R ) ≤ ( 1 + ε ) mincut G ( R , T ∖ R ) .
Our algorithm is inspired by the algorithm of [18 Section 3] for constructing a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) . We first discuss their algorithm, which will also provide the required context on the tools and concepts we use, and then proceed to describe ours.
The Dual Instance
The starting point of the discussion is the well-known duality between finding a minimum s s s -t t t cut in G G G and a minimum separating cycle in the dual graph G ∗ G^* G ∗ of G G G . This cycle is defined as the shortest cycle in G ∗ G^* G ∗ that separates two specific dual faces f s f_s f s and f t f_t f t in G ∗ G^* G ∗ (i.e., a cycle that contains exactly one of f s f_s f s and f t f_t f t , but not both), where f s f_s f s and f t f_t f t are the dual faces in G ∗ G^* G ∗ enclosing s s s and t t t , respectively. The dual graph G ∗ G^* G ∗ is constructed by associating a dual vertex v f v_f v f with every face f f f in G G G , and connecting v f v_f v f and v f ′ v_{f'} v f ′ if the faces f f f and f ′ f' f ′ share an edge in G G G . The celebrated theorem of Itai and Shiloach [33 ] states that the s s s -t t t min-cut in G G G corresponds to the f s f_s f s -f t f_t f t minimum separating cycle in G ∗ G^* G ∗ .
As is common in the planar graph algorithms literature, our goal is to go one step further and reduce the computation of minimum separating cycles to that of shortest paths. To achieve this, instead of just taking the standard dual graph, we first modify the primal graph and then take the standard dual, giving us an alternative dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) of ( G , T ) (G,T) ( G , T ) , where T D T_D T D is the set of dual terminal vertices [32 , 18 ] . Intuitively, this dual ensures that every minimum separating cycle in G ∗ G^* G ∗ is split at a dual terminal vertex; i.e., we split every dual terminal into two dual terminals, so that the path resulting from the split becomes the shortest path between the (split dual terminal) endpoints.
The construction proceeds as follows. For every hole h ∈ H ( G , T ) h \in\mathcal{H}(G,T) h ∈ H ( G , T ) , we first place an auxiliary vertex x h x_h x h inside h h h . Then, we connect x h x_h x h to every terminal on h h h , ensuring that the connections respect the embedding. As a result, h h h is divided into faces, each of which is in a one-to-one correspondence with the terminals on h h h . For a terminal t t t on h h h , we denote the corresponding face by f t f_t f t . Let G ‾ \overline{G} G be the graph obtained by adding all the auxiliary vertices and dividing all the holes accordingly. We then construct the dual graph G ‾ ∗ \overline{G}^{*} G ∗ of G ‾ \overline{G} G . It follows from the construction that each divided face f t f_t f t now corresponds to a dual vertex v t v_t v t in G ‾ ∗ \overline{G}^{*} G ∗ . Finally, to obtain the alternate dual graph G D G_D G D , we remove the dual edge v t v t ′ v_t v_{t'} v t v t ′ (if any) for every pair of terminals t , t ′ t,t' t , t ′ on h h h . The dual terminal set T D T_D T D consists of all dual vertices v t v_t v t for t ∈ T t \in T t ∈ T , and there is a one-to-one correspondence between the terminals in T T T and the dual terminals in T D T_D T D . Moreover, ∣ H ( G D , T D ) ∣ = ∣ H ( G , T ) ∣ |\mathcal{H}(G_D,T_D)| = |\mathcal{H}(G,T)| ∣ H ( G D , T D ) ∣ = ∣ H ( G , T ) ∣ . Based on the construction, the dual instance of ( G D , T D ) (G_D,T_D) ( G D , T D ) is ( G , T ) (G,T) ( G , T ) itself, which we refer to the primal instance of ( G D , T D ) (G_D,T_D) ( G D , T D ) .8 See Figure 1 for an illustration. In Subsection 5.1, we explain in more detail how ( G D , T D ) (G_D,T_D) ( G D , T D ) is constructed. A contribution of our work is to show to efficiently maintain ( G D , T D ) (G_D,T_D) ( G D , T D ) under dynamic updates such that each update in ( G , T ) (G,T) ( G , T ) results in O ( 1 ) O(1) O ( 1 ) updates to ( G D , T D ) (G_D,T_D) ( G D , T D ) .
Figure 1. An example of computing ( G D , T D ) (G_D,T_D) ( G D , T D ) for a one-hole instance ( G , T ) (G,T) ( G , T ) . Each figure depicts a part of G G G with the hole h h h being completely shown. The faces are colored with a blue background: (a) The hole h h h contains terminals t 1 t_1 t 1 and t 2 t_2 t 2 in G G G . (b) The auxiliary vertex x h x_h x h (the blue vertex) is placed inside h h h , and it is connected to the terminals t 1 t_1 t 1 and t 2 t_2 t 2 (by blue edges) to form G ‾ \overline{G} G . (c) The standard dual G ‾ ∗ \overline{G}^{*} G ∗ of G ‾ \overline{G} G is obtained by associating a dual vertex (orange squares) with each face of G ‾ \overline{G} G and connecting them if the associated faces in G ‾ \overline{G} G share an edge. Here, f t 1 f_{t_1} f t 1 and f t 2 f_{t_2} f t 2 are the dual vertices in G ‾ ∗ \overline{G}^{*} G ∗ associated with the faces containing t 1 t_1 t 1 and t 2 t_2 t 2 in G ‾ \overline{G} G , respectively. (d) The dual ( G D , T D ) (G_D,T_D) ( G D , T D ) is obtained by removing the edges between f t 1 f_{t_1} f t 1 and f t 2 f_{t_2} f t 2 .
Pattern Emulators
A key observation in [18 ] is that for a one-hole instance ( G , T ) (G,T) ( G , T ) , any min-cut between the terminals corresponds to a union of edge-disjoint shortest paths between some dual terminals in ( G D , T D ) (G_D,T_D) ( G D , T D ) (see Lemma A.1). Therefore, for the one-hole instance ( G , T ) (G,T) ( G , T ) , [18 ] computes an emulator ( H D , T D ) (H_D,T_D) ( H D , T D ) for ( G D , T D ) (G_D,T_D) ( G D , T D ) , which ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximates any shortest path between any pair of terminals in T D T_D T D , and subsequently shows that the primal instance ( H , T ) (H,T) ( H , T ) of ( H D , T D ) (H_D,T_D) ( H D , T D ) forms a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier for ( G , T ) (G,T) ( G , T ) .
In the multiple-hole case, i.e., ∣ H ( G , T ) ∣ > 1 |\mathcal{H}(G,T)| > 1 ∣ H ( G , T ) ∣ > 1 , the analysis becomes more involved. This arises from the fact that when there is more than one hole in ( G , T ) (G,T) ( G , T ) , it is not sufficient to preserve only the shortest paths between the dual terminals in ( G D , T D ) (G_D,T_D) ( G D , T D ) . We first provide some intuition to explain why preserving only the distance between terminals is not sufficient in this case. Assume that ( G , T ) (G,T) ( G , T ) consists of the holes h 1 h_1 h 1 and h 2 h_2 h 2 with terminals T 1 T_1 T 1 and T 2 T_2 T 2 on them, respectively. Thus, T = T 1 ∪ T 2 T = T_1 \cup T_2 T = T 1 ∪ T 2 . Let ∅ ≠ T 1 ′ ⊂ T 1 \varnothing\ne T'_1 \subset T_1 ∅ = T 1 ′ ⊂ T 1 be an interval terminal set on h 1 h_1 h 1 . i.e., if t 1 , … , t k t_1,\ldots,t_k t 1 , … , t k is the clockwise ordering of T 1 T_1 T 1 on h 1 h_1 h 1 , then T 1 ′ T'_1 T 1 ′ is a subset t i , t i + 1 , … , t j t_{i},t_{i+1},\ldots,t_j t i , t i + 1 , … , t j of terminals on h 1 h_1 h 1 , where j ≥ i j \ge i j ≥ i . We discuss how the minimum cuts E 1 E_1 E 1 and E 2 E_2 E 2 corresponding to mincut G ( T 1 ′ ∪ T 2 , T 1 ∖ T 1 ′ ) \operatorname{mincut}_G(T'_1 \cup T_2,T_1 \setminus T'_1) mincut G ( T 1 ′ ∪ T 2 , T 1 ∖ T 1 ′ ) and mincut G ( T 1 ′ , T ∖ T 1 ′ ) \operatorname{mincut}_G(T'_1,T \setminus T'_1) mincut G ( T 1 ′ , T ∖ T 1 ′ ) , respectively, appear in the dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) . Note that E 1 E_1 E 1 and E 2 E_2 E 2 are cuts that separate T 1 ′ T'_1 T 1 ′ from T 1 ∖ T 1 ′ T_1 \setminus T'_1 T 1 ∖ T 1 ′ , but E 1 E_1 E 1 separates T 1 ′ T'_1 T 1 ′ along with the entire T 2 T_2 T 2 from the remaining terminals, whereas E 2 E_2 E 2 separates only T 1 ′ T'_1 T 1 ′ from the remaining terminals. See Figure 2 a for an illustration. Now, the shortest paths P 1 P_1 P 1 and P 2 P_2 P 2 in ( G D , T D ) (G_D,T_D) ( G D , T D ) corresponding to E 1 E_1 E 1 and E 2 E_2 E 2 in ( G , T ) (G,T) ( G , T ) , respectively, are shown in Figure 2 b. Here, both paths have the same dual terminals v t , v t ′ v_t,v_{t'} v t , v t ′ as their endpoints, but exactly one of them, say P 1 P_1 P 1 , is the v t v_t v t -v t ′ v_{t'} v t ′ shortest path in ( G D , T D ) (G_D,T_D) ( G D , T D ) .9 However, to preserve the minimum cut E 2 E_2 E 2 , it is also necessary to preserve P 2 P_2 P 2 in ( G D , T D ) (G_D,T_D) ( G D , T D ) , which cannot be accomplished solely by maintaining the shortest paths between the dual terminal pairs in ( G D , T D ) (G_D,T_D) ( G D , T D ) . This raises a fundamental question: what should be the criteria for preserving paths in ( G D , T D ) (G_D,T_D) ( G D , T D ) (such as P 2 P_2 P 2 ) in order to ensure that all min-cuts in ( G , T ) (G,T) ( G , T ) are preserved? It turns out that preserving the shortest paths with respect to the holes in ( G D , T D ) (G_D,T_D) ( G D , T D ) is sufficient [39 ] . In our example, denoting the hole in ( G D , T D ) (G_D,T_D) ( G D , T D ) corresponding to h 2 h_2 h 2 by h 2 ′ h'_2 h 2 ′ , path P 2 P_2 P 2 is still the shortest v t v_t v t -v t ′ v_{t'} v t ′ path in ( G D , T D ) (G_D,T_D) ( G D , T D ) that has h 2 ′ h'_2 h 2 ′ on its left (assuming traversal from v t v_t v t to v t ′ v_{t'} v t ′ ), while P 1 P_1 P 1 remains the shortest v t v_t v t -v t ′ v_{t'} v t ′ path in ( G D , T D ) (G_D,T_D) ( G D , T D ) with h 2 ′ h'_2 h 2 ′ on its right. This example also demonstrates why this issue does not arise in the single-hole case: the paths P 1 P_1 P 1 and P 2 P_2 P 2 attempt to “navigate” through other holes, whereas in the single-hole case, there are no other holes to consider.
Figure 2. An example of how the information of minimum cuts E 1 E_1 E 1 , E 2 E_2 E 2 in ( G , T ) (G,T) ( G , T ) is preserved in ( G D , T D ) (G_D,T_D) ( G D , T D ) , where ( G , T ) (G,T) ( G , T ) consists of two holes h 1 , h 2 h_1,h_2 h 1 , h 2 with terminals T 1 , T 2 T_1,T_2 T 1 , T 2 lying on them, respectively: (a) The interval terminal T 1 ′ ⊂ T 1 T'_1 \subset T_1 T 1 ′ ⊂ T 1 is depicted as green terminals on h 1 h_1 h 1 , while T 1 ∖ T 1 ′ T_1 \setminus T'_1 T 1 ∖ T 1 ′ is on the other side of h 1 h_1 h 1 and is not shown. The minimum cut E 1 E_1 E 1 is the set of blue edges (plus the top and bottom black edges on h 1 h_1 h 1 ), while the minimum cut E 2 E_2 E 2 is the set of orange edges (plus the top and bottom black edges on h 1 h_1 h 1 ). (b) The path P 1 P_1 P 1 in ( G D , T D ) (G_D,T_D) ( G D , T D ) corresponding to E 1 E_1 E 1 is the blue path (plus the top and bottom gray edges), and the path P 2 P_2 P 2 in ( G D , T D ) (G_D,T_D) ( G D , T D ) corresponding to E 2 E_2 E 2 is the orange path (plus the top and bottom gray edges). Here, h 2 ′ h'_2 h 2 ′ is the dual hole in ( G D , T D ) (G_D,T_D) ( G D , T D ) (with dual terminals on it) corresponding to the hole h 2 h_2 h 2 in ( G , T ) (G,T) ( G , T ) . Both paths P 1 , P 2 P_1,P_2 P 1 , P 2 have the dual terminals v t , v t ′ v_t,v_{t'} v t , v t ′ as their endpoint. Starting from v t v_t v t , path P 1 P_1 P 1 has h 2 ′ h'_2 h 2 ′ on its right and path P 2 P_2 P 2 has h 2 ′ h'_2 h 2 ′ on its left.
This concept of having a hole on the left or right is what we mean by navigating with respect to the holes in ( G D , T D ) (G_D,T_D) ( G D , T D ) , and it is formalized as the pattern Φ ( P ) \Phi(P) Φ ( P ) of a path P P P in ( G D , T D ) (G_D,T_D) ( G D , T D ) , defined as follows. Let v t v_t v t and v t ′ v_{t'} v t ′ be the endpoints of P P P , and let P ′ P' P ′ be the shortest v t v_t v t -v t ′ v_{t'} v t ′ path in ( G D , T D ) (G_D,T_D) ( G D , T D ) . The set Φ ( P ) \Phi(P) Φ ( P ) is defined as the set of holes that are inside the closed curve formed by
P ∪ P ′ P \cup P' P ∪ P ′ . 10 Thus, there are at most 2 h 2^h 2 h distinct patterns in an h h h -hole graph. If P P P is the shortest path with pattern Φ ( P ) \Phi(P) Φ ( P ) , we refer to it as the Φ ( P ) \Phi(P) Φ ( P ) -respecting v t v_t v t -v t ′ v_{t'} v t ′ shortest path in ( G D , T D ) (G_D,T_D) ( G D , T D ) .
To construct the cut sparsifier, the goal is to preserve the shortest paths in ( G D , T D ) (G_D,T_D) ( G D , T D ) for every pattern. The emulator that, for every pattern Φ \Phi Φ , preserves all Φ \Phi Φ -respecting shortest paths between the terminals in ( G D , T D ) (G_D,T_D) ( G D , T D ) is called the pattern emulator of ( G D , T D ) (G_D,T_D) ( G D , T D ) . As mentioned earlier, computing a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator ( H D , T D ) (H_D,T_D) ( H D , T D ) of ( G D , T D ) (G_D,T_D) ( G D , T D ) is sufficient for constructing a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier of ( G , T ) (G,T) ( G , T ) [39 ] .11 See Theorem 3.14 for more details.
Pattern Emulator Construction of Chen and Tan [18 ]
We now describe how [18 ] computes a pattern emulator. Later, we show how to modify this construction so that pattern emulators can be computed in near-linear time. Since, from this point on, we focus exclusively on constructing pattern emulators, we slightly abuse notation and write ( G , T ) (G,T) ( G , T ) instead of ( G D , T D ) (G_D,T_D) ( G D , T D ) for the dual instance.
Reduction to O ( 1 ) O(1) O ( 1 ) -hole Instances. For an instance ( G , T ) (G,T) ( G , T ) with an arbitrary number of holes, Chen and Tan [18 ] first partition E ( G ) E(G) E ( G ) into pieces p 1 , … , p k p_1,\ldots,p_k p 1 , … , p k , referred to as a structured division of G G G . Intuitively, the structured division allows for the terminals of G G G to be evenly distributed among the pieces, ensuring that each piece contains O ( 1 ) O(1) O ( 1 ) terminals. Moreover, the boundary vertices of each piece (i.e., vertices shared between the pieces) are guaranteed to lie on O ( 1 ) O(1) O ( 1 ) additional holes. See § 3 for the precise definition. The task of computing a pattern emulator for ( G , T ) (G,T) ( G , T ) then translates into the task of computing the pattern emulator for each piece ( p i , T i ) (p_i,T_i) ( p i , T i ) , where T i T_i T i is the union of T ∩ V ( p i ) T \cap V(p_i) T ∩ V ( p i ) and the boundary vertices of p i p_i p i . By the discussion above, T i T_i T i lies on O ( 1 ) O(1) O ( 1 ) holes, and thus the primary challenge reduces to computing a pattern emulator for an instance with O ( 1 ) O(1) O ( 1 ) holes.
The O ( 1 ) O(1) O ( 1 ) -hole Case. Assume now that ( G , T ) (G,T) ( G , T ) is an instance with h = O ( 1 ) h = O(1) h = O ( 1 ) holes. To compute a pattern emulator for ( G , T ) (G,T) ( G , T ) , [18 ] first employs a similar approach to [15 ] to reduce ( G , T ) (G,T) ( G , T ) into a single-hole instance ( G h , T h ) (G_h,T_h) ( G h , T h ) as follows. Starting with G 1 = G G_1 = G G 1 = G and T 1 = T T_1 = T T 1 = T , they select two arbitrary terminals t 1 , t 2 ∈ T 1 t_1,t_2 \in T_1 t 1 , t 2 ∈ T 1 lying on different holes in ( G 1 , T 1 ) (G_1,T_1) ( G 1 , T 1 ) and compute the shortest t 1 t_1 t 1 -t 2 t_2 t 2 path R 1 R_1 R 1 in G 1 G_1 G 1 . Next, they slice along R 1 R_1 R 1 to obtain ( G 2 , T 2 ) (G_2,T_2) ( G 2 , T 2 ) ; they add a copy R ‾ 1 \overline{R}_1 R 1 of R 1 R_1 R 1 , and for every vertex v v v on R 1 R_1 R 1 , they reassign every edge connected to v v v on the right side of R 1 R_1 R 1 (with respect to the traversal from t 1 t_1 t 1 to t 2 t_2 t 2 ) to the vertex v ‾ \overline{v} v on R ‾ 1 \overline{R}_1 R 1 that is the copy of v v v . This operation merges the holes containing t 1 t_1 t 1 and t 2 t_2 t 2 into a single hole, thus reducing the number of holes in ( G 2 , T 2 ) (G_2,T_2) ( G 2 , T 2 ) to h − 1 h-1 h − 1 . This process continues iteratively until a one-hole instance ( G h , T h ) (G_h,T_h) ( G h , T h ) is obtained. Specifically, for 2 ≤ i ≤ h − 1 2 \leq i \leq h-1 2 ≤ i ≤ h − 1 , we select two terminals t 1 t_1 t 1 and t 2 t_2 t 2 on different holes of ( G i , T i ) (G_i,T_i) ( G i , T i ) and find the shortest t 1 t_1 t 1 -t 2 t_2 t 2 path R i R_i R i . The graph G i G_i G i is then sliced along R i R_i R i to obtain G i + 1 G_{i+1} G i + 1 . See Figure 3 for an illustration of the slicing procedure.
Figure 3. An illustration for the slicing procedure used in Subsection 4.3.3 for an h h h -hole instance ( G , T ) (G,T) ( G , T ) with h = 3 h=3 h = 3 and holes h 1 , h 2 , h 3 h_1,h_2,h_3 h 1 , h 2 , h 3 . Starting with G 1 = G G_1=G G 1 = G : (a) The path R 1 R_1 R 1 is the shortest path connecting any pair of holes in G 1 G_1 G 1 (e.g., connecting h 1 h_1 h 1 to h 3 h_3 h 3 ).12 (b) The sliced graph G ‾ 1 \overline{G}_1 G 1 is obtained from G 1 G_1 G 1 by slicing along R 1 R_1 R 1 using Algorithm 1. The depicted vertices on R 1 R_1 R 1 (and R ‾ 1 \overline{R}_1 R 1 ) are the portals (and their copies on R ‾ 1 \overline{R}_1 R 1 ) as defined in Definition 4.13 . Note that, after slicing, h 1 h_1 h 1 is merged into h 3 h_3 h 3 . (c) The path R 2 R_2 R 2 is a shortest path between any pair of holes in G 2 = G ‾ 1 G_2=\overline{G}_1 G 2 = G 1 . (d) The graph G ‾ 2 \overline{G}_2 G 2 is obtained from G ‾ 1 \overline{G}_1 G 1 by slicing along R 2 R_2 R 2 . Similarly, the portals on R 2 R_2 R 2 and R ‾ 2 \overline{R}_2 R 2 are depicted. By our definition, G 3 = G ‾ 2 G_3=\overline{G}_2 G 3 = G 2 , and since h = 3 h=3 h = 3 , we have G 3 = G 3 ′ G_3=G'_3 G 3 = G 3 ′ . Note that h 2 h_2 h 2 is merged into h 3 h_3 h 3 .
To approximately preserve a Φ \Phi Φ -respecting t 1 t_1 t 1 -t 2 t_2 t 2 shortest path P P P in ( G , T ) (G,T) ( G , T ) , we next discuss how to expand terminal set T i T_i T i based on T i − 1 T_{i-1} T i − 1 . To illustrate this, let us first show the intuition behind the expansion of the terminal set T 2 T_2 T 2 in G 2 G_2 G 2 , where we distinguish two cases. (1) If P P P does not cross R 1 R_1 R 1 , then it remains unchanged in ( G 2 , T 2 ) (G_2,T_2) ( G 2 , T 2 ) . (2) However, if P P P crosses R 1 R_1 R 1 , it is divided into subpaths in ( G 2 , T 2 ) (G_2,T_2) ( G 2 , T 2 ) (Figure 7 illustrates a case where P P P crosses R 1 R_1 R 1 ). It follows that each subpath in ( G 2 , T 2 ) (G_2,T_2) ( G 2 , T 2 ) is a shortest path between its endpoints with a specific pattern. Therefore, considering all the endpoints of these subpaths as terminals in G 2 G_2 G 2 ensures that all the subpaths are preserved. The major drawback of this approach is that it would require adding Ω ( n ) \Omega(n) Ω ( n ) vertices from T 1 = T T_1 = T T 1 = T to T 2 T_2 T 2 ; different paths may cross R 1 R_1 R 1 at different vertices, and it could be the case that ∣ R 1 ∣ = Ω ( n ) |R_1| = \Omega(n) ∣ R 1 ∣ = Ω ( n ) . To address this issue, [18 ] introduces a subset of vertices on R 1 R_1 R 1 , called pattern portals , as additional terminals of G 2 G_2 G 2 (alongside T 1 T_1 T 1 ), which approximately preserves every Φ \Phi Φ -respecting shortest path P P P crossing R 1 R_1 R 1 for every pattern Φ \Phi Φ .
Figure 7. An illustration of the slicing procedure described in Algorithm 1 applied to G G G : (a) The holes h 1 h_1 h 1 and h 2 h_2 h 2 (the outer face of G G G ) are the closest holes in G G G , and R R R (the orange path) is the shortest path connecting h 1 h_1 h 1 to h 2 h_2 h 2 . The vertices t 1 , t 2 t_1,t_2 t 1 , t 2 belong to the terminal set T T T , and P P P (the black path) is the Φ \Phi Φ -respecting t 1 t_1 t 1 -t 2 t_2 t 2 shortest path in G G G , where Φ \Phi Φ is a pattern. The vertices p 1 , p 2 , p 3 p_1,p_2,p_3 p 1 , p 2 , p 3 are points on P P P that intersect R R R during traversal from t 1 t_1 t 1 to t 2 t_2 t 2 . (b) The instance G ˉ \bar{G} G ˉ is created by slicing along R R R . The vertices p ˉ 1 , p ˉ 2 , p ˉ 3 \bar{p}_1,\bar{p}_2,\bar{p}_3 p ˉ 1 , p ˉ 2 , p ˉ 3 are the copies of p 1 , p 2 , p 3 p_1,p_2,p_3 p 1 , p 2 , p 3 on R ˉ \bar{R} R ˉ (the upper red path), respectively.
Pattern Portals. To explain how pattern portals are selected on R 1 R_1 R 1 , we first briefly review the construction of an ε \varepsilon ε -cover [44 , 35 ] , referred to as portals , which serves as the foundation for the pattern portal construction. For a terminal t ∈ T 1 t \in T_1 t ∈ T 1 not on R 1 R_1 R 1 , the portal set of t t t on R 1 R_1 R 1 , denoted by Portals ( R 1 , t , ε ) \operatorname{Portals}(R_1,t,\varepsilon) Portals ( R 1 , t , ε ) , is constructed as follows. First, find the closest vertex x x x on R 1 R_1 R 1 to t t t . This vertex induces two maximal subpaths on R 1 R_1 R 1 , with x x x serving as an endpoint. The algorithm adds x x x to Portals ( R 1 , t , ε ) \operatorname{Portals}(R_1,t,\varepsilon) Portals ( R 1 , t , ε ) and proceeds as follows for each maximal subpath. Starting at y = x y=x y = x , the algorithm traverses toward the other endpoint of the subpath, selecting the first vertex z z z (if any) as a portal if ( 1 + ε ) dist ( t , z ) < dist ( t , y ) + dist ( y , z ) (1+\varepsilon)\operatorname{dist}(t,z)<\operatorname{dist}(t,y)+\operatorname{dist}(y,z) ( 1 + ε ) dist ( t , z ) < dist ( t , y ) + dist ( y , z ) . It then sets y = z y=z y = z and repeats the process until reaching the endpoint of the subpath. This construction ensures that ∣ Portals ( R 1 , t , ε ) ∣ = O ( 1 / ε ) |\operatorname{Portals}(R_1,t,\varepsilon)|=O(1/\varepsilon) ∣ Portals ( R 1 , t , ε ) ∣ = O ( 1/ ε ) . Thus, for the portal set across all terminals, ∣ ⋃ t ∈ T 1 Portals ( R 1 , t , ε ) ∣ = O ( ∣ T 1 ∣ / ε ) \left|\bigcup_{t\in T_1}\operatorname{Portals}(R_1,t,\varepsilon)\right|=O(|T_1|/\varepsilon) ⋃ t ∈ T 1 Portals ( R 1 , t , ε ) = O ( ∣ T 1 ∣/ ε ) , which is significantly smaller than the Ω ( n ) \Omega(n) Ω ( n ) bound that would arise if all vertices on R 1 R_1 R 1 were considered as terminals. Moreover, computing this portal set when T 1 T_1 T 1 lies on O ( 1 ) O(1) O ( 1 ) holes takes O ( n log ∣ T 1 ∣ ) O(n\log|T_1|) O ( n log ∣ T 1 ∣ ) time [16 Lemma 2.4] .
The key idea behind computing pattern portals in [18 ] is to compute portals for every pattern. i.e., for any pattern Φ \Phi Φ , the portal set of t ∈ T 1 t\in T_1 t ∈ T 1 with respect to Φ \Phi Φ is computed on R 1 R_1 R 1 in a way similar to the discussion above, but the criterion now becomes $(1+\varepsilon)\operatorname{dist}^{\Phi}(t,z)< dist Φ ( t , y ) + dist Φ ( y , z ) \operatorname{dist}^{\Phi}(t,y)+\operatorname{dist}^{\Phi}(y,z) dist Φ ( t , y ) + dist Φ ( y , z ) , where dist Φ ( x , y ) \operatorname{dist}^{\Phi}(x,y) dist Φ ( x , y ) is the length of the shortest Φ \Phi Φ -respecting x x x -y y y path. When ( G , T ) (G,T) ( G , T ) consists of h h h holes, it follows that there are O ( 2 h ∣ T 1 ∣ / ε ) O(2^h|T_1|/\varepsilon) O ( 2 h ∣ T 1 ∣/ ε ) pattern portals on R 1 R_1 R 1 , which are added to T 1 T_1 T 1 to form T 2 T_2 T 2 . The expansion of T i + 1 T_{i+1} T i + 1 is performed similarly by adding to T i T_i T i the pattern portals of R i R_i R i computed for each terminal in T i T_i T i . It follows that the size of T h T_h T h is O ( h 2 h ∣ T ∣ / ε ) O(h2^h|T|/\varepsilon) O ( h 2 h ∣ T ∣/ ε ) , which is O ( ∣ T ∣ / ε ) O(|T|/\varepsilon) O ( ∣ T ∣/ ε ) when h = O ( 1 ) h=O(1) h = O ( 1 ) . In summary, pattern portals prevent a blow-up in the sizes of the terminal sets T 1 , … , T h T_1,\ldots,T_h T 1 , … , T h while still ensuring that all patterns are approximately preserved. However, it is unclear how to turn their polynomial-time construction into a near-linear-time one, which is the key step toward obtaining a dynamic pattern emulator.
The Bottom-up Procedure. After obtaining the instances ( G 1 , T 1 ) , … , ( G h , T h ) (G_1,T_1),\ldots,(G_h,T_h) ( G 1 , T 1 ) , … , ( G h , T h ) by slicing along the path R i R_i R i on G i G_i G i for 1 ≤ i ≤ h − 1 1\leq i\leq h-1 1 ≤ i ≤ h − 1 in a top-down manner, the pattern emulator of ( G , T ) (G,T) ( G , T ) is then computed in a bottom-up fashion. Starting from the single-hole instance ( G h , T h ) (G_h,T_h) ( G h , T h ) , [18 ] computes an emulator ( H h , T h ) (H_h,T_h) ( H h , T h ) for ( G h , T h ) (G_h,T_h) ( G h , T h ) . Then, for each 1 ≤ i ≤ h − 1 1\leq i\leq h-1 1 ≤ i ≤ h − 1 , the emulator ( H i , T i ) (H_i,T_i) ( H i , T i ) is constructed from ( H i + 1 , T i + 1 ) (H_{i+1},T_{i+1}) ( H i + 1 , T i + 1 ) by gluing every portal z z z on R i R_i R i with its copy z ˉ \bar{z} z ˉ on R ˉ i \bar{R}_i R ˉ i . Note that ( H i , T i ) (H_i,T_i) ( H i , T i ) has T i T_i T i as its terminal set; during the gluing process, each glued portal on R i R_i R i loses its status as a terminal in ( H i , T ˉ i ) (H_i,\bar{T}_i) ( H i , T ˉ i ) . It follows that ( H i , T i ) (H_i,T_i) ( H i , T i ) has h − i + 1 h-i+1 h − i + 1 holes, and the instance ( H 1 , T 1 ) = ( H , T ) (H_1,T_1)=(H,T) ( H 1 , T 1 ) = ( H , T ) obtained through this procedure is the pattern emulator of ( G 1 , T 1 ) = ( G , T ) (G_1,T_1)=(G,T) ( G 1 , T 1 ) = ( G , T ) . See Figure 4 for an illustration of the gluing procedure.
Figure 4. An illustration for the gluing notation used in Subsection 4.3.3 for the h h h -hole instance ( G h , T h ) (G_h,T_h) ( G h , T h ) obtained from ( G , T ) (G,T) ( G , T ) in Figure 3 with h = 3 h=3 h = 3 and holes h 1 , h 2 , h 3 h_1,h_2,h_3 h 1 , h 2 , h 3 . (a) The glued graph G 2 ′ G'_2 G 2 ′ is obtained from G 3 ′ G'_3 G 3 ′ by gluing back the portals on R ‾ 2 \overline{R}_2 R 2 . This reestablishes the hole from G 2 G_2 G 2 that was merged to form G 3 G_3 G 3 . For example, the hole h 2 h_2 h 2 reappears, and, in general, G i ′ G'_i G i ′ has the same number of holes as G i G_i G i . (b) The glued graph G 1 ′ G'_1 G 1 ′ is obtained from G 2 ′ G'_2 G 2 ′ by gluing back the portals on R ‾ 1 \overline{R}_1 R 1 .
Our Contribution
In the static setting, our main conceptual contribution in is to show that using the standard portals of Thorup-Klein [44 , 35 ] instead of pattern portals is sufficient for preserving all the pattern information. In other words, we can set T i + 1 = T i ∪ ⋃ t ∈ T i Portals ( R i , t , ε ′ ′ ) T_{i+1}=T_i\cup\bigcup_{t\in T_i}\operatorname{Portals}(R_i,t,\varepsilon'') T i + 1 = T i ∪ ⋃ t ∈ T i Portals ( R i , t , ε ′′ ) , where ε ′ ′ = ε / 2 O ( h ) \varepsilon''=\varepsilon/2^{O(h)} ε ′′ = ε / 2 O ( h ) is an error parameter, and still obtain a pattern emulator ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) by gluing the portals back to their copies in a bottom-up fashion, as described above. Although this does not improve the asymptotic bound on the number of portals used, since h = O ( 1 ) h = O(1) h = O ( 1 ) , it has two important consequences. First, the construction based on the framework of [15 ] yields a pattern emulator. Second, as a useful byproduct, this construction gives the first near-linear-time implementation of pattern emulators, without relying on additional preprocessing steps such as division or bootstrapping, while simultaneously simplifying the algorithm.
More importantly, we leverage these insights in the dynamic setting to maintain a dynamic pattern emulator based on the dynamic (standard) emulator construction of Filtser, Goranci, Patel, and Gutenberg [21 ] , as outlined in Subsection 2.2.
For the remainder of this subsection, we give a high-level technical discussion of where our construction deviates from that of [18 ] to show that portals are sufficient instead of pattern portals.
Our first deviation is in the selection of R i R_i R i ; we choose R i R_i R i to be the shortest path between the closest pair of holes in ( G i , T i ) (G_i,T_i) ( G i , T i ) , rather than the shortest path between any pair of holes. This adjustment simplifies our analysis. We define patterns based on the one-hole instance ( G h , T h ) (G_h,T_h) ( G h , T h ) , where we assign a unique path P h P_h P h in ( G h , T h ) (G_h,T_h) ( G h , T h ) for every Φ \Phi Φ -respecting path P P P in ( G , T ) (G,T) ( G , T ) . The pattern Φ \Phi Φ of P P P is then defined using both P P P and P h P_h P h (see Definition 3.11 ). Slicing along the closest pair of holes allows us to obtain a unique ( G h , T h ) (G_h,T_h) ( G h , T h ) , and therefore a unique P h P_h P h , thus significantly simplifying our pattern analysis for every instance ( G i , T i ) (G_i,T_i) ( G i , T i ) . See the proof of Lemma 4.11 for an example of how this adjustment simplifies the analysis.
Another deviation is in our ε \varepsilon ε -cover procedure. We adapt the algorithm of [44 , 35 ] for a parameter ε ′ ′ = ε / 2 O ( h ) \varepsilon'' = \varepsilon/2^{O(h)} ε ′′ = ε / 2 O ( h ) : for the closest vertex x x x on the path to any terminal t ∈ T t \in T t ∈ T , starting from y = x y=x y = x , we select the first edge z ′ z z'z z ′ z (if any) such that dist ( x , z ) > ( 1 + ε ′ ′ ) dist ( x , y ) \operatorname{dist}(x,z) > (1+\varepsilon'')\operatorname{dist}(x,y) dist ( x , z ) > ( 1 + ε ′′ ) dist ( x , y ) , add z z z and z ′ z' z ′ to the portal set, and then repeat the procedure by setting y = z y=z y = z until we reach the other endpoint. Moreover, starting from x x x , we choose the edge z i ′ z i z'_i z_i z i ′ z i (if any) to be the first edge from x x x satisfying dist ( x , z i ) > i ε ′ ′ dist ( t , x ) \operatorname{dist}(x,z_i) > i\varepsilon''\operatorname{dist}(t,x) dist ( x , z i ) > i ε ′′ dist ( t , x ) for 1 ≤ i ≤ 2 / ε ′ ′ 1 \le i \le2/\varepsilon'' 1 ≤ i ≤ 2/ ε ′′ and add z i ′ z'_i z i ′ and z i z_i z i to the portal set. As a result of these changes, our ε ′ ′ \varepsilon'' ε ′′ -cover has a size of O ( ∣ T ∣ log n / ε ) O(|T|\log n/\varepsilon) O ( ∣ T ∣ log n / ε ) instead of O ( ∣ T ∣ / ε ) O(|T|/\varepsilon) O ( ∣ T ∣/ ε ) , which we can still afford. See Definition 4.13 for the precise definition of ε ′ ′ \varepsilon'' ε ′′ .
To determine the value for ε ′ ′ \varepsilon'' ε ′′ , we first prove that if P P P crosses R R R , then R R R segments P P P into at most 2 h + 2 2^{h+2} 2 h + 2 pieces (see Claim 4.12 for more details). Thus, by setting ε ′ ′ = ε / 2 O ( h ) \varepsilon'' = \varepsilon/2^{O(h)} ε ′′ = ε / 2 O ( h ) , the distances between the portals become granular enough such that the distance between any two consecutive portals on R R R is O ( ε ∣ P ∣ ) O(\varepsilon|P|) O ( ε ∣ P ∣ ) (see Claim 3.21). This enables us to successfully approximate the length of any Φ \Phi Φ -respecting shortest path P P P in ( G , T ) (G,T) ( G , T ) by ( 1 + ε ) ∣ P ∣ (1+\varepsilon)|P| ( 1 + ε ) ∣ P ∣ in ( H , T ) (H,T) ( H , T ) , as it ensures that if P P P crosses R i R_i R i , the additional cost incurred when rerouting P P P through the portals remains sufficiently small relative to ∣ P ∣ |P| ∣ P ∣ . See Claim 4.19 for further details.
Another deviation is that we extend the definition of the Φ \Phi Φ -respecting shortest path P P P to allow P P P to be any path, not necessarily a simple path (as used in [39 , 18 ] ). As mentioned above, to simplify the proofs, we define the pattern Φ \Phi Φ of a path P P P in ( G , T ) (G,T) ( G , T ) using a unique path P h P_h P h in ( G h , T h ) (G_h,T_h) ( G h , T h ) . Similarly, every path P i P_i P i in ( G i , T i ) (G_i,T_i) ( G i , T i ) is also defined using its unique path in ( G h , T h ) (G_h,T_h) ( G h , T h ) . The analysis for each such path P i P_i P i considers the image of P i P_i P i in ( G , T ) (G,T) ( G , T ) , which is obtained by naturally contracting the portals and tracking how P i P_i P i evolves. Since the image of P i P_i P i may not necessarily be simple in ( G , T ) (G,T) ( G , T ) , generalizing the definition helps us to focus on the image of P i P_i P i without requiring us to find another simple path between its endpoints in ( G , T ) (G,T) ( G , T ) . Moreover, this generalization allows us to prove that R i R_i R i segments the path P P P into at most 2 h + 2 2^{h+2} 2 h + 2 pieces in Claim 4.12, which we will later use to show that ε ′ ′ \varepsilon'' ε ′′ -covers are sufficient
to approximate P P P in the glued instances (see Claim 4.19 ).
In conclusion, we present a method to use ε ′ ′ \varepsilon'' ε ′′ -covers instead of requiring pattern portals as in [18 ] . Thus, for a sufficiently fine-grained ε ′ ′ \varepsilon'' ε ′′ , employing the [15 ] construction (which utilizes ε ′ ′ \varepsilon'' ε ′′ -covers to compute portals) also results in pattern emulators. This shows that the [15 ] construction is stronger than previously believed.
Dynamic All-Pairs s s s -t t t Min-cut
In this subsection, we describe how our main observation from Subsection 2.1 (that using ε \varepsilon ε -covers as portals in the CKT emulator construction [15 ] leads to a pattern emulator) can be combined with the dynamic version of the CKT [21 ] to achieve a fully dynamic all-pairs s s s -t t t min-cut with subpolynomial update and query time. Recall that an update on the instance ( G , T ) (G,T) ( G , T ) can involve either an edge insertion or deletion in G G G , or the addition or removal of a terminal in T T T .
The high-level intuition is to maintain the dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) of ( G , D ) (G,D) ( G , D ) as defined in Subsection 2.1, and subsequently run the dynamic data structure of [21 ] on ( G D , T D ) (G_D,T_D) ( G D , T D ) . As discussed in Subsection 2.1, the maintained emulator ( H D , T D ) (H_D,T_D) ( H D , T D ) is a pattern emulator that ensures every cut in ( G , T ) (G,T) ( G , T ) , separating a subset of terminals from the rest, corresponds to a union of shortest paths between certain dual terminals in T D T_D T D . To answer s s s -t t t queries, we then compute the primal instance ( H , T ) (H,T) ( H , T ) of ( H D , T D ) (H_D,T_D) ( H D , T D ) and run a static s s s -t t t min-cut algorithm on ( H , T ) (H,T) ( H , T ) . We now elaborate on these steps in more detail.
Maintaining the Dual Instance
As we run the data structure on the dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) , we need to efficiently maintain ( G D , T D ) (G_D,T_D) ( G D , T D ) after each update in ( G , T ) (G,T) ( G , T ) . Unfortunately, directly maintaining ( G D , T D ) (G_D,T_D) ( G D , T D ) could result in an Ω ( n ) \Omega(n) Ω ( n ) update time. For example, consider a face f f f that is neighboring Ω ( n ) \Omega(n) Ω ( n ) other faces in G G G , and let v f v_f v f be the dual vertex in G D G_D G D corresponding to f f f . The insertion of an edge in G G G that splits f f f can result in a vertex split of v f v_f v f in G D G_D G D , where we need to split v f v_f v f into v f v_f v f and v f ′ v_{f'} v f ′ , and reassign almost half of the edges neighboring v f v_f v f to v f ′ v_{f'} v f ′ . This update takes Ω ( n ) \Omega(n) Ω ( n ) time to process. To overcome this issue, similar to [32 ] , we maintain an instance ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) based on ( G D , T D ) (G_D,T_D) ( G D , T D ) that translates each update in ( G , T ) (G,T) ( G , T ) to O ( 1 ) O(1) O ( 1 ) updates in ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) (see Lemma 5.1 ). The graph G D ∗ G_D^* G D ∗ is constructed as follows. For every vertex v f v_f v f in G D G_D G D , we replace it with a cycle C f C_f C f of deg G D ( v f ) \deg_{G_D}(v_f) deg G D ( v f ) edges, each edge having a zero length. Each vertex on C f C_f C f is assigned exactly one edge neighboring v f v_f v f in G D G_D G D , such that the constructed graph is planar and respects the embedding. See Figure 5 for an illustration. To form T D ∗ T_D^* T D ∗ , if v f ∈ T D v_f \in T_D v f ∈ T D , we then arbitrarily pick one of the vertices on C f C_f C f in G D ∗ G_D^* G D ∗ to be a terminal vertex in T D ∗ T_D^* T D ∗ . It then follows that a single update in ( G , T ) (G,T) ( G , T ) translates to O ( 1 ) O(1) O ( 1 ) edge deletions and insertions between the cycles in ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) to simulate vertex splits. See Subsection 5.1 for a more detailed discussion and Figure 14 for an update illustration.
Figure 5. An example of ( G D , T D ) (G_D,T_D) ( G D , T D ) from Figure 1 and the graph ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) constructed based on it: (a) The dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) of Figure 1 d. (b) The instance ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) is obtained from ( G D , T D ) (G_D,T_D) ( G D , T D ) by replacing each dual vertex f f f with a deg G D ( f ) \deg_{G_D}(f) deg G D ( f ) -edge cycle C f C_f C f and connecting each vertex of C f C_f C f to exactly one of the neighbors of f f f while respecting the embedding.
Figure 14. Updating ( G D ∗ , T D ∗ ) (G_D^*, T_D^*) ( G D ∗ , T D ∗ ) after adding the terminal t t t on the hole h h h , as in Figure 13 . (a) The instance ( G D ∗ , T D ∗ ) (G_D^*, T_D^*) ( G D ∗ , T D ∗ ) before the update. (b) To obtain the cycles C f ′ C_{f'} C f ′ and C f ′ ′ C_{f''} C f ′′ from C f t 1 C_{f_{t_1}} C f t 1 , we delete two zero-length edges of C f t 1 C_{f_{t_1}} C f t 1 so that the resulting paths correspond to the two sides of the split. (c) We then add zero-length edges between the endpoints of the resulting paths, thereby forming the cycles C f ′ C_{f'} C f ′ and C f ′ ′ C_{f''} C f ′′ . (d) The corresponding dual instance ( G D , T D ) (G_D, T_D) ( G D , T D ) after the terminal addition, shown for comparison.
The Dynamic Data Structure
We then run the data structure of [21 ] on ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) instead of ( G D , T D ) (G_D,T_D) ( G D , T D ) .15 To briefly discuss how the data structure works, for simplicity of notation, we explain how we run the data structure of [21 ] on instance ( G , T ) (G,T) ( G , T ) instead.
We use terminal updates only when handling min-cut queries; upon an s s s -t t t min-cut query, we add s s s and t t t to the terminal set T T T and maintain the pattern emulator. After answering the query (details will be discussed later), we revert the addition of s s s and t t t to T T T . Thus, during edge updates, we always have T = ∅ T=\varnothing T = ∅ , and in the following discussion, we focus on maintaining a pattern emulator for the instance ( G , ∅ ) (G,\varnothing) ( G , ∅ ) . 16
On a high level, to maintain a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator ( H , ∅ ) (H,\varnothing) ( H , ∅ ) of ( G , ∅ ) (G,\varnothing) ( G , ∅ ) , we partition E ( G ) E(G) E ( G ) into small enough pieces and then compute a pattern emulator on each piece.17 The union of each such piece’s pattern emulator forms the pattern emulator ( H , ∅ ) (H,\varnothing) ( H , ∅ ) .
To form these pieces, the data structure starts with what it calls Type-4 instances and reduces their size to obtain Type-3 instances with O ( 1 ) O(1) O ( 1 ) holes. Then, it reduces the number of holes in Type-3 instances to obtain Type-2 instances with one hole. Finally, the pieces we are looking for, called Type-1 instances, are obtained from Type-2 instances by splitting them to reduce their terminal set. This procedure for obtaining Type-1 instances naturally forms a tree T \mathcal{T} T , called the decomposition tree , where each node of T \mathcal{T} T corresponds to an instance ( R , S ) (R,S) ( R , S ) of a specific type, and its leaves are Type-1 instances. We now provide a more detailed explanation of how we compute different types of instances and use them to construct T \mathcal{T} T in the initialization phase.
Initialization. For the n n n -vertex graph G G G , target parameter 1 ≤ τ ≤ n / log n 1 \le\tau\le n/\log n 1 ≤ τ ≤ n / log n , and error parameter 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 , an instance ( R , S ) (R,S) ( R , S ) :
Is of type Type-4 if ∣ R ∣ > n / τ |R| > n/\tau ∣ R ∣ > n / τ and it contains O ( 1 ) O(1) O ( 1 ) holes. The children of ( R , S ) (R,S) ( R , S ) in T T T are the pieces ( R 1 , S 1 ) , … , ( R k , S k ) (R_1,S_1),\ldots,(R_k,S_k) ( R 1 , S 1 ) , … , ( R k , S k ) obtained by using a division algorithm (see Theorem 3.18) that guarantees each instance ( R i , S i ) (R_i,S_i) ( R i , S i ) has O ( 1 ) O(1) O ( 1 ) holes with respect to its parent ( R , S ) (R,S) ( R , S ) . Each S i S_i S i consists of the boundary vertices (i.e., any vertex in V ( R i ) V(R_i) V ( R i ) that also belongs to V ( R j ) V(R_j) V ( R j ) for j ≠ i j \ne i j = i ) and the subset S ∩ V ( R i ) S \cap V(R_i) S ∩ V ( R i ) of S S S that is present in R i R_i R i . Note that ( G , ∅ ) (G,\emptyset) ( G , ∅ ) is a Type-4 instance with no holes, which serves as the root of T T T .
Is of type Type-3 if ∣ R ∣ = O ( n / τ ) |R| = O(n/\tau) ∣ R ∣ = O ( n / τ ) and it contains O ( 1 ) O(1) O ( 1 ) holes. The instance ( R , S ) (R,S) ( R , S ) has only one child ( R ′ , S ′ ) (R',S') ( R ′ , S ′ ) in T T T , obtained by slicing along the path π u v \pi_{uv} π uv between the closest holes (as explained in Subsection 2.1 and Algorithm 1) with endpoints u , v u,v u , v , where π u v \pi_{uv} π uv is the shortest path between the closest holes in ( R , S ) (R,S) ( R , S ) . The terminal set S ′ S' S ′ consists of S S S and the portal set Portals ( R , π u v , ε ) \operatorname{Portals}(R,\pi_{uv},\varepsilon) Portals ( R , π uv , ε ) and its copies on π u v \pi_{uv} π uv as defined in Subsection 2.1.18
Is of type Type-2 if ∣ R ∣ = O ( n / τ ) |R| = O(n/\tau) ∣ R ∣ = O ( n / τ ) and it is a one-hole instance. The instance ( R , S ) (R,S) ( R , S ) has two children ( R 1 , S 1 ) (R_1,S_1) ( R 1 , S 1 ) and ( R 2 , S 2 ) (R_2,S_2) ( R 2 , S 2 ) in T T T , which are obtained from ( R , S ) (R,S) ( R , S ) by splitting it such that ∣ S 1 ∣ , ∣ S 2 ∣ ≤ 11 12 ∣ S ∣ |S_1|, |S_2| \le\frac{11}{12}|S| ∣ S 1 ∣ , ∣ S 2 ∣ ≤ 12 11 ∣ S ∣ using a balanced shortest path separator π u v \pi_{uv} π uv (see Theorem 3.19) with endpoints u , v u,v u , v . Again, S 1 S_1 S 1 and S 2 S_2 S 2 contain the subset of S S S that is in R 1 R_1 R 1 and R 2 R_2 R 2 , respectively, plus the portal set SplitPortals ( R , π u v , ε ) \operatorname{SplitPortals}(R,\pi_{uv},\varepsilon) SplitPortals ( R , π uv , ε ) . Somewhat surprisingly, [15 ] shows that one can pick a portal set SplitPortals ( R , π u v , ε ) \operatorname{SplitPortals}(R,\pi_{uv},\varepsilon) SplitPortals ( R , π uv , ε ) of size O ( log n / ε ) O(\log n/\varepsilon) O ( log n / ε ) that satisfies the O ( ε ) O(\varepsilon) O ( ε ) -cover property.19
Is of type Type-1 if ∣ R ∣ = O ( n / τ ) |R| = O(n/\tau) ∣ R ∣ = O ( n / τ ) , it is a one-hole instance, and ∣ S ∣ ≤ log 10 n |S| \le\log^{10} n ∣ S ∣ ≤ log 10 n . The instance ( R , S ) (R,S) ( R , S ) is a leaf node in T T T .
The pattern emulator ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) is constructed based on T T T in a bottom-up fashion: for a Type-1 instance ( R , S ) (R,S) ( R , S ) , we use [38 ] to construct an exact pattern emulator ( H , S ) (H,S) ( H , S ) of ( R , S ) (R,S) ( R , S ) of size ∣ H ∣ = poly ( log n ) |H| = \operatorname{poly}(\log n) ∣ H ∣ = poly ( log n ) (see Theorem 3.9). For any other type of instance ( R , S ) (R,S) ( R , S ) , we define its pattern emulator ( H , S ) (H,S) ( H , S ) using the pattern emulators of its children in T T T as follows.
For a Type-2 instance ( R , S ) (R,S) ( R , S ) , we obtain ( H , S ) (H,S) ( H , S ) by gluing ( H 1 , S 1 ) (H_1,S_1) ( H 1 , S 1 ) and ( H 2 , S 2 ) (H_2,S_2) ( H 2 , S 2 ) on the portals in SplitPortals ( R , π u v , ε ) \operatorname{SplitPortals}(R,\pi_{uv},\varepsilon) SplitPortals ( R , π uv , ε ) , where ( H i , S i ) (H_i,S_i) ( H i , S i ) is the pattern emulator of the child ( R i , S i ) (R_i,S_i) ( R i , S i ) in T T T for i = 1 , 2 i = 1,2 i = 1 , 2 . i.e., we glue every portal v ∈ SplitPortals ( R , π u v , ε ) ∩ V ( H 1 ) v \in\operatorname{SplitPortals}(R,\pi_{uv},\varepsilon) \cap V(H_1) v ∈ SplitPortals ( R , π uv , ε ) ∩ V ( H 1 ) with its copy in H 2 H_2 H 2 . Using induction, it follows that ∣ H ∣ = ∣ S ∣ ⋅ poly ( log n ) / ε O ( 1 ) |H| = |S| \cdot\operatorname{poly}(\log n)/\varepsilon^{O(1)} ∣ H ∣ = ∣ S ∣ ⋅ poly ( log n ) / ε O ( 1 ) .
For a Type-3 instance ( R , S ) (R,S) ( R , S ) , we obtain ( H , S ) (H,S) ( H , S ) by gluing ( H ′ , S ′ ) (H',S') ( H ′ , S ′ ) on Portals ( R , π u v , ε ) \operatorname{Portals}(R,\pi_{uv},\varepsilon) Portals ( R , π uv , ε ) ,20 where ( H ′ , S ′ ) (H',S') ( H ′ , S ′ ) is the pattern emulator of its child ( R ′ , S ′ ) (R',S') ( R ′ , S ′ ) in T T T . As we merge vertices, it follows that ∣ H ∣ = ∣ S ∣ ⋅ poly ( log n ) / ε O ( 1 ) |H| = |S| \cdot\operatorname{poly}(\log n)/\varepsilon^{O(1)} ∣ H ∣ = ∣ S ∣ ⋅ poly ( log n ) / ε O ( 1 ) .
For a Type-4 instance ( R , S ) (R,S) ( R , S ) , we set ( H , S ) (H,S) ( H , S ) as the union ⋃ i = 1 k ( H i , S i ) \bigcup_{i=1}^{k}(H_i,S_i) ⋃ i = 1 k ( H i , S i ) in T T T , where ( H i , S i ) (H_i,S_i) ( H i , S i ) is the pattern emulator of its child ( R i , S i ) (R_i,S_i) ( R i , S i ) in T T T . Using the property of the division, it follows that ∣ H ∣ = O ~ ( n τ / ε O ( 1 ) ) |H| = \widetilde{O}(\sqrt{n\tau}/\varepsilon^{O(1)}) ∣ H ∣ = O ( n τ / ε O ( 1 ) ) .
For more details on the initialization and the size guarantees, see Subsection 5.2.1.
Handling the Updates. To maintain ( H , ∅ ) (H,\emptyset) ( H , ∅ ) after each update in ( G , ∅ ) (G,\emptyset) ( G , ∅ ) , we first update the instances in T \mathcal{T} T by passing the updates in a top-down manner from the root of T \mathcal{T} T to the affected instances. After passing the updates, we recompute the pattern emulator for any affected Type-1 instances and update the pattern emulators of their ancestor instances in T \mathcal{T} T in a bottom-up fashion accordingly. i.e., if the pattern emulator of a child of ( R , S ) (R,S) ( R , S ) is updated, we then update ( H , S ) (H,S) ( H , S ) by recomputing it using the procedure explained above with the updated pattern emulators of its children. It follows that after each update in ( G , ∅ ) (G,\emptyset) ( G , ∅ ) , at most O ( log 2 n ) O(\log^2 n) O ( log 2 n ) instances in T \mathcal{T} T are affected, and they can be maintained in O ~ ( n / ( ε O ( 1 ) τ ) ) \widetilde{O}(n/(\varepsilon^{O(1)}\tau)) O ( n / ( ε O ( 1 ) τ )) amortized update time. See Subsection 5.2.2 for more details on how the updates are handled and their update guarantees.
Based on the discussion above, the maintained pattern emulator ( H , ∅ ) (H,\emptyset) ( H , ∅ ) of ( G , ∅ ) (G,\emptyset) ( G , ∅ ) is of size O ~ ( n τ / ε O ( 1 ) ) \widetilde{O}(\sqrt{n\tau}/\varepsilon^{O(1)}) O ( n τ / ε O ( 1 ) ) , which is too large for our purpose. For example, assume that we want to find a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate s s s -t t t min-cut value. We first pass s , t s,t s , t as terminal additions to ( G , ∅ ) (G,\emptyset) ( G , ∅ ) . The data structure then maintains the emulator ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) , where T = { s , t } T=\{s,t\} T = { s , t } , with an amortized update time of O ~ ( n τ / ε O ( 1 ) ) \widetilde{O}(\sqrt{n\tau}/\varepsilon^{O(1)}) O ( n τ / ε O ( 1 ) ) . Now, if we want to take the dual ( H D , T D ) (H_D,T_D) ( H D , T D ) of ( H , T ) (H,T) ( H , T ) and run a static min-cut algorithm on ( H D , T D ) (H_D,T_D) ( H D , T D ) , we end up with an O ~ ( n τ / ε O ( 1 ) ) \widetilde{O}(\sqrt{n\tau}/\varepsilon^{O(1)}) O ( n τ / ε O ( 1 ) ) query time, which is too expensive for us to afford. To overcome this issue, we use the data structure in a hierarchical way, called the pattern emulator hierarchy .
The Pattern Emulator Hierarchy.
To achieve subpolynomial update and query time, we form a hierarchy ( H 1 , T ) , … , ( H L , T ) (H_1,T),\ldots,(H_L,T) ( H 1 , T ) , … , ( H L , T ) of pattern emulators with L = log 2 / 3 n L=\log^{2/3}n L = log 2/3 n , such that ( H L , T L ) (H_L,T_L) ( H L , T L ) is of size n o ( 1 ) n^{o(1)} n o ( 1 ) and is a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximation pattern emulator of ( G , T ) (G,T) ( G , T ) . Roughly speaking, for 1 ≤ i ≤ L − 1 1\le i\le L-1 1 ≤ i ≤ L − 1 , the instance ( H i + 1 , T ) (H_{i+1},T) ( H i + 1 , T ) is a ( 1 + ε ′ ) (1+\varepsilon') ( 1 + ε ′ ) -approximate pattern emulator of ( H i , T ) (H_i,T) ( H i , T ) , where ε ′ = ε / ( 2 L ) \varepsilon'=\varepsilon/(2L) ε ′ = ε / ( 2 L ) , and ( H i + 1 , T ) (H_{i+1},T) ( H i + 1 , T ) is maintained by the dynamic data structure initialized on ( H i , T ) (H_i,T) ( H i , T ) . Before asking a query, we maintain the hierarchy such that T = ∅ T=\emptyset T = ∅ , and for each s s s -t t t min-cut query, we pass the terminal additions from ( H i , T ) (H_i,T) ( H i , T ) to ( H i + 1 , T ) (H_{i+1},T) ( H i + 1 , T ) so that T = { s , t } T=\{s,t\} T = { s , t } for all pattern emulators while answering the query. After answering the query, we revert the terminal additions so that T = ∅ T=\emptyset T = ∅ during edge updates.
Edge updates also follow this top-down approach; upon an edge update in ( G , ∅ ) (G,\emptyset) ( G , ∅ ) , we first pass the update to the data structure maintaining ( H 1 , ∅ ) (H_1,\emptyset) ( H 1 , ∅ ) , which results in a batch B 1 B_1 B 1 of updates in ( H 1 , ∅ ) (H_1,\emptyset) ( H 1 , ∅ ) . By the guarantees of the data structure, ∣ B 1 ∣ = n o ( 1 ) |B_1|=n^{o(1)} ∣ B 1 ∣ = n o ( 1 ) . We then send the batch B 1 B_1 B 1 as updates to the data structure maintaining ( H 2 , ∅ ) (H_2,\emptyset) ( H 2 , ∅ ) to obtain the batch B 2 B_2 B 2 of updates, which will be passed to ( H 3 , ∅ ) (H_3,\emptyset) ( H 3 , ∅ ) , and so on until ( H L , ∅ ) (H_L,\emptyset) ( H L , ∅ ) is updated. It follows that we can maintain the entire hierarchy in n o ( 1 ) n^{o(1)} n o ( 1 ) amortized update time. See Subsection 5.3 for more details.
Answering the Queries. Recall that to answer an s s s -t t t min-cut query for an instance ( G , T ) (G,T) ( G , T ) , we maintain the dynamic data structure on the dual instance ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) of ( G , T ) (G,T) ( G , T ) . In this case, our pattern emulator hierarchy maintains a pattern emulator ( H L , T L ) (H_L,T_L) ( H L , T L ) of ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) of size n o ( 1 ) n^{o(1)} n o ( 1 ) in n o ( 1 ) n^{o(1)} n o ( 1 ) amortized update time. Since ( H L , T L ) (H_L,T_L) ( H L , T L ) is an emulator of ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) , by the discussion we have had so far in this section, its dual instance ( H , T ) (H,T) ( H , T ) of ( H L , T L ) (H_L,T_L) ( H L , T L ) is a terminal cut sparsifier of ( G , T ) (G,T) ( G , T ) . As we keep T = ∅ T=\emptyset T = ∅ during the edge updates in ( G , T ) (G,T) ( G , T ) , upon an s s s -t t t min-cut query, we simply add s s s and t t t to T T T and maintain the pattern emulator ( H L , T L ) (H_L,T_L) ( H L , T L ) in n o ( 1 ) n^{o(1)} n o ( 1 ) amortized update time. Next, we compute ( H , T ) (H,T) ( H , T ) and run a static s s s -t t t min-cut algorithm on it (using Theorem 5.6 ), which takes n o ( 1 ) n^{o(1)} n o ( 1 ) time as the size of ( H L , T L ) (H_L,T_L) ( H L , T L ) is n o ( 1 ) n^{o(1)} n o ( 1 ) . Finally, after answering the s s s -t t t min-cut query, we revert the addition of s s s and t t t to T T T to restore the state where T = ∅ T=\varnothing T = ∅ for future updates.
Preliminaries
Graphs. All graphs in this paper are planar, weighted (capacitated), and undirected. For a graph G G G , we denote its vertex set by V ( G ) V(G) V ( G ) and its edge set by E ( G ) E(G) E ( G ) . For an n n n -vertex graph G G G , all weights (capacities) on E ( G ) E(G) E ( G ) are positive real numbers in the range [ 1 , n c ] [1,n^c] [ 1 , n c ] for some constant c c c .
For vertices u , v ∈ V ( G ) u,v\in V(G) u , v ∈ V ( G ) , we denote by dist G ( u , v ) \operatorname{dist}_G(u,v) dist G ( u , v ) the shortest distance between u u u and v v v in the graph G G G . When the graph is clear from context, we omit the subscript from dist G \operatorname{dist}_G dist G . We perturb the weights infinitesimally in a standard way so that all shortest paths are unique.
A subgraph H H H of G G G has vertex set V ( H ) ⊆ V ( G ) V(H)\subseteq V(G) V ( H ) ⊆ V ( G ) and edge set E ( H ) ⊆ E ( G ) E(H)\subseteq E(G) E ( H ) ⊆ E ( G ) , where every edge in E ( H ) E(H) E ( H ) has both endpoints in V ( H ) V(H) V ( H ) . For a subset S ⊆ V ( G ) S\subseteq V(G) S ⊆ V ( G ) , the induced subgraph G [ S ] G[S] G [ S ] is the subgraph of G G G with vertex set S S S containing all the edges in E ( G ) E(G) E ( G ) with both endpoints in S S S . Similarly, for a subset E ⊆ E ( G ) E\subseteq E(G) E ⊆ E ( G ) , the subgraph G [ E ] G[E] G [ E ] is the subgraph of G G G with edge set E E E and vertex set consisting of the endpoints of E E E . For an edge e ∈ E ( G ) e\in E(G) e ∈ E ( G ) , we denote by G ∖ e G\setminus e G ∖ e the subgraph of G G G defined on the vertex set V ( G ) V(G) V ( G ) with the edge set E ( G ) ∖ { e } E(G)\setminus\{e\} E ( G ) ∖ { e } .
Given two graphs G 1 G_1 G 1 and G 2 G_2 G 2 , we define their union G 1 ∪ G 2 G_1\cup G_2 G 1 ∪ G 2 as the graph with vertex set V ( G 1 ) ∪ V ( G 2 ) V(G_1)\cup V(G_2) V ( G 1 ) ∪ V ( G 2 ) and edge set E ( G 1 ) ∪ E ( G 2 ) E(G_1)\cup E(G_2) E ( G 1 ) ∪ E ( G 2 ) .
Graph Embedding. Throughout the paper, every planar graph is assumed to be given together with a fixed plane embedding. We use the combinatorial representation of this embedding, namely its rotation system . Specifically, for each vertex v ∈ V ( G ) v\in V(G) v ∈ V ( G ) , the combinatorial embedding specifies a cyclic order e 0 , e 1 , … , e k − 1 e_0,e_1,\ldots,e_{k-1} e 0 , e 1 , … , e k − 1 of the edges incident to v v v , such that in the planar embedding, every e i e_i e i lies between e i − 1 e_{i-1} e i − 1 and e i + 1 e_{i+1} e i + 1 in the cyclic order, with indices modulo k k k .
The embedding is part of the input and is maintained under updates. Edge insertions are allowed only if they preserve planarity. More precisely, an insertion of an edge u v uv uv is assumed to be accompanied by the positions of the new incidences at u u u and at v v v in the cyclic orders for u u u and v v v , and we only allow such insertions when the resulting rotation system is planar.
Faces and Holes. The fixed embedding of G G G divides the plane into regions called faces of G G G . The boundary of a face is a closed walk in G G G ; in particular, an edge may appear more than once on a face boundary. We say that a face contains a vertex if the vertex lies on its boundary.
Given a set T ⊆ V ( G ) T\subseteq V(G) T ⊆ V ( G ) of terminals, we denote by H ( G , T ) \mathcal{H}(G,T) H ( G , T ) a minimal set of faces of G G G that covers T T T , i.e., for each t ∈ T t\in T t ∈ T , there is at least one face in H ( G , T ) \mathcal{H}(G,T) H ( G , T ) that contains t t t . We call each face in H ( G , T ) \mathcal{H}(G,T) H ( G , T ) a hole, and denote the number of holes in G G G by h = ∣ H ( G , T ) ∣ h=|\mathcal{H}(G,T)| h = ∣ H ( G , T ) ∣ .
Paths and Cycles. A path P P P in G G G is a sequence of vertices v 1 − v 2 − ⋯ − v k + 1 v_1-v_2-\cdots-v_{k+1} v 1 − v 2 − ⋯ − v k + 1 such that v i v i + 1 ∈ E ( G ) v_i v_{i+1}\in E(G) v i v i + 1 ∈ E ( G ) for 1 ≤ i ≤ k 1\leq i\leq k 1 ≤ i ≤ k . The length ∣ P ∣ |P| ∣ P ∣ of a path P P P is defined as the sum of the weights of the edges in P P P . If v i ≠ v j v_i\ne v_j v i = v j for i ≠ j i\ne j i = j , then we say P P P is a simple path . We allow paths to repeat vertices unless explicitly called simple.
We denote by V ( P ) : = { v 1 , … , v k + 1 } V(P):=\{v_1,\ldots,v_{k+1}\} V ( P ) := { v 1 , … , v k + 1 } and E G ( P ) E_G(P) E G ( P ) the multiset of edges present in P P P within G G G , i.e., every edge v i v i + 1 v_i v_{i+1} v i v i + 1 for 1 ≤ i ≤ k 1\leq i\leq k 1 ≤ i ≤ k , along with the number of times it is traversed using P P P .
We define tail ( P ) : = v 1 \operatorname{tail}(P) := v_1 tail ( P ) := v 1 and head ( P ) : = v k + 1 \operatorname{head}(P) := v_{k+1} head ( P ) := v k + 1 . For 1 ≤ i ≤ j ≤ k + 1 1 \leq i \leq j \leq k+1 1 ≤ i ≤ j ≤ k + 1 , we denote by P [ v i , v j ] P[v_i,v_j] P [ v i , v j ] the subpath v i − v i + 1 − ⋯ − v j − 1 − v j v_i-v_{i+1}-\cdots-v_{j-1}-v_j v i − v i + 1 − ⋯ − v j − 1 − v j of P P P . We also denote by P ← \overleftarrow{P} P the path obtained by traversing P P P in the reverse direction. i.e., we define P ← : = v k + 1 − v k − ⋯ − v 1 \overleftarrow{P} := v_{k+1}-v_k-\cdots-v_1 P := v k + 1 − v k − ⋯ − v 1 .
For a path Q : = v k + 1 − v k + 2 − ⋯ − v l Q := v_{k+1}-v_{k+2}-\cdots-v_l Q := v k + 1 − v k + 2 − ⋯ − v l , we denote by P ∘ Q P \circ Q P ∘ Q the path resulting from concatenating P P P and Q Q Q . Formally, we define P ∘ Q : = v 1 − v 2 − ⋯ − v k + 1 − v k + 2 − ⋯ − v l P \circ Q := v_1-v_2-\cdots-v_{k+1}-v_{k+2}-\cdots-v_l P ∘ Q := v 1 − v 2 − ⋯ − v k + 1 − v k + 2 − ⋯ − v l .
For a collection of simple paths P \mathcal{P} P in G G G , we denote by M G [ P ] \mathcal{M}_G[\mathcal{P}] M G [ P ] the graph where (1) v ∈ V ( M G [ P ] ) v \in V(\mathcal{M}_G[\mathcal{P}]) v ∈ V ( M G [ P ]) if and only if v ∈ tail ( P ) v \in\operatorname{tail}(P) v ∈ tail ( P ) or v ∈ head ( P ) v \in\operatorname{head}(P) v ∈ head ( P ) for a path P ∈ P P \in\mathcal{P} P ∈ P , and (2) for every path P ∈ P P \in\mathcal{P} P ∈ P , there is an edge in M G [ P ] \mathcal{M}_G[\mathcal{P}] M G [ P ] connecting tail ( P ) \operatorname{tail}(P) tail ( P ) and head ( P ) \operatorname{head}(P) head ( P ) with weight ∣ P ∣ |P| ∣ P ∣ . We drop the subscript G G G from M G [ P ] \mathcal{M}_G[\mathcal{P}] M G [ P ] whenever it is clear from the context.
Let R R R be a simple u u u -v v v path connecting two holes in G G G , and let u ′ u' u ′ be the vertex succeeding u u u on its hole in clockwise order, and v ′ v' v ′ be the vertex preceding v v v on its hole in clockwise order. Let e R − , e R + e_R^-,e_R^+ e R − , e R + be the edges of u ′ − R − v ′ u'-R-v' u ′ − R − v ′ incident to some vertex w ∈ V ( R ) w \in V(R) w ∈ V ( R ) , and let e P − , e P + e_P^-,e_P^+ e P − , e P + be the edges of P P P incident to w w w in an occurrence of w w w on P P P . We say that P P P crosses R R R at w w w if these four incidences are distinct and appear around w w w in one of the two alternating orders: e R − , e P − , e R + , e P + e_R^-,e_P^-,e_R^+,e_P^+ e R − , e P − , e R + , e P + or e R − , e P + , e R + , e P − e_R^-,e_P^+,e_R^+,e_P^- e R − , e P + , e R + , e P − , up to cyclic rotation. We say that P P P crosses R R R if this condition holds at some vertex of R R R .
A closed curve C C C in G G G is a sequence of vertices v 1 − v 2 − ⋯ − v k + 1 v_1-v_2-\cdots-v_{k+1} v 1 − v 2 − ⋯ − v k + 1 such that v i v i + 1 ∈ E ( G ) v_i v_{i+1} \in E(G) v i v i + 1 ∈ E ( G ) for 1 ≤ i ≤ k 1 \leq i \leq k 1 ≤ i ≤ k and v 1 = v k + 1 v_1=v_{k+1} v 1 = v k + 1 . We say C C C is simple if v i v_i v i appears exactly once in C C C for 2 ≤ i ≤ k 2 \leq i \leq k 2 ≤ i ≤ k and exactly twice for i = 1 , k + 1 i=1,k+1 i = 1 , k + 1 . We denote V ( C ) : = { v 1 , … , v k + 1 } V(C) := \{v_1,\ldots,v_{k+1}\} V ( C ) := { v 1 , … , v k + 1 } .
Dynamic Instances. Given a planar graph G G G , an instance is a tuple ( G , T ) (G,T) ( G , T ) where T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) is a set of terminal vertices. As we allow edge insertions and deletions in G G G , and terminal additions and removals in T T T , we define the following updates on ( G , T ) (G,T) ( G , T ) :
Insertion (respectively, deletion) of u v uv uv into (respectively, from) ( G , T ) (G,T) ( G , T ) : edge u v uv uv is inserted into (respectively, deleted from) G G G .
Addition (respectively, removal) of u u u to (respectively, from) ( G , T ) (G,T) ( G , T ) : vertex u u u is added to (respectively, removed from) T T T .
We define the size of ( G , T ) (G,T) ( G , T ) as ∣ ( G , T ) ∣ = ∣ V ( G ) ∣ + ∣ E ( G ) ∣ + ∣ T ∣ |(G,T)| = |V(G)| + |E(G)| + |T| ∣ ( G , T ) ∣ = ∣ V ( G ) ∣ + ∣ E ( G ) ∣ + ∣ T ∣ .
Given instances ( G 1 , T 1 ) (G_1,T_1) ( G 1 , T 1 ) and ( G 2 , T 2 ) (G_2,T_2) ( G 2 , T 2 ) , we define their union ( G 1 , T 1 ) ∪ ( G 2 , T 2 ) (G_1,T_1) \cup(G_2,T_2) ( G 1 , T 1 ) ∪ ( G 2 , T 2 ) to be an instance ( G , T ) (G,T) ( G , T ) where G = G 1 ∪ G 2 G = G_1 \cup G_2 G = G 1 ∪ G 2 and T = T 1 ∪ T 2 T = T_1 \cup T_2 T = T 1 ∪ T 2 .
Dual Graph. The standard dual G ∗ G^* G ∗ of G G G is simply obtained by associating to every face of G G G a dual vertex, and connecting the dual vertices by a dual edge if their corresponding faces in G G G have an edge in common. We allow loops and parallel edges. It follows that there is a one-to-one correspondence between the faces in G G G and the vertices in G ∗ G^* G ∗ , as well as between the edges in G G G and the edges in G ∗ G^* G ∗ . We denote the outer face of G G G by f ∞ f_\infty f ∞ and its corresponding dual vertex by v ∗ v^* v ∗ in G ∗ G^* G ∗ .
We use the standard dual graph G ∗ G^* G ∗ of G G G in the static setting when defining patterns (later in this section). In the dynamic setting, we use dual instances , which rely on a different definition of the dual graph, as discussed next.
Dual Instance. To construct the dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) of ( G , T ) (G,T) ( G , T ) , we use the dual graph as defined in [39 , 18 ] (which differs from the standard dual graph defined above). Given an instance ( G , T ) (G,T) ( G , T ) , the dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) of ( G , T ) (G,T) ( G , T ) is constructed as follows. For every hole h ∈ H ( G , T ) h \in\mathcal{H}(G,T) h ∈ H ( G , T ) , we add an auxiliary vertex x h x_h x h and connect x h x_h x h to every terminal on h h h . This divides h h h into faces that are in one-to-one correspondence with the terminals on h h h . We then take the standard dual of this graph. Each dual terminal related to h h h in this dual graph corresponds to the face to which the terminal was assigned while dividing h h h . It follows that each terminal on h h h corresponds to a dual terminal in this dual graph. We denote T D T_D T D by the set of dual terminals. Finally, to obtain G D G_D G D , we remove every edge whose two endpoints correspond to auxiliary faces in G G G formed by connecting an auxiliary vertex x h x_h x h to the terminals on h h h . See Figure 1 for an illustration.
A more detailed discussion on the construction of ( G D , T D ) (G_D,T_D) ( G D , T D ) and how updates in G G G naturally extend to updates in G D G_D G D is given in Subsection 5.1. In summary, each edge of G G G corresponds bijectively to an edge of G D G_D G D , so an update to the weight of a primal edge induces the corresponding update in G D G_D G D .
Patterns. Before rigorously defining patterns, we provide an intuition similar to the one in [18 ] . For a closed curve γ \gamma γ in G G G , we say a vertex v ∉ V ( γ ) v \notin V(\gamma) v ∈ / V ( γ ) is inside γ \gamma γ if there exists a vertex u ∉ V ( γ ) u \notin V(\gamma) u ∈ / V ( γ ) on the outer face of G G G such that every simple u u u -v v v path crosses γ \gamma γ an odd number of times.21
For every hole h ∈ H ( G , T ) h \in\mathcal{H}(G,T) h ∈ H ( G , T ) , let z h z_h z h be an auxiliary vertex inside h h h connected to an arbitrary vertex of h h h . For a pair t 1 , t 2 ∈ T t_1,t_2 \in T t 1 , t 2 ∈ T of terminals, let S S S be the shortest t 1 t_1 t 1 -t 2 t_2 t 2 path in G G G and let P P P be any t 1 t_1 t 1 -t 2 t_2 t 2 path in G G G . The pattern of P P P in G G G , denoted by Φ G ( P ) \Phi_G(P) Φ G ( P ) , is defined as
Φ G ( P ) : = { h ∈ H ( G , T ) ∣ z h is an auxiliary vertex inside the closed curve S ∪ P } . \Phi_G(P) := \{h \in\mathcal{H}(G,T) \mid z_h \text{ is an auxiliary vertex inside the closed curve } S \cup P\}. Φ G ( P ) := { h ∈ H ( G , T ) ∣ z h is an auxiliary vertex inside the closed curve S ∪ P } .
Intuitively, Φ G ( P ) \Phi_G(P) Φ G ( P ) corresponds to all holes that are inside the closed curve formed by S ∪ P S \cup P S ∪ P . For clarity, we provide the formal definition of a closed curve below.
Definition 3.1 (Closed curve A ∪ B A \cup B A ∪ B ). Let G G G be a planar graph, and let v 1 , v 2 ∈ V ( G ) v_1,v_2 \in V(G) v 1 , v 2 ∈ V ( G ) be two vertices in G G G . Let A A A and B B B be v 1 v_1 v 1 -v 2 v_2 v 2 paths in G G G . The closed curve A ∪ B A \cup B A ∪ B is defined as
A ∪ B : = A ∘ B ← . A \cup B := A \circ\overleftarrow{B}. A ∪ B := A ∘ B .
Since our definition of patterns allows P P P to be any path, we give a precise definition of Φ G ( P ) \Phi_G(P) Φ G ( P ) in the following definitions. These definitions will later be used to generalize certain claims from [39 ] , extending them from the case where P P P is a simple path to the case where P P P is any path.22
We start by defining the parity of a face f v f_v f v with respect to a closed curve M M M . Intuitively, this parity shows whether f v f_v f v lies inside M M M (in which case the parity is one) or outside M M M (in which case the parity is zero).
Definition 3.2 (Parity of a face). Let G G G be a planar graph and f ∞ f_\infty f ∞ be its outer face. Let G ∗ G^* G ∗ be the dual of G G G and v ∗ v^* v ∗ be the dual vertex in G ∗ G^* G ∗ corresponding to f ∞ f_\infty f ∞ . For a face f v f_v f v in G G G , let v v v be the dual vertex in G ∗ G^* G ∗ corresponding to it. Let P ∗ P^* P ∗ be a simple v ∗ v^* v ∗ -v v v path in G ∗ G^* G ∗ . For a closed
curve M M M in G G G , the parity of the face f v f_v f v with respect to M M M is defined as
Par ( f v , M ) : = ∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( M ) ) ( m o d 2 ) , \operatorname{Par}(f_v,M):=\sum_{e^*\in E_{G^*}(P^*)}\operatorname{count}(e,E(M))\pmod{2}, Par ( f v , M ) := e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( M )) ( mod 2 ) ,
where E ( M ) E(M) E ( M ) is the multiset23 of edges that are present in M M M , and count ( e , E ( M ) ) \operatorname{count}(e,E(M)) count ( e , E ( M )) is the number of times the edge e e e corresponding to the dual edge e ∗ ∈ E G ∗ ( P ∗ ) e^*\in E_{G^*}(P^*) e ∗ ∈ E G ∗ ( P ∗ ) appears in E ( M ) E(M) E ( M ) .
See Figure 6 for an illustration of Definition 3.2.
Figure 6. An example illustrating Definition 3.2: (a) In graph G G G , M M M is a closed curve (depicted with orange edges). The face f v f_v f v is surrounded by some edges of M M M . (b) The dual graph G ∗ G^* G ∗ of G G G is shown in pink. The vertex v ∗ v^* v ∗ in G ∗ G^* G ∗ corresponds to the outer face of G G G , and the vertex v v v in G ∗ G^* G ∗ corresponds to the face f v f_v f v in G G G . The path P ∗ P^* P ∗ is a v ∗ v^* v ∗ -v v v path in G ∗ G^* G ∗ (depicted in green). Each edge in P ∗ P^* P ∗ corresponds to an edge in G G G (depicted in bold). Since all three of these corresponding edges in this example belong to M M M (the bold orange edges), it follows that ∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( M ) ) = 3 \sum_{e^*\in E_{G^*}(P^*)} \operatorname{count}(e,E(M))=3 ∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( M )) = 3 , and so Par ( f v , M ) = 1 \operatorname{Par}(f_v,M)=1 Par ( f v , M ) = 1 .
We note that the parity of f v f_v f v is independent of the choice of path P ∗ P^* P ∗ in Definition 3.2, as summarized in the following claim.
Claim 3.3 ([39 Claim 4.13] , Rephrased). For a fixed face f v f_v f v in G G G , let P 1 ∗ , P 2 ∗ P_1^*,P_2^* P 1 ∗ , P 2 ∗ be two v ∗ − v v^*-v v ∗ − v paths in G ∗ G^* G ∗ as defined in Definition 3.2. Then, for every closed curve M M M in G G G ,
∑ e ∗ ∈ E G ∗ ( P 1 ∗ ) count ( e , E ( M ) ) ≡ ∑ e ∗ ∈ E G ∗ ( P 2 ∗ ) count ( e , E ( M ) ) ( m o d 2 ) . \sum_{e^*\in E_{G^*}(P_1^*)}\operatorname{count}(e,E(M))\equiv\sum_{e^*\in E_{G^*}(P_2^*)}\operatorname{count}(e,E(M))\pmod{2}. e ∗ ∈ E G ∗ ( P 1 ∗ ) ∑ count ( e , E ( M )) ≡ e ∗ ∈ E G ∗ ( P 2 ∗ ) ∑ count ( e , E ( M )) ( mod 2 ) .
Definition 3.2 provides a rigorous basis for defining whether a face is inside or outside of a closed curve, formalized below.
Definition 3.4. Let G G G be a planar graph, M M M be a closed curve in G G G , and f v f_v f v be a face in G G G . Let Par ( f v , M ) \operatorname{Par}(f_v,M) Par ( f v , M ) denote the parity of f v f_v f v with respect to M M M , as defined in Definition 3.2. We say that f v f_v f v is inside M M M if Par ( f v , M ) = 1 \operatorname{Par}(f_v,M)=1 Par ( f v , M ) = 1 , and outside M M M if Par ( f v , M ) = 0 \operatorname{Par}(f_v,M)=0 Par ( f v , M ) = 0 .
We now define the pattern of a closed curve M M M . Intuitively, the pattern of M M M consists of all holes in H ( G , T ) \mathcal{H}(G,T) H ( G , T ) that lie inside M M M .
Definition 3.5 (Pattern of a closed curve). Let G G G be a planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be its terminal set, and H ( G , T ) \mathcal{H}(G,T) H ( G , T ) be the associated hole set. Let M M M be a closed curve in G G G . Then, the pattern of M M M in G G G is defined as
Φ G ( M ) : = { h ∈ H ( G , T ) ∣ Par ( h , M ) = 1 } . \Phi_G(M) := \{h \in\mathcal{H}(G,T) \mid\operatorname{Par}(h,M) = 1\}. Φ G ( M ) := { h ∈ H ( G , T ) ∣ Par ( h , M ) = 1 } .
Finally, we use Definition 3.5 to define the pattern of a v 1 v_1 v 1 -v 2 v_2 v 2 path P P P in G G G as follows. The main intuition behind this definition is to first identify a unique v 1 v_1 v 1 -v 2 v_2 v 2 path S S S in G G G , and then define the pattern of P P P as the pattern of the closed curve P ∪ S P \cup S P ∪ S using Definition 3.5 . For our later analysis, we define S S S based on another v 1 v_1 v 1 -v 2 v_2 v 2 path S ′ S' S ′ , which is the shortest v 1 v_1 v 1 -v 2 v_2 v 2 path in the sliced graph G h G_h G h of G G G (to be defined shortly), where h = ∣ H ( G , T ) ∣ h = |\mathcal{H}(G,T)| h = ∣ H ( G , T ) ∣ .24 This choice is useful because we use the sliced graph to obtain our emulator; defining S S S based on S ′ S' S ′ significantly simplifies our analysis, since S ′ S' S ′ is preserved by the slicing procedure.
The graph G h G_h G h is defined as follows. Starting with G 1 = G G_1 = G G 1 = G , for 1 ≤ i ≤ h − 1 1 \leq i \leq h - 1 1 ≤ i ≤ h − 1 , we define G i + 1 G_{i+1} G i + 1 by slicing G i G_i G i along the closest pair of holes in G i G_i G i ; we slice along the shortest path between those two holes to obtain G i + 1 G_{i+1} G i + 1 . The slicing procedure along a path R R R adds a copy R ‾ \overline{R} R of R R R to the graph and reassigns the edges on one side of R R R to R ‾ \overline{R} R . See Algorithm 1 for a precise description of the slicing procedure. The path S ′ S' S ′ naturally corresponds to a path in G G G : if S ′ S' S ′ uses a copy v ‾ \overline{v} v on R ‾ \overline{R} R , we use v v v on R R R in G G G instead.
Definition 3.6 (Pattern of a path). Let G G G be a planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be its terminal set, and H ( G , T ) \mathcal{H}(G,T) H ( G , T ) be the associated hole set. Let G h G_h G h be the one-hole graph obtained by repeatedly slicing along the closest pair of holes.25 For a pair v 1 , v 2 ∈ V ( G ) v_1,v_2 \in V(G) v 1 , v 2 ∈ V ( G ) , let P P P be a v 1 v_1 v 1 -v 2 v_2 v 2 path and S S S be the v 1 v_1 v 1 -v 2 v_2 v 2 path in G G G corresponding to the shortest v 1 v_1 v 1 -v 2 v_2 v 2 path in G h G_h G h . Then, the pattern of P P P in G G G is defined as
Φ G ( P ) : = { h ∈ H ( G , T ) ∣ Par ( h , P ∪ S ) = 1 } . \Phi_G(P) := \{h \in\mathcal{H}(G,T) \mid\operatorname{Par}(h,P \cup S) = 1\}. Φ G ( P ) := { h ∈ H ( G , T ) ∣ Par ( h , P ∪ S ) = 1 } . Moreover, for Φ = Φ G ( P ) \Phi= \Phi_G(P) Φ = Φ G ( P ) , we say that P P P is a Φ \Phi Φ -respecting v 1 v_1 v 1 -v 2 v_2 v 2 path in G G G .
We will omit the subscript G G G from Φ G \Phi_G Φ G in Definitions 3.5 and 3.6 when there is no ambiguity.
Pattern Emulator
We first discuss the definition of emulators. Intuitively, an emulator of an instance ( G , T ) (G,T) ( G , T ) is a planar graph that approximately preserves pairwise distances between vertices in T T T .
Definition 3.7 (Emulator). Let G G G be a planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. A ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate emulator of ( G , T ) (G,T) ( G , T ) is an instance ( H , T ) (H,T) ( H , T ) such that for every s , t ∈ T s,t \in T s , t ∈ T ,
dist G ( s , t ) ≤ dist H ( s , t ) ≤ ( 1 + ε ) dist G ( s , t ) . \operatorname{dist}_G(s,t) \leq\operatorname{dist}_H(s,t) \leq(1+\varepsilon)\operatorname{dist}_G(s,t). dist G ( s , t ) ≤ dist H ( s , t ) ≤ ( 1 + ε ) dist G ( s , t ) .
Note that by our convention, H H H is planar. Before proceeding, we first define aligned instances, which are used in the following theorems. Intuitively, aligned instances have similar embedding properties, allowing us to avoid discussing them further in the paper.
Definition 3.8 (Aligned Instances). Given two instances ( H , T ) (H,T) ( H , T ) and ( G , T ) (G,T) ( G , T ) defined on the same terminal set, we say that ( H , T ) (H,T) ( H , T ) and ( G , T ) (G,T) ( G , T ) are aligned if there is a bijection between the holes of ( H , T ) (H,T) ( H , T ) and ( G , T ) (G,T) ( G , T ) such that corresponding holes contain the same terminals in the same cyclic order.
We will use the following theorem to obtain an exact emulator (i.e., with zero error) of ( G , T ) (G,T) ( G , T ) .
Theorem 3.9 ([38 ] , Rephrased). Let G G G be an n n n -vertex planar graph and T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set. Then, there is an algorithm that constructs an exact planar emulator ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) of size O ( ∣ T ∣ 4 ) O(|T|^4) O ( ∣ T ∣ 4 ) in time O ( n ∣ T ∣ ) O(n|T|) O ( n ∣ T ∣ ) . Moreover, ( H , T ) (H,T) ( H , T ) is aligned with ( G , T ) (G,T) ( G , T ) .
To obtain a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate emulator of ( G , T ) (G,T) ( G , T ) , we use the following theorem.
Theorem 3.10 ([15 ] , Rephrased). Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. Then, there is an algorithm that constructs a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate emulator ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) of size O ~ ( ∣ T ∣ / ε O ( 1 ) ) \widetilde{O}(|T|/\varepsilon^{O(1)}) O ( ∣ T ∣/ ε O ( 1 ) ) in time O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) . Moreover, ( H , T ) (H,T) ( H , T ) is aligned with ( G , T ) (G,T) ( G , T ) .
We are now ready to define the notion of a pattern emulator. Intuitively, a pattern emulator maintains the shortest-path distances between terminals for every pattern.
Definition 3.11 (Pattern Emulator). Let G G G be a planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and 0 < ε 0 < \varepsilon 0 < ε be an error parameter. A ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator of ( G , T ) (G,T) ( G , T ) is an instance ( H , T ) (H,T) ( H , T ) aligned with ( G , T ) (G,T) ( G , T ) , such that for every pattern Φ \Phi Φ and every s , t ∈ T s,t \in T s , t ∈ T ,
dist G Φ ( s , t ) ≤ dist H Φ ( s , t ) ≤ ( 1 + ε ) dist G Φ ( s , t ) , \operatorname{dist}^{\Phi}_{G}(s,t) \le\operatorname{dist}^{\Phi}_{H}(s,t) \le(1+\varepsilon)\operatorname{dist}^{\Phi}_{G}(s,t), dist G Φ ( s , t ) ≤ dist H Φ ( s , t ) ≤ ( 1 + ε ) dist G Φ ( s , t ) , where dist G Φ ( s , t ) \operatorname{dist}^{\Phi}_{G}(s,t) dist G Φ ( s , t ) is the distance of the shortest Φ \Phi Φ -respecting s s s -t t t path in G G G .
We now present two properties for pattern emulators: (1) transitivity, which states that a pattern emulator of a pattern emulator of G G G is itself a pattern emulator of G G G , albeit with slightly weaker approximation guarantees, and (2) composability, which states that the union of two pattern emulators of edge-disjoint graphs forms a pattern emulator of the union graph, provided the graphs share only terminal vertices in their vertex sets.
Lemma 3.12 (Transitivity of Pattern Emulators). Let ( H , T ) (H,T) ( H , T ) be a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator of ( G , T ) (G,T) ( G , T ) , and ( H ′ , T ′ ) (H',T') ( H ′ , T ′ ) be a ( 1 + ε ′ ) (1+\varepsilon') ( 1 + ε ′ ) -approximate pattern emulator of ( H , T ′ ) (H,T') ( H , T ′ ) , where T ′ ⊇ T T' \supseteq T T ′ ⊇ T , T ′ ⊆ V ( H ) T' \subseteq V(H) T ′ ⊆ V ( H ) , and T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) . Then, ( H ′ , T ) (H',T) ( H ′ , T ) is a ( 1 + ε ) ( 1 + ε ′ ) (1+\varepsilon)(1+\varepsilon') ( 1 + ε ) ( 1 + ε ′ ) -approximate pattern emulator of ( G , T ) (G,T) ( G , T ) .
Proof. Suppose that s , t ∈ T s,t \in T s , t ∈ T and let Φ \Phi Φ be a pattern. By assumption, s , t ∈ T ′ s,t \in T' s , t ∈ T ′ , and we have
dist H ′ Φ ( s , t ) ≤ ( 1 + ε ′ ) ⋅ dist H Φ ( s , t ) ≤ ( 1 + ε ) ( 1 + ε ′ ) ⋅ dist G Φ ( s , t ) . \operatorname{dist}^{\Phi}_{H'}(s,t) \le(1+\varepsilon') \cdot\operatorname{dist}^{\Phi}_{H}(s,t) \le(1+\varepsilon)(1+\varepsilon') \cdot\operatorname{dist}^{\Phi}_{G}(s,t). dist H ′ Φ ( s , t ) ≤ ( 1 + ε ′ ) ⋅ dist H Φ ( s , t ) ≤ ( 1 + ε ) ( 1 + ε ′ ) ⋅ dist G Φ ( s , t ) .
The first inequality holds because ( H ′ , T ′ ) (H',T') ( H ′ , T ′ ) is a ( 1 + ε ′ ) (1+\varepsilon') ( 1 + ε ′ ) -approximate pattern emulator of ( H , T ′ ) (H,T') ( H , T ′ ) , and the second inequality holds because T ⊆ T ′ T \subseteq T' T ⊆ T ′ and ( H , T ) (H,T) ( H , T ) is a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator of ( G , T ) (G,T) ( G , T ) .
For the lower bound, we similarly have
dist H ′ Φ ( s , t ) ≥ dist H Φ ( s , t ) ≥ dist G Φ ( s , t ) , \operatorname{dist}^{\Phi}_{H'}(s,t) \ge\operatorname{dist}^{\Phi}_{H}(s,t) \ge\operatorname{dist}^{\Phi}_{G}(s,t), dist H ′ Φ ( s , t ) ≥ dist H Φ ( s , t ) ≥ dist G Φ ( s , t ) ,
where the first inequality holds as ( H ′ , T ′ ) (H',T') ( H ′ , T ′ ) is a ( 1 + ε ′ ) (1+\varepsilon') ( 1 + ε ′ ) -approximate pattern emulator of ( H , T ′ ) (H,T') ( H , T ′ ) , and the second inequality holds as T ⊆ T ′ T \subseteq T' T ⊆ T ′ and ( H , T ) (H,T) ( H , T ) is a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator of ( G , T ) (G,T) ( G , T ) .
Lemma 3.13 (Composability of Pattern Emulators). Let ( G 1 , T 1 ) (G_1,T_1) ( G 1 , T 1 ) and ( G 2 , T 2 ) (G_2,T_2) ( G 2 , T 2 ) be two instances with V ( G 1 ) ∩ V ( G 2 ) ⊆ T 1 ∩ T 2 V(G_1)\cap V(G_2)\subseteq T_1\cap T_2 V ( G 1 ) ∩ V ( G 2 ) ⊆ T 1 ∩ T 2 . If ( H i , T i ) (H_i,T_i) ( H i , T i ) is a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator of ( G i , T i ) (G_i,T_i) ( G i , T i ) for i = 1 , 2 i=1,2 i = 1 , 2 , then H : = H 1 ∪ H 2 H:=H_1\cup H_2 H := H 1 ∪ H 2 is a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator of ( G , T ) : = ( G 1 ∪ G 2 , T 1 ∪ T 2 ) (G,T):=(G_1\cup G_2,T_1\cup T_2) ( G , T ) := ( G 1 ∪ G 2 , T 1 ∪ T 2 ) .
Proof. Suppose that s , t ∈ T s,t\in T s , t ∈ T and let Φ \Phi Φ be a pattern. Let P P P be the shortest Φ \Phi Φ -respecting s s s -t t t path in G G G . Without loss of generality, suppose that s ∈ V ( G 1 ) s\in V(G_1) s ∈ V ( G 1 ) . Then, path P P P decomposes into subpaths P 1 , P 2 , … , P q P_1,P_2,\ldots,P_q P 1 , P 2 , … , P q , such that P 1 , P 3 , … P_1,P_3,\ldots P 1 , P 3 , … are fully contained in G 1 G_1 G 1 and P 2 , P 4 , … P_2,P_4,\ldots P 2 , P 4 , … are fully contained in G 2 G_2 G 2 . Let s i , t i s_i,t_i s i , t i be the endpoints of P i P_i P i , and Φ i \Phi_i Φ i be the pattern of P i P_i P i in the graph containing it (i.e., in G 1 G_1 G 1 or G 2 G_2 G 2 ). It then follows that P i P_i P i is a Φ i \Phi_i Φ i -respecting s i s_i s i -t i t_i t i shortest path in the graph containing it, since otherwise we could construct a path shorter than P P P with the same pattern Φ \Phi Φ .27 We have
dist H Φ ( s , t ) = ∑ i = 1 q dist H Φ i ( s i , t i ) = ∑ i = 1 ⌈ q / 2 ⌉ dist H 1 Φ 2 i − 1 ( s 2 i − 1 , t 2 i − 1 ) + ∑ i = 1 ⌊ q / 2 ⌋ dist H 2 Φ 2 i ( s 2 i , t 2 i ) ≤ ( 1 + ε ) ∑ i = 1 ⌈ q / 2 ⌉ dist G 1 Φ 2 i − 1 ( s 2 i − 1 , t 2 i − 1 ) + ( 1 + ε ) ∑ i = 1 ⌊ q / 2 ⌋ dist G 2 Φ 2 i ( s 2 i , t 2 i ) = ( 1 + ε ) ∑ i = 1 q dist G Φ i ( s i , t i ) = ( 1 + ε ) dist G Φ ( s , t ) . \begin{aligned}
\operatorname{dist}_{H}^{\Phi}(s,t)
&=\sum_{i=1}^{q}\operatorname{dist}_{H}^{\Phi_i}(s_i,t_i)\\
&=\sum_{i=1}^{\lceil q/2\rceil}\operatorname{dist}_{H_1}^{\Phi_{2i-1}}(s_{2i-1},t_{2i-1})+\sum_{i=1}^{\lfloor q/2\rfloor}\operatorname{dist}_{H_2}^{\Phi_{2i}}(s_{2i},t_{2i})\\
&\le(1+\varepsilon)\sum_{i=1}^{\lceil q/2\rceil}\operatorname{dist}_{G_1}^{\Phi_{2i-1}}(s_{2i-1},t_{2i-1})+(1+\varepsilon)\sum_{i=1}^{\lfloor q/2\rfloor}\operatorname{dist}_{G_2}^{\Phi_{2i}}(s_{2i},t_{2i})\\
&=(1+\varepsilon)\sum_{i=1}^{q}\operatorname{dist}_{G}^{\Phi_i}(s_i,t_i)\\
&=(1+\varepsilon)\operatorname{dist}_{G}^{\Phi}(s,t).
\end{aligned} dist H Φ ( s , t ) = i = 1 ∑ q dist H Φ i ( s i , t i ) = i = 1 ∑ ⌈ q /2 ⌉ dist H 1 Φ 2 i − 1 ( s 2 i − 1 , t 2 i − 1 ) + i = 1 ∑ ⌊ q /2 ⌋ dist H 2 Φ 2 i ( s 2 i , t 2 i ) ≤ ( 1 + ε ) i = 1 ∑ ⌈ q /2 ⌉ dist G 1 Φ 2 i − 1 ( s 2 i − 1 , t 2 i − 1 ) + ( 1 + ε ) i = 1 ∑ ⌊ q /2 ⌋ dist G 2 Φ 2 i ( s 2 i , t 2 i ) = ( 1 + ε ) i = 1 ∑ q dist G Φ i ( s i , t i ) = ( 1 + ε ) dist G Φ ( s , t ) .
The lower-bound guarantee of the pattern emulator can be obtained similarly. It follows that ( H , T ) (H,T) ( H , T ) , where H = H 1 ∪ H 2 H=H_1\cup H_2 H = H 1 ∪ H 2 and T = T 1 ∪ T 2 T=T_1\cup T_2 T = T 1 ∪ T 2 , is a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator of ( G , T ) (G,T) ( G , T ) .
Finally, we use the following theorem to relate pattern emulators to terminal cut sparsifiers.
Theorem 3.14 ([18 Theorem 16] and [39 Theorem 4.6] , Rephrased). Let ( G D , T D ) (G_D,T_D) ( G D , T D ) be the dual instance of ( G , T ) (G,T) ( G , T ) , 0 < ε ≤ 1 0<\varepsilon\le1 0 < ε ≤ 1 be an error parameter, and let ( H D , T D ) (H_D,T_D) ( H D , T D ) be an instance aligned with ( G D , T D ) (G_D,T_D) ( G D , T D ) whose primal instance is ( H , T ) (H,T) ( H , T ) . If ( H D , T D ) (H_D,T_D) ( H D , T D ) is a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator of ( G D , T D ) (G_D,T_D) ( G D , T D ) , then ( H , T ) (H,T) ( H , T ) is a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier of ( G , T ) (G,T) ( G , T ) .
Cuts. For an instance ( G , T ) (G,T) ( G , T ) and a subset ∅ ⊂ R ⊂ T \varnothing\subset R\subset T ∅ ⊂ R ⊂ T of terminals, we denote by mincut G ( R , T ∖ R ) \operatorname{mincut}_G(R,T\setminus R) mincut G ( R , T ∖ R ) the value of the minimum cut in G G G that separates R R R from T ∖ R T\setminus R T ∖ R . Using this terminology, we now define terminal cut sparsifiers.
Definition 3.15 (Terminal Cut Sparsifier). Let G G G be a planar graph, T ⊆ V ( G ) T\subseteq V(G) T ⊆ V ( G ) a terminal set, and 0 < ε < 1 0<\varepsilon<1 0 < ε < 1 an error parameter. A ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier of ( G , T ) (G,T) ( G , T ) is an instance ( H , T ) (H,T) ( H , T ) such that for every subset ∅ ⊂ R ⊂ T \varnothing\subset R\subset T ∅ ⊂ R ⊂ T of terminals,
mincut G ( R , T ∖ R ) ≤ mincut H ( R , T ∖ R ) ≤ ( 1 + ε ) mincut G ( R , T ∖ R ) . \operatorname{mincut}_G(R,T\setminus R)\le\operatorname{mincut}_H(R,T\setminus R)\le(1+\varepsilon)\operatorname{mincut}_G(R,T\setminus R). mincut G ( R , T ∖ R ) ≤ mincut H ( R , T ∖ R ) ≤ ( 1 + ε ) mincut G ( R , T ∖ R ) .
Structured Divisions. We will use structured divisions, defined below, to compute a terminal cut sparsifier for a graph with an arbitrary number of holes. Intuitively, we use structured divisions to evenly distribute the terminal vertices across smaller subgraphs.
Definition 3.16 (Structured r r r -Division). Given an n n n -vertex planar graph G G G , a parameter 1 ≤ r ≤ n 1 \le r \le n 1 ≤ r ≤ n , and a terminal set T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) , a structured r r r -division of ( G , T ) (G,T) ( G , T ) is a partition of E ( G ) E(G) E ( G ) into k k k subsets E 1 , … , E k E_1,\ldots,E_k E 1 , … , E k such that
Each edge-induced subgraph G [ E i ] G[E_i] G [ E i ] (called a piece) has O ( r ) O(r) O ( r ) vertices, and
Each piece has O ( r ) O(\sqrt{r}) O ( r ) boundary vertices, where a boundary vertex is a vertex shared with another piece, and
There are k = O ( n / r ) k = O(n/r) k = O ( n / r ) pieces in the r r r -division, and
Each piece contains O ( 1 + ∣ T ∣ / k ) O(1 + |T|/k) O ( 1 + ∣ T ∣/ k ) terminals from T T T .
We note that the above definition is an extension of r r r -division [36 ] with the extra property that the terminals in T T T are evenly distributed among the pieces. We use the following theorem to construct a structured r r r -division, ensuring that each piece has a constant number of holes.
Theorem 3.17 ([16 Lemma 5.5] , Rephrased). Given an n n n -vertex planar graph G G G , a parameter 1 ≤ r ≤ n 1 \le r \le n 1 ≤ r ≤ n , and a terminal set T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) , there is an algorithm that computes a structured r r r -division of ( G , T ) (G,T) ( G , T ) in O ( n ) O(n) O ( n ) time such that each piece is connected and has O ( 1 ) O(1) O ( 1 ) holes.
The r r r -division theorem of [36 ] is stated below. Note that [36 ] guarantees O ( 1 ) O(1) O ( 1 ) holes in the pieces only when ( G , T ) (G,T) ( G , T ) itself has O ( 1 ) O(1) O ( 1 ) holes.
Theorem 3.18 ([36 ] ). Given an n n n -vertex planar graph G G G and a terminal set T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) on h h h holes, there is an algorithm that computes an r r r -division of ( G , T ) (G,T) ( G , T ) satisfying items 1 to 3 of Definition 3.16 in O ( n ) O(n) O ( n ) time such that, for every 1 ≤ i ≤ k 1 \le i \le k 1 ≤ i ≤ k , the piece G [ E i ] G[E_i] G [ E i ] has at most 3 4 h + 4 \frac{3}{4}h + 4 4 3 h + 4 holes.
Separators. We use separators to split a one-hole instance ( G , T ) (G,T) ( G , T ) into two instances with fewer terminals. The following theorem will be used in § 6 . An edge e e e is called a bridge in G G G if G ∖ e G \setminus e G ∖ e has more connected components than G G G .
Theorem 3.19 ([21 Theorem 3.10] , Rephrased). Given an n n n -vertex planar graph G G G and a terminal set T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) on a single hole, there is an algorithm that finds vertices u , v u,v u , v on the hole of ( G , T ) (G,T) ( G , T ) in O ( n ) O(n) O ( n ) time such that the two terminal intervals on the hole bounded by u u u and v v v contain at most 11 12 ∣ T ∣ \frac{11}{12}|T| 12 11 ∣ T ∣ terminals each, and at least one of the following holds.
The shortest path π u v \pi_{uv} π uv in G G G does not contain a bridge.
The edge u v ∈ E ( G ) uv \in E(G) uv ∈ E ( G ) exists and is a bridge.
Portals. In our sparsifier constructions, we use the slicing scheme of [15 ] , where we pick a shortest path R R R in G G G and slice along it to reduce the number of holes in the resulting instance by one (see Algorithm 1 for a detailed explanation of the slicing procedure). To maintain the distances within a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) factor, we pick some vertices on the sliced path R R R , called portals . The path R R R is chosen as the shortest path between any two holes of G G G , and the portals on R R R form an ε \varepsilon ε -cover for T T T . i.e., for every terminal t ∈ T t \in T t ∈ T not on R R R and every vertex r ∈ V ( R ) r \in V(R) r ∈ V ( R ) , there is a portal p p p that satisfies the ε \varepsilon ε -cover property
dist ( t , r ) ≤ dist ( t , p ) + dist ( p , r ) ≤ ( 1 + ε ) dist ( t , r ) . (1) \operatorname{dist}(t,r) \le\operatorname{dist}(t,p) + \operatorname{dist}(p,r) \le(1+\varepsilon)\operatorname{dist}(t,r). \tag*{(1)} dist ( t , r ) ≤ dist ( t , p ) + dist ( p , r ) ≤ ( 1 + ε ) dist ( t , r ) . (1)
Our algorithm for computing an ε \varepsilon ε -cover is as follows. For each t ∈ T t \in T t ∈ T , the algorithm first finds the shortest path Δ t \Delta_t Δ t from t t t to R R R .28 Let x x x be the closest vertex to t t t on R R R . Then, the algorithm finds the portal set PORTALS( R , t , ε ) (R,t,\varepsilon) ( R , t , ε ) on the two maximal subpaths of R R R that have x x x as one endpoint. The portal set is obtained using the following two procedures.
Starting from x x x , the algorithm keeps adding vertices with distance ε ∣ Δ t ∣ \varepsilon|\Delta_t| ε ∣ Δ t ∣ from each other until it reaches a vertex y y y with dist ( x , y ) > 2 ∣ Δ t ∣ \operatorname{dist}(x,y)>2|\Delta_t| dist ( x , y ) > 2∣ Δ t ∣ . i.e., starting from x x x , it adds the sequence z 1 , z 2 , … z_1,z_2,\ldots z 1 , z 2 , … of vertices, where each z i z_i z i is the first vertex visited from x x x with dist ( x , z i ) > i ε ∣ Δ t ∣ \operatorname{dist}(x,z_i)>i\varepsilon|\Delta_t| dist ( x , z i ) > i ε ∣ Δ t ∣ and dist ( x , z i ) ≤ 2 ∣ Δ t ∣ \operatorname{dist}(x,z_i)\le2|\Delta_t| dist ( x , z i ) ≤ 2∣ Δ t ∣ . Thus, the number of selected portals in the sequence is O ( 1 / ε ) O(1/\varepsilon) O ( 1/ ε ) .
Once the algorithm reaches an edge y ′ y y'y y ′ y with dist ( x , y ) > 2 ∣ Δ t ∣ \operatorname{dist}(x,y)>2|\Delta_t| dist ( x , y ) > 2∣ Δ t ∣ , it adds y y y and y ′ y' y ′ to the portal set. Then, starting from y y y , it traverses to the other endpoint until it reaches the first edge z ′ z z'z z ′ z (if any) with dist ( x , z ) > ( 1 + ε ) dist ( x , y ) \operatorname{dist}(x,z)>(1+\varepsilon)\operatorname{dist}(x,y) dist ( x , z ) > ( 1 + ε ) dist ( x , y ) . Then, it adds z z z and z ′ z' z ′ to the portal set and repeats the procedure for z z z as y y y . i.e., it sets y = z y=z y = z and keeps traversing to the other endpoint until it reaches an edge w ′ w w'w w ′ w (if any) such that dist ( x , w ) > ( 1 + ε ) dist ( x , y ) \operatorname{dist}(x,w)>(1+\varepsilon)\operatorname{dist}(x,y) dist ( x , w ) > ( 1 + ε ) dist ( x , y ) . It then adds w w w and w ′ w' w ′ to the portal set, and then repeats the procedure for y = w y=w y = w . The procedure continues until the algorithm reaches the other endpoint of the subpath. Since the weights are polynomial in n n n , the number of selected portals is O ( log n / ε ) O(\log n/\varepsilon) O ( log n / ε ) .
The following lemma summarizes the guarantees for computing the portals. The proof is similar to that of [16 ] , Lemma 2.4 and is thus omitted.
Lemma 3.20. Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set lying on h h h holes, and 0 < ε < 1 0<\varepsilon<1 0 < ε < 1 be an error parameter. Let R R R be a shortest path in G G G . Then, there exists an algorithm that computes the set PORTALS( R , T , ε ) : = ⋃ t ∈ T (R,T,\varepsilon):=\bigcup_{t\in T} ( R , T , ε ) := ⋃ t ∈ T PORTALS( R , t , ε ) (R,t,\varepsilon) ( R , t , ε ) , which lies on R R R and has size O ( ∣ T ∣ log n / ε ) O(|T|\log n/\varepsilon) O ( ∣ T ∣ log n / ε ) , in time O ( n h log ∣ T ∣ ) O(nh\log|T|) O ( nh log ∣ T ∣ ) .
We will use the following claim to bound the approximation guarantee of our algorithm.
Claim 3.21. Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and 0 < ε < 1 0<\varepsilon<1 0 < ε < 1 be an error parameter. Let R R R be a shortest path in G G G on which an ε \varepsilon ε -cover PORTALS( R , T , ε ) (R,T,\varepsilon) ( R , T , ε ) is computed as defined in Lemma 3.20. Then, for any t 1 t_1 t 1 -t 2 t_2 t 2 path P P P with t 1 , t 2 ∈ T t_1,t_2 \in T t 1 , t 2 ∈ T , if P P P crosses R R R , the distance from any crossing vertex on R R R to its closest portal is O ( ε ∣ P ∣ ) O(\varepsilon|P|) O ( ε ∣ P ∣ ) .
Proof. Let x x x be the closest vertex on R R R to t 1 t_1 t 1 , and let Δ t 1 \Delta_{t_1} Δ t 1 be a shortest path from t 1 t_1 t 1 to R R R , and let ∣ Δ t 1 ∣ = dist ( t 1 , x ) |\Delta_{t_1}|=\operatorname{dist}(t_1,x) ∣ Δ t 1 ∣ = dist ( t 1 , x ) . Suppose that P P P crosses R R R on the subpath R [ v i , v i + 1 ] R[v_i,v_{i+1}] R [ v i , v i + 1 ] , where v i v_i v i and v i + 1 v_{i+1} v i + 1 are the i i i -th and ( i + 1 ) (i+1) ( i + 1 ) -th portals selected based on item 2 of the construction. As P P P crosses R R R , it follows that ∣ P ∣ ≥ ∣ Δ t 1 ∣ |P|\ge|\Delta_{t_1}| ∣ P ∣ ≥ ∣ Δ t 1 ∣ .
Let v ′ v' v ′ be a vertex in the subpath R [ v i , v i + 1 ] R[v_i,v_{i+1}] R [ v i , v i + 1 ] where P P P crosses. If v ′ = v i v'=v_i v ′ = v i or v ′ = v i + 1 v'=v_{i+1} v ′ = v i + 1 , the claim trivially follows. Otherwise, we assume v ′ ≠ v i v'\ne v_i v ′ = v i and v ′ ≠ v i + 1 v'\ne v_{i+1} v ′ = v i + 1 .
We analyze the following two distinct cases.
If dist ( x , v ′ ) ≤ 2 ∣ Δ t 1 ∣ \operatorname{dist}(x,v')\le2|\Delta_{t_1}| dist ( x , v ′ ) ≤ 2∣ Δ t 1 ∣ : By item 1 of the construction, there exists a portal z i z_i z i within a distance of O ( ε ∣ Δ t 1 ∣ ) O(\varepsilon|\Delta_{t_1}|) O ( ε ∣ Δ t 1 ∣ ) from v ′ v' v ′ . Since ∣ P ∣ ≥ ∣ Δ t 1 ∣ |P|\ge|\Delta_{t_1}| ∣ P ∣ ≥ ∣ Δ t 1 ∣ , the claim follows directly.
If dist ( x , v ′ ) > 2 ∣ Δ t 1 ∣ \operatorname{dist}(x,v') > 2|\Delta_{t_1}| dist ( x , v ′ ) > 2∣ Δ t 1 ∣ : By item 2 of the construction, we have
( 1 + ε ) i ∣ Δ t 1 ∣ ≤ dist ( x , v ′ ) ≤ ( 1 + ε ) i + 1 ∣ Δ t 1 ∣ . (1+\varepsilon)^i|\Delta_{t_1}| \le\operatorname{dist}(x,v') \le(1+\varepsilon)^{i+1}|\Delta_{t_1}|. ( 1 + ε ) i ∣ Δ t 1 ∣ ≤ dist ( x , v ′ ) ≤ ( 1 + ε ) i + 1 ∣ Δ t 1 ∣.
Consequently, the distance d d d between v ′ v' v ′ and its nearest portal satisfies
d ≤ ( 1 + ε ) i + 1 ∣ Δ t 1 ∣ − ( 1 + ε ) i ∣ Δ t 1 ∣ = ε ( 1 + ε ) i ∣ Δ t 1 ∣ ≤ ε dist ( x , v ′ ) . (2) d \le(1+\varepsilon)^{i+1}|\Delta_{t_1}|-(1+\varepsilon)^i|\Delta_{t_1}|=\varepsilon(1+\varepsilon)^i|\Delta_{t_1}| \le\varepsilon\operatorname{dist}(x,v'). \tag*{(2)} d ≤ ( 1 + ε ) i + 1 ∣ Δ t 1 ∣ − ( 1 + ε ) i ∣ Δ t 1 ∣ = ε ( 1 + ε ) i ∣ Δ t 1 ∣ ≤ ε dist ( x , v ′ ) . (2)
Now, let P ′ P' P ′ denote the shortest t 1 t_1 t 1 -v ′ v' v ′ path in G G G . Clearly, ∣ P ∣ ≥ ∣ P ′ ∣ |P|\ge|P'| ∣ P ∣ ≥ ∣ P ′ ∣ . Furthermore, using the triangle inequality, we derive
∣ P ′ ∣ ≥ dist ( x , v ′ ) − ∣ Δ t 1 ∣ ≥ 1 2 dist ( x , v ′ ) , (3) |P'| \ge\operatorname{dist}(x,v')-|\Delta_{t_1}| \ge\frac{1}{2}\operatorname{dist}(x,v'), \tag*{(3)} ∣ P ′ ∣ ≥ dist ( x , v ′ ) − ∣ Δ t 1 ∣ ≥ 2 1 dist ( x , v ′ ) , (3)
where the second inequality follows from the assumption dist ( x , v ′ ) > 2 ∣ Δ t 1 ∣ \operatorname{dist}(x,v') > 2|\Delta_{t_1}| dist ( x , v ′ ) > 2∣ Δ t 1 ∣ . By combining Equations (2) and (3) , we obtain
d = O ( ε ∣ P ′ ∣ ) = O ( ε ∣ P ∣ ) , d=O(\varepsilon|P'|)=O(\varepsilon|P|), d = O ( ε ∣ P ′ ∣ ) = O ( ε ∣ P ∣ ) ,
which completes the proof.
We will use the following lemma in § 6 to obtain a second set of portals on the shortest path π u v \pi_{uv} π uv as defined in Theorem 3.19.
Lemma 3.22. Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T\subseteq V(G) T ⊆ V ( G ) be a terminal set on a single hole, and 0 < ε < 1 0<\varepsilon<1 0 < ε < 1 be an error parameter. Let π u v \pi_{uv} π uv be the separator path obtained from Theorem 3.19. Then, there is an algorithm that computes a set of portals SplitPortals ( π u v , T , ε ) \operatorname{SplitPortals}(\pi_{uv},T,\varepsilon) SplitPortals ( π uv , T , ε ) on π u v \pi_{uv} π uv of size O ( ∣ T ∣ / ε ) O(|T|/\varepsilon) O ( ∣ T ∣/ ε ) that satisfies the ( 1 + O ( ε ) ) (1+O(\varepsilon)) ( 1 + O ( ε )) -cover property of Equation (1) . Moreover, the portal set can be computed in time O ( n ∣ T ∣ ) O(n|T|) O ( n ∣ T ∣ ) .
Static Terminal Cut Sparsifier
In this section, we present our algorithm for constructing a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) with near-linear size in near-linear time, whose guarantees are summarized in the following theorem.
Theorem 4.1. Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T\subseteq V(G) T ⊆ V ( G ) be a terminal set, and 0 < ε < 1 0<\varepsilon<1 0 < ε < 1 be an error parameter. Then, there is an algorithm that constructs a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) in time O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) with size ∣ H ∣ = O ~ ( ∣ T ∣ / ε O ( 1 ) ) |H|=\widetilde{O}(|T|/\varepsilon^{O(1)}) ∣ H ∣ = O ( ∣ T ∣/ ε O ( 1 ) ) .
We note that [18 ] presents a polynomial-time algorithm for constructing a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier. By leveraging standard techniques such as division and bootstrapping, their algorithm can be used to achieve guarantees similar to those in Theorem 4.1 . However, their approach relies on different sets of portals, which makes it unsuitable for use in our dynamic data structure in § 6 , as this would lead to a significant increase in update time.29 Our main technical contribution is showing that employing the same portal set as in [14 ] suffices to achieve the same construction. This, in turn, allows us to obtain a subpolynomial update time.
The structure of this section is as follows. In Subsection 4.1, we explain how obtaining a terminal cut sparsifier as described in Theorem 4.1 can be reduced to the task of constructing a pattern emulator with guarantees similar to those in Theorem 1.3. The remainder of the section is then devoted to finding such a pattern emulator. In Subsection 4.2, we provide a brief discussion of the special case where ( G , T ) (G,T) ( G , T ) is a one-hole instance. Next, we address the O ( 1 ) O(1) O ( 1 ) -hole case in Subsection 4.3. Finally, we establish the general case (Theorem 1.3) in Subsection 4.4.
Reduction to Pattern Emulators
In this subsection, we explain how computing the terminal cut sparsifier of Theorem 4.1 can be reduced to constructing a pattern emulator with similar guarantees.
The reduction follows the same strategy outlined in [18 ] by first using Theorem 3.14, restated below. Before presenting Theorem 3.14, we first revisit the definitions of the parity of a face and the pattern of a path, as these concepts are crucial to the theorem.
Definition 3.1 (Closed curve A ∪ B A \cup B A ∪ B ). Let G G G be a planar graph, and let v 1 , v 2 ∈ V ( G ) v_1,v_2 \in V(G) v 1 , v 2 ∈ V ( G ) be two vertices in G G G . Let A A A and B B B be v 1 v_1 v 1 -v 2 v_2 v 2 paths in G G G . The closed curve A ∪ B A \cup B A ∪ B is defined as
A ∪ B : = A ∘ B ← . A \cup B := A \circ\overleftarrow{B}. A ∪ B := A ∘ B .
Definition 3.2 (Parity of a face). Let G G G be a planar graph and f ∞ f_\infty f ∞ be its outer face. Let G ∗ G^* G ∗ be the dual of G G G and v ∗ v^* v ∗ be the dual vertex in G ∗ G^* G ∗ corresponding to f ∞ f_\infty f ∞ . For a face f v f_v f v in G G G , let v v v be the dual vertex in G ∗ G^* G ∗ corresponding to it. Let P ∗ P^* P ∗ be a simple v ∗ v^* v ∗ -v v v path in G ∗ G^* G ∗ . For a closed curve M M M in G G G , the parity of the face f v f_v f v with respect to M M M is defined as
Par ( f v , M ) : = ∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( M ) ) ( m o d 2 ) , \operatorname{Par}(f_v,M) := \sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}(e,E(M)) \pmod{2}, Par ( f v , M ) := e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( M )) ( mod 2 ) , where E ( M ) E(M) E ( M ) is the multiset30 of edges that are present in M M M , and count ( e , E ( M ) ) \operatorname{count}(e,E(M)) count ( e , E ( M )) is the number of times the edge e e e corresponding to the dual edge e ∗ ∈ E G ∗ ( P ∗ ) e^* \in E_{G^*}(P^*) e ∗ ∈ E G ∗ ( P ∗ ) appears in E ( M ) E(M) E ( M ) .
Definition 3.6 (Pattern of a path). Let G G G be a planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be its terminal set, and H ( G , T ) \mathcal{H}(G,T) H ( G , T ) be the associated hole set. Let G h G_h G h be the one-hole graph obtained by repeatedly slicing along the closest pair of holes.31 For a pair v 1 , v 2 ∈ V ( G ) v_1,v_2 \in V(G) v 1 , v 2 ∈ V ( G ) , let P P P be a v 1 v_1 v 1 -v 2 v_2 v 2 path and S S S be the v 1 v_1 v 1 -v 2 v_2 v 2 path in G G G corresponding to the shortest v 1 v_1 v 1 -v 2 v_2 v 2 path in G h G_h G h . Then, the pattern of P P P in G G G is defined as
Φ G ( P ) : = { h ∈ H ( G , T ) ∣ Par ( h , P ∪ S ) = 1 } . \Phi_G(P) := \{h \in\mathcal{H}(G,T) \mid\operatorname{Par}(h,P \cup S) = 1\}. Φ G ( P ) := { h ∈ H ( G , T ) ∣ Par ( h , P ∪ S ) = 1 } . Moreover, for Φ = Φ G ( P ) \Phi= \Phi_G(P) Φ = Φ G ( P ) , we say that P P P is a Φ \Phi Φ -respecting v 1 v_1 v 1 -v 2 v_2 v 2 path in G G G .
Theorem 3.14 ([18 Theorem 16] and [39 Theorem 4.6] , Rephrased). Let ( G D , T D ) (G_D,T_D) ( G D , T D ) be the dual instance of ( G , T ) (G,T) ( G , T ) , 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter, and let ( H D , T D ) (H_D,T_D) ( H D , T D ) be an instance aligned with ( G D , T D ) (G_D,T_D) ( G D , T D ) whose primal instance is ( H , T ) (H,T) ( H , T ) . If ( H D , T D ) (H_D,T_D) ( H D , T D ) is a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator of ( G D , T D ) (G_D,T_D) ( G D , T D ) , then ( H , T ) (H,T) ( H , T ) is a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier of ( G , T ) (G,T) ( G , T ) .
In other words, Theorem 3.14 states that obtaining a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) can be achieved by first computing the dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) of ( G , T ) (G,T) ( G , T ) and then constructing a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator ( H D , T D ) (H_D,T_D) ( H D , T D ) of ( G D , T D ) (G_D,T_D) ( G D , T D ) . If ( H D , T D ) (H_D,T_D) ( H D , T D ) is aligned with ( G D , T D ) (G_D,T_D) ( G D , T D ) , we can subsequently conclude that the ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) corresponds to the dual instance of ( H D , T D ) (H_D,T_D) ( H D , T D ) . Leveraging this insight, the problem is reduced to proving the following theorem.
Theorem 1.3. Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. Then, there is an algorithm that constructs a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate planar pattern emulator ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) in time O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) with size ∣ H ∣ = O ~ ( ∣ T ∣ / ε O ( 1 ) ) |H| = \widetilde{O}(|T|/\varepsilon^{O(1)}) ∣ H ∣ = O ( ∣ T ∣/ ε O ( 1 ) ) . Moreover, ( H , T ) (H,T) ( H , T ) is aligned with ( G , T ) (G,T) ( G , T ) .33
We now formalize the reduction outlined above in the following claim.
Claim 4.2. Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. Then, by employing Theorem 1.3, we can construct a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) in time O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) with size ∣ H ∣ = O ~ ( ∣ T ∣ / ε O ( 1 ) ) |H| = \widetilde{O}(|T|/\varepsilon^{O(1)}) ∣ H ∣ = O ( ∣ T ∣/ ε O ( 1 ) ) .
Proof. We begin by constructing the dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) of ( G , T ) (G,T) ( G , T ) . Recall that the construction of ( G D , T D ) (G_D,T_D) ( G D , T D ) involves adding O ( n ) O(n) O ( n ) auxiliary vertices and O ( n ) O(n) O ( n ) edges to G G G to form an augmented graph, denoted G ′ G' G ′ , on which we compute the standard dual. Since ∣ G ′ ∣ = O ( n ) |G'| = O(n) ∣ G ′ ∣ = O ( n ) , the computation of the standard dual G D ′ G'_D G D ′ of G ′ G' G ′ can be performed in O ( n ) O(n) O ( n ) time.
The dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) is then derived from G D ′ G'_D G D ′ by removing O ( n ) O(n) O ( n ) edges corresponding to certain edges added to G G G during the formation of G ′ G' G ′ .34 Given that the construction of G ′ G' G ′ and ( G D , T D ) (G_D,T_D) ( G D , T D ) involves probing G G G and G D ′ G'_D G D ′ exactly once, respectively, it follows that the computation of ( G D , T D ) (G_D,T_D) ( G D , T D ) requires O ( n ) O(n) O ( n ) time.
Next, we apply Theorem 1.3 to ( G D , T D ) (G_D,T_D) ( G D , T D ) to obtain a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator ( H D , T D ) (H_D,T_D) ( H D , T D ) of ( G D , T D ) (G_D,T_D) ( G D , T D ) in O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) time, with size ∣ H D ∣ = O ~ ( ∣ T D ∣ / ε O ( 1 ) ) |H_D| = \widetilde{O}(|T_D|/\varepsilon^{O(1)}) ∣ H D ∣ = O ( ∣ T D ∣/ ε O ( 1 ) ) . Since ( H D , T D ) (H_D,T_D) ( H D , T D ) is aligned with ( G D , T D ) (G_D,T_D) ( G D , T D ) , by Theorem 3.14, it follows that the primal ( H , T ) (H,T) ( H , T ) of ( H D , T D ) (H_D,T_D) ( H D , T D ) serves as a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier for the primal ( G , T ) (G,T) ( G , T ) of ( G D , T D ) (G_D,T_D) ( G D , T D ) .
For the runtime analysis, observe that the computation time is dominated by applying Theorem 1.3 to construct ( H D , T D ) (H_D,T_D) ( H D , T D ) in O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) time; constructing ( G D , T D ) (G_D,T_D) ( G D , T D ) is only O ( n ) O(n) O ( n ) . This follows from the fact that ∣ H D ∣ = O ~ ( ∣ T D ∣ / ε O ( 1 ) ) = O ~ ( n / ε O ( 1 ) ) |H_D| = \widetilde{O}(|T_D|/\varepsilon^{O(1)}) = \widetilde{O}(n/\varepsilon^{O(1)}) ∣ H D ∣ = O ( ∣ T D ∣/ ε O ( 1 ) ) = O ( n / ε O ( 1 ) ) . Additionally, since ∣ H D ∣ = Θ ( ∣ H ∣ ) |H_D| = \Theta(|H|) ∣ H D ∣ = Θ ( ∣ H ∣ ) , the size guarantee for ( H , T ) (H,T) ( H , T ) directly follows from the equality ∣ T D ∣ = ∣ T ∣ |T_D| = |T| ∣ T D ∣ = ∣ T ∣ as there is a one-to-one correspondence between the terminals in T T T and T D T_D T D due to the construction of the dual instance.
This concludes the proof. □
Using Claim 4.2, for the remainder of this section, we focus on proving Theorem 1.3 in Subsections 4.2 to 4.4.
The One-Hole Case
In this subsection, we prove Theorem 1.3 for the case where ( G , T ) (G,T) ( G , T ) is a one-hole instance. i.e., all terminals in T T T lie on a single hole in ( G , T ) (G,T) ( G , T ) . The guarantees are summarized in the following lemma.
Lemma 4.3. Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set all lying on a single hole, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. Then, there is an algorithm that constructs a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) in time O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) with size ∣ H ∣ = O ~ ( ∣ T ∣ / ε O ( 1 ) ) |H| = \widetilde{O}(|T|/\varepsilon^{O(1)}) ∣ H ∣ = O ( ∣ T ∣/ ε O ( 1 ) ) . Moreover, ( H , T ) (H,T) ( H , T ) is aligned with ( G , T ) (G,T) ( G , T ) .
Proof. Without loss of generality, assume that the hole is the outer face of G G G .
Observe that, for every pair t 1 , t 2 ∈ T t_1,t_2 \in T t 1 , t 2 ∈ T , any t 1 t_1 t 1 -t 2 t_2 t 2 path in G G G has the trivial pattern. i.e., using the terminology from Definition 3.6, we have Φ G ( P ) = ∅ \Phi_G(P) = \varnothing Φ G ( P ) = ∅ . This follows from the fact that f ∞ f_\infty f ∞ is the only hole in G G G , and by the Jordan curve theorem, every v ∗ − v v^*-v v ∗ − v path in the dual graph G ∗ G^* G ∗ must cross the dual edges corresponding to the hole edges an even number of times. Here, f ∞ f_\infty f ∞ , v ∗ v^* v ∗ , and v v v are as defined in Definition 3.2. Note that v = v ∗ v = v^* v = v ∗ since the hole is the outer face.
Since, for each t 1 t_1 t 1 -t 2 t_2 t 2 path P P P , we only need to maintain the shortest t 1 t_1 t 1 -t 2 t_2 t 2 path with the pattern ∅ \varnothing ∅ , it follows that we only need to maintain the shortest t 1 t_1 t 1 -t 2 t_2 t 2 path for every pair t 1 , t 2 ∈ T t_1,t_2 \in T t 1 , t 2 ∈ T . Consequently, a pattern emulator reduces to a standard emulator, wherein we are required to approximately preserve the shortest paths between any pair in T T T (see Definition 3.7 for the formal definition of an emulator).
It follows that employing Theorem 3.10 on ( G , T ) (G,T) ( G , T ) directly results in a (pattern) emulator ( H , T ) (H,T) ( H , T ) of size ∣ H ∣ = O ~ ( ∣ T ∣ / ε O ( 1 ) ) |H| = \widetilde{O}(|T|/\varepsilon^{O(1)}) ∣ H ∣ = O ( ∣ T ∣/ ε O ( 1 ) ) in O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) time. The alignment of ( H , T ) (H,T) ( H , T ) and ( G , T ) (G,T) ( G , T ) is a direct consequence of this construction.
Combined with Claim 4.2, Lemma 4.3 establishes the following lemma.
Lemma 4.4. Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a set of terminals all lying on a single hole, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. Then, there is an algorithm that constructs a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) in time O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) with size ∣ H ∣ = O ~ ( ∣ T ∣ / ε O ( 1 ) ) |H| = \widetilde{O}(|T|/\varepsilon^{O(1)}) ∣ H ∣ = O ( ∣ T ∣/ ε O ( 1 ) ) .
Our proof of Lemma 4.4 is concise and relies solely on the pattern property of ( G , T ) (G,T) ( G , T ) . However, it does not provide intuition about how minimum cuts in a one-hole instance ( G , T ) (G,T) ( G , T ) correspond to shortest paths in its dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) as described in Theorem 3.14. In contrast, [18 ] gives a more direct proof by leveraging the cut property of ( G , T ) (G,T) ( G , T ) . We refer the reader to Appendix § 8 for an outline of their approach, which will also provide valuable intuition about why using the dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) instead of the standard dual is necessary in Theorem 3.14.
The O(1)-Hole Case
We now focus on the case where ( G , T ) (G,T) ( G , T ) is an O ( 1 ) O(1) O ( 1 ) -hole instance, and present an algorithm for computing a near-linear size pattern emulator ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) in near-linear time. The main result of this subsection is summarized in the following theorem.
Theorem 4.5. Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set on O ( 1 ) O(1) O ( 1 ) holes in G G G , and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. Then, there is an algorithm that constructs a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) in time O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) with size ∣ H ∣ = O ~ ( ∣ T ∣ / ε O ( 1 ) ) |H| = \widetilde{O}(|T|/\varepsilon^{O(1)}) ∣ H ∣ = O ( ∣ T ∣/ ε O ( 1 ) ) . Moreover, ( H , T ) (H,T) ( H , T ) is aligned with ( G , T ) (G,T) ( G , T ) .
This subsection is the most technical part of this section. Before proceeding, we first provide an overview of this subsection below.
In Subsection 4.3.1, we provide some auxiliary claims that are used in the rest of this subsection.
In Subsection 4.3.2, we discuss how to construct an exact pattern emulator ( H , T ) (H,T) ( H , T ) in near-linear time,35 though the size of ( H , T ) (H,T) ( H , T ) is not near-linear in ∣ T ∣ |T| ∣ T ∣ . The main goal of this subsection is to provide the technical material for constructing the ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximation pattern emulator of Theorem 4.5 in Subsection 4.3.3. We will study how slicing, as the main technique to reduce the O ( 1 ) O(1) O ( 1 ) -case to the one-hole case of Subsection 4.2, affects the Φ \Phi Φ -respecting shortest paths in G G G . Most notably, we prove that each such path corresponds to a constant number of paths in the sliced graph (see Claim 4.12), which will play a crucial role in the construction of the ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximation pattern emulator of Theorem 4.5 in Subsection 4.3.3. We note that the results of this subsection do not depend on the assumption of ( G , T ) (G,T) ( G , T ) having O ( 1 ) O(1) O ( 1 ) holes; this assumption is used in Subsection 4.3.3 for obtaining an approximate pattern emulator with a desired size.
In Subsection 4.3.3, we prove Theorem 4.5 by using the slicing scheme of Subsection 4.3.2. To reduce the size to near-linear, we employ ε \varepsilon ε -cover portals (as will be defined in Definition 4.13 ) on the sliced paths during the construction of ( H , T ) (H,T) ( H , T ) . The main technical part of this subsection is to prove that using these ε \varepsilon ε -cover portals results in the desired ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximation pattern emulator (see Claims 4.19 and 4.20 ), and thus the emulator construction of [15 ] on the reduced one-hole instance can be used to obtain a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximation pattern emulator for ( G , T ) (G,T) ( G , T ) . We prove Theorem 4.5 at the end of this subsection.
Auxiliary Claims
In this subsection, we prove some claims that will be useful in the rest of the section.
We start by proving a claim about the parity of a face, whose definition is restated below.
Definition 3.2 (Parity of a face). Let G G G be a planar graph and f ∞ f_{\infty} f ∞ be its outer face. Let G ∗ G^* G ∗ be the dual of G G G and v ∗ v^* v ∗ be the dual vertex in G ∗ G^* G ∗ corresponding to f ∞ f_{\infty} f ∞ . For a face f v f_v f v in G G G , let v v v be the dual vertex in G ∗ G^* G ∗ corresponding to it. Let P ∗ P^* P ∗ be a simple v ∗ v^* v ∗ -v v v path in G ∗ G^* G ∗ . For a closed curve M M M in G G G , the parity of the face f v f_v f v with respect to M M M is defined as
Par ( f v , M ) : = ∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( M ) ) ( m o d 2 ) , \operatorname{Par}(f_v,M) := \sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}(e,E(M)) \pmod2, Par ( f v , M ) := e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( M )) ( mod 2 ) , where E ( M ) E(M) E ( M ) is the multiset36 of edges that are present in M M M , and count ( e , E ( M ) ) \operatorname{count}(e,E(M)) count ( e , E ( M )) is the number of times the edge e e e corresponding to the dual edge e ∗ ∈ E G ∗ ( P ∗ ) e^* \in E_{G^*}(P^*) e ∗ ∈ E G ∗ ( P ∗ ) appears in E ( M ) E(M) E ( M ) .
Intuitively, the following claim states that if A A A , B B B , and C C C are paths with the same endpoints in G G G , then the holes inside the closed curve A ∪ C A \cup C A ∪ C are the ones that are exactly in one of A ∪ B A \cup B A ∪ B or B ∪ C B \cup C B ∪ C .37
Claim 4.6. Let A A A , B B B , and C C C be three paths with the same endpoints in G G G . Then,
Φ G ( A ∪ C ) = Φ G ( A ∪ B ) △ Φ G ( B ∪ C ) , \Phi_G(A \cup C) = \Phi_G(A \cup B) \mathbin{\triangle} \Phi_G(B \cup C), Φ G ( A ∪ C ) = Φ G ( A ∪ B ) △ Φ G ( B ∪ C ) , where △ \triangle △ is the symmetric difference operator.
Proof. Let h ∈ H ( G , T ) h \in\mathcal{H}(G,T) h ∈ H ( G , T ) be a hole in G G G and P ∗ P^* P ∗ be a simple path between the dual vertices in G ∗ G^* G ∗ corresponding f ∞ f_\infty f ∞ and h h h in G G G , following the same terminology as in Definition 3.2. It is not hard to see that A ∪ C A \cup C A ∪ C , A ∪ B A \cup B A ∪ B , and B ∪ C B \cup C B ∪ C are closed curves, and that E ( A ∪ B ) E(A \cup B) E ( A ∪ B ) is a multiset where the cardinality of e ∈ E ( A ∪ B ) e \in E(A \cup B) e ∈ E ( A ∪ B ) corresponds to the sum of its cardinalities in E ( A ) E(A) E ( A ) and E ( B ) E(B) E ( B ) . Thus, we have
∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( A ∪ C ) ) = ∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( A ) ) + ∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( C ) ) , ∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( A ∪ B ) ) = ∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( A ) ) + ∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( B ) ) , ∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( B ∪ C ) ) = ∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( B ) ) + ∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( C ) ) . \begin{aligned}
\sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}\left(e,E(A \cup C)\right)
&= \sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}\left(e,E(A)\right)
+ \sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}\left(e,E(C)\right),\\
\sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}\left(e,E(A \cup B)\right)
&= \sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}\left(e,E(A)\right)
+ \sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}\left(e,E(B)\right),\\
\sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}\left(e,E(B \cup C)\right)
&= \sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}\left(e,E(B)\right)
+ \sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}\left(e,E(C)\right).
\end{aligned} e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( A ∪ C ) ) e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( A ∪ B ) ) e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( B ∪ C ) ) = e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( A ) ) + e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( C ) ) , = e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( A ) ) + e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( B ) ) , = e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( B ) ) + e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( C ) ) . By summing all three equations above, we have
Par ( h , A ∪ C ) + Par ( h , A ∪ B ) + Par ( h , B ∪ C ) ≡ 0 ( m o d 2 ) . (4) \operatorname{Par}(h,A \cup C) + \operatorname{Par}(h,A \cup B) + \operatorname{Par}(h,B \cup C) \equiv0 \pmod{2}. \tag*{(4)} Par ( h , A ∪ C ) + Par ( h , A ∪ B ) + Par ( h , B ∪ C ) ≡ 0 ( mod 2 ) . (4) We now prove the main statement.
If h ∈ Φ G ( A ∪ B ) △ Φ G ( B ∪ C ) h \in\Phi_G(A \cup B) \mathbin{\triangle} \Phi_G(B \cup C) h ∈ Φ G ( A ∪ B ) △ Φ G ( B ∪ C ) , then h h h is inside exactly one of A ∪ B A \cup B A ∪ B or B ∪ C B \cup C B ∪ C . This implies that exactly one of Par ( h , A ∪ B ) \operatorname{Par}(h,A \cup B) Par ( h , A ∪ B ) or Par ( h , B ∪ C ) \operatorname{Par}(h,B \cup C) Par ( h , B ∪ C ) equals one. By Equation (4) , it follows that Par ( h , A ∪ C ) ≡ 1 ( m o d 2 ) \operatorname{Par}(h,A \cup C) \equiv1 \pmod{2} Par ( h , A ∪ C ) ≡ 1 ( mod 2 ) , and thus h ∈ Φ G ( A ∪ C ) h \in\Phi_G(A \cup C) h ∈ Φ G ( A ∪ C ) .
If h ∈ Φ G ( A ∪ C ) h \in\Phi_G(A \cup C) h ∈ Φ G ( A ∪ C ) , then using similar reasoning, it follows that either h ∈ Φ G ( A ∪ B ) h \in\Phi_G(A \cup B) h ∈ Φ G ( A ∪ B ) or h ∈ Φ G ( B ∪ C ) h \in\Phi_G(B \cup C) h ∈ Φ G ( B ∪ C ) , but h ∉ Φ G ( A ∪ B ) ∩ Φ G ( B ∪ C ) h \notin\Phi_G(A \cup B) \cap\Phi_G(B \cup C) h ∈ / Φ G ( A ∪ B ) ∩ Φ G ( B ∪ C ) , and thus h ∈ Φ G ( A ∪ B ) △ Φ G ( B ∪ C ) h \in\Phi_G(A \cup B) \mathbin{\triangle} \Phi_G(B \cup C) h ∈ Φ G ( A ∪ B ) △ Φ G ( B ∪ C ) .
Using the above claim, in the following claim we prove that the closed curve formed by two paths with the same pattern does not contain any hole inside. Before stating the claim, we restate the definition of the pattern of a path, which is used in the claim.
Definition 3.6 (Pattern of a path). Let G G G be a planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be its terminal set, and H ( G , T ) \mathcal{H}(G,T) H ( G , T ) be the associated hole set. Let G h G_h G h be the one-hole graph obtained by repeatedly slicing along the closest pair of holes.38 For a pair v 1 , v 2 ∈ V ( G ) v_1,v_2 \in V(G) v 1 , v 2 ∈ V ( G ) , let P P P be a v 1 v_1 v 1 -v 2 v_2 v 2 path and S S S be the v 1 v_1 v 1 -v 2 v_2 v 2 path in G G G corresponding to the shortest v 1 v_1 v 1 -v 2 v_2 v 2 path in G h G_h G h . Then, the pattern of P P P in G G G is defined as
Φ G ( P ) : = { h ∈ H ( G , T ) ∣ Par ( h , P ∪ S ) = 1 } . \Phi_G(P) := \{h \in\mathcal{H}(G,T) \mid\operatorname{Par}(h,P \cup S) = 1\}. Φ G ( P ) := { h ∈ H ( G , T ) ∣ Par ( h , P ∪ S ) = 1 } . Moreover, for Φ = Φ G ( P ) \Phi= \Phi_G(P) Φ = Φ G ( P ) , we say that P P P is a Φ \Phi Φ -respecting v 1 v_1 v 1 -v 2 v_2 v 2 path in G G G .39
Claim 4.7. Let A A A and C C C be two paths with the same endpoints in G G G . Then, A A A and C C C have the same pattern if and only if the pattern of the closed curve A ∪ C A \cup C A ∪ C is Φ G ( A ∪ C ) = ∅ \Phi_G(A \cup C) = \emptyset Φ G ( A ∪ C ) = ∅ . i.e., A A A and C C C have the same pattern if and only if the closed curve A ∪ C A \cup C A ∪ C does not contain any hole of G G G .
Proof. Let t 1 , t 2 t_1,t_2 t 1 , t 2 be the endpoints of A A A and C C C , and let B B B be the t 1 t_1 t 1 -t 2 t_2 t 2 shortest path in G h G_h G h as defined in Definition 3.6. We prove both directions separately.
⇒ ) \Rightarrow) ⇒ ) Since A A A and C C C have the same pattern, by Definition 3.6, Φ G ( A ∪ B ) = Φ G ( C ∪ B ) \Phi_G(A \cup B) = \Phi_G(C \cup B) Φ G ( A ∪ B ) = Φ G ( C ∪ B ) . Using Claim 4.6 , it immediately follows that Φ G ( A ∪ C ) = ∅ \Phi_G(A \cup C) = \emptyset Φ G ( A ∪ C ) = ∅ .
⇐ ) \Leftarrow) ⇐ ) Since Φ G ( A ∪ C ) = ∅ \Phi_G(A \cup C) = \emptyset Φ G ( A ∪ C ) = ∅ , it follows from Claim 4.6 that Φ G ( A ∪ B ) = Φ G ( C ∪ B ) \Phi_G(A \cup B) = \Phi_G(C \cup B) Φ G ( A ∪ B ) = Φ G ( C ∪ B ) . As B B B is the t 1 t_1 t 1 -t 2 t_2 t 2 shortest path in G h G_h G h , by Definition 3.6, it follows that A A A and C C C have the same pattern.
We now prove the following simple claim.
Claim 4.8. Let G G G be a planar graph with at least two distinct holes h 1 , h 2 h_1,h_2 h 1 , h 2 , and let R R R be a path between h 1 h_1 h 1 and h 2 h_2 h 2 . Let C C C be a closed curve in G G G . Then, if R R R does not cross C C C , then both h 1 , h 2 h_1,h_2 h 1 , h 2 are either inside C C C or outside C C C .
Proof. Assume for the sake of contradiction, that R R R does not cross C C C and that h 1 h_1 h 1 is inside C C C while h 2 h_2 h 2 is outside C C C .
By the definition of the curve C C C , the region inside C C C and the region outside C C C are disjoint. Therefore, any path connecting a point inside C C C to a point outside C C C must necessarily intersect C C C .
Since R R R connects h 1 h_1 h 1 (inside C C C ) to h 2 h_2 h 2 (outside C C C ), it must cross C C C at least once to transition from the interior to the exterior. However, this contradicts the assumption that R R R does not cross C C C . Hence, the assumption that h 1 h_1 h 1 is inside C C C while h 2 h_2 h 2 is outside C C C is incorrect. Consequently, both h 1 h_1 h 1 and h 2 h_2 h 2 must either lie inside C C C or lie outside C C C .
We proceed to establish the following claim. Intuitively, this claim asserts that replacing a subpath P ′ P' P ′ of a path P P P with another subpath P ′ ′ P'' P ′′ that shares the same pattern as P ′ P' P ′ results in a path whose pattern remains identical to that of P P P . This claim will play a crucial role in subsequent arguments, particularly when analyzing the behavior of sliced subpaths of P P P as the graph G G G undergoes slicing operations.
Claim 4.9. Let G G G be a planar graph, and let P P P be a t 1 t_1 t 1 -t 2 t_2 t 2 path in G G G . Let P ′ P' P ′ be a subpath of P P P with endpoints p 1 p_1 p 1 and p 2 p_2 p 2 , such that P ′ = P [ p 1 , p 2 ] P' = P[p_1,p_2] P ′ = P [ p 1 , p 2 ] . Let P ′ ′ P'' P ′′ be a p 1 p_1 p 1 -p 2 p_2 p 2 path in G G G that has the same pattern as P ′ P' P ′ . Then, the path
P ′ ′ ′ : = P [ t 1 , p 1 ] ∘ P ′ ′ ∘ P [ p 2 , t 2 ] P''' := P[t_1,p_1] \circ P'' \circ P[p_2,t_2] P ′′′ := P [ t 1 , p 1 ] ∘ P ′′ ∘ P [ p 2 , t 2 ] has the same pattern as P P P .
Proof. Let S S S be the shortest t 1 t_1 t 1 -t 2 t_2 t 2 path in G h G_h G h , as defined in Definition 3.6. Since P ′ P' P ′ and P ′ ′ P'' P ′′ have the same pattern, it follows that Φ G ( P ′ ∪ P ′ ′ ) = ∅ \Phi_G(P' \cup P'') = \emptyset Φ G ( P ′ ∪ P ′′ ) = ∅ by Claim 4.7 . By applying Claim 4.6 , it follows that
Φ G ( P ∪ P ′ ′ ′ ) = Φ G ( P ∪ S ) △ Φ G ( P ′ ′ ′ ∪ S ) . (5) \Phi_G(P \cup P''') = \Phi_G(P \cup S) \mathbin{\triangle} \Phi_G(P''' \cup S). \tag*{(5)} Φ G ( P ∪ P ′′′ ) = Φ G ( P ∪ S ) △ Φ G ( P ′′′ ∪ S ) . (5)
Algorithm 1: $\operatorname{Slice}(G,T)$
**Input:** a planar graph $G$ with terminal set $T \subseteq V(G)$ and at least two holes
**Output:** the sliced graph $\overline{G}$ with one fewer hole than $G$
1. Let $h$ and $h'$ be the two closest holes in $(G,T)$
2. Let $R$ be the shortest path between $h$ and $h'$ with $u,v$ as its endpoints
3. Let $u'$ be the vertex succeeding $u$ on $h$ in the clockwise order
4. Let $v'$ be the vertex preceding $v$ on $h'$ in the clockwise order
5. Create the path $\overline{R}$ by duplicating the edges and vertices on $R$
6. Let $\overline{G}$ be a copy of $G$
7. Add $\overline{R}$ to $\overline{G}$
8. **foreach** vertex $w$ on $R$ **do**
9. Reassign the edges incident to $w$ in $\overline{G}$ from the left side of the path $u'-R-v'$ (in the direction from $u'$ to $v'$) to its copy $\overline{w}$ on $\overline{R}$
10. **return** $\overline{G}$
Since P P P and P ′ ′ ′ P''' P ′′′ differ only in the subpaths P ′ P' P ′ and P ′ ′ P'' P ′′ , we can conclude that
Φ G ( P ∪ P ′ ′ ′ ) = Φ G ( P ′ ∪ P ′ ′ ) = ∅ . \Phi_G(P \cup P''') = \Phi_G(P' \cup P'') = \varnothing. Φ G ( P ∪ P ′′′ ) = Φ G ( P ′ ∪ P ′′ ) = ∅ .
Substituting this into Equation (5) , we obtain Φ G ( P ∪ S ) = Φ G ( P ′ ′ ′ ∪ S ) \Phi_G(P \cup S) = \Phi_G(P''' \cup S) Φ G ( P ∪ S ) = Φ G ( P ′′′ ∪ S ) . By Definition 3.6, this implies that P P P and P ′ ′ ′ P''' P ′′′ have the same pattern.
Exact Maintenance of Patterns
In this subsection, we show how to reduce ( G , T ) (G,T) ( G , T ) to a one-hole instance such that, for every t 1 , t 2 ∈ T t_1,t_2 \in T t 1 , t 2 ∈ T and pattern Φ \Phi Φ in G G G , every Φ \Phi Φ -respecting t 1 t_1 t 1 -t 2 t_2 t 2 shortest path in G G G is exactly maintained in the reduced instance.
The main procedure in the reduction is straightforward: we repeatedly slice along a shortest path connecting a pair of holes (thus reducing the number of holes by one) until we reach the one-hole instance. At each iteration, we slice along a path R R R , which is the shortest path between any pair of holes in the graph undergoing the slicing.
The slicing along R R R is performed by adding a copy R ‾ \overline{R} R of R R R to the graph and reassigning the edges incident to vertices of R R R that lie on one side of R R R , to R ‾ \overline{R} R . We denote by G ‾ \overline{G} G the resulting sliced graph obtained from G G G . See Algorithm 1 for more details about the slicing procedure.
The main intuition behind this procedure is that, although the slicing may partition the Φ \Phi Φ -respecting t 1 t_1 t 1 -t 2 t_2 t 2 shortest path into subpaths, each subpath remains a “pattern-respecting” shortest path (defined shortly below) in the sliced graph G ‾ \overline{G} G . See Figure 7 for an illustration.
Note that the pattern of the subpaths is defined in the sliced graph G ‾ \overline{G} G , which can differ from the pattern Φ \Phi Φ of P P P in G G G . We use the term “pattern-respecting” to refer to the Φ ′ \Phi' Φ ′ -respecting shortest path when the exact pattern Φ ′ \Phi' Φ ′ is not known. To avoid ambiguity, we formally define this term in the following definition.
Definition 4.10 (Pattern-Respecting Shortest Path). Let ( G , T ) (G,T) ( G , T ) be an instance and let P P P be a u u u -v v v path in G G G . We say that P P P is a pattern-respecting shortest path in G G G if P P P is the shortest u u u -v v v path in G G G with pattern Φ G ( P ) \Phi_G(P) Φ G ( P ) .
Note that a Φ \Phi Φ -respecting shortest path P P P in G G G may be split into several subpaths in G ˉ \bar{G} G ˉ (as depicted in Figure 7 ). Using Definition 4.10 , we say that each such subpath P ′ P' P ′ in the sliced graph G ˉ \bar{G} G ˉ is itself a shortest path between its endpoints with pattern Φ G ˉ ( P ′ ) \Phi_{\bar{G}}(P') Φ G ˉ ( P ′ ) : the subpath P ′ P' P ′ is a pattern-respecting shortest path in G ˉ \bar{G} G ˉ . This definition helps reduce the complexity of notation used in our proof later.
We now prove that the sliced graph G ˉ \bar{G} G ˉ , as described in Algorithm 1, preserves all the necessary information for maintaining Φ \Phi Φ -respecting shortest paths in G G G , as stated in the following lemma.
Intuitively, the lemma asserts that every subpath P ′ P' P ′ (as defined in the previous paragraphs) is a pattern-respecting shortest path in G ˉ \bar{G} G ˉ . For example, using the case in Figure 7 , the lemma shows that the segmented subpaths P [ t 1 , p 1 ] P[t_1,p_1] P [ t 1 , p 1 ] , P [ p 1 , p 2 ] P[p_1,p_2] P [ p 1 , p 2 ] , P [ p 2 , p 3 ] P[p_2,p_3] P [ p 2 , p 3 ] , P [ p 3 , t 2 ] P[p_3,t_2] P [ p 3 , t 2 ] of P P P , resulting from the slicing along R R R , remain pattern-respecting shortest paths in G ˉ \bar{G} G ˉ , with their respective patterns defined in G ˉ \bar{G} G ˉ . e.g., the subpath P [ p 1 , p 2 ] P[p_1,p_2] P [ p 1 , p 2 ] in G ˉ \bar{G} G ˉ (with endpoints p ˉ 1 \bar{p}_1 p ˉ 1 and p ˉ 2 \bar{p}_2 p ˉ 2 ) is a Φ G ˉ ( P [ p ˉ 1 , p ˉ 2 ] ) \Phi_{\bar{G}}(P[\bar{p}_1,\bar{p}_2]) Φ G ˉ ( P [ p ˉ 1 , p ˉ 2 ]) -respecting p ˉ 1 \bar{p}_1 p ˉ 1 -p ˉ 2 \bar{p}_2 p ˉ 2 shortest path in G ˉ \bar{G} G ˉ (with endpoints p ˉ 1 \bar{p}_1 p ˉ 1 and p ˉ 2 \bar{p}_2 p ˉ 2 ). Therefore, if we preserve all pattern-respecting shortest paths between the endpoints of the subpaths along the sliced path R R R , we can retrieve P P P using G ˉ \bar{G} G ˉ .
The downside of this approach is that R R R may contain O ( n ) O(n) O ( n ) vertices, and thus considering all endpoints along R R R may not reduce the size of the resulting pattern emulator we aim to construct. In Subsection 4.3.3, we address this size limitation by selecting O ~ ( ∣ T ∣ / ε ) \widetilde{O}(|T|/\varepsilon) O ( ∣ T ∣/ ε ) vertices on R R R instead of all vertices, trading off exactness for a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator.
Lemma 4.11. Let G G G be a planar graph with at least two holes, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and R R R be the shortest path in G G G between the closest pair of holes. Let G ˉ \bar{G} G ˉ be the graph resulting from slicing G G G along R R R using Algorithm 1. Then, for every t 1 , t 2 ∈ T t_1,t_2 \in T t 1 , t 2 ∈ T and every pattern Φ \Phi Φ , the Φ \Phi Φ -respecting t 1 t_1 t 1 -t 2 t_2 t 2 shortest path in G G G is the union of pattern-respecting shortest paths in G ˉ \bar{G} G ˉ with endpoints in T ∪ V ( R ) ∪ V ( R ˉ ) T \cup V(R) \cup V(\bar{R}) T ∪ V ( R ) ∪ V ( R ˉ ) , where R ˉ \bar{R} R ˉ is the copy of R R R in G ˉ \bar{G} G ˉ .
Proof. Let P P P be the shortest Φ \Phi Φ -respecting t 1 t_1 t 1 -t 2 t_2 t 2 path in G G G and S S S be the shortest t 1 t_1 t 1 -t 2 t_2 t 2 path in G ‾ h \overline{G}_h G h as defined in Definition 3.6. Without loss of generality, suppose that R R R is the shortest path between the holes h , h ′ ∈ H ( G , T ) h,h' \in\mathcal{H}(G,T) h , h ′ ∈ H ( G , T ) . The shortest path in G ‾ h \overline{G}_h G h corresponding to S S S does not cross R R R ; after mapping copies back to G G G , S S S does not cross R R R as it exists in G ‾ h \overline{G}_h G h .40 Without loss of generality, we assume that the hole h h h is merged into h ′ h' h ′ after the slice. i.e., the hole h h h is eliminated in G ‾ \overline{G} G . We consider the following two cases.
The path P P P does not cross R R R : In this case, both P P P and S S S exist in G ‾ \overline{G} G , and the closed curve S ∪ P S \cup P S ∪ P does not cross R R R . We show that P P P is the shortest t 1 t_1 t 1 -t 2 t_2 t 2 path in G ‾ \overline{G} G with pattern Φ ′ = Φ ∖ h \Phi' = \Phi\setminus h Φ ′ = Φ ∖ h . By Claim 4.8 , the holes h h h and h ′ h' h ′ are either both contained inside S ∪ P S \cup P S ∪ P or both outside it. To show that Φ ′ = Φ ∖ h \Phi' = \Phi\setminus h Φ ′ = Φ ∖ h , we consider the following two distinct cases.
Both h , h ′ h,h' h , h ′ are outside S ∪ P S \cup P S ∪ P : By Definition 3.6, we conclude that h , h ′ ∉ Φ h,h' \notin\Phi h , h ′ ∈ / Φ . Furthermore, since S ∪ P S \cup P S ∪ P is not crossed by R R R , it remains unaffected by the slicing along R R R . Consequently, Φ ′ = Φ G ‾ ( P ) = Φ \Phi' = \Phi_{\overline{G}}(P) = \Phi Φ ′ = Φ G ( P ) = Φ . Given that h , h ′ ∉ Φ h,h' \notin\Phi h , h ′ ∈ / Φ , it follows that Φ ′ = Φ ∖ h \Phi' = \Phi\setminus h Φ ′ = Φ ∖ h .
Both h , h ′ h,h' h , h ′ are inside S ∪ P S \cup P S ∪ P : By Definition 3.6, we have h , h ′ ∈ Φ h,h' \in\Phi h , h ′ ∈ Φ . Since there is one-to-one correspondence between the holes in G ‾ \overline{G} G and H ( G , T ) ∖ h \mathcal{H}(G,T) \setminus h H ( G , T ) ∖ h , the only change to Φ ′ \Phi' Φ ′ is the removal of h h h , as h h h no longer exists in G ‾ \overline{G} G . Therefore, it follows that Φ ′ = Φ G ‾ ( P ) = Φ ∖ h \Phi' = \Phi_{\overline{G}}(P) = \Phi\setminus h Φ ′ = Φ G ( P ) = Φ ∖ h .
We now proceed to show that P P P is indeed the shortest t 1 t_1 t 1 -t 2 t_2 t 2 path in G ‾ \overline{G} G . Assume, for the sake of contradiction, that there exists a shorter t 1 t_1 t 1 -t 2 t_2 t 2 path P ′ P' P ′ in G ‾ \overline{G} G with pattern Φ ′ \Phi' Φ ′ . By Claim 4.7 , there are no holes inside P ∪ P ′ P \cup P' P ∪ P ′ . Moreover, since both P P P and P ′ P' P ′ exist in G G G , it follows from Claim 4.9 that P ′ P' P ′ would be a shorter path in G G G with pattern Φ \Phi Φ , which contradicts the assumption that P P P is the shortest t 1 t_1 t 1 -t 2 t_2 t 2 path in G G G with pattern Φ \Phi Φ . Thus, P P P must be the shortest t 1 t_1 t 1 -t 2 t_2 t 2 path in G ‾ \overline{G} G with pattern Φ ′ \Phi' Φ ′ , completing the proof.
The path P P P crosses R R R : Let p 1 , … , p i p_1,\ldots,p_i p 1 , … , p i be the sequence of vertices on P P P (starting from t 1 t_1 t 1 ) that cross R R R . For simplicity of notation, we treat p j p_j p j s as the vertices on R R R and their copies on R ‾ \overline{R} R .41 See Figure 8 for an illustration of the described setting.
Figure 8. An illustration of when the path P P P (the black path) crosses R R R (the orange path). The path Q Q Q (the pink path) is the shortest p j p_j p j -p j + 1 p_{j+1} p j + 1 path in G ˉ \bar{G} G ˉ with the same pattern as P [ p j , p j + 1 ] P[p_j,p_{j+1}] P [ p j , p j + 1 ] . The green paths show the shortest paths in G h G_h G h : dashed for the t 1 t_1 t 1 -t 2 t_2 t 2 path S [ t 1 , t 2 ] S[t_1,t_2] S [ t 1 , t 2 ] and dot-dashed for the p j p_j p j -p j + 1 p_{j+1} p j + 1 path S [ p j , p j + 1 ] S[p_j,p_{j+1}] S [ p j , p j + 1 ] . Note that the paths in G h G_h G h are not crossed by any slicing path (such as R R R ).
Clearly, i ≥ 1 i \ge1 i ≥ 1 by our assumption. If i ≥ 2 i \ge2 i ≥ 2 , it follows that, for 1 ≤ j ≤ i − 1 1 \le j \le i-1 1 ≤ j ≤ i − 1 , the closed curve P [ p j , p j + 1 ] ∪ R [ p j , p j + 1 ] P[p_j,p_{j+1}] \cup R[p_j,p_{j+1}] P [ p j , p j + 1 ] ∪ R [ p j , p j + 1 ] must contain at least one hole; otherwise, since R [ p j , p j + 1 ] R[p_j,p_{j+1}] R [ p j , p j + 1 ] is a shorter path than P [ p j , p j + 1 ] P[p_j,p_{j+1}] P [ p j , p j + 1 ] , replacing P [ p j , p j + 1 ] P[p_j,p_{j+1}] P [ p j , p j + 1 ] with R [ p j , p j + 1 ] R[p_j,p_{j+1}] R [ p j , p j + 1 ] in P P P would result in a shorter t 1 t_1 t 1 -t 2 t_2 t 2 path in G G G . By Claim 4.7 , this new path would have the same pattern as P [ p j , p j + 1 ] P[p_j,p_{j+1}] P [ p j , p j + 1 ] . This substitution would ultimately result in a t 1 t_1 t 1 -t 2 t_2 t 2 path in G G G with the same pattern as P P P by using Claim 4.9 , contradicting the assumption that P P P is the shortest t 1 t_1 t 1 -t 2 t_2 t 2 pattern-respecting path in G G G . Thus, the closed curve P [ p j , p j + 1 ] ∪ R [ p j , p j + 1 ] P[p_j,p_{j+1}] \cup R[p_j,p_{j+1}] P [ p j , p j + 1 ] ∪ R [ p j , p j + 1 ] must contain at least one hole.
We now show that any subpath of P P P with respect to the sequence p 1 , … , p i p_1,\ldots,p_i p 1 , … , p i is a shortest pattern-respecting path in G ‾ \overline{G} G . We discuss the two types of subpaths separately below.
The subpath P [ p j , p j + 1 ] P[p_j,p_{j+1}] P [ p j , p j + 1 ] for $1 \le j \le i-1: Let S [ p j , p j + 1 ] S[p_j,p_{j+1}] S [ p j , p j + 1 ] be the shortest p j p_j p j -p j + 1 p_{j+1} p j + 1 path in G ‾ h \overline{G}_h G h as defined in Definition 3.6. Suppose that there exists a shorter p j p_j p j -p j + 1 p_{j+1} p j + 1 path Q Q Q in G ‾ \overline{G} G
with pattern Φ G ˉ ( P [ p j , p j + 1 ] ) : = Φ G ˉ ( R [ p j , p j + 1 ] ∪ P [ p j , p j + 1 ] ) \Phi_{\bar{G}}(P[p_j,p_{j+1}]) := \Phi_{\bar{G}}(R[p_j,p_{j+1}] \cup P[p_j,p_{j+1}]) Φ G ˉ ( P [ p j , p j + 1 ]) := Φ G ˉ ( R [ p j , p j + 1 ] ∪ P [ p j , p j + 1 ]) .42 Using Claim 4.9 , it follows that the path
P ′ = P [ p 1 , p j ] ∘ Q ∘ P [ p j + 1 , p i ] P' = P[p_1,p_j] \circ Q \circ P[p_{j+1},p_i] P ′ = P [ p 1 , p j ] ∘ Q ∘ P [ p j + 1 , p i ]
has exactly the same pattern as P [ p 1 , p i ] P[p_1,p_i] P [ p 1 , p i ] in G G G . Specifically, it follows that Φ ( P ′ ) = Φ ( P [ p 1 , p i ] ) \Phi(P') = \Phi(P[p_1,p_i]) Φ ( P ′ ) = Φ ( P [ p 1 , p i ]) , which contradicts the assumption that P P P is the shortest t 1 t_1 t 1 -t 2 t_2 t 2 pattern-respecting path in G G G . Therefore, P [ p j , p j + 1 ] P[p_j,p_{j+1}] P [ p j , p j + 1 ] must be the shortest p j p_j p j -p j + 1 p_{j+1} p j + 1 path in G G G .
Let S [ t 1 , p 1 ] S[t_1,p_1] S [ t 1 , p 1 ] and S [ p i , t 2 ] S[p_i,t_2] S [ p i , t 2 ] be the shortest t 1 t_1 t 1 -p 1 p_1 p 1 and p i p_i p i -t 2 t_2 t 2 paths in G h G_h G h , respectively. Using the above argument, it follows that for the t 1 t_1 t 1 -t 2 t_2 t 2 paths
P ′ ′ = P [ t 1 , p 1 ] ∘ P ′ ∘ P [ p i , t 2 ] , P'' = P[t_1,p_1] \circ P' \circ P[p_i,t_2], P ′′ = P [ t 1 , p 1 ] ∘ P ′ ∘ P [ p i , t 2 ] ,
and
P ′ ′ ′ = S [ t 1 , p 1 ] ∘ ◯ j = 1 i − 1 S [ p j , p j + 1 ] ∘ S [ p i , t 2 ] , P''' = S[t_1,p_1] \circ\bigcirc_{j=1}^{i-1} S[p_j,p_{j+1}] \circ S[p_i,t_2], P ′′′ = S [ t 1 , p 1 ] ∘ ◯ j = 1 i − 1 S [ p j , p j + 1 ] ∘ S [ p i , t 2 ] ,
we have
Φ G ( P ′ ′ ∪ P ′ ′ ′ ) = Φ G ( P ∪ P ′ ′ ′ ) . \Phi_G(P'' \cup P''') = \Phi_G(P \cup P'''). Φ G ( P ′′ ∪ P ′′′ ) = Φ G ( P ∪ P ′′′ ) .
This follows using the following argument. By using curve decomposition, the only differences between P ′ ′ ∪ P ′ ′ ′ P'' \cup P''' P ′′ ∪ P ′′′ and P ∪ P ′ ′ ′ P \cup P''' P ∪ P ′′′ are the curves Q ∪ S [ p j , p j + 1 ] Q \cup S[p_j,p_{j+1}] Q ∪ S [ p j , p j + 1 ] and P [ p j , p j + 1 ] ∪ S [ p j , p j + 1 ] P[p_j,p_{j+1}] \cup S[p_j,p_{j+1}] P [ p j , p j + 1 ] ∪ S [ p j , p j + 1 ] , respectively. Since Φ G ( Q ∪ P [ p j , p j + 1 ] ) = ∅ \Phi_G(Q \cup P[p_j,p_{j+1}]) = \varnothing Φ G ( Q ∪ P [ p j , p j + 1 ]) = ∅ , it follows that
Φ G ( Q ∪ S [ p j , p j + 1 ] ) = Φ G ( P [ p j , p j + 1 ] ∪ S [ p j , p j + 1 ] ) . \Phi_G(Q \cup S[p_j,p_{j+1}]) = \Phi_G(P[p_j,p_{j+1}] \cup S[p_j,p_{j+1}]). Φ G ( Q ∪ S [ p j , p j + 1 ]) = Φ G ( P [ p j , p j + 1 ] ∪ S [ p j , p j + 1 ]) .
Using Claim 4.6 twice, we obtain
Φ G ( S ∪ P ′ ′ ) = Φ G ( S ∪ P ′ ′ ′ ) △ Φ G ( P ′ ′ ∪ P ′ ′ ′ ) = Φ G ( S ∪ P ′ ′ ′ ) △ Φ G ( P ∪ P ′ ′ ′ ) = Φ G ( S ∪ P ) , \begin{aligned}
\Phi_G(S \cup P'') &= \Phi_G(S \cup P''') \mathbin{\triangle} \Phi_G(P'' \cup P''') \\
&= \Phi_G(S \cup P''') \mathbin{\triangle} \Phi_G(P \cup P''') \\
&= \Phi_G(S \cup P),
\end{aligned} Φ G ( S ∪ P ′′ ) = Φ G ( S ∪ P ′′′ ) △ Φ G ( P ′′ ∪ P ′′′ ) = Φ G ( S ∪ P ′′′ ) △ Φ G ( P ∪ P ′′′ ) = Φ G ( S ∪ P ) ,
which implies that P P P and P ′ ′ P'' P ′′ have the same pattern in G G G . However, P ′ ′ P'' P ′′ has a shorter length than P P P , thereby contradicting that P P P is the shortest Φ \Phi Φ -respecting t 1 t_1 t 1 -t 2 t_2 t 2 path.
– The subpaths P [ t 1 , p 1 ] P[t_1,p_1] P [ t 1 , p 1 ] and P [ p i , t 2 ] P[p_i,t_2] P [ p i , t 2 ] : Suppose that there exists a shorter t 1 t_1 t 1 -p 1 p_1 p 1 path Q Q Q in G ‾ \overline{G} G with Φ ‾ G ( Q ) = Φ ‾ G ( P [ t 1 , p 1 ] ) \overline{\Phi}_G(Q)=\overline{\Phi}_G(P[t_1,p_1]) Φ G ( Q ) = Φ G ( P [ t 1 , p 1 ]) . Using a similar argument as in the previous case, it follows that the path
P ′ ∘ Q ∘ P [ p 1 , t 2 ] P' \circ Q \circ P[p_1,t_2] P ′ ∘ Q ∘ P [ p 1 , t 2 ]
exists in G G G , and that by Claim 4.9 , Φ G ( P ′ ∪ P ′ ′ ) = Φ G ( P ∪ P ′ ′ ) \Phi_G(P' \cup P'')=\Phi_G(P \cup P'') Φ G ( P ′ ∪ P ′′ ) = Φ G ( P ∪ P ′′ ) , where
P ′ ′ = S ‾ [ t 1 , p 1 ] ∘ P [ p 1 , p i ] ∘ S ‾ [ p i , t 2 ] . P''=\overline{S}[t_1,p_1]\circ P[p_1,p_i]\circ\overline{S}[p_i,t_2]. P ′′ = S [ t 1 , p 1 ] ∘ P [ p 1 , p i ] ∘ S [ p i , t 2 ] .
Again, using Claim 4.6 , we have
Φ G ( S ∪ P ′ ) = Φ G ( S ∪ P ′ ′ ) △ Φ G ( P ′ ∪ P ′ ′ ) = Φ G ( S ∪ P ′ ′ ) △ Φ G ( P ∪ P ′ ′ ) = Φ G ( S ∪ P ) . \begin{aligned}
\Phi_G(S \cup P') &= \Phi_G(S \cup P'') \mathbin{\triangle} \Phi_G(P' \cup P'') \\
&= \Phi_G(S \cup P'') \mathbin{\triangle} \Phi_G(P \cup P'') \\
&= \Phi_G(S \cup P).
\end{aligned} Φ G ( S ∪ P ′ ) = Φ G ( S ∪ P ′′ ) △ Φ G ( P ′ ∪ P ′′ ) = Φ G ( S ∪ P ′′ ) △ Φ G ( P ∪ P ′′ ) = Φ G ( S ∪ P ) .
Therefore, Φ G ( P ′ ) = Φ G ( P ) \Phi_G(P')=\Phi_G(P) Φ G ( P ′ ) = Φ G ( P ) ; however, P ′ P' P ′ is shorter than P P P , thereby contradicting the assumption that P P P is the shortest path.
The argument for the subpath P [ p i , t 2 ] P[p_i,t_2] P [ p i , t 2 ] follows similarly.
We conclude this subsection by establishing an upper bound on the number of segments into which P P P can be partitioned after slicing along R R R . We will use the upper bound later in Subsection 4.3.3 to select a sufficient number of portals on R R R to construct a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator.
It is important to note that, as P P P intuitively “navigates” around the holes of G G G to form its pattern, this process can result in a more complex segmentation compared to the scenario depicted in Figure 8 . This complexity necessitates a more thorough analysis. Refer to Figure 9 for an illustration of a more complex segmentation.
Figure 9. An example of how P P P can cross R R R . The orange and black lines represent subpaths of R R R and P P P , respectively. Note that P P P does not necessarily partition R R R . For example, the subpath R [ p 5 , p 6 ] R[p_5,p_6] R [ p 5 , p 6 ] is completely contained within R [ p 1 , p 2 ] R[p_1,p_2] R [ p 1 , p 2 ] . This requires a more detailed reasoning for upper bounding the number of segments of P P P , as the segments of P P P do not necessarily correspond to a partitioning of R R R .
Claim 4.12. Let G G G be a planar graph with h ≥ 2 h \ge2 h ≥ 2 holes, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and R R R be the shortest path in G G G between any pair of holes. Let P P P be the Φ \Phi Φ -respecting t 1 t_1 t 1 -t 2 t_2 t 2 shortest path in G G G , for any t 1 , t 2 ∈ T t_1,t_2 \in T t 1 , t 2 ∈ T and pattern Φ \Phi Φ . Then, R R R divides P P P into at most 2 h + 1 + 2 2^{h+1}+2 2 h + 1 + 2 subpaths with both endpoints on R R R .
Proof. Suppose that R R R partitions P P P into at least 2 h + 1 + 3 2^{h+1}+3 2 h + 1 + 3 subpaths with both endpoints on R R R . This implies that there are at least 2 h + 1 + 1 2^{h+1}+1 2 h + 1 + 1 subpaths with both endpoints on R R R . As each subpath can contain some of the holes of G G G , by the pigeonhole principle, there must exist at least three subpaths in G G G with the same pattern.
Let P 1 P_1 P 1 , P 2 P_2 P 2 , and P 3 P_3 P 3 be the first, second, and third subpaths (starting from t 1 t_1 t 1 ) that connect u 1 u_1 u 1 to v 1 v_1 v 1 , u 2 u_2 u 2 to v 2 v_2 v 2 , and u 3 u_3 u 3 to v 3 v_3 v 3 , respectively, with the same pattern. Moreover, let P 1 ′ P'_1 P 1 ′ and P 2 ′ P'_2 P 2 ′ denote the subpaths of P P P between P 1 P_1 P 1 and P 2 P_2 P 2 , and between P 2 P_2 P 2 and P 3 P_3 P 3 , respectively. Let P [ t 1 , u 1 ] P[t_1,u_1] P [ t 1 , u 1 ] and P [ v 3 , t 2 ] P[v_3,t_2] P [ v 3 , t 2 ] represent the subpaths of P P P before P 1 P_1 P 1 and after P 3 P_3 P 3 , respectively. Thus, we can express P P P as
P = P [ t 1 , u 1 ] ∘ P 1 ∘ P 1 ′ ∘ P 2 ∘ P 2 ′ ∘ P 3 ∘ P [ v 3 , t 2 ] . P = P[t_1,u_1] \circ P_1 \circ P'_1 \circ P_2 \circ P'_2 \circ P_3 \circ P[v_3,t_2]. P = P [ t 1 , u 1 ] ∘ P 1 ∘ P 1 ′ ∘ P 2 ∘ P 2 ′ ∘ P 3 ∘ P [ v 3 , t 2 ] .
This definition is well-defined as P 1 P_1 P 1 , P 2 P_2 P 2 , and P 3 P_3 P 3 were chosen as the first, second, and third subpaths with the same pattern, respectively. Refer to Figure 10 for an illustration.
Figure 10. An illustration for the proof of Claim 4.12. The subpaths P 1 P_1 P 1 , P 2 P_2 P 2 , and P 3 P_3 P 3 of P P P (the black path) have the same pattern. Note that P 1 P_1 P 1 , P 2 P_2 P 2 , and P 3 P_3 P 3 are nested in this example only for clarity of presentation; in the general case, they may not be nested and can cross each other. The example does not depict the entire path P P P but instead focuses only on the sub-part containing P 1 P_1 P 1 , P 2 P_2 P 2 , P 3 P_3 P 3 , and the connecting subpaths P 1 ′ P'_1 P 1 ′ and P 2 ′ P'_2 P 2 ′ . The path P ′ P' P ′ is identical to P P P except in this sub-part, which is depicted in pink. For clarity, its subpaths on R R R are shown slightly above and below R R R ; its difference from P P P is that it replaces P 1 P_1 P 1 with R [ u 1 , v 1 ] R[u_1,v_1] R [ u 1 , v 1 ] and P 2 P_2 P 2 with R [ u 2 , v 2 ] R[u_2,v_2] R [ u 2 , v 2 ] . The closed curve M ′ ′ M'' M ′′ is depicted in green. Here, R [ u 1 , v 1 ] R[u_1,v_1] R [ u 1 , v 1 ] is the smallest subpath of R R R that covers all subpaths R [ u 1 , u 2 ] R[u_1,u_2] R [ u 1 , u 2 ] , R [ v 1 , v 2 ] R[v_1,v_2] R [ v 1 , v 2 ] , R [ u 2 , v 1 ] R[u_2,v_1] R [ u 2 , v 1 ] , and R [ u 1 , v 2 ] R[u_1,v_2] R [ u 1 , v 2 ] . Thus, R [ u , v ] = R [ u 1 , v 1 ] R[u,v]=R[u_1,v_1] R [ u , v ] = R [ u 1 , v 1 ] in this example.
We now show that we can form a shorter path by replacing P 1 P_1 P 1 and P 2 P_2 P 2 with shorter paths on R R R that connect their endpoints. Specifically, we show that the path
P ′ = P [ t 1 , u 1 ] ∘ R [ u 1 , v 1 ] ∘ P 1 ′ ∘ R [ u 2 , v 2 ] ∘ P 2 ′ ∘ P 3 ∘ P [ v 3 , t 2 ] P' = P[t_1,u_1] \circ R[u_1,v_1] \circ P'_1 \circ R[u_2,v_2] \circ P'_2 \circ P_3 \circ P[v_3,t_2] P ′ = P [ t 1 , u 1 ] ∘ R [ u 1 , v 1 ] ∘ P 1 ′ ∘ R [ u 2 , v 2 ] ∘ P 2 ′ ∘ P 3 ∘ P [ v 3 , t 2 ]
has the same pattern as P P P (i.e., Φ G ( P ) = Φ G ( P ′ ) \Phi_G(P) = \Phi_G(P') Φ G ( P ) = Φ G ( P ′ ) ) but is shorter in length.
Following the notation of Definition 3.2, let P ∗ P^* P ∗ be a simple v ∗ − v v^*-v v ∗ − v path in the dual graph G ∗ G^* G ∗ . Let A = { e ∈ E ( M ) ∣ e ∗ ∈ E G ∗ ( P ∗ ) } A = \{e \in E(M) \mid e^* \in E_{G^*}(P^*)\} A = { e ∈ E ( M ) ∣ e ∗ ∈ E G ∗ ( P ∗ )} be the multiset of edges on the closed curve M = P ∪ S M = P \cup S M = P ∪ S , where P P P is the path in G G G corresponding to the dual path P ∗ P^* P ∗ , and S S S is the shortest t 1 t_1 t 1 -t 2 t_2 t 2 path in G h G_h G h . By Definition 3.2, Par ( f v , M ) = ∣ A ∣ ( m o d 2 ) \operatorname{Par}(f_v,M) = |A| \pmod2 Par ( f v , M ) = ∣ A ∣ ( mod 2 ) .
Similarly, let B = { e ∈ E ( P 1 ∪ P 2 ) ∣ e ∗ ∈ E G ∗ ( P ∗ ) } B = \{e \in E(P_1 \cup P_2) \mid e^* \in E_{G^*}(P^*)\} B = { e ∈ E ( P 1 ∪ P 2 ) ∣ e ∗ ∈ E G ∗ ( P ∗ )} be the multiset of edges that are on P 1 P_1 P 1 or P 2 P_2 P 2 and correspond to the edges in P ∗ P^* P ∗ in G G G . Since B ⊆ A B \subseteq A B ⊆ A , it follows that
Par ( f v , M ) = ( ∣ A ∖ B ∣ + ∣ B ∣ ) ( m o d 2 ) . \operatorname{Par}(f_v,M) = \left(|A \setminus B| + |B|\right) \pmod2. Par ( f v , M ) = ( ∣ A ∖ B ∣ + ∣ B ∣ ) ( mod 2 ) .
We argue that for the closed curve
M ′ = P ′ ∪ S , M' = P' \cup S, M ′ = P ′ ∪ S ,
it holds that
Par ( f v , M ′ ) = Par ( f v , M ) , \operatorname{Par}(f_v,M') = \operatorname{Par}(f_v,M), Par ( f v , M ′ ) = Par ( f v , M ) ,
thus proving that Φ G ( P ) = Φ G ( P ′ ) \Phi_G(P) = \Phi_G(P') Φ G ( P ) = Φ G ( P ′ ) by Definition 3.6 since f v f_v f v was arbitrary.
To do so, let
M ′ ′ = P 1 ∪ R [ v 1 , u 2 ] ∪ P 2 ∪ R [ v 2 , u 1 ] M'' = P_1 \cup R[v_1,u_2] \cup P_2 \cup R[v_2,u_1] M ′′ = P 1 ∪ R [ v 1 , u 2 ] ∪ P 2 ∪ R [ v 2 , u 1 ]
be the closed curve between P 1 P_1 P 1 , P 2 P_2 P 2 , and R R R .43 Since R R R is the shortest path connecting the endpoints of P 1 P_1 P 1 and P 2 P_2 P 2 , it follows that Φ G ( R [ v 1 , u 2 ] ) = Φ G ( R [ v 2 , u 1 ] ) = ∅ \Phi_G(R[v_1,u_2]) = \Phi_G(R[v_2,u_1]) = \varnothing Φ G ( R [ v 1 , u 2 ]) = Φ G ( R [ v 2 , u 1 ]) = ∅ . Therefore, P 2 P_2 P 2 and R [ v 1 , u 2 ] ∪ P 2 ∪ R [ v 2 , u 1 ] R[v_1,u_2] \cup P_2 \cup R[v_2,u_1] R [ v 1 , u 2 ] ∪ P 2 ∪ R [ v 2 , u 1 ] have the same pattern. Thus, R [ v 1 , u 2 ] ∪ P 2 ∪ R [ v 2 , u 1 ] R[v_1,u_2] \cup P_2 \cup R[v_2,u_1] R [ v 1 , u 2 ] ∪ P 2 ∪ R [ v 2 , u 1 ] forms a v 1 v_1 v 1 -u 1 u_1 u 1 path with pattern Φ G ( P 2 ) = Φ G ( P 1 ) \Phi_G(P_2) = \Phi_G(P_1) Φ G ( P 2 ) = Φ G ( P 1 ) . It follows from Claim 4.7 that the closed curve M ′ ′ M'' M ′′ does not contain any hole. Consequently, the dual path P ∗ P^* P ∗ , whose endpoint is the dual vertex corresponding to a hole in G G G , cannot end up at a face inside M ′ ′ M'' M ′′ . That is, the destination face f v f_v f v of P ∗ P^* P ∗ must lie outside M ′ ′ M'' M ′′ , as f v f_v f v is required to be a hole by Definition 3.6. Therefore, if P ∗ P^* P ∗ enters M ′ ′ M'' M ′′ , it must subsequently exit M ′ ′ M'' M ′′ to reach f v f_v f v . By the parity argument, it thus follows that
∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( M ′ ′ ) ) ≡ 0 ( m o d 2 ) . (6) \sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}\left(e,E(M'')\right) \equiv0 \pmod{2}. \tag*{(6)} e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( M ′′ ) ) ≡ 0 ( mod 2 ) . (6)
On the other hand, for the curves M = P ∪ S M=P\cup S M = P ∪ S and M ′ = P ′ ∪ S M'=P'\cup S M ′ = P ′ ∪ S , we have
M = M ′ ∪ P 1 ∪ P 2 ∖ ( R [ u 1 , v 1 ] ∪ R [ u 2 , v 2 ] ) , = M ′ ∪ P 1 ∪ P 2 ∪ R [ u 2 , v 1 ] ∪ R [ u 1 , v 2 ] ∖ ( R [ u 1 , u 2 ] ∪ R [ v 1 , v 2 ] ∪ R [ u 2 , v 1 ] ∪ R [ u 1 , v 2 ] ) , = M ′ ∪ M ′ ′ ∖ ( R [ u 1 , u 2 ] ∪ R [ v 1 , v 2 ] ∪ R [ u 2 , v 1 ] ∪ R [ u 1 , v 2 ] ) , \begin{aligned}
M &= M' \cup P_1 \cup P_2 \setminus\left(R[u_1,v_1] \cup R[u_2,v_2]\right),\\
&= M' \cup P_1 \cup P_2 \cup R[u_2,v_1] \cup R[u_1,v_2] \setminus\left(R[u_1,u_2] \cup R[v_1,v_2] \cup R[u_2,v_1] \cup R[u_1,v_2]\right),\\
&= M' \cup M'' \setminus\left(R[u_1,u_2] \cup R[v_1,v_2] \cup R[u_2,v_1] \cup R[u_1,v_2]\right),
\end{aligned} M = M ′ ∪ P 1 ∪ P 2 ∖ ( R [ u 1 , v 1 ] ∪ R [ u 2 , v 2 ] ) , = M ′ ∪ P 1 ∪ P 2 ∪ R [ u 2 , v 1 ] ∪ R [ u 1 , v 2 ] ∖ ( R [ u 1 , u 2 ] ∪ R [ v 1 , v 2 ] ∪ R [ u 2 , v 1 ] ∪ R [ u 1 , v 2 ] ) , = M ′ ∪ M ′′ ∖ ( R [ u 1 , u 2 ] ∪ R [ v 1 , v 2 ] ∪ R [ u 2 , v 1 ] ∪ R [ u 1 , v 2 ] ) ,
where the first equality follows from the fact that we replace P 1 P_1 P 1 and P 2 P_2 P 2 with R [ u 1 , v 1 ] R[u_1,v_1] R [ u 1 , v 1 ] and R [ u 2 , v 2 ] R[u_2,v_2] R [ u 2 , v 2 ] , respectively, to form M ′ M' M ′ . Let R [ u , v ] R[u,v] R [ u , v ] be the minimal subpath of R R R that covers all subpaths R [ u 1 , u 2 ] R[u_1,u_2] R [ u 1 , u 2 ] , R [ v 1 , v 2 ] R[v_1,v_2] R [ v 1 , v 2 ] , R [ u 2 , v 1 ] R[u_2,v_1] R [ u 2 , v 1 ] , and R [ u 1 , v 2 ] R[u_1,v_2] R [ u 1 , v 2 ] . It is not hard to see that
∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( R [ u 1 , u 2 ] ∪ R [ v 1 , v 2 ] ∪ R [ u 2 , v 1 ] ∪ R [ u 1 , v 2 ] ) ) ≡ ∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( R [ u , v ] ∪ R [ u , v ] ) ) ( m o d 2 ) . \sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}\left(e,E\left(R[u_1,u_2]\cup R[v_1,v_2]\cup R[u_2,v_1]\cup R[u_1,v_2]\right)\right)
\equiv\sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}\left(e,E\left(R[u,v]\cup R[u,v]\right)\right) \pmod{2}. e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( R [ u 1 , u 2 ] ∪ R [ v 1 , v 2 ] ∪ R [ u 2 , v 1 ] ∪ R [ u 1 , v 2 ] ) ) ≡ e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( R [ u , v ] ∪ R [ u , v ] ) ) ( mod 2 ) .
Therefore, we obtain
∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( M ) ) = ∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( M ′ ) ) + ∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( M ′ ′ ) ) − ∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( R [ u , v ] ∪ R [ u , v ] ) ) . (7) \sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}(e,E(M)) =
\sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}(e,E(M'))+
\sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}(e,E(M''))
-\sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}\left(e,E\left(R[u,v]\cup R[u,v]\right)\right). \tag*{(7)} e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( M )) = e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( M ′ )) + e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( M ′′ )) − e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( R [ u , v ] ∪ R [ u , v ] ) ) . (7)
Since R [ u , v ] ∪ R [ u , v ] R[u,v]\cup R[u,v] R [ u , v ] ∪ R [ u , v ] is a closed curve with no holes inside, by Claim 4.7 and Definition 3.5 , we have
∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( R [ u , v ] ∪ R [ u , v ] ) ) ≡ 0 ( m o d 2 ) . (8) \sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}\left(e,E\left(R[u,v]\cup R[u,v]\right)\right)\equiv0 \pmod{2}. \tag*{(8)} e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( R [ u , v ] ∪ R [ u , v ] ) ) ≡ 0 ( mod 2 ) . (8)
By combining Equations (6) to (8) , we obtain
∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( M ) ) = ∑ e ∗ ∈ E G ∗ ( P ∗ ) count ( e , E ( M ′ ) ) ( m o d 2 ) , \sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}(e,E(M)) =
\sum_{e^* \in E_{G^*}(P^*)} \operatorname{count}(e,E(M')) \pmod{2}, e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( M )) = e ∗ ∈ E G ∗ ( P ∗ ) ∑ count ( e , E ( M ′ )) ( mod 2 ) ,
which means that P ′ P' P ′ is a path shorter than P P P with the same pattern, thus contradicting the choice of P P P . This completes the proof.
Approximate Maintenance of Patterns
In this subsection, we explain how we adapt the slicing scheme of Subsection 4.3.2 to obtain a pattern emulator for an O ( 1 ) O(1) O ( 1 ) -hole instance ( G , T ) (G,T) ( G , T ) with size near-linear in ∣ T ∣ |T| ∣ T ∣ .
Theorem 4.5. Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T\subseteq V(G) T ⊆ V ( G ) be a terminal set on O ( 1 ) O(1) O ( 1 ) holes in G G G , and 0 < ε < 1 0<\varepsilon<1 0 < ε < 1 be an error parameter. Then, there is an algorithm that constructs a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) in time O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) with size ∣ H ∣ = O ~ ( ∣ T ∣ / ε O ( 1 ) ) |H|=\widetilde{O}(|T|/\varepsilon^{O(1)}) ∣ H ∣ = O ( ∣ T ∣/ ε O ( 1 ) ) . Moreover, ( H , T ) (H,T) ( H , T ) is aligned with ( G , T ) (G,T) ( G , T ) .
Recall that the slicing procedure of Subsection 4.3.2 identifies the path R R R in G G G as the shortest path between the closest pair of holes, and slices along R R R to produce G ′ G' G ′ . This operation merges the holes connected by R R R in G G G into a single hole in G ′ G' G ′ , thereby reducing the number of holes in G ′ G' G ′ by one.
Generally speaking, to achieve a near-linear size, we select certain vertices on R R R , referred to as portals . To construct an instance aligned with G G G , we subsequently glue R R R back at these portals. This gluing procedure will be applied to a pattern emulator of G ′ G' G ′ (to be defined later), enabling us to obtain the ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator of ( G , T ) (G,T) ( G , T ) .
We begin by defining the portal set Portals( R , T ) (R,T) ( R , T ) for a shortest path R R R with respect to a terminal set T T T . Before proceeding, we first restate Lemma 3.20, which is referenced in the definition.
Lemma 3.20. Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set lying on h h h holes, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. Let R R R be a shortest path in G G G . Then, there exists an algorithm that computes the set Portals ( R , T , ε ) : = ⋃ t ∈ T Portals ( R , t , ε ) \operatorname{Portals}(R,T,\varepsilon) := \bigcup_{t\in T}\operatorname{Portals}(R,t,\varepsilon) Portals ( R , T , ε ) := ⋃ t ∈ T Portals ( R , t , ε ) , which lies on R R R and has size O ( ∣ T ∣ log n / ε ) O(|T|\log n/\varepsilon) O ( ∣ T ∣ log n / ε ) , in time O ( n h log ∣ T ∣ ) O(nh\log|T|) O ( nh log ∣ T ∣ ) .
Definition 4.13 (Portal Set SlicePortals( R , T , ε ) (R,T,\varepsilon) ( R , T , ε ) ). Let G G G be a planar graph with h ≥ 2 h \ge2 h ≥ 2 holes, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. Let R R R be the shortest path between the closest pair of holes. Then, we define the set SlicePortals( R , T , ε ) (R,T,\varepsilon) ( R , T , ε ) of portals on R R R as
SlicePortals ( R , T , ε ) : = Portals ( R , T , ε ′ ′ ) , \operatorname{SlicePortals}(R,T,\varepsilon) := \operatorname{Portals}(R,T,\varepsilon''), SlicePortals ( R , T , ε ) := Portals ( R , T , ε ′′ ) , where Portals ( ⋅ , ⋅ , ⋅ ) \operatorname{Portals}(\cdot,\cdot,\cdot) Portals ( ⋅ , ⋅ , ⋅ ) is from Lemma 3.20, and ε ′ ′ = ε ′ / 2 h + 5 \varepsilon'' = \varepsilon'/2^{h+5} ε ′′ = ε ′ / 2 h + 5 and ε ′ = ε / ( 2 h ) \varepsilon' = \varepsilon/(2h) ε ′ = ε / ( 2 h ) .
Intuitively, the choice of ε ′ ′ \varepsilon'' ε ′′ is influenced by two factors:
By Claim 4.12, for every pattern Φ \Phi Φ , R R R divides each Φ \Phi Φ -respecting shortest path into O ( 2 h ) O(2^h) O ( 2 h ) subpaths. Hence, we set ε ′ ′ = O ( ε ′ / 2 h ) \varepsilon'' = O(\varepsilon'/2^h) ε ′′ = O ( ε ′ / 2 h ) .
As we will observe later, we recursively slice along the shortest path to reduce the h h h -hole instance into a one-hole instance. Since this reduction involves a sequence of O ( h ) O(h) O ( h ) instances, we set ε ′ = O ( ε / h ) \varepsilon' = O(\varepsilon/h) ε ′ = O ( ε / h ) .
For convenience, we restate Claim 3.21, which will be used later in the proofs of this subsection.
Claim 3.21. Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. Let R R R be a shortest path in G G G on which an ε \varepsilon ε -cover Portals ( R , T , ε ) \operatorname{Portals}(R,T,\varepsilon) Portals ( R , T , ε ) is computed as defined in Lemma 3.20. Then, for any t 1 t_1 t 1 -t 2 t_2 t 2 path P P P with t 1 , t 2 ∈ T t_1,t_2 \in T t 1 , t 2 ∈ T , if P P P crosses R R R , the distance from any crossing vertex on R R R to its closest portal is O ( ε ∣ P ∣ ) O(\varepsilon|P|) O ( ε ∣ P ∣ ) .
We introduce the notation necessary for our ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator construction. This consists of two parts: first, we define the sliced instance ( G i , T i ) (G_i,T_i) ( G i , T i ) based on ( G , T ) (G,T) ( G , T ) for 1 ≤ i ≤ h 1 \le i \le h 1 ≤ i ≤ h using a top-down approach. Next, we use this definition in a bottom-up fashion to define the glued instance ( G i ′ , T i ′ ) (G'_i,T'_i) ( G i ′ , T i ′ ) based on ( G h , T h ) (G_h,T_h) ( G h , T h ) for 1 ≤ i ≤ h 1 \le i \le h 1 ≤ i ≤ h .
We now formalize the definition of a sliced instance ( G i , T i ) (G_i,T_i) ( G i , T i ) for 1 ≤ i ≤ h 1 \le i \le h 1 ≤ i ≤ h . Intuitively, this instance is derived from ( G , T ) (G,T) ( G , T ) by iteratively slicing along the shortest paths between pairs of holes and adding the portals defined in Definition 4.13 on these shortest paths to the terminal set. We present this formally in the following definition.
Definition 4.14 (Sliced Instance ( G i , T i ) (G_i,T_i) ( G i , T i ) Based on ( G , T ) (G,T) ( G , T ) with Parameter ε \varepsilon ε ). Let G G G be a planar graph with h ≥ 2 h \ge2 h ≥ 2 holes, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. For 1 ≤ i ≤ h 1 \le i \le h 1 ≤ i ≤ h , we recursively define the instance ( G i , T i ) (G_i,T_i) ( G i , T i ) as follows.
We set ( G 1 , T 1 ) : = ( G , T ) (G_1,T_1) := (G,T) ( G 1 , T 1 ) := ( G , T ) .
For 2 ≤ i ≤ h 2 \le i \le h 2 ≤ i ≤ h , we define ( G i , T i ) (G_i,T_i) ( G i , T i ) based on ( G i − 1 , T i − 1 ) (G_{i-1},T_{i-1}) ( G i − 1 , T i − 1 ) as follows. Let R i − 1 R_{i-1} R i − 1 be the shortest path connecting the closest pair of holes in G i − 1 G_{i-1} G i − 1 .
T i : = T i − 1 ∪ SlicePortals ( R i − 1 , T i − 1 , ε ) ∪ SlicePortals ‾ ( R i − 1 , T i − 1 , ε ) , T_i := T_{i-1} \cup\operatorname{SlicePortals}(R_{i-1},T_{i-1},\varepsilon) \cup\overline{\operatorname{SlicePortals}}(R_{i-1},T_{i-1},\varepsilon), T i := T i − 1 ∪ SlicePortals ( R i − 1 , T i − 1 , ε ) ∪ SlicePortals ( R i − 1 , T i − 1 , ε ) ,
where SlicePortals ‾ ( R i − 1 , T i − 1 , ε ) \overline{\operatorname{SlicePortals}}(R_{i-1},T_{i-1},\varepsilon) SlicePortals ( R i − 1 , T i − 1 , ε ) is the set of vertices on R ‾ i − 1 \overline{R}_{i-1} R i − 1 that are copies of SlicePortals ( R i − 1 , T i − 1 , ε ) \operatorname{SlicePortals}(R_{i-1},T_{i-1},\varepsilon) SlicePortals ( R i − 1 , T i − 1 , ε ) .
Refer to Figure 3 a to Figure 3 d for an illustration of Definition 4.14. Since each instance ( G i , T i ) (G_i,T_i) ( G i , T i ) has one fewer hole than its predecessor ( G i − 1 , T i − 1 ) (G_{i-1},T_{i-1}) ( G i − 1 , T i − 1 ) , the following observation is evident.
Observation 4.15. For 1 ≤ i ≤ h 1 \le i \le h 1 ≤ i ≤ h , each sliced instance ( G i , T i ) (G_i,T_i) ( G i , T i ) as defined in Definition 4.14 is a ( h − i + 1 ) (h-i+1) ( h − i + 1 ) -hole instance.
We now define the glued instance ( G i ′ , T i ′ ) (G'_i,T'_i) ( G i ′ , T i ′ ) for 1 ≤ i ≤ h 1 \le i \le h 1 ≤ i ≤ h . Intuitively, ( G i ′ , T i ′ ) (G'_i,T'_i) ( G i ′ , T i ′ ) is constructed recursively by gluing the shortest path R i R_i R i , as defined in Definition 4.14, onto its portals in the instance ( G i + 1 ′ , T i + 1 ′ ) (G'_{i+1},T'_{i+1}) ( G i + 1 ′ , T i + 1 ′ ) . We formalize this process in the following definition.
Definition 4.16 (Glued Instance ( G i ′ , T i ′ ) (G'_i,T'_i) ( G i ′ , T i ′ ) Based on ( G h , T h ) (G_h,T_h) ( G h , T h ) with Parameter ε \varepsilon ε ). Let G G G be a planar graph with h ≥ 2 h \ge2 h ≥ 2 holes, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. For 1 ≤ i ≤ h 1 \le i \le h 1 ≤ i ≤ h , let ( G i , T i ) (G_i,T_i) ( G i , T i ) be the sliced instance as defined in Definition 4.14. For 1 ≤ i ≤ h 1 \le i \le h 1 ≤ i ≤ h , we recursively define the instance ( G i ′ , T i ′ ) (G'_i,T'_i) ( G i ′ , T i ′ ) as follows.
We set ( G h ′ , T h ′ ) : = ( G h , T h ) (G'_h,T'_h) := (G_h,T_h) ( G h ′ , T h ′ ) := ( G h , T h ) .
For 1 ≤ i ≤ h − 1 1 \le i \le h-1 1 ≤ i ≤ h − 1 , we define ( G i ′ , T i ′ ) (G'_i,T'_i) ( G i ′ , T i ′ ) based on ( G i + 1 ′ , T i + 1 ′ ) (G'_{i+1},T'_{i+1}) ( G i + 1 ′ , T i + 1 ′ ) as follows. Let R i R_i R i be the shortest path connecting the closest pair of holes in G i G_i G i as defined in Definition 4.14.
G i ′ G'_i G i ′ is the graph obtained from G i + 1 ′ G'_{i+1} G i + 1 ′ by gluing the portals of R i R_i R i . i.e., we contract every vertex v ∈ SlicePortals ( R i , T i , ε ) v \in\operatorname{SlicePortals}(R_i,T_i,\varepsilon) v ∈ SlicePortals ( R i , T i , ε ) with its copy v ‾ ∈ SlicePortals ‾ ( R i , T i , ε ) \overline{v} \in\overline{\operatorname{SlicePortals}}(R_i,T_i,\varepsilon) v ∈ SlicePortals ( R i , T i , ε ) .
T i ′ T'_i T i ′ is simply set as T i T_i T i .
Note that the gluing procedure in Definition 4.16 is performed on G i + 1 ′ G'_{i+1} G i + 1 ′ and not on G i + 1 G_{i+1} G i + 1 . However, the shortest path R i R_i R i is still available in G i + 1 ′ G'_{i+1} G i + 1 ′ because we only glue the shortest paths R h − 1 , … , R i + 1 R_{h-1},\ldots,R_{i+1} R h − 1 , … , R i + 1 prior to gluing back R i R_i R i . All of these paths were sliced after R i R_i R i was sliced in G i G_i G i . Thus, there is no ambiguity in defining R i R_i R i within G i + 1 ′ G'_{i+1} G i + 1 ′ .
Refer to Figure 4 a and Figure 4 b for an illustration of Definition 4.16 . Since each instance ( G i ′ , T i ′ ) (G'_i,T'_i) ( G i ′ , T i ′ ) restores the hole that was removed from ( G i , T i ) (G_i,T_i) ( G i , T i ) during the formation of ( G i + 1 , T i + 1 ) (G_{i+1},T_{i+1}) ( G i + 1 , T i + 1 ) , the following observation is evident.
Observation 4.17. For 1 ≤ i ≤ h 1 \le i \le h 1 ≤ i ≤ h , each glued instance ( G i ′ , T i ′ ) (G'_i,T'_i) ( G i ′ , T i ′ ) as defined in Definition 4.16 is a ( h − i + 1 ) (h-i+1) ( h − i + 1 ) -hole instance.
We are now prepared to prove the most technical part of this subsection, which states that each glued instance ( G i ′ , T i ′ ) (G'_i,T'_i) ( G i ′ , T i ′ ) serves as a good approximation for the corresponding sliced instance ( G i , T i ) (G_i,T_i) ( G i , T i ) . In particular, ( G 1 ′ , T 1 ′ ) (G'_1,T'_1) ( G 1 ′ , T 1 ′ ) approximates ( G 1 , T 1 ) = ( G , T ) (G_1,T_1) = (G,T) ( G 1 , T 1 ) = ( G , T ) .
Remark 4.18 (Notation). Since T i ′ = T i T'_i = T_i T i ′ = T i in Definition 4.16 , for the remainder of this section, we will use ( G i ′ , T i ) (G'_i,T_i) ( G i ′ , T i ) instead of ( G i ′ , T i ′ ) (G'_i,T'_i) ( G i ′ , T i ′ ) to simplify the notation.
Claim 4.19. Let G G G be a planar graph with h ≥ 2 h \ge2 h ≥ 2 holes, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. For each 1 ≤ i ≤ h 1 \le i \le h 1 ≤ i ≤ h , let ( G i , T i ) (G_i,T_i) ( G i , T i ) and ( G i ′ , T i ) (G'_i,T_i) ( G i ′ , T i ) be instances with parameter ε \varepsilon ε as defined in Definitions 4.14 and 4.16. Then, for every t 1 , t 2 ∈ T i t_1,t_2 \in T_i t 1 , t 2 ∈ T i and pattern Φ \Phi Φ , the graph G i ′ G'_i G i ′ approximates every Φ \Phi Φ -respecting t 1 t_1 t 1 -t 2 t_2 t 2 shortest path in G i G_i G i within a factor of ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) .
Proof. We prove the claim by induction on I j : = G h − j + 1 I_j := G_{h-j+1} I j := G h − j + 1 for 1 ≤ j ≤ h 1 \le j \le h 1 ≤ j ≤ h ; we show that, for every t 1 , t 2 ∈ T h − j + 1 t_1,t_2 \in T_{h-j+1} t 1 , t 2 ∈ T h − j + 1 and pattern Φ \Phi Φ , the graph G h − j + 1 ′ G'_{h-j+1} G h − j + 1 ′ , defined in Definition 4.16 , approximates every Φ \Phi Φ -respecting t 1 t_1 t 1 -t 2 t_2 t 2 shortest path in G h − j + 1 G_{h-j+1} G h − j + 1 with quality ( 1 + ε ′ ) j − 1 (1+\varepsilon')^{j-1} ( 1 + ε ′ ) j − 1 , where ε ′ \varepsilon' ε ′ is defined in Definition 4.13 . The claim then follows because ε ′ = ε / ( 2 h ) \varepsilon'=\varepsilon/(2h) ε ′ = ε / ( 2 h ) , and
( 1 + ε ′ ) i ≤ ( 1 + ε ′ ) h ≤ 1 + ε . (1+\varepsilon')^i \le(1+\varepsilon')^h \le1+\varepsilon. ( 1 + ε ′ ) i ≤ ( 1 + ε ′ ) h ≤ 1 + ε .
For the base case j = 1 j=1 j = 1 , the result holds trivially since G h ′ = G h G'_h=G_h G h ′ = G h by Definition 4.16 . The remainder of the proof addresses the case j = i + 1 j=i+1 j = i + 1 , where i ≥ 1 i \ge1 i ≥ 1 . We assume that I j − 1 ′ = I i ′ : = G h − i + 1 ′ I'_{j-1}=I'_i:=G'_{h-i+1} I j − 1 ′ = I i ′ := G h − i + 1 ′ approximates every Φ \Phi Φ -respecting t 1 t_1 t 1 -t 2 t_2 t 2 shortest path in I i = G h − i + 1 I_i=G_{h-i+1} I i = G h − i + 1 with quality ( 1 + ε ′ ) i − 1 (1+\varepsilon')^{i-1} ( 1 + ε ′ ) i − 1 .
Let P P P be the Φ \Phi Φ -respecting t 1 t_1 t 1 -t 2 t_2 t 2 shortest path in I j = G h − i I_j=G_{h-i} I j = G h − i for t 1 , t 2 ∈ T h − i t_1,t_2 \in T_{h-i} t 1 , t 2 ∈ T h − i . Recall that G h − i + 1 G_{h-i+1} G h − i + 1 is obtained from G h − i G_{h-i} G h − i by slicing along the shortest path R : = R h − i R:=R_{h-i} R := R h − i in G h − i G_{h-i} G h − i (using Algorithm 1), where R R R is the shortest path between any two holes of G h − i G_{h-i} G h − i . We denote by R ‾ \overline{R} R the copy of R R R in the sliced graph G h − i + 1 G_{h-i+1} G h − i + 1 .
By Claim 4.12, R R R partitions P P P into at most 2 h + 1 + 2 2^{h+1}+2 2 h + 1 + 2 segments. Let p 1 , … , p l p_1,\ldots,p_l p 1 , … , p l be the sequence of vertices on P P P (starting from t 1 t_1 t 1 ) that cross R R R while traversing on P P P . Thus, l ≤ 2 h + 1 + 1 ≤ 2 h + 2 l \le2^{h+1}+1 \le2^{h+2} l ≤ 2 h + 1 + 1 ≤ 2 h + 2 . If P P P does not cross R R R , then P P P exists in G h − i + 1 G_{h-i+1} G h − i + 1 , so the induction hypothesis directly gives the bound. Thus, for the rest of the proof, we assume that l ≥ 1 l \ge1 l ≥ 1 .
To construct G h − i ′ G'_{h-i} G h − i ′ , we glue G h − i + 1 ′ G'_{h-i+1} G h − i + 1 ′ back along the portals on R R R and R ‾ \overline{R} R . Refer to Figure 11 for an illustration of G h − i ′ G'_{h-i} G h − i ′ and the subpaths of P P P in it.
Figure 11. An illustration of G h − i ′ G'_{h-i} G h − i ′ obtained from G h − i + 1 ′ G'_{h-i+1} G h − i + 1 ′ , where the (orange) glued lines are R R R and its copy R ‾ \overline{R} R in G h − i + 1 G_{h-i+1} G h − i + 1 . The path P P P can cross R R R several times, which are depicted by the vertices p 1 , … , p l p_1,\ldots,p_l p 1 , … , p l . The vertices p ˉ 1 , … , p ˉ j \bar{p}_1,\ldots,\bar{p}_j p ˉ 1 , … , p ˉ j are the corresponding copy vertices on R ‾ \overline{R} R . This results in l l l subpaths of P P P in G h − i ′ G'_{h-i} G h − i ′ , such as P [ t 1 , p 1 ] P[t_1,p_1] P [ t 1 , p 1 ] and P [ p ˉ 1 , p ˉ 2 ] P[\bar{p}_1,\bar{p}_2] P [ p ˉ 1 , p ˉ 2 ] in this example. By Claim 4.12, it follows that l ≤ 2 h + 2 l \le2^{h+2} l ≤ 2 h + 2 .
To provide an upper bound on the length of the shortest Φ \Phi Φ -respecting t 1 t_1 t 1 -t 2 t_2 t 2 path in G h − i ′ G'_{h-i} G h − i ′ , we construct a t 1 t_1 t 1 -t 2 t_2 t 2 path P ′ P' P ′ with pattern Φ \Phi Φ and then bound the length of P ′ P' P ′ . The following notation is used in the construction of P ′ P' P ′ . 44
Let t 1 ′ t'_1 t 1 ′ be the portal in SlicePortals ( R , T h − i , ε ) \operatorname{SlicePortals}(R,T_{h-i},\varepsilon) SlicePortals ( R , T h − i , ε ) that is associated with p 1 p_1 p 1 from the terminal t 1 t_1 t 1 (i.e., t 1 ′ t'_1 t 1 ′ is the closest portal to p 1 p_1 p 1 in Portals ( R , { t 1 } , ε ′ ′ ) \operatorname{Portals}(R,\{t_1\},\varepsilon'') Portals ( R , { t 1 } , ε ′′ ) ), and let S [ t 1 , t 1 ′ ] S[t_1,t'_1] S [ t 1 , t 1 ′ ] be the shortest t 1 t_1 t 1 -t 1 ′ t'_1 t 1 ′ path in G h − i + 1 G_{h-i+1} G h − i + 1 with the same pattern as P [ t 1 , p 1 ] P[t_1,p_1] P [ t 1 , p 1 ] . Refer to Figure 12 a for an illustration.
Figure 12. An illustration of the subpaths of the path P ′ P' P ′ chosen in G h − i + 1 ′ G_{h-i+1}' G h − i + 1 ′ for subpaths of P P P for the case that P P P enters R R R and leaves R ‾ \overline{R} R (starting from t 1 t_1 t 1 ). Each subpath of P ′ P' P ′ has the same pattern as its corresponding subpath of P P P : (a) For the subpath P [ t 1 , p ˉ 1 ] P[t_1,\bar{p}_1] P [ t 1 , p ˉ 1 ] , we select the shortest t 1 t_1 t 1 -t 1 ′ t_1' t 1 ′ path S [ t 1 , t 1 ′ ] S[t_1,t_1'] S [ t 1 , t 1 ′ ] with the same pattern as P [ p ˉ 1 , p ˉ 1 ] P[\bar{p}_1,\bar{p}_1] P [ p ˉ 1 , p ˉ 1 ] , where t 1 ′ t_1' t 1 ′ is the portal on R ‾ \overline{R} R associated with p 1 p_1 p 1 via t 1 t_1 t 1 . The subpath P ′ [ t 1 , p ˉ 1 ] P'[t_1,\bar{p}_1] P ′ [ t 1 , p ˉ 1 ] connecting t 1 t_1 t 1 to p ˉ 1 \bar{p}_1 p ˉ 1 is then defined as S [ t 1 , t 1 ′ ] ∘ R ‾ [ t 1 ′ , p ˉ 1 ] S[t_1,t_1'] \circ\overline{R}[t_1',\bar{p}_1] S [ t 1 , t 1 ′ ] ∘ R [ t 1 ′ , p ˉ 1 ] , represented by the dashed green line. A similar approach is applied to define P ′ [ t 2 , p ˉ j ] P'[t_2,\bar{p}_j] P ′ [ t 2 , p ˉ j ] . (b) For the subpath P [ p ˉ k , p ˉ k + 1 ] P[\bar{p}_k,\bar{p}_{k+1}] P [ p ˉ k , p ˉ k + 1 ] , we first use R ‾ \overline{R} R to traverse from p ˉ k \bar{p}_k p ˉ k to its closest portal p k ′ p_k' p k ′ and from p ˉ k + 1 \bar{p}_{k+1} p ˉ k + 1 to its closest portal p k + 1 ′ p_{k+1}' p k + 1 ′ . Next, we find the shortest p k ′ p_k' p k ′ -p k + 1 ′ p_{k+1}' p k + 1 ′ path S [ p k ′ , p k + 1 ′ ] S[p_k',p_{k+1}'] S [ p k ′ , p k + 1 ′ ] that has the same pattern as P [ p ˉ k , p ˉ k + 1 ] P[\bar{p}_k,\bar{p}_{k+1}] P [ p ˉ k , p ˉ k + 1 ] . The subpath P ′ [ p ˉ k , p ˉ k + 1 ] P'[\bar{p}_k,\bar{p}_{k+1}] P ′ [ p ˉ k , p ˉ k + 1 ] is then set as R ‾ [ p ˉ k , p k ′ ] ∘ S [ p k ′ , p k + 1 ′ ] ∘ R ‾ [ p ˉ k + 1 , p k + 1 ′ ] \overline{R}[\bar{p}_k,p_k'] \circ S[p_k',p_{k+1}'] \circ\overline{R}[\bar{p}_{k+1},p_{k+1}'] R [ p ˉ k , p k ′ ] ∘ S [ p k ′ , p k + 1 ′ ] ∘ R [ p ˉ k + 1 , p k + 1 ′ ] , illustrated by the dashed green line.
Since P [ t 1 , p 1 ] P[t_1,p_1] P [ t 1 , p 1 ] and S [ t 1 , t 1 ′ ] S[t_1,t'_1] S [ t 1 , t 1 ′ ] have the same pattern and that P [ t 1 , p 1 ] P[t_1,p_1] P [ t 1 , p 1 ] is a shortest pattern-respecting path, it follows that
∣ P [ t 1 , p 1 ] ∣ ≤ ∣ S [ t 1 , t 1 ′ ] ∪ R [ t 1 ′ , p ‾ 1 ] ∣ = ∣ S [ t 1 , t 1 ′ ] ∪ R ‾ [ t 1 ′ , p ‾ 1 ] ∣ . (9) \left|P[t_1,p_1]\right| \le\left|S[t_1,t'_1] \cup R[t'_1,\overline{p}_1]\right| = \left|S[t_1,t'_1] \cup\overline{R}[t'_1,\overline{p}_1]\right|. \tag*{(9)} ∣ P [ t 1 , p 1 ] ∣ ≤ ∣ S [ t 1 , t 1 ′ ] ∪ R [ t 1 ′ , p 1 ] ∣ = S [ t 1 , t 1 ′ ] ∪ R [ t 1 ′ , p 1 ] . (9)
For each 1 ≤ k ≤ l − 1 1 \le k \le l-1 1 ≤ k ≤ l − 1 , let p k ′ p'_k p k ′ be the closest portal in SlicePortals ( R , T h − i , ε ) \operatorname{SlicePortals}(R,T_{h-i},\varepsilon) SlicePortals ( R , T h − i , ε ) to p k p_k p k . Let S [ p k ′ , p k + 1 ′ ] S[p'_k,p'_{k+1}] S [ p k ′ , p k + 1 ′ ] denote the shortest p k ′ p'_k p k ′ -p k + 1 ′ p'_{k+1} p k + 1 ′ path in G h − i + 1 G_{h-i+1} G h − i + 1 that has the same pattern as
P [ p k , p k + 1 ] P[p_k,p_{k+1}] P [ p k , p k + 1 ] in G h − i + 1 G_{h-i+1} G h − i + 1 . Similarly, let S [ p k , p k + 1 ] S[p_k,p_{k+1}] S [ p k , p k + 1 ] denote the shortest p k p_k p k -p k + 1 p_{k+1} p k + 1 path in G h − i + 1 G_{h-i+1} G h − i + 1 that has the same pattern as P [ p k , p k + 1 ] P[p_k,p_{k+1}] P [ p k , p k + 1 ] in G h − i + 1 G_{h-i+1} G h − i + 1 .45 Refer to Figure 12 b for an illustration. By using the triangle inequality, we have
∣ S [ p k ′ , p k + 1 ′ ] ∣ ≤ ∣ R [ p k , p k ′ ] ∪ S [ p k , p k + 1 ] ∪ R [ p k + 1 , p k + 1 ′ ] ∣ = ∣ R [ p k , p k ′ ] ∣ + ∣ S [ p k , p k + 1 ] ∣ + ∣ R [ p k + 1 , p k + 1 ′ ] ∣ . (10) \left|S[p'_k,p'_{k+1}]\right| \le\left|R[p_k,p'_k] \cup S[p_k,p_{k+1}] \cup R[p_{k+1},p'_{k+1}]\right|
= \left|R[p_k,p'_k]\right|+\left|S[p_k,p_{k+1}]\right|+\left|R[p_{k+1},p'_{k+1}]\right|. \tag*{(10)} S [ p k ′ , p k + 1 ′ ] ≤ R [ p k , p k ′ ] ∪ S [ p k , p k + 1 ] ∪ R [ p k + 1 , p k + 1 ′ ] = ∣ R [ p k , p k ′ ] ∣ + ∣ S [ p k , p k + 1 ] ∣ + R [ p k + 1 , p k + 1 ′ ] . (10)
Let t 2 ′ t'_2 t 2 ′ be the portal in SliсePortals( R , T h − i , ε ) (R,T_{h-i},\varepsilon) ( R , T h − i , ε ) that is associated with p l p_l p l via the terminal t 2 t_2 t 2 . Similar to the first item, since P [ t 2 , p l ] P[t_2,p_l] P [ t 2 , p l ] and S [ t 2 , t 2 ′ ] S[t_2,t'_2] S [ t 2 , t 2 ′ ] have the same pattern and that P [ t 2 , p l ] P[t_2,p_l] P [ t 2 , p l ] is a shortest pattern-respecting path, we have
∣ P [ t 2 , p l ] ∣ ≤ ∣ S [ t 2 , t 2 ′ ] ∪ R [ t 2 ′ , p l ] ∣ = ∣ S [ t 2 , t 2 ′ ] ∪ R [ t 2 ′ , p ˉ l ] ∣ . (11) \left|P[t_2,p_l]\right| \le\left|S[t_2,t'_2] \cup R[t'_2,p_l]\right| = \left|S[t_2,t'_2] \cup R[t'_2,\bar{p}_l]\right|. \tag*{(11)} ∣ P [ t 2 , p l ] ∣ ≤ ∣ S [ t 2 , t 2 ′ ] ∪ R [ t 2 ′ , p l ] ∣ = ∣ S [ t 2 , t 2 ′ ] ∪ R [ t 2 ′ , p ˉ l ] ∣ . (11)
where S [ t 2 , t 2 ′ ] S[t_2,t'_2] S [ t 2 , t 2 ′ ] is the shortest t 2 t_2 t 2 -t 2 ′ t'_2 t 2 ′ path in G h − i + 1 G_{h-i+1} G h − i + 1 with the same pattern as P [ t 2 , p l ] P[t_2,p_l] P [ t 2 , p l ] .
Now, we construct the path P ′ P' P ′ in G h − i ′ G'_{h-i} G h − i ′ by using the selected portals above in a natural way as follows. Note that the shortest paths used to define P ′ P' P ′ are taken from G h − i + 1 ′ G'_{h-i+1} G h − i + 1 ′ (rather than G h − i + 1 G_{h-i+1} G h − i + 1 ); we use the notation S ′ [ ⋅ , ⋅ ] S'[\,\cdot,\cdot\,] S ′ [ ⋅ , ⋅ ] for the shortest paths in G h − i + 1 G_{h-i+1} G h − i + 1 and the notation S ′ [ ⋅ , ⋅ ] S'[\,\cdot,\cdot\,] S ′ [ ⋅ , ⋅ ] for the shortest paths in G h − i + 1 ′ G'_{h-i+1} G h − i + 1 ′ corresponding to one defined in S [ ⋅ , ⋅ ] S[\,\cdot,\cdot\,] S [ ⋅ , ⋅ ] .
The subpath P ′ [ t 1 , p ˉ 1 ] P'[t_1,\bar{p}_1] P ′ [ t 1 , p ˉ 1 ] consists of the shortest t 1 t_1 t 1 -t 1 ′ t'_1 t 1 ′ path S ′ [ t 1 , t 1 ′ ] S'[t_1,t'_1] S ′ [ t 1 , t 1 ′ ] in G h − i + 1 ′ G'_{h-i+1} G h − i + 1 ′ and the subpath R [ t 1 ′ , p ˉ 1 ] R[t'_1,\bar{p}_1] R [ t 1 ′ , p ˉ 1 ] . Specifically, we define
P ′ [ t 1 , p ˉ 1 ] : = S ′ [ t 1 , t 1 ′ ] ∘ R [ t 1 ′ , p ˉ 1 ] . P'[t_1,\bar{p}_1] := S'[t_1,t'_1] \circ R[t'_1,\bar{p}_1]. P ′ [ t 1 , p ˉ 1 ] := S ′ [ t 1 , t 1 ′ ] ∘ R [ t 1 ′ , p ˉ 1 ] .
For 1 ≤ k ≤ l − 1 1 \le k \le l-1 1 ≤ k ≤ l − 1 , we define P ′ [ p k , p k + 1 ] P'[p_k,p_{k+1}] P ′ [ p k , p k + 1 ] and P ′ [ p ˉ k , p ˉ k + 1 ] P'[\bar{p}_k,\bar{p}_{k+1}] P ′ [ p ˉ k , p ˉ k + 1 ] as
P ′ [ p k , p k + 1 ] : = R [ p k , p k ′ ] ∘ S ′ [ p k ′ , p k + 1 ′ ] ∘ R [ p k + 1 , p k + 1 ′ ] , and P'[p_k,p_{k+1}] := R[p_k,p_k'] \circ S'[p_k',p_{k+1}'] \circ R[p_{k+1},p_{k+1}'], \text{ and} P ′ [ p k , p k + 1 ] := R [ p k , p k ′ ] ∘ S ′ [ p k ′ , p k + 1 ′ ] ∘ R [ p k + 1 , p k + 1 ′ ] , and
P ′ [ p ˉ k , p ˉ k + 1 ] : = R [ p ˉ k , p ˉ k ′ ] ∘ S ′ [ p ˉ k ′ , p ˉ k + 1 ′ ] ∘ R [ p ˉ k + 1 , p ˉ k + 1 ′ ] , P'[\bar{p}_k,\bar{p}_{k+1}] := R[\bar{p}_k,\bar{p}_k'] \circ S'[\bar{p}_k',\bar{p}_{k+1}'] \circ R[\bar{p}_{k+1},\bar{p}_{k+1}'], P ′ [ p ˉ k , p ˉ k + 1 ] := R [ p ˉ k , p ˉ k ′ ] ∘ S ′ [ p ˉ k ′ , p ˉ k + 1 ′ ] ∘ R [ p ˉ k + 1 , p ˉ k + 1 ′ ] ,
where S ′ [ p k ′ , p k + 1 ′ ] S'[p_k',p_{k+1}'] S ′ [ p k ′ , p k + 1 ′ ] (and S ′ [ p ˉ k ′ , p ˉ k + 1 ′ ] S'[\bar{p}_k',\bar{p}_{k+1}'] S ′ [ p ˉ k ′ , p ˉ k + 1 ′ ] ) denotes the shortest p k ′ p_k' p k ′ -p k + 1 ′ p_{k+1}' p k + 1 ′ (and p ˉ k ′ \bar{p}_k' p ˉ k ′ -p ˉ k + 1 ′ \bar{p}_{k+1}' p ˉ k + 1 ′ ) path in G h − i + 1 ′ G_{h-i+1}' G h − i + 1 ′ that has the same pattern as P [ p k , p k + 1 ] P[p_k,p_{k+1}] P [ p k , p k + 1 ] (and P [ p ˉ k , p ˉ k + 1 ] P[\bar{p}_k,\bar{p}_{k+1}] P [ p ˉ k , p ˉ k + 1 ] ) in G h − i + 1 ′ G_{h-i+1}' G h − i + 1 ′ .
The subpath P ′ [ t 2 , p ˉ l ] P'[t_2,\bar{p}_l] P ′ [ t 2 , p ˉ l ] is defined similarly as
P ′ [ t 2 , p ˉ l ] : = S ′ [ t 2 , t 2 ′ ] ∘ R [ t 2 ′ , p ˉ l ] . P'[t_2,\bar{p}_l] := S'[t_2,t_2'] \circ R[t_2',\bar{p}_l]. P ′ [ t 2 , p ˉ l ] := S ′ [ t 2 , t 2 ′ ] ∘ R [ t 2 ′ , p ˉ l ] .
By the induction hypothesis, the path S ′ [ p k ′ , p k + 1 ′ ] S'[p_k',p_{k+1}'] S ′ [ p k ′ , p k + 1 ′ ] in G h − i + 1 ′ G_{h-i+1}' G h − i + 1 ′ approximates S [ p k ′ , p k + 1 ′ ] S[p_k',p_{k+1}'] S [ p k ′ , p k + 1 ′ ] in G h − i + 1 G_{h-i+1} G h − i + 1 with quality ( 1 + ϵ ′ ) i − 1 (1+\epsilon')^{i-1} ( 1 + ϵ ′ ) i − 1 . Specifically, we have
∣ S ′ [ p k ′ , p k + 1 ′ ] ∣ ≤ ( 1 + ϵ ′ ) i − 1 ∣ S [ p k ′ , p k + 1 ′ ] ∣ , (12) \lvert S'[p_k',p_{k+1}']\rvert\le(1+\epsilon')^{i-1}\lvert S[p_k',p_{k+1}']\rvert, \tag*{(12)} ∣ S ′ [ p k ′ , p k + 1 ′ ]∣ ≤ ( 1 + ϵ ′ ) i − 1 ∣ S [ p k ′ , p k + 1 ′ ]∣ , (12)
and
∣ S ′ [ t 1 , t 1 ′ ] ∣ ≤ ( 1 + ϵ ′ ) i − 1 ∣ S [ t 1 , t 1 ′ ] ∣ and ∣ S ′ [ t 2 , t 2 ′ ] ∣ ≤ ( 1 + ϵ ′ ) i − 1 ∣ S [ t 2 , t 2 ′ ] ∣ . (13) \lvert S'[t_1,t_1']\rvert\le(1+\epsilon')^{i-1}\lvert S[t_1,t_1']\rvert\quad\text{and} \quad\lvert S'[t_2,t_2']\rvert\le(1+\epsilon')^{i-1}\lvert S[t_2,t_2']\rvert. \tag*{(13)} ∣ S ′ [ t 1 , t 1 ′ ]∣ ≤ ( 1 + ϵ ′ ) i − 1 ∣ S [ t 1 , t 1 ′ ]∣ and ∣ S ′ [ t 2 , t 2 ′ ]∣ ≤ ( 1 + ϵ ′ ) i − 1 ∣ S [ t 2 , t 2 ′ ]∣ . (13)
Combining Equations (10) and (12) yields
∣ S ′ [ p k ′ , p k + 1 ′ ] ∣ ≤ ( 1 + ϵ ′ ) i − 1 ( ∣ R [ p k , p k ′ ] ∣ + ∣ S [ p k , p k + 1 ] ∣ + ∣ R [ p k + 1 , p k + 1 ′ ] ∣ ) . (14) \lvert S'[p_k',p_{k+1}']\rvert\le(1+\epsilon')^{i-1}\left(\lvert R[p_k,p_k']\rvert+\lvert S[p_k,p_{k+1}]\rvert+\lvert R[p_{k+1},p_{k+1}']\rvert\right). \tag*{(14)} ∣ S ′ [ p k ′ , p k + 1 ′ ]∣ ≤ ( 1 + ϵ ′ ) i − 1 ( ∣ R [ p k , p k ′ ]∣ + ∣ S [ p k , p k + 1 ]∣ + ∣ R [ p k + 1 , p k + 1 ′ ]∣ ) . (14)
Using the definition of P ′ P' P ′ in G h − i ′ G'_{h-i} G h − i ′ , we obtain
∣ P ′ ∣ = ∣ P ′ [ t 1 , p ‾ 1 ′ ] ∣ + ∣ P ′ [ t 2 , p ‾ l ′ ] ∣ + ∑ k = 1 l − 1 ∣ P ′ [ p k , p k + 1 ] ∣ = ∣ R [ p 1 , t 1 ′ ] ∪ S ′ [ t 1 , t 1 ′ ] ∣ + ∣ R [ p j , t 2 ′ ] ∪ S ′ [ t 2 , t 2 ′ ] ∣ + ∑ k = 1 l − 1 ( ∣ R [ p k , p k ′ ] ∪ S ′ [ p k , p k + 1 ] ∪ R [ p k + 1 , p k + 1 ′ ] ∣ ) = ∣ S ′ [ t 1 , t 1 ′ ] ∣ + ∑ k = 1 l − 1 ∣ S ′ [ p k , p k + 1 ] ∣ + ∣ S ′ [ t 2 , t 2 ′ ] ∣ + ∣ R [ p 1 , t 1 ′ ] ∣ + ∑ k = 1 l − 1 ( ∣ R [ p k , p k ′ ] ∣ + ∣ R [ p k + 1 , p k + 1 ′ ] ∣ ) + ∣ R [ p l , t 2 ′ ] ∣ . \begin{aligned}
|P'|={}&|P'[t_1,\overline{p}_1']|+|P'[t_2,\overline{p}_l']|+\sum_{k=1}^{l-1}|P'[p_k,p_{k+1}]|\\
={}&|R[p_1,t_1']\cup S'[t_1,t_1']|+|R[p_j,t_2']\cup S'[t_2,t_2']|\\
&+\sum_{k=1}^{l-1}\left(|R[p_k,p_k']\cup S'[p_k,p_{k+1}]\cup R[p_{k+1},p_{k+1}']|\right)\\
={}&|S'[t_1,t_1']|+\sum_{k=1}^{l-1}|S'[p_k,p_{k+1}]|+|S'[t_2,t_2']|\\
&+|R[p_1,t_1']|+\sum_{k=1}^{l-1}\left(|R[p_k,p_k']|+|R[p_{k+1},p_{k+1}']|\right)+|R[p_l,t_2']|.
\end{aligned} ∣ P ′ ∣ = = = ∣ P ′ [ t 1 , p 1 ′ ] ∣ + ∣ P ′ [ t 2 , p l ′ ] ∣ + k = 1 ∑ l − 1 ∣ P ′ [ p k , p k + 1 ] ∣ ∣ R [ p 1 , t 1 ′ ] ∪ S ′ [ t 1 , t 1 ′ ] ∣ + ∣ R [ p j , t 2 ′ ] ∪ S ′ [ t 2 , t 2 ′ ] ∣ + k = 1 ∑ l − 1 ( ∣ R [ p k , p k ′ ] ∪ S ′ [ p k , p k + 1 ] ∪ R [ p k + 1 , p k + 1 ′ ] ∣ ) ∣ S ′ [ t 1 , t 1 ′ ] ∣ + k = 1 ∑ l − 1 ∣ S ′ [ p k , p k + 1 ] ∣ + ∣ S ′ [ t 2 , t 2 ′ ] ∣ + ∣ R [ p 1 , t 1 ′ ] ∣ + k = 1 ∑ l − 1 ( ∣ R [ p k , p k ′ ] ∣ + ∣ R [ p k + 1 , p k + 1 ′ ] ∣ ) + ∣ R [ p l , t 2 ′ ] ∣.
Using Equations (13) and (14) in the previous equality yields
∣ P ′ ∣ ≤ ( 1 + ε ′ ) i − 1 ( ∣ S [ t 1 , t 1 ′ ] ∣ + ∑ k = 1 l − 1 ∣ S [ p k , p k + 1 ] ∣ + ∣ S [ t 2 , t 2 ′ ] ∣ ) + ∣ R [ p 1 , t 1 ′ ] ∣ + ∑ k = 1 l − 1 ( ∣ R [ p k , p k ′ ] ∣ + ∣ R [ p k + 1 , p k + 1 ′ ] ∣ ) + ∣ R [ p l , t 2 ′ ] ∣ . \begin{aligned}
|P'|\le{}&(1+\varepsilon')^{i-1}\left(|S[t_1,t_1']|+\sum_{k=1}^{l-1}|S[p_k,p_{k+1}]|+|S[t_2,t_2']|\right)\\
&+|R[p_1,t_1']|+\sum_{k=1}^{l-1}\left(|R[p_k,p_k']|+|R[p_{k+1},p_{k+1}']|\right)+|R[p_l,t_2']|.
\end{aligned} ∣ P ′ ∣ ≤ ( 1 + ε ′ ) i − 1 ( ∣ S [ t 1 , t 1 ′ ] ∣ + k = 1 ∑ l − 1 ∣ S [ p k , p k + 1 ] ∣ + ∣ S [ t 2 , t 2 ′ ] ∣ ) + ∣ R [ p 1 , t 1 ′ ] ∣ + k = 1 ∑ l − 1 ( ∣ R [ p k , p k ′ ] ∣ + ∣ R [ p k + 1 , p k + 1 ′ ] ∣ ) + ∣ R [ p l , t 2 ′ ] ∣.
Now, using the triangle inequality, we obtain
\begin{aligned}
|P'|\le{}&(1+\varepsilon')^{i-1}\left(|R[p_1,t_1']|+|S[t_1,p_1]|\\
&+\sum_{k=1}^{l-1}\left(|R[p_k,p_k']|+|S[p_k,p_{k+1}]|+|R[p_{k+1},p_{k+1}']|\right)\\
&+|R[p_l,t_2']|+|S[t_2,p_l]|\right)\\
&+|R[p_1,t_1']|+\sum_{k=1}^{l-1}\left(|R[p_k,p_k']|+|R[p_{k+1},p_{k+1}']|\right)+|R[p_l,t_2']|\\
={}&(1+\varepsilon')^{i-1}\left(|S[t_1,p_1]|+\sum_{k=1}^{l-1}|S[p_k,p_{k+1}]|+|S[t_2,p_l]|\right)\\
&+\left(1+(1+\varepsilon')^{i-1}\right)\left(|R[p_1,t_1']|+\sum_{k=1}^{l-1}\left(|R[p_k,p_k']|+|R[p_{k+1},p_{k+1}']|\right)+|R[p_l,t_2']|\right)\\
={}&(1+\varepsilon')^{i-1}|P|\\
&+\left(1+(1+\varepsilon')^{i-1}\right)\left(|R[p_1,t_1']|+\sum_{k=1}^{l-1}\left(|R[p_k,p_k']|+|R[p_{k+1},p_{k+1}']|\right)+|R[p_l,t_2']|\right).
\end{aligned}
To provide an upper bound for the last line, we use the ε ′ ′ \varepsilon^{\prime\prime} ε ′′ -cover property of SlicePortals( R , T h − i , ε ) (R,T_{h-i},\varepsilon) ( R , T h − i , ε ) by Claim 3.2146 . Specifically, for every 1 ≤ k ≤ l 1 \le k \le l 1 ≤ k ≤ l , we have ∣ R [ p k , p k ′ ] ∣ ≤ ε ′ ′ ∣ P ∣ \lvert R[p_k,p_k^{\prime}]\rvert\le\varepsilon^{\prime\prime}\lvert P\rvert ∣ R [ p k , p k ′ ]∣ ≤ ε ′′ ∣ P ∣ as well as ∣ R [ p 1 , t 1 ′ ] ∣ , ∣ R [ p j , t 2 ′ ] ∣ ≤ ε ′ ′ ∣ P ∣ \lvert R[p_1,t_1^{\prime}]\rvert,\lvert R[p_j,t_2^{\prime}]\rvert\le\varepsilon^{\prime\prime}\lvert P\rvert ∣ R [ p 1 , t 1 ′ ]∣ , ∣ R [ p j , t 2 ′ ]∣ ≤ ε ′′ ∣ P ∣ .47 Since j ≤ 2 h + 2 j \le2^{h+2} j ≤ 2 h + 2 , we obtain
∣ P ′ ∣ ≤ ( 1 + ε ′ ) i − 1 ∣ P ∣ + 2 h + 4 ( 1 + ( 1 + ε ′ ) i − 1 ) ε ′ ′ ∣ P ∣ = ( ( 1 + ε ′ ) i − 1 + 2 h + 4 ( 1 + ( 1 + ε ′ ) i − 1 ) ε ′ ′ ) ∣ P ∣ ≤ ( 1 + ε ′ ) i ∣ P ∣ , \begin{aligned}
\lvert P^{\prime}\rvert\le(1+\varepsilon^{\prime})^{i-1}\lvert P\rvert+ 2^{h+4}\left(1+(1+\varepsilon^{\prime})^{i-1}\right)\varepsilon^{\prime\prime}\lvert P\rvert\\
&= \left((1+\varepsilon^{\prime})^{i-1}+2^{h+4}\left(1+(1+\varepsilon^{\prime})^{i-1}\right)\varepsilon^{\prime\prime}\right)\lvert P\rvert\\
&\le(1+\varepsilon^{\prime})^i\lvert P\rvert,
\end{aligned} ∣ P ′ ∣ ≤ ( 1 + ε ′ ) i − 1 ∣ P ∣ + 2 h + 4 ( 1 + ( 1 + ε ′ ) i − 1 ) ε ′′ ∣ P ∣ = ( ( 1 + ε ′ ) i − 1 + 2 h + 4 ( 1 + ( 1 + ε ′ ) i − 1 ) ε ′′ ) ∣ P ∣ ≤ ( 1 + ε ′ ) i ∣ P ∣ ,
where the last inequality follows from ε ′ ′ = ε ′ / 2 h + 5 \varepsilon^{\prime\prime}=\varepsilon^{\prime}/2^{h+5} ε ′′ = ε ′ / 2 h + 5 and the fact that
( 1 + ε ′ ) i − 1 + 2 h + 4 ( 1 + ( 1 + ε ′ ) i − 1 ) ε ′ ′ = ( 1 + ε ′ ) i − 1 + ( 1 + ( 1 + ε ′ ) i − 1 ) ε ′ 2 = ( 1 + ε ′ ) i − 1 + ( 1 + ( 1 + ε ′ ) i − 1 ) ε ′ ( 1 + ε ′ ) i − 1 2 ( 1 + ε ′ ) i − 1 ≤ ( 1 + ε ′ ) i − 1 + ( 1 + ( 1 + ε ′ ) i − 1 ) ε ′ ( 1 + ε ′ ) i − 1 1 + ( 1 + ε ′ ) i − 1 = ( 1 + ε ′ ) i − 1 + ( ( 1 + ε ′ ) i − ( 1 + ε ′ ) i − 1 ) = ( 1 + ε ′ ) i . \begin{aligned}
(1+\varepsilon^{\prime})^{i-1}+2^{h+4}\left(1+(1+\varepsilon^{\prime})^{i-1}\right)\varepsilon^{\prime\prime}
= (1+\varepsilon^{\prime})^{i-1}+\left(1+(1+\varepsilon^{\prime})^{i-1}\right)\frac{\varepsilon^{\prime}}{2} \\
&= (1+\varepsilon^{\prime})^{i-1}+\left(1+(1+\varepsilon^{\prime})^{i-1}\right)\frac{\varepsilon^{\prime}(1+\varepsilon^{\prime})^{i-1}}{2(1+\varepsilon^{\prime})^{i-1}} \\
&\le(1+\varepsilon^{\prime})^{i-1}+\left(1+(1+\varepsilon^{\prime})^{i-1}\right)\frac{\varepsilon^{\prime}(1+\varepsilon^{\prime})^{i-1}}{1+(1+\varepsilon^{\prime})^{i-1}} \\
&= (1+\varepsilon^{\prime})^{i-1}+\left((1+\varepsilon^{\prime})^i-(1+\varepsilon^{\prime})^{i-1}\right) \\
&= (1+\varepsilon^{\prime})^i.
\end{aligned} ( 1 + ε ′ ) i − 1 + 2 h + 4 ( 1 + ( 1 + ε ′ ) i − 1 ) ε ′′ = ( 1 + ε ′ ) i − 1 + ( 1 + ( 1 + ε ′ ) i − 1 ) 2 ε ′ = ( 1 + ε ′ ) i − 1 + ( 1 + ( 1 + ε ′ ) i − 1 ) 2 ( 1 + ε ′ ) i − 1 ε ′ ( 1 + ε ′ ) i − 1 ≤ ( 1 + ε ′ ) i − 1 + ( 1 + ( 1 + ε ′ ) i − 1 ) 1 + ( 1 + ε ′ ) i − 1 ε ′ ( 1 + ε ′ ) i − 1 = ( 1 + ε ′ ) i − 1 + ( ( 1 + ε ′ ) i − ( 1 + ε ′ ) i − 1 ) = ( 1 + ε ′ ) i .
As i = j − 1 i=j-1 i = j − 1 , the proof is now complete.
Finally, we discuss the construction of our ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator ( H , T ) (H,T) ( H , T ) for ( G , T ) (G,T) ( G , T ) by leveraging the sliced instances ( G i , T i ) (G_i,T_i) ( G i , T i ) defined earlier. The construction of ( H , T ) (H,T) ( H , T ) is carried out straightforwardly using the following steps.
We use Lemma 4.3 from Subsection 4.2 to compute a ( 1 + ε H ) (1+\varepsilon_H) ( 1 + ε H ) -approximate pattern emulator ( H h , T h ) (H_h,T_h) ( H h , T h ) of ( G h , T h ) (G_h,T_h) ( G h , T h ) . Note that, by Observation 4.15 , the instance ( G h , T h ) (G_h,T_h) ( G h , T h ) is a one-hole instance. The choice of ε H \varepsilon_H ε H (discussed shortly afterward) ensures that the resulting pattern emulator ( H , T ) (H,T) ( H , T ) is a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator of ( G , T ) (G,T) ( G , T ) .
For 1 ≤ i ≤ h − 1 1 \le i \le h-1 1 ≤ i ≤ h − 1 , we construct the emulator ( H i ′ , T i ) (H_i^{\prime},T_i) ( H i ′ , T i ) of ( G i , T i ) (G_i,T_i) ( G i , T i ) in a bottom-up fashion by setting ( H i ′ , T i ) (H_i^{\prime},T_i) ( H i ′ , T i ) to be the glued instance based on ( H h , T h ) (H_h,T_h) ( H h , T h ) as defined in Definition 4.16 . That is, starting with ( H h ′ , T h ) = ( H h , T h ) (H_h^{\prime},T_h)=(H_h,T_h) ( H h ′ , T h ) = ( H h , T h ) , for each 1 ≤ i ≤ h − 1 1 \le i \le h-1 1 ≤ i ≤ h − 1 , we use ( H i + 1 ′ , T i + 1 ) (H_{i+1}^{\prime},T_{i+1}) ( H i + 1 ′ , T i + 1 ) and contract every portal v ∈ v \in v ∈ SlicePortals( R i , T i , ε H ) (R_i,T_i,\varepsilon_H) ( R i , T i , ε H ) with its corresponding copy v ˉ \bar{v} v ˉ . The resulting instance is denoted as the emulator ( H i ′ , T i ) (H_i^{\prime},T_i) ( H i ′ , T i ) .
Let ( H , T ) (H,T) ( H , T ) be the instance ( H 1 ′ , T 1 ) (H_1^{\prime},T_1) ( H 1 ′ , T 1 ) . To achieve a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximation quality, we rely on the guarantee of Claim 4.19 , combined with the ε ′ ′ \varepsilon^{\prime\prime} ε ′′ -cover defined in Definition 4.13 , and the fact that ( H h ′ , T h ) = ( H h , T h ) (H_h^{\prime},T_h)=(H_h,T_h) ( H h ′ , T h ) = ( H h , T h ) is a ( 1 + ε H ) (1+\varepsilon_H) ( 1 + ε H ) -approximate pattern emulator of ( G h , T h ) (G_h,T_h) ( G h , T h ) . Specifically, we set ε ′ ′ = ε ′ / 2 h + 5 \varepsilon^{\prime\prime}=\varepsilon^{\prime}/2^{h+5} ε ′′ = ε ′ / 2 h + 5 and ε ′ = ε H / ( 2 h ) \varepsilon^{\prime}=\varepsilon_H/(2h) ε ′ = ε H / ( 2 h ) where ε H = ε / 4 \varepsilon_H=\varepsilon/4 ε H = ε /4 .
We now show that ( H , T ) (H,T) ( H , T ) is indeed a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator of ( G , T ) (G,T) ( G , T ) . To begin, we prove that ( H i ′ , T i ) (H'_i,T_i) ( H i ′ , T i ) ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximates ( G i ′ , T i ) (G'_i,T_i) ( G i ′ , T i ) .
Claim 4.20. Let G G G be a planar graph with h ≥ 2 h \ge2 h ≥ 2 holes, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. For each 1 ≤ i ≤ h 1 \le i \le h 1 ≤ i ≤ h , let ( G i , T i ) (G_i,T_i) ( G i , T i ) be the sliced instance with parameter ε \varepsilon ε defined in Definition 4.14. Let ( H h , T h ) (H_h,T_h) ( H h , T h ) be a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator of ( G h , T h ) (G_h,T_h) ( G h , T h ) computed using Lemma 4.3 . For 1 ≤ i ≤ h 1 \le i \le h 1 ≤ i ≤ h , let ( H i ′ , T i ) (H'_i,T_i) ( H i ′ , T i ) be the glued instance with parameter ε \varepsilon ε based on ( H h , T h ) (H_h,T_h) ( H h , T h ) , and let ( G i ′ , T i ) (G'_i,T_i) ( G i ′ , T i ) be the glued instance with parameter ε \varepsilon ε based on ( G h , T h ) (G_h,T_h) ( G h , T h ) as defined in Definition 4.16 .
Then, for every t 1 , t 2 ∈ T i t_1,t_2 \in T_i t 1 , t 2 ∈ T i and pattern Φ \Phi Φ , the graph H i ′ H'_i H i ′ ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximates every Φ \Phi Φ -respecting t 1 t_1 t 1 -t 2 t_2 t 2 shortest path in G i ′ G'_i G i ′ .
Proof. The argument follows from a straightforward adaptation of the proof of Claim 4.19 . To avoid redundancy, we outline the proof by building upon the reasoning used in Claim 4.19 .
The proof proceeds by induction on I j : = H h − j + 1 ′ I_j := H'_{h-j+1} I j := H h − j + 1 ′ for 1 ≤ j ≤ h 1 \le j \le h 1 ≤ j ≤ h , where we show that, for every t 1 , t 2 ∈ T h − j + 1 t_1,t_2 \in T_{h-j+1} t 1 , t 2 ∈ T h − j + 1 and pattern Φ \Phi Φ , the graph H h − j + 1 ′ H'_{h-j+1} H h − j + 1 ′ approximates every Φ \Phi Φ -respecting t 1 t_1 t 1 -t 2 t_2 t 2 shortest path in G h − j + 1 ′ G'_{h-j+1} G h − j + 1 ′ with approximation quality ( 1 + ε ′ ) j (1+\varepsilon')^j ( 1 + ε ′ ) j . The claim then follows from the observation that ε ′ = ε / ( 2 h ) \varepsilon'=\varepsilon/(2h) ε ′ = ε / ( 2 h ) and
( 1 + ε ′ ) j ≤ ( 1 + ε ′ ) h ≤ ( 1 + ε ) . (1+\varepsilon')^j \le(1+\varepsilon')^h \le(1+\varepsilon). ( 1 + ε ′ ) j ≤ ( 1 + ε ′ ) h ≤ ( 1 + ε ) .
The base case follows trivially, as ( H h ′ , T h ) (H'_h,T_h) ( H h ′ , T h ) is a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator of ( G h ′ , T h ) = ( G h , T h ) (G'_h,T_h)=(G_h,T_h) ( G h ′ , T h ) = ( G h , T h ) .
Assume the claim holds for j − 1 j-1 j − 1 , i.e., I j − 1 = I i = H h − i + 1 ′ I_{j-1}=I_i=H'_{h-i+1} I j − 1 = I i = H h − i + 1 ′ approximates every Φ \Phi Φ -respecting t 1 t_1 t 1 -t 2 t_2 t 2 shortest path in G h − i + 1 ′ G'_{h-i+1} G h − i + 1 ′ with approximation quality ( 1 + ε ′ ) i (1+\varepsilon')^i ( 1 + ε ′ ) i , where i = j − 1 i=j-1 i = j − 1 . We now prove the claim for j = i + 1 j=i+1 j = i + 1 .
Let P P P denote the Φ \Phi Φ -respecting t 1 t_1 t 1 -t 2 t_2 t 2 shortest path in G h − i ′ G'_{h-i} G h − i ′ for some t 1 , t 2 ∈ T h − i t_1,t_2 \in T_{h-i} t 1 , t 2 ∈ T h − i . Recall that G h − i ′ G'_{h-i} G h − i ′ is obtained from G h − i + 1 ′ G'_{h-i+1} G h − i + 1 ′ by gluing the portals along the shortest path R : = R h − i R:=R_{h-i} R := R h − i and its copy R ‾ \overline{R} R in G h − i G_{h-i} G h − i (as defined in Algorithm 1), where R R R is the shortest path connecting two holes of G h − i G_{h-i} G h − i .
We analyze two cases based on whether P P P crosses R R R :
The path P P P does not cross R R R : In this case, since R R R is sliced in G h − i + 1 G_{h-i+1} G h − i + 1 and consequently in G h − i + 1 ′ G'_{h-i+1} G h − i + 1 ′ , the path P P P exists in G h − i + 1 ′ G'_{h-i+1} G h − i + 1 ′ . By the inductive hypothesis, P P P is preserved in H h − i ′ H'_{h-i} H h − i ′ with approximation quality ( 1 + ε ′ ) i (1+\varepsilon')^i ( 1 + ε ′ ) i . Therefore, the overall quality satisfies ( 1 + ε ′ ) i ≤ ( 1 + ε ′ ) i + 1 (1+\varepsilon')^i \le(1+\varepsilon')^{i+1} ( 1 + ε ′ ) i ≤ ( 1 + ε ′ ) i + 1 .
The path P P P crosses R R R : Let p 1 , … , p l p_1,\ldots,p_l p 1 , … , p l represent the sequence of vertices on P P P (starting from t 1 t_1 t 1 ) that cross R R R during traversal along P P P . Let p ‾ 1 , … , p ‾ l \overline{p}_1,\ldots,\overline{p}_l p 1 , … , p l and t 1 ′ , t 2 ′ t'_1,t'_2 t 1 ′ , t 2 ′ denote the closest portals on R R R corresponding to these intersections, as defined in the proof of Claim 4.19 . Let P ′ P' P ′ denote the path in G h − i G_{h-i} G h − i obtained by replacing the segments of P P P crossing R R R with the corresponding portal-based shortcuts as defined in the proof of Claim 4.19 .
By the same reasoning in Claim 4.19 , it follows that ∣ P ′ ∣ ≤ ( 1 + ε ′ ) ∣ P ∣ \lvert P'\rvert\le(1+\varepsilon')\lvert P\rvert ∣ P ′ ∣ ≤ ( 1 + ε ′ ) ∣ P ∣ , and that P ′ P' P ′ has the same pattern Φ \Phi Φ as P P P . Since the approximation quality increases by a multiplicative factor of ( 1 + ε ′ ) (1+\varepsilon') ( 1 + ε ′ ) , the overall quality in G h − i ′ G'_{h-i} G h − i ′ becomes ( 1 + ε ′ ) i + 1 (1+\varepsilon')^{i+1} ( 1 + ε ′ ) i + 1 .
Hence, the claim holds as i = j − 1 i=j-1 i = j − 1 , completing the proof.
We are now ready to prove that ( H , T ) (H,T) ( H , T ) is a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator of ( G , T ) (G,T) ( G , T ) .
Claim 4.21. Let G G G be a planar graph with h ≥ 2 h \ge2 h ≥ 2 holes, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. For each 1 ≤ i ≤ h 1 \le i \le h 1 ≤ i ≤ h , let ( G i , T i ) (G_i,T_i) ( G i , T i ) be the sliced instance with parameter ε H ≔ ε / 4 \varepsilon_H \coloneqq\varepsilon/4 ε H : = ε /4 defined in Definition 4.16 . Let ( H h , T h ) (H_h,T_h) ( H h , T h ) be a ( 1 + ε H ) (1+\varepsilon_H) ( 1 + ε H ) -approximate pattern emulator of ( G h , T h ) (G_h,T_h) ( G h , T h ) computed using Lemma 4.3 . For 1 ≤ i ≤ h 1 \le i \le h 1 ≤ i ≤ h , let ( H i ′ , T i ) (H'_i,T_i) ( H i ′ , T i ) be the glued instance based on ( H h , T h ) (H_h,T_h) ( H h , T h ) with parameter ε H \varepsilon_H ε H as defined in Definition 4.16 .
Then, for every t 1 , t 2 ∈ T i t_1,t_2 \in T_i t 1 , t 2 ∈ T i and pattern Φ \Phi Φ , the graph H i ′ H'_i H i ′ ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximates every Φ \Phi Φ -respecting t 1 t_1 t 1 -t 2 t_2 t 2 shortest path in G i G_i G i .
Proof. By Claim 4.20 , each H i ′ H'_i H i ′ is a ( 1 + ε H ) (1+\varepsilon_H) ( 1 + ε H ) -approximate pattern emulator of G i ′ G'_i G i ′ , and by Claim 4.19 , each G i ′ G'_i G i ′ is a ( 1 + ε H ) (1+\varepsilon_H) ( 1 + ε H ) -approximate pattern emulator of G i G_i G i . Therefore, by the transitivity property of pattern emulators (Lemma 3.12 ), H i ′ H'_i H i ′ approximates G i G_i G i with overall quality ( 1 + ε H ) ( 1 + ε H ) ≤ ( 1 + ε ) (1+\varepsilon_H)(1+\varepsilon_H) \le(1+\varepsilon) ( 1 + ε H ) ( 1 + ε H ) ≤ ( 1 + ε ) , as required.
We conclude this subsection with the proof of Theorem 4.5.
Theorem 4.5. Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set on O ( 1 ) O(1) O ( 1 ) holes in G G G , and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. Then, there is an algorithm that constructs a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) in time O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) with size ∣ H ∣ = O ~ ( ∣ T ∣ / ε O ( 1 ) ) |H| = \widetilde{O}(|T|/\varepsilon^{O(1)}) ∣ H ∣ = O ( ∣ T ∣/ ε O ( 1 ) ) . Moreover, ( H , T ) (H,T) ( H , T ) is aligned with ( G , T ) (G,T) ( G , T ) .
Proof of Theorem 4.5. The ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) approximation quality directly follows from Claim 4.21. It remains to prove the guarantees for the emulator size, the construction time, and alignment.
Emulator Size: By Definition 4.14, the sliced instance ( G i , T i ) (G_i,T_i) ( G i , T i ) is constructed by slicing G i G_i G i along the path R i − 1 R_{i-1} R i − 1 in G i − 1 G_{i-1} G i − 1 . Since R i − 1 R_{i-1} R i − 1 is a shortest path and has a length of O ( n ) O(n) O ( n ) , and h = O ( 1 ) h = O(1) h = O ( 1 ) by assumption, it follows that each sliced graph G i G_i G i has size O ( n ) O(n) O ( n ) . Additionally, by Definition 4.13 , we select O ~ ( ∣ T i − 1 ∣ / ε O ( 1 ) ) \widetilde{O}(|T_{i-1}|/\varepsilon^{O(1)}) O ( ∣ T i − 1 ∣/ ε O ( 1 ) ) portals on R i R_i R i to include in T i T_i T i . Using straightforward induction, it follows that for all 1 ≤ i ≤ h 1 \le i \le h 1 ≤ i ≤ h , the terminal set T i T_i T i has size O ~ ( ∣ T ∣ / ε O ( 1 ) ) \widetilde{O}(|T|/\varepsilon^{O(1)}) O ( ∣ T ∣/ ε O ( 1 ) ) . Combining these observations, the overall size of each sliced instance ( G i , T i ) (G_i,T_i) ( G i , T i ) is O ~ ( n ) \widetilde{O}(n) O ( n ) .
Next, consider the one-hole instance ( H h , T h ) (H_h,T_h) ( H h , T h ) . By Lemma 4.3 , the size of ( H h , T h ) (H_h,T_h) ( H h , T h ) is O ~ ( ∣ T ∣ / ε O ( 1 ) ) \widetilde{O}(|T|/\varepsilon^{O(1)}) O ( ∣ T ∣/ ε O ( 1 ) ) . Furthermore, ( H i ′ , T i ) (H'_i,T_i) ( H i ′ , T i ) is obtained from ( H i + 1 ′ , T i + 1 ) (H'_{i+1},T_{i+1}) ( H i + 1 ′ , T i + 1 ) by contracting the portals on R i R_i R i with their corresponding copies on R i ‾ \overline{R_i} R i . Since the contraction process does not increase the size of the graph, a simple induction shows that for all 1 ≤ i ≤ h 1 \le i \le h 1 ≤ i ≤ h , the size of ( H i ′ , T i ) (H'_i,T_i) ( H i ′ , T i ) is O ~ ( ∣ T ∣ / ε O ( 1 ) ) \widetilde{O}(|T|/\varepsilon^{O(1)}) O ( ∣ T ∣/ ε O ( 1 ) ) . Hence, the size of the pattern emulator ( H , T ) (H,T) ( H , T ) satisfies the desired bound.
Construction Time: By the above reasoning, the size of each graph G i G_i G i is O ( n ) O(n) O ( n ) . Since each G i G_i G i is obtained by slicing along R i R_i R i , it follows that we can construct G i G_i G i in O ( n ) O(n) O ( n ) time.
For the terminal sets, by Lemma 3.20, the portals for each sliced instance can be computed in O ~ ( n ) \widetilde{O}(n) O ( n ) time. Therefore, the total time to construct all ( G i , T i ) (G_i,T_i) ( G i , T i ) instances is O ~ ( n ) \widetilde{O}(n) O ( n ) .
Next, consider the one-hole instance ( H h , T h ) (H_h,T_h) ( H h , T h ) . Since ( H h , T h ) (H_h,T_h) ( H h , T h ) contains O ~ ( ∣ T ∣ / ε O ( 1 ) ) \widetilde{O}(|T|/\varepsilon^{O(1)}) O ( ∣ T ∣/ ε O ( 1 ) ) terminals, by Lemma 4.3 , we can construct ( H h , T h ) (H_h,T_h) ( H h , T h ) in O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) time.
Finally, constructing ( H i ′ , T i ) (H'_i,T_i) ( H i ′ , T i ) for 1 ≤ i < h 1 \le i < h 1 ≤ i < h involves contracting at most n n n vertices in ( H i + 1 ′ , T i + 1 ) (H'_{i+1},T_{i+1}) ( H i + 1 ′ , T i + 1 ) on R i R_i R i with its corresponding copy R i ‾ \overline{R_i} R i . Since contraction is a linear-time operation, the total time to construct all ( H i ′ , T i ) (H'_i,T_i) ( H i ′ , T i ) instances is also bounded by O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) . Thus, the total construction time for the emulator ( H , T ) (H,T) ( H , T ) satisfies the desired bound.
Alignment: The alignment argument follows directly from the construction process described in [15 ] . The approach used to build our pattern emulator ( H , T ) (H,T) ( H , T ) relies on the same foundational building blocks, including slicing, ε \varepsilon ε -cover portal selection, and contraction. To avoid unnecessary repetition and ensure clarity, we refer the reader to [15 ] for a detailed proof of alignment properties. This guarantees that ( H i ′ , T i ) (H'_i,T_i) ( H i ′ , T i ) is aligned with ( G i , T i ) (G_i,T_i) ( G i , T i ) , and consequently, ( H , T ) (H,T) ( H , T ) is aligned with ( G , T ) (G,T) ( G , T ) .
The General Case: Proof of Theorem 1.3
In this subsection, we prove Theorem 1.3, restated below.
Theorem 1.3. Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. Then, there is an algorithm that constructs a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate planar pattern emulator ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) in time O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) with size ∣ H ∣ = O ~ ( ∣ T ∣ / ε O ( 1 ) ) |H|=\widetilde{O}(|T|/\varepsilon^{O(1)}) ∣ H ∣ = O ( ∣ T ∣/ ε O ( 1 ) ) . Moreover, ( H , T ) (H,T) ( H , T ) is aligned with ( G , T ) (G,T) ( G , T ) . 48
The approach we use in this subsection is fairly standard, and thus we keep the discussion concise. Similar arguments can be found for the general case in [15 , 18 ] . We first restate Definition 3.16 and Theorem 3.17, which are employed in our construction.
Definition 3.16 (Structured r r r -Division). Given an n n n -vertex planar graph G G G , a parameter 1 ≤ r ≤ n 1 \le r \le n 1 ≤ r ≤ n , and a terminal set T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) , a structured r r r -division of ( G , T ) (G,T) ( G , T ) is a partition of E ( G ) E(G) E ( G ) into k k k subsets E 1 , … , E k E_1,\ldots,E_k E 1 , … , E k such that
Each edge-induced subgraph G [ E i ] G[E_i] G [ E i ] (called a piece) has O ( r ) O(r) O ( r ) vertices, and
Each piece has O ( r ) O(\sqrt{r}) O ( r ) boundary vertices, where a boundary vertex is a vertex shared with another piece, and
There are k = O ( n / r ) k=O(n/r) k = O ( n / r ) pieces in the r r r -division, and
Each piece contains O ( 1 + ∣ T ∣ / k ) O(1+|T|/k) O ( 1 + ∣ T ∣/ k ) terminals from T T T .
Theorem 3.17 ([16 Lemma 5.5] , Rephrased). Given an n n n -vertex planar graph G G G , a parameter 1 ≤ r ≤ n 1 \le r \le n 1 ≤ r ≤ n , and a terminal set T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) , there is an algorithm that computes a structured r r r -division of ( G , T ) (G,T) ( G , T ) in O ( n ) O(n) O ( n ) time such that each piece is connected and has O ( 1 ) O(1) O ( 1 ) holes.
To establish Theorem 1.3, we first use the following procedure to obtain a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator with a smaller size.
Use Theorem 3.17 to partition E ( G ) E(G) E ( G ) into pieces E 1 , … , E k E_1,\ldots,E_k E 1 , … , E k , each containing O ( 1 ) O(1) O ( 1 ) holes.
For each piece G i : = G [ E i ] G_i := G[E_i] G i := G [ E i ] , compute a planar pattern emulator ( H i , T i ) (H_i,T_i) ( H i , T i ) of ( G i , T i ) (G_i,T_i) ( G i , T i ) using Theorem 4.5, where T i T_i T i contains the boundary vertices of G i G_i G i and the terminal vertices T ∩ V ( G i ) T \cap V(G_i) T ∩ V ( G i ) present in G i G_i G i .
By composability (Lemma 3.13 ), the union H = ⋃ i = 1 k H i H=\bigcup_{i=1}^{k}H_i H = ⋃ i = 1 k H i with terminal set restricted to T T T serves as a planar pattern emulator of ( G , T ) (G,T) ( G , T ) .
We now provide the guarantees for this procedure in the following claim.
Claim 4.22. Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. Then, the procedure above computes a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) with size O ~ ( n ∣ T ∣ / ε O ( 1 ) ) \widetilde{O}(\sqrt{n|T|}/\varepsilon^{O(1)}) O ( n ∣ T ∣ / ε O ( 1 ) ) in time O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) .
Proof. By Theorem 3.17, we can construct all the pieces E 1 , … , E k E_1,\ldots,E_k E 1 , … , E k in O ( n ) O(n) O ( n ) time such that, for each piece G i = G [ E i ] G_i=G[E_i] G i = G [ E i ] , the size of the boundary set is ∣ T i ∣ = O ( r ) |T_i|=O(\sqrt{r}) ∣ T i ∣ = O ( r ) . To ensure O ( 1 ) O(1) O ( 1 ) -holes for all pieces,49 we set r = Θ ( n / ∣ T ∣ ) r=\Theta(n/|T|) r = Θ ( n /∣ T ∣ ) , which implies k = O ( ∣ T ∣ ) k=O(|T|) k = O ( ∣ T ∣ ) .
As the terminals are evenly distributed across the pieces, this results in O ( 1 ) O(1) O ( 1 ) terminal vertices in each piece, ensuring that the number of holes remains O ( 1 ) O(1) O ( 1 ) . Consequently, we can use Theorem 4.5 for each instance ( G i , T i ) (G_i,T_i) ( G i , T i ) to compute a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator ( H i , T i ) (H_i,T_i) ( H i , T i ) in time O ~ ( ∣ G i ∣ / ε O ( 1 ) ) = O ~ ( n / ( ∣ T ∣ ε O ( 1 ) ) ) \widetilde{O}(|G_i|/\varepsilon^{O(1)})=\widetilde{O}(n/(|T|\varepsilon^{O(1)})) O ( ∣ G i ∣/ ε O ( 1 ) ) = O ( n / ( ∣ T ∣ ε O ( 1 ) )) with size O ~ ( ∣ T i ∣ / ε O ( 1 ) ) = O ~ ( n / ( ∣ T ∣ ε O ( 1 ) ) ) \widetilde{O}(|T_i|/\varepsilon^{O(1)})=\widetilde{O}(\sqrt{n}/(\sqrt{|T|}\varepsilon^{O(1)})) O ( ∣ T i ∣/ ε O ( 1 ) ) = O ( n / ( ∣ T ∣ ε O ( 1 ) )) . Therefore, the total time for constructing ( H , T ) (H,T) ( H , T ) is
∑ i = 1 k O ~ ( n / ( ∣ T ∣ ε O ( 1 ) ) ) = O ~ ( n / ε O ( 1 ) ) , \sum_{i=1}^{k}\widetilde{O}\left(n/(|T|\varepsilon^{O(1)})\right)=\widetilde{O}\left(n/\varepsilon^{O(1)}\right), i = 1 ∑ k O ( n / ( ∣ T ∣ ε O ( 1 ) ) ) = O ( n / ε O ( 1 ) ) ,
and the size of ( H , T ) (H,T) ( H , T ) is
∑ i = 1 k O ~ ( n / ( ∣ T ∣ ε O ( 1 ) ) ) = O ~ ( n ∣ T ∣ / ε O ( 1 ) ) . \sum_{i=1}^{k}\widetilde{O}\left(\sqrt{n}/(\sqrt{|T|}\varepsilon^{O(1)})\right)=\widetilde{O}\left(\sqrt{n|T|}/\varepsilon^{O(1)}\right). i = 1 ∑ k O ( n / ( ∣ T ∣ ε O ( 1 ) ) ) = O ( n ∣ T ∣ / ε O ( 1 ) ) .
The pattern emulator of Claim 4.22 has a significantly larger size than what we are aiming for in Theorem 1.3. To achieve the desired size and thus prove Theorem 1.3, we use Claim 4.22 recursively until we obtain the desired size for our emulator. We formalize this in the following definition.
Definition 4.23 (L L L -Sequence ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -Approximate Pattern Emulators of ( G , T ) (G,T) ( G , T ) ). Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T\subseteq V(G) T ⊆ V ( G ) be a terminal set, 0 < ε < 1 0<\varepsilon<1 0 < ε < 1 be an error parameter, and L L L be a positive integer. The L L L -sequence ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulators of ( G , T ) (G,T) ( G , T ) is a sequence ( H 1 , T ) , … , ( H L , T ) (H_1,T),\ldots,(H_L,T) ( H 1 , T ) , … , ( H L , T ) of ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulators defined recursively as follows.
( H 1 , T ) (H_1,T) ( H 1 , T ) is a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator of ( G , T ) (G,T) ( G , T ) obtained via Claim 4.22 .
For 1 ≤ i ≤ L − 1 1\leq i\leq L-1 1 ≤ i ≤ L − 1 , ( H i + 1 , T ) (H_{i+1},T) ( H i + 1 , T ) is a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator of ( H i , T ) (H_i,T) ( H i , T ) obtained via Claim 4.22 .
Using the terminology of Definition 4.23, our desired pattern emulator ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) is then defined as ( H L , T ) (H_L,T) ( H L , T ) . We are now ready to prove Theorem 1.3.
Proof of Theorem 1.3. We construct an L L L -sequence of ( 1 + ε ′ ) (1+\varepsilon') ( 1 + ε ′ ) -approximate pattern emulators of ( G , T ) (G,T) ( G , T ) using Definition 4.23, with L = log log n L=\log\log n L = log log n and ε ′ = ε / ( 2 L ) \varepsilon'=\varepsilon/(2L) ε ′ = ε / ( 2 L ) . This results in a sequence ( H 1 , T ) , … , ( H L , T ) (H_1,T),\ldots,(H_L,T) ( H 1 , T ) , … , ( H L , T ) of ( 1 + ε ′ ) (1+\varepsilon') ( 1 + ε ′ ) -approximate pattern emulators. We analyze the sequence ( H 1 , T ) , … , ( H L , T ) (H_1,T),\ldots,(H_L,T) ( H 1 , T ) , … , ( H L , T ) and separately prove the guarantees for ( H , T ) : = ( H L , T ) (H,T):=(H_L,T) ( H , T ) := ( H L , T ) .
Construction Time: By Claim 4.22 and using simple induction, it follows that ∣ V ( H i ) ∣ = O ~ ( n / ε O ( 1 ) ) |V(H_i)|=\widetilde{O}(n/\varepsilon^{O(1)}) ∣ V ( H i ) ∣ = O ( n / ε O ( 1 ) ) for 1 ≤ i ≤ L 1\leq i\leq L 1 ≤ i ≤ L . The construction time then follows directly from Claim 4.22 and the fact that L = log log n L=\log\log n L = log log n .
Approximation Quality: Using simple induction, it follows that ( H i , T ) (H_i,T) ( H i , T ) approximates ( G , T ) (G,T) ( G , T ) with quality ( 1 + ε ′ ) i (1+\varepsilon')^i ( 1 + ε ′ ) i for 1 ≤ i ≤ L 1\leq i\leq L 1 ≤ i ≤ L . The quality for ( H , T ) (H,T) ( H , T ) is then given by
( 1 + ε ′ ) L = ( 1 + ε / ( 2 L ) ) L ≤ e ε / ( 2 L ) L ≤ 1 + ε . (1+\varepsilon')^L=(1+\varepsilon/(2L))^L\leq e^{\varepsilon/(2L)L}\leq1+\varepsilon. ( 1 + ε ′ ) L = ( 1 + ε / ( 2 L ) ) L ≤ e ε / ( 2 L ) L ≤ 1 + ε .
O ~ ( n 1 2 i ∣ T ∣ 2 i − 1 2 i ε c ′ ( 1 + ∑ j = 1 i 1 2 j ) ) . \widetilde{O}\left(\frac{n^{\frac{1}{2^i}}|T|^{\frac{2^i-1}{2^i}}}{\varepsilon^{c'}(1+\sum_{j=1}^{i}\frac{1}{2^j})}\right). O ε c ′ ( 1 + ∑ j = 1 i 2 j 1 ) n 2 i 1 ∣ T ∣ 2 i 2 i − 1 .
where c ′ c' c ′ is a sufficiently large constant for the exponent of ε \varepsilon ε in Claim 4.22 . The upper bound on the emulator size then follows as
∣ H L ∣ = O ~ ( n 1 2 log log n ∣ T ∣ ε c ′ ( 1 + 1 ) ) = O ~ ( ∣ T ∣ / ε O ( 1 ) ) . |H_L|=\widetilde{O}\left(\frac{n^{\frac{1}{2^{\log\log n}}}|T|}{\varepsilon^{c'}(1+1)}\right)=\widetilde{O}\left(|T|/\varepsilon^{O(1)}\right). ∣ H L ∣ = O ( ε c ′ ( 1 + 1 ) n 2 l o g l o g n 1 ∣ T ∣ ) = O ( ∣ T ∣/ ε O ( 1 ) ) .
The remainder is dedicated to proving the induction.
For i = 1 i=1 i = 1 , the bound on ∣ H 1 ∣ |H_1| ∣ H 1 ∣ trivially follows from Claim 4.22 .
For i = k + 1 i=k+1 i = k + 1 , assume that
∣ H k ∣ = O ~ ( n 1 2 k ∣ T ∣ 2 k − 1 2 k ε c ′ ( 1 + ∑ j = 1 k 1 2 j ) ) . |H_k|=\widetilde{O}\left(\frac{n^{\frac{1}{2^k}}|T|^{\frac{2^k-1}{2^k}}}{\varepsilon^{c'}(1+\sum_{j=1}^{k}\frac{1}{2^j})}\right). ∣ H k ∣ = O ε c ′ ( 1 + ∑ j = 1 k 2 j 1 ) n 2 k 1 ∣ T ∣ 2 k 2 k − 1 .
By Claim 4.22 , ∣ H k + 1 ∣ = O ~ ( n k ∣ T ∣ / ε c ′ ) |H_{k+1}|=\widetilde{O}\left(\sqrt{n_k|T|}/\varepsilon^{c'}\right) ∣ H k + 1 ∣ = O ( n k ∣ T ∣ / ε c ′ ) where n k = ∣ H k ∣ n_k=|H_k| n k = ∣ H k ∣ . Substituting the assumed size of H k H_k H k into this bound yields
O ~ ( n 1 2 k ∣ T ∣ 2 k − 1 2 k ε c ′ ( 1 + ∑ j = 1 k 1 2 j ) ⋅ ∣ T ∣ ε c ′ ) = O ~ ( n 1 2 k + 1 ∣ T ∣ 1 2 2 k − 1 2 k ⋅ ∣ T ∣ ε c ′ ( 1 2 + ∑ j = 1 k 1 2 j + 1 ) ) = O ~ ( n 1 2 k + 1 ∣ T ∣ 1 − 1 2 k + 1 ε c ′ ( ∑ j = 1 k + 1 1 2 j ) ⋅ 1 ε c ′ ) = O ~ ( n 1 2 k + 1 ∣ T ∣ 2 k + 1 − 1 2 k + 1 ε c ′ ( 1 + ∑ j = 1 k + 1 1 2 j ) ) , \begin{aligned}
\widetilde{O}\left(\sqrt{\frac{n^{\frac{1}{2^k}}|T|^{\frac{2^k-1}{2^k}}}{\varepsilon^{c'}(1+\sum_{j=1}^{k}\frac{1}{2^j})}\cdot\frac{|T|}{\varepsilon^{c'}}}\right)
=
\widetilde{O}\left(\frac{n^{\frac{1}{2^{k+1}}}|T|^{\frac{1}{2}\frac{2^k-1}{2^k}}\cdot\sqrt{|T|}}{\varepsilon^{c'}(\frac{1}{2}+\sum_{j=1}^{k}\frac{1}{2^{j+1}})}\right) \\
&=
\widetilde{O}\left(\frac{n^{\frac{1}{2^{k+1}}}|T|^{1-\frac{1}{2^{k+1}}}}{\varepsilon^{c'}(\sum_{j=1}^{k+1}\frac{1}{2^j})}\cdot\frac{1}{\varepsilon^{c'}}\right) \\
&=
\widetilde{O}\left(\frac{n^{\frac{1}{2^{k+1}}}|T|^{\frac{2^{k+1}-1}{2^{k+1}}}}{\varepsilon^{c'}(1+\sum_{j=1}^{k+1}\frac{1}{2^j})}\right),
\end{aligned} O ε c ′ ( 1 + ∑ j = 1 k 2 j 1 ) n 2 k 1 ∣ T ∣ 2 k 2 k − 1 ⋅ ε c ′ ∣ T ∣ = O ε c ′ ( 2 1 + ∑ j = 1 k 2 j + 1 1 ) n 2 k + 1 1 ∣ T ∣ 2 1 2 k 2 k − 1 ⋅ ∣ T ∣ = O ( ε c ′ ( ∑ j = 1 k + 1 2 j 1 ) n 2 k + 1 1 ∣ T ∣ 1 − 2 k + 1 1 ⋅ ε c ′ 1 ) = O ε c ′ ( 1 + ∑ j = 1 k + 1 2 j 1 ) n 2 k + 1 1 ∣ T ∣ 2 k + 1 2 k + 1 − 1 ,
as desired.
Dynamic All-Pairs s s s -t t t Min-Cut
In this section, we present our fully dynamic algorithm for maintaining all-pairs s s s -t t t min-cuts with subpolynomial update and query times, as outlined below.
Theorem 1.1. Let G G G be an n n n -vertex undirected planar graph undergoing edge insertions and deletions with capacities in [ 1 , n c ] [1,n^c] [ 1 , n c ] for some constant c c c at all times. Let 1 / poly ( log n ) < ε < 1 1/\operatorname{poly}(\log n)<\varepsilon<1 1/ poly ( log n ) < ε < 1 be
an error parameter. Then, there is a deterministic data structure that supports edge updates and queries for the ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate minimum cut between any pair of vertices s , t ∈ V ( G ) s,t \in V(G) s , t ∈ V ( G ) in the current graph G G G . The data structure has an initialization time of O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) and an amortized update time and query time of n o ( 1 ) n^{o(1)} n o ( 1 ) .
Our algorithm is derived by dynamizing the static algorithm of Subsection 4.3.3, which computes a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator for ( G , T ) (G,T) ( G , T ) . The guarantees of this dynamic algorithm are restated below.
Theorem 1.4. Let ( G , T ) (G,T) ( G , T ) be a dynamic instance where G G G is an n n n -vertex planar graph undergoing edge insertions and deletions with weights [ 1 , n c ] [1,n^c] [ 1 , n c ] for a constant c c c at all times, and T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) is a terminal set of at most two vertices at any time. Let 1 ≤ τ ≤ n / log n 1 \leq\tau\leq n/\log n 1 ≤ τ ≤ n / log n be a target parameter and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter.
Then, there is a deterministic data structure that explicitly maintains a collection P \mathcal{P} P of paths in G G G that induces a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate planar pattern emulator ( M [ P ] , T ) (\mathcal{M}[\mathcal{P}],T) ( M [ P ] , T ) 50 of instance ( G , T ) (G,T) ( G , T ) , such that for each batch B B B of updates in ( G , T ) (G,T) ( G , T ) (whether edge insertions or deletions in G G G , or terminal additions or removals in T ) T) T ) ,
Emulator Size: At any time, ∣ P ∣ = O ~ ( n τ / ε O ( 1 ) ) |\mathcal{P}|=\widetilde{O}(\sqrt{n\tau}/\varepsilon^{O(1)}) ∣ P ∣ = O ( n τ / ε O ( 1 ) ) , and
Emulator Recourse: The amortized number of paths added or deleted from P \mathcal{P} P after processing a batch update B B B is O ~ ( ∣ B ∣ / ε O ( 1 ) ) \widetilde{O}(|B|/\varepsilon^{O(1)}) O ( ∣ B ∣/ ε O ( 1 ) ) , and
Update Time: The amortized update time is O ~ ( n ∣ B ∣ / ( ε O ( 1 ) τ ) ) \widetilde{O}(n|B|/(\varepsilon^{O(1)}\tau)) O ( n ∣ B ∣/ ( ε O ( 1 ) τ )) .
The data structure has an initialization time of O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) . Moreover, ( M [ P ] , T ) (\mathcal{M}[\mathcal{P}],T) ( M [ P ] , T ) is aligned with ( G , T ) (G,T) ( G , T ) .
The remainder of this section is organized as follows.
In Subsection 5.1, we describe how to efficiently maintain a dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) associated with ( G , T ) (G,T) ( G , T ) . As shown in Subsection 4.1, computing a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator for ( G D , T D ) (G_D,T_D) ( G D , T D ) results in a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier for ( G , T ) (G,T) ( G , T ) . Therefore, in order to use a dynamic ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator, it remains to maintain the corresponding dual instance efficiently after each update. We achieve this by maintaining a dynamic instance ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) that satisfies the same relevant properties as ( G D , T D ) (G_D,T_D) ( G D , T D ) .
In Subsection 5.2, we show how to adapt the algorithm from § 5 to the dynamic setting, thereby proving Theorem 1.4. Our algorithm follows the same framework as that of [21 ] ; hence, in this subsection we mainly summarize their approach and establish the additional guarantees needed for our application.
Maintaining The Dual Instance
In this subsection, we show how an update to the instance ( G , T ) (G,T) ( G , T ) can be translated into O ( 1 ) O(1) O ( 1 ) updates to an associated dual instance. This is summarized in the following lemma.
Lemma 5.1. Let G G G be an n n n -vertex planar graph, T ⊂ V ( G ) T \subset V(G) T ⊂ V ( G ) be a terminal set, and ( G D , T D ) (G_D,T_D) ( G D , T D ) be the dual instance of ( G , T ) (G,T) ( G , T ) . Then, there exists a dynamic instance ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) with the following properties.
There is a bijection between the terminals in T D T_D T D and the terminals in T D ∗ T_D^* T D ∗ .
For every pair of dual terminals t 1 , t 2 ∈ T D t_1,t_2 \in T_D t 1 , t 2 ∈ T D , if t 1 ∗ , t 2 ∗ ∈ T D ∗ t_1^*,t_2^* \in T_D^* t 1 ∗ , t 2 ∗ ∈ T D ∗ denote their corresponding terminals, then dist G D ( t 1 , t 2 ) = dist G D ∗ ( t 1 ∗ , t 2 ∗ ) \operatorname{dist}_{G_D}(t_1,t_2)=\operatorname{dist}_{G_D^*}(t_1^*,t_2^*) dist G D ( t 1 , t 2 ) = dist G D ∗ ( t 1 ∗ , t 2 ∗ ) .
The size of ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) is O ( n ) O(n) O ( n ) .
After each update to ( G , T ) (G,T) ( G , T ) , the instance ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) can be maintained using O ( 1 ) O(1) O ( 1 ) elementary updates: terminal additions or removals, and edge insertions or deletions.
We prove Lemma 5.1 at the end of this subsection. The construction follows a strategy similar to that of [32 ] : instead of maintaining the dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) directly, we maintain a modified instance ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) in which every vertex of G D G_D G D is replaced by a zero-length cycle. The construction is described formally in Definition 5.2 .
We emphasize that the data structure of [32 ] is designed for maintaining the standard planar dual G ∗ G^* G ∗ . In our setting, the dual instance also depends on the choice of terminals; see § 3 . Thus, we need to extend the same idea to dual instances, while preserving distances between dual terminals.
Recall that the dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) is obtained from ( G , T ) (G,T) ( G , T ) as follows. First, for every hole h ∈ H ( G , T ) h \in\mathcal{H}(G,T) h ∈ H ( G , T ) , we add an auxiliary vertex x h x_h x h . Second, we connect x h x_h x h to every terminal on h h h , obtaining the graph G ‾ \overline{G} G . This subdivides the hole h h h into faces that are in one-to-one correspondence with the terminals on h h h ; in particular, a terminal t t t on h h h corresponds to a face f t f_t f t of G ‾ \overline{G} G . Third, we take the standard dual G ‾ ∗ \overline{G}^* G ∗ of G ‾ \overline{G} G . Finally, we delete from G ‾ ∗ \overline{G}^* G ∗ every dual edge f t f t ′ f_t f_{t'} f t f t ′ that corresponds to an auxiliary edge incident to some auxiliary vertex x h x_h x h . See Figure 1 for an illustration.
We next describe the main difficulty in maintaining ( G D , T D ) (G_D,T_D) ( G D , T D ) dynamically. Suppose that a new terminal t t t is added on an already existing hole h h h . Let t 1 t_1 t 1 and t 2 t_2 t 2 be the consecutive terminals immediately before and after t t t on h h h in the chosen cyclic order (note that t 1 t_1 t 1 and t 2 t_2 t 2 may coincide). The effect of this update on the dual instance can be described as follows.
Since the hole h h h already existed before the update, the auxiliary vertex x h x_h x h is already present and is connected to the terminals on h h h , including the terminal(s) t 1 t_1 t 1 and t 2 t_2 t 2 . Let f t 1 f_{t_1} f t 1 be the face of G ‾ \overline{G} G corresponding to t 1 t_1 t 1 .
After t t t is added as a terminal, the edge x h t x_h t x h t is added to G ‾ \overline{G} G . This splits the face f t 1 f_{t_1} f t 1 into two faces, say f ′ f' f ′ and f ′ ′ f'' f ′′ . The face f ′ f' f ′ is bounded by the edges x h t 1 x_h t_1 x h t 1 and x h t x_h t x h t , while f ′ ′ f'' f ′′ is bounded by the edges x h t x_h t x h t and x h t 2 x_h t_2 x h t 2 . We let f ′ f' f ′ correspond to the old terminal t 1 t_1 t 1 , and let f ′ ′ f'' f ′′ correspond to the new terminal t t t . See Figure 13 .
Figure 13. An example based on Figure 1 , illustrating how ( G D , T D ) (G_D,T_D) ( G D , T D ) changes after adding a terminal t t t on the hole h h h . (a) The standard dual of G ‾ \overline{G} G before the update. (b) The terminal t t t is added on h h h . In G ‾ \overline{G} G , this corresponds to adding the edge x h t x_ht x h t , which splits the face f t 1 f_{t_1} f t 1 into two faces f ′ f' f ′ and f ′ ′ f'' f ′′ . (c) The updated dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) is obtained after deleting the dual edges corresponding to auxiliary edges. (d) The dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) of Figure 1 d before the terminal addition, shown for comparison.
Passing to the dual, this face split in G ‾ \overline{G} G becomes a vertex split in the dual graph. All dual edges whose endpoints are different from f t 1 f_{t_1} f t 1 remain unchanged. Each dual edge incident to f t 1 f_{t_1} f t 1 before the update becomes incident to exactly one of f ′ f' f ′ and f ′ ′ f'' f ′′ after the update. Moreover, because the split is due to a face split in the embedded primal graph, the cyclic order of the incident dual edges is preserved: the edges assigned to one of the two new vertices form a contiguous interval in the embedding of G D G_D G D .
The obstacle is that the vertex f t 1 f_{t_1} f t 1 may have Ω ( n ) \Omega(n) Ω ( n ) incident edges. Thus, explicitly performing the vertex split in G D G_D G D may require changing Ω ( n ) \Omega(n) Ω ( n ) edge endpoints, which is too expensive for a dynamic algorithm. To avoid this, we maintain a modified instance ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) that preserves all distances between dual terminals, while allowing such vertex splits and merges to be implemented by only O ( 1 ) O(1) O ( 1 ) elementary updates.
We now define this modified instance.
Definition 5.2 (Modified Dynamic instance ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) based on ( G , T ) (G,T) ( G , T ) ). Let G G G be a planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and ( G D , T D ) (G_D,T_D) ( G D , T D ) be the dual instance of ( G , T ) (G,T) ( G , T ) . The dynamic instance ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) is obtained from ( G D , T D ) (G_D,T_D) ( G D , T D ) as follows.
For every vertex f ∈ V ( G D ) f \in V(G_D) f ∈ V ( G D ) , let e 1 , e 2 , … , e deg G D ( f ) e_1,e_2,\ldots,e_{\deg_{G_D}(f)} e 1 , e 2 , … , e d e g G D ( f ) be the edges incident to f f f in their cyclic order in the embedding of G D G_D G D . We replace f f f by a cycle C f C_f C f with one vertex for each incident edge of f f f . The edges touching vertices in C f C_f C f are added as follows.
Consecutive vertices on C f C_f C f are connected by edges of length 0.
Each original edge e i e_i e i incident to f f f is attached to the corresponding vertex of C f C_f C f , and these attachments preserve the cyclic order of the incident edges around f f f .
The zero-length cycles ensure that terminal distances are unchanged, as shown in the following claim.
Claim 5.3. Let ( G D ∗ , T D ∗ ) (G_D^*, T_D^*) ( G D ∗ , T D ∗ ) be the dynamic instance based on ( G , T ) (G,T) ( G , T ) as in Definition 5.2. For every pair of terminals t 1 , t 2 ∈ T D t_1,t_2 \in T_D t 1 , t 2 ∈ T D , if t 1 ∗ , t 2 ∗ ∈ T D ∗ t_1^*,t_2^* \in T_D^* t 1 ∗ , t 2 ∗ ∈ T D ∗ denote their corresponding terminals, then
dist G D ( t 1 , t 2 ) = dist G D ∗ ( t 1 ∗ , t 2 ∗ ) . \operatorname{dist}_{G_D}(t_1,t_2) = \operatorname{dist}_{G_D^*}(t_1^*,t_2^*). dist G D ( t 1 , t 2 ) = dist G D ∗ ( t 1 ∗ , t 2 ∗ ) . Proof. We prove both inequalities.
First, let P P P be a t 1 t_1 t 1 -t 2 t_2 t 2 path in G D G_D G D . We construct a corresponding t 1 ∗ t_1^* t 1 ∗ -t 2 ∗ t_2^* t 2 ∗ path P ∗ P^* P ∗ in G D ∗ G_D^* G D ∗ as follows. Each edge of P P P is present in G D ∗ G_D^* G D ∗ with the same length, except that its endpoints are attached to vertices on the corresponding replacement cycles. Whenever P P P enters and leaves a vertex f f f of G D G_D G D , we connect the corresponding attachment points on C f C_f C f by a path along C f C_f C f . At the first and last vertices, we similarly connect the terminal representative to the relevant attachment point along the corresponding zero-length cycle. Since all edges of C f C_f C f have length 0, this does not increase the length. Thus
dist G D ∗ ( t 1 ∗ , t 2 ∗ ) ≤ dist G D ( t 1 , t 2 ) . \operatorname{dist}_{G_D^*}(t_1^*,t_2^*) \le\operatorname{dist}_{G_D}(t_1,t_2). dist G D ∗ ( t 1 ∗ , t 2 ∗ ) ≤ dist G D ( t 1 , t 2 ) . Conversely, let P ∗ P^* P ∗ be a t 1 ∗ t_1^* t 1 ∗ -t 2 ∗ t_2^* t 2 ∗ path in G D ∗ G_D^* G D ∗ . Contracting every cycle C f C_f C f to the original vertex f f f maps P ∗ P^* P ∗ to a t 1 t_1 t 1 -t 2 t_2 t 2 walk in G D G_D G D of the same length, since all contracted edges have length 0 and all original dual edges retain their lengths. Hence
dist G D ( t 1 , t 2 ) ≤ dist G D ∗ ( t 1 ∗ , t 2 ∗ ) . \operatorname{dist}_{G_D}(t_1,t_2) \le\operatorname{dist}_{G_D^*}(t_1^*,t_2^*). dist G D ( t 1 , t 2 ) ≤ dist G D ∗ ( t 1 ∗ , t 2 ∗ ) .
It remains to describe how ( G D ∗ , T D ∗ ) (G_D^*, T_D^*) ( G D ∗ , T D ∗ ) is updated after an update to ( G , T ) (G,T) ( G , T ) .
Edge insertion and terminal addition. As discussed above, adding a terminal t t t on an existing hole h h h induces a vertex split in ( G D , T D ) (G_D,T_D) ( G D , T D ) , together with the creation of a new dual terminal. If t t t is the first terminal on h h h , then the edge x h t x_ht x h t does not split an existing face of G G G ; in this case, G D G_D G D remains unchanged, and we only designate the corresponding vertex as a terminal.
Similarly, inserting an edge in G G G splits a face of G G G , assuming that G G G was connected before the insertion. In the dual, this results in a vertex split and the addition of the dual edge corresponding to the inserted primal edge.
In both cases, the vertex split respects the embedding: the incident edges assigned to one side of the split form a contiguous interval in the cyclic order around the split vertex. We can therefore implement the split in G D ∗ G_D^* G D ∗ as follows. Suppose the vertex f f f of G D G_D G D is split into vertices f ′ f' f ′ and f ′ ′ f'' f ′′ . The cycle C f C_f C f is split into two cycles C f ′ C_{f'} C f ′ and C f ′ ′ C_{f''} C f ′′ by performing the following operations.
Delete two zero-length edges of C f C_f C f so that the two resulting paths correspond to the two intervals of incident edges assigned to f ′ f' f ′ and f ′ ′ f'' f ′′ , respectively.
Add zero-length edges between the endpoints of these paths, thereby closing them into the cycles C f ′ C_{f'} C f ′ and C f ′ ′ C_{f''} C f ′′ .
If the update is an edge insertion in G G G , we also add the corresponding dual edge between the appropriate vertices of C f ′ C_{f'} C f ′ and C f ′ ′ C_{f''} C f ′′ . If the update creates a new dual terminal, we designate an arbitrary vertex of the corresponding cycle as its representative in T D ∗ T_D^* T D ∗ . Overall, this requires only O ( 1 ) O(1) O ( 1 ) elementary updates. See Figure 14 for an illustration.
Edge deletion and terminal removal. These operations are the inverses of edge insertion and terminal addition. Deleting an edge of G G G merges the two faces incident to that edge, assuming that G G G remains connected after the deletion. In the dual, this corresponds to deleting the dual edge and merging the two incident dual vertices. Similarly, removing a terminal t t t from a hole h h h removes the auxiliary edge x h t x_{ht} x h t from G ‾ \overline{G} G , which merges the two faces incident to x h t x_{ht} x h t , if such faces are distinct.
The merge also respects the embedding, and hence it is the inverse of the embedding-respecting split described above. Thus, to merge two cycles C f ′ C_{f'} C f ′ and C f ′ ′ C_{f''} C f ′′ into a single cycle C f C_f C f , we perform the following operations.
Delete the zero-length edges that closed the two cycles.
Add zero-length edges that concatenate the two paths into one cycle.
We also remove the corresponding dual edge if the update is an edge deletion in G G G , and update the terminal representatives if the update is a terminal removal. Again, only O ( 1 ) O(1) O ( 1 ) elementary updates are required.
We now prove Lemma 5.1 .
Proof of Lemma 5.1 . We verify the four properties in order.
By construction, every terminal t ∈ T D t \in T_D t ∈ T D is represented by exactly one designated vertex t ∗ ∈ T D ∗ t^* \in T_D^* t ∗ ∈ T D ∗ on the cycle replacing t t t . Hence the correspondence is a bijection.
This is exactly Claim 5.3 .
Each vertex f ∈ V ( G D ) f \in V(G_D) f ∈ V ( G D ) is replaced by a cycle whose size is proportional to deg G D ( f ) \deg_{G_D}(f) deg G D ( f ) . Therefore,
∣ V ( G D ∗ ) ∣ + ∣ E ( G D ∗ ) ∣ = O ( ∑ f ∈ V ( G D ) deg G D ( f ) ) = O ( ∣ E ( G D ) ∣ ) . |V(G_D^*)| + |E(G_D^*)| = O\left(\sum_{f \in V(G_D)} \deg_{G_D}(f)\right) = O(|E(G_D)|). ∣ V ( G D ∗ ) ∣ + ∣ E ( G D ∗ ) ∣ = O f ∈ V ( G D ) ∑ deg G D ( f ) = O ( ∣ E ( G D ) ∣ ) .
Since G D G_D G D is planar and has size O ( n ) O(n) O ( n ) , it follows that ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) has size O ( n ) O(n) O ( n ) .
By the discussion above, each update to ( G , T ) (G,T) ( G , T ) induces either no change to the underlying dual graph, or one split or merge of a dual vertex, together with O ( 1 ) O(1) O ( 1 ) changes to dual edges and terminal representatives. In ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) , such a split or merge is implemented by deleting and inserting O ( 1 ) O(1) O ( 1 ) zero-length cycle edges, and by performing O ( 1 ) O(1) O ( 1 ) additional edge or terminal updates. Hence ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) can be maintained using O ( 1 ) O(1) O ( 1 ) elementary updates after each update to ( G , T ) (G,T) ( G , T ) .
Dynamic Pattern Emulator: Proof of Theorem 1.4
In this subsection, we explain how to dynamically maintain the pattern emulator of § 5 under edge insertions and deletions, and up to two terminal additions or removals to establish Theorem 1.4 stated below.
Theorem 1.4. Let ( G , T ) (G,T) ( G , T ) be a dynamic instance where G G G is an n n n -vertex planar graph undergoing edge insertions and deletions with weights [ 1 , n c ] [1,n^c] [ 1 , n c ] for a constant c c c at all times, and T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) is a terminal set of at most two vertices at any time. Let 1 ≤ τ ≤ n / log n 1 \le\tau\le n/\log n 1 ≤ τ ≤ n / log n be a target parameter and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter.
Then, there is a deterministic data structure that explicitly maintains a collection P \mathcal{P} P of paths in G G G that induces a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate planar pattern emulator ( M [ P ] , T ) (M[\mathcal{P}],T) ( M [ P ] , T ) 51 of instance ( G , T ) (G,T) ( G , T ) , such that for each batch B B B of updates in ( G , T ) (G,T) ( G , T ) (whether edge insertions or deletions in G G G , or terminal additions or removals in T T T ),
Emulator Size: At any time, ∣ P ∣ = O ~ ( n τ / ε O ( 1 ) ) |\mathcal{P}| = \widetilde{O}(\sqrt{n\tau}/\varepsilon^{O(1)}) ∣ P ∣ = O ( n τ / ε O ( 1 ) ) , and
Emulator Recourse: The amortized number of paths added or deleted from P \mathcal{P} P after processing a batch update B B B is O ~ ( ∣ B ∣ / ε O ( 1 ) ) \widetilde{O}(|B|/\varepsilon^{O(1)}) O ( ∣ B ∣/ ε O ( 1 ) ) , and
Update Time: The amortized update time is O ~ ( n ∣ B ∣ / ( ε O ( 1 ) τ ) ) \widetilde{O}(n|B|/(\varepsilon^{O(1)}\tau)) O ( n ∣ B ∣/ ( ε O ( 1 ) τ )) .
The data structure has an initialization time of O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) . Moreover, ( M [ P ] , T ) (M[\mathcal{P}],T) ( M [ P ] , T ) is aligned with ( G , T ) (G,T) ( G , T ) .
The dynamic algorithm builds upon the algorithm of [21 ] , and we refer to their proofs where necessary. We begin by describing the initialization process in Subsection 5.2.1. Next, we outline how the data structure processes updates in Subsection 5.2.2. Finally, we show how to adapt the algorithm to achieve the guarantees of Theorem 1.4 at the end of Subsection 5.2.2. Theorem 1.4 is proved at the end of the subsection.
Before moving on to the initialization, we first revisit and outline the components that will be used in this subsection.
Theorem 3.9 ([38 ] , Rephrased). Let G G G be an n n n -vertex planar graph and T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set. Then, there is an algorithm that constructs an exact planar emulator ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) of size O ( ∣ T ∣ 4 ) O(|T|^4) O ( ∣ T ∣ 4 ) in time O ( n ∣ T ∣ ) O(n|T|) O ( n ∣ T ∣ ) . Moreover, ( H , T ) (H,T) ( H , T ) is aligned with ( G , T ) (G,T) ( G , T ) .
Theorem 3.17 ([16 Lemma 5.5] , Rephrased). Given an n n n -vertex planar graph G G G , a parameter 1 ≤ r ≤ n 1 \le r \le n 1 ≤ r ≤ n , and a terminal set T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) , there is an algorithm that computes a structured r r r -division of ( G , T ) (G,T) ( G , T ) in O ( n ) O(n) O ( n ) time such that each piece is connected and has O ( 1 ) O(1) O ( 1 ) holes.
Theorem 3.18 ([36 ] ). Given an n n n -vertex planar graph G G G and a terminal set T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) on h h h holes, there is an algorithm that computes an r r r -division of ( G , T ) (G,T) ( G , T ) satisfying items 1 to 3 of Definition 3.16 in O ( n ) O(n) O ( n ) time such that, for every 1 ≤ i ≤ k 1 \le i \le k 1 ≤ i ≤ k , the piece G [ E i ] G[E_i] G [ E i ] has at most 3 4 h + 4 \frac{3}{4}h + 4 4 3 h + 4 holes.
Theorem 3.19 ([21 Theorem 3.10] , Rephrased). Given an n n n -vertex planar graph G G G and a terminal set T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) on a single hole, there is an algorithm that finds vertices u , v u,v u , v on the hole of ( G , T ) (G,T) ( G , T ) in O ( n ) O(n) O ( n ) time such that the two terminal intervals on the hole bounded by u u u and v v v contain at most 11 12 ∣ T ∣ \frac{11}{12}|T| 12 11 ∣ T ∣ terminals each, and at least one of the following holds.
The shortest path π u v \pi_{uv} π uv in G G G does not contain a bridge.
The edge u v ∈ E ( G ) uv \in E(G) uv ∈ E ( G ) exists and is a bridge.
Lemma 3.20. Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set lying on h h h holes, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. Let R R R be a shortest path in G G G . Then, there exists an algorithm that computes the set Portals ( R , T , ε ) : = ⋃ t ∈ T Portals ( R , t , ε ) \operatorname{Portals}(R,T,\varepsilon) := \bigcup_{t\in T}\operatorname{Portals}(R,t,\varepsilon) Portals ( R , T , ε ) := ⋃ t ∈ T Portals ( R , t , ε ) , which lies on R R R and has size O ( ∣ T ∣ log n / ε ) O(|T|\log n/\varepsilon) O ( ∣ T ∣ log n / ε ) , in time O ( n h log ∣ T ∣ ) O(nh\log|T|) O ( nh log ∣ T ∣ ) .
Lemma 3.22. Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set on a single hole, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. Let π u v \pi_{uv} π uv be the separator path obtained from Theorem 3.19. Then, there is an algorithm that computes a set of portals SplitPortals ( π u v , T , ε ) \operatorname{SplitPortals}(\pi_{uv},T,\varepsilon) SplitPortals ( π uv , T , ε ) on π u v \pi_{uv} π uv of size O ( ∣ T ∣ / ε ) O(|T|/\varepsilon) O ( ∣ T ∣/ ε ) that satisfies the ( 1 + O ( ε ) ) (1+O(\varepsilon)) ( 1 + O ( ε )) -cover property of Equation (1) . Moreover, the portal set can be computed in time O ( n ∣ T ∣ ) O(n|T|) O ( n ∣ T ∣ ) .
Definition 4.13 (Portal Set SlicePortals ( R , T , ε ) \operatorname{SlicePortals}(R,T,\varepsilon) SlicePortals ( R , T , ε ) ). Let G G G be a planar graph with h ≥ 2 h \ge2 h ≥ 2 holes, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. Let R R R be the shortest path between the closest pair of holes. Then, we define the set SlicePortals ( R , T , ε ) \operatorname{SlicePortals}(R,T,\varepsilon) SlicePortals ( R , T , ε ) of portals on R R R as
SlicePortals ( R , T , ε ) : = Portals ( R , T , ε ′ ′ ) , \operatorname{SlicePortals}(R,T,\varepsilon) := \operatorname{Portals}(R,T,\varepsilon''), SlicePortals ( R , T , ε ) := Portals ( R , T , ε ′′ ) , where Portals ( ⋅ , ⋅ , ⋅ ) \operatorname{Portals}(\cdot,\cdot,\cdot) Portals ( ⋅ , ⋅ , ⋅ ) is from Lemma 3.20, and ε ′ ′ = ε ′ / 2 h + 5 \varepsilon'' = \varepsilon'/2^{h+5} ε ′′ = ε ′ / 2 h + 5 and ε ′ = ε / ( 2 h ) \varepsilon' = \varepsilon/(2h) ε ′ = ε / ( 2 h ) .
Definition 4.14 (Sliced Instance ( G i , T i ) (G_i,T_i) ( G i , T i ) Based on ( G , T ) (G,T) ( G , T ) with Parameter ε \varepsilon ε ). Let G G G be a planar graph with h ≥ 2 h \ge2 h ≥ 2 holes, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. For 1 ≤ i ≤ h 1 \le i \le h 1 ≤ i ≤ h , we recursively define the instance ( G i , T i ) (G_i,T_i) ( G i , T i ) as follows.
We set ( G 1 , T 1 ) : = ( G , T ) (G_1,T_1):=(G,T) ( G 1 , T 1 ) := ( G , T ) .
For 2 ≤ i ≤ h 2\le i\le h 2 ≤ i ≤ h , we define ( G i , T i ) (G_i,T_i) ( G i , T i ) based on ( G i − 1 , T i − 1 ) (G_{i-1},T_{i-1}) ( G i − 1 , T i − 1 ) as follows. Let R i − 1 R_{i-1} R i − 1 be the shortest path connecting the closest pair of holes in G i − 1 G_{i-1} G i − 1 .
G i G_i G i is the graph obtained from G i − 1 G_{i-1} G i − 1 by slicing along R i − 1 R_{i-1} R i − 1 using Algorithm 1. i.e., using the terminology of Algorithm 1, G i = G ‾ i − 1 G_i=\overline{G}_{i-1} G i = G i − 1 .
T i T_i T i is obtained from T i − 1 T_{i-1} T i − 1 together with the portals on R i − 1 R_{i-1} R i − 1 (and its copy R ‾ i − 1 \overline{R}_{i-1} R i − 1 ) as defined in Definition 4.13 . i.e., we set
T i : = T i − 1 ∪ SlicePortals ( R i − 1 , T i − 1 , ε ) ∪ SlicePortals ‾ ( R i − 1 , T i − 1 , ε ) T_i:=T_{i-1}\cup\operatorname{SlicePortals}(R_{i-1},T_{i-1},\varepsilon)\cup\overline{\operatorname{SlicePortals}}(R_{i-1},T_{i-1},\varepsilon) T i := T i − 1 ∪ SlicePortals ( R i − 1 , T i − 1 , ε ) ∪ SlicePortals ( R i − 1 , T i − 1 , ε )
where SlicePortals ‾ ( R i − 1 , T i − 1 , ε ) \overline{\operatorname{SlicePortals}}(R_{i-1},T_{i-1},\varepsilon) SlicePortals ( R i − 1 , T i − 1 , ε ) is the set of vertices on R ‾ i − 1 \overline{R}_{i-1} R i − 1 that are copies of SlicePortals ( R i − 1 , T i − 1 , ε ) \operatorname{SlicePortals}(R_{i-1},T_{i-1},\varepsilon) SlicePortals ( R i − 1 , T i − 1 , ε ) .
Initialization
The data structure initially partitions ( G , T ) (G,T) ( G , T ) into sufficiently small pieces and then computes an emulator for each piece. The construction of these pieces involves three main steps: reducing the size of the instances, reducing the number of holes, and finally reducing the size of the terminal set to achieve the desired piece size. To differentiate these steps, the algorithm classifies the instances formed during this process into four types, as follows.
Type-4 Instance: An instance ( R , S ) (R,S) ( R , S ) is classified as Type-4 if ∣ R ∣ > n / τ |R|>n/\tau ∣ R ∣ > n / τ and it contains O ( 1 ) O(1) O ( 1 ) holes.
Type-3 Instance: An instance ( R , S ) (R,S) ( R , S ) is classified as Type-3 if ∣ R ∣ = O ( n / τ ) |R|=O(n/\tau) ∣ R ∣ = O ( n / τ ) and it contains O ( 1 ) O(1) O ( 1 ) holes.
Type-2 Instance: An instance ( R , S ) (R,S) ( R , S ) is classified as Type-2 if ∣ R ∣ = O ( n / τ ) |R|=O(n/\tau) ∣ R ∣ = O ( n / τ ) and it is a one-hole instance.
Type-1 Instance: An instance ( R , S ) (R,S) ( R , S ) is classified as Type-1 if ∣ R ∣ = O ( n / τ ) |R|=O(n/\tau) ∣ R ∣ = O ( n / τ ) , it is a one-hole instance, and ∣ S ∣ ≤ log 10 n |S|\le\log^{10} n ∣ S ∣ ≤ log 10 n .
The main intuition behind this classification is to start with the Type-4 instance ( G , ∅ ) (G,\emptyset) ( G , ∅ ) 52 and sequentially refine it: first obtaining pieces of Type-3 , then using each Type-3 piece to derive Type-2 pieces, and finally using each Type-2 piece to derive Type-1 pieces. The Type-1 pieces are the granular pieces that we will use to construct our emulator.
Obtaining Type-1 pieces for ( G , ∅ ) (G,\emptyset) ( G , ∅ ) naturally induces a tree T \mathcal{T} T , referred to as the decomposition tree . Each node in T \mathcal{T} T corresponds to an instance ( R , S ) (R,S) ( R , S ) .53 Similar to § 5 , to approximately preserve distances while constructing the instances, we use a portal set Portals ( R , S ) \operatorname{Portals}(R,S) Portals ( R , S ) for each instance in the tree. The portal set is designed to handle the distance changes caused by updates, where portal additions are propagated to the children of ( R , S ) (R,S) ( R , S ) in T \mathcal{T} T , as will be discussed later in this subsection.
We now describe the construction of the decomposition tree T \mathcal{T} T .
For every Type-4 instance ( R , S ) (R,S) ( R , S ) , we use Theorem 3.18 to obtain a structured r r r -division of ( R , S ) (R,S) ( R , S ) with pieces ( R 1 , S 1 ) , … , ( R k , S k ) (R_1,S_1),\ldots,(R_k,S_k) ( R 1 , S 1 ) , … , ( R k , S k ) of ( R , S ) (R,S) ( R , S ) . Each piece ( R i , S i ) (R_i,S_i) ( R i , S i ) becomes a child of ( R , S ) (R,S) ( R , S ) in T T T . We set the parameter r r r such that ∣ R i ∣ ≤ 3 / 4 ∣ R ∣ |R_i| \le3/4|R| ∣ R i ∣ ≤ 3/4∣ R ∣ for 1 ≤ i ≤ k 1 \le i \le k 1 ≤ i ≤ k and ∑ i = 1 k ∣ S i ∣ = O ( ∣ R ∣ ) \sum_{i=1}^{k}|S_i|=O(\sqrt{|R|}) ∑ i = 1 k ∣ S i ∣ = O ( ∣ R ∣ ) . Furthermore, by Theorem 3.18, each instance ( R i , S i ) (R_i,S_i) ( R i , S i ) has 3 / 4 ∣ H ( R , S ) ∣ + 4 ≤ 16 = O ( 1 ) 3/4|\mathcal{H}(R,S)|+4 \le16=O(1) 3/4∣ H ( R , S ) ∣ + 4 ≤ 16 = O ( 1 ) holes.
For every Type-4 instance ( R , S ) (R,S) ( R , S ) , we set Portals ( R , S ) = ( ⋃ i = 1 k S i ) ∖ S \operatorname{Portals}(R,S)=\left(\bigcup_{i=1}^{k}S_i\right)\setminus S Portals ( R , S ) = ( ⋃ i = 1 k S i ) ∖ S . Note that the terminal set S i S_i S i is provided by Theorem 3.18 and consists of the boundary vertices of R i R_i R i as well as the set S ∩ V ( R i ) S\cap V(R_i) S ∩ V ( R i ) , which includes terminals of ( R , S ) (R,S) ( R , S ) that are present in ( R i , S i ) (R_i,S_i) ( R i , S i ) .
For every Type-3 instance ( R , S ) (R,S) ( R , S ) , we reduce the number of holes by one via the slicing procedure (see Algorithm 1). We select the shortest path π u v \pi_{uv} π uv between the closest holes in H ( R , S ) \mathcal{H}(R,S) H ( R , S ) , with endpoints u u u and v v v . After slicing through π u v \pi_{uv} π uv , the resulting instance ( R ′ , S ′ ) (R',S') ( R ′ , S ′ ) is set as the child of ( R , S ) (R,S) ( R , S ) in T T T . We denote by π ‾ u v \overline{\pi}_{uv} π uv the copy of π u v \pi_{uv} π uv used in the slicing procedure.
For every child ( R ′ , S ′ ) (R',S') ( R ′ , S ′ ) of a Type-3 instance ( R , S ) (R,S) ( R , S ) , we set Portals ( R ′ , S ′ ) = Portals ( R , S ) ∪ SlicePortals ( π u v , S , ε ) ∪ SlicePortals ( π ‾ u v , S , ε ) \operatorname{Portals}(R',S')=\operatorname{Portals}(R,S)\cup\operatorname{SlicePortals}(\pi_{uv},S,\varepsilon)\cup\operatorname{SlicePortals}(\overline{\pi}_{uv},S,\varepsilon) Portals ( R ′ , S ′ ) = Portals ( R , S ) ∪ SlicePortals ( π uv , S , ε ) ∪ SlicePortals ( π uv , S , ε ) , as defined in Definition 4.13 .54 Additionally, we set the terminal set S ′ = S ∪ SlicePortals ( π u v , S , ε ) ∪ SlicePortals ( π ‾ u v , S , ε ) S'=S\cup\operatorname{SlicePortals}(\pi_{uv},S,\varepsilon)\cup\operatorname{SlicePortals}(\overline{\pi}_{uv},S,\varepsilon) S ′ = S ∪ SlicePortals ( π uv , S , ε ) ∪ SlicePortals ( π uv , S , ε ) . See Algorithm 2 for a summary of this procedure.
Table 2.
For every Type-2 instance ( R , S ) (R,S) ( R , S ) , we split ( R , S ) (R,S) ( R , S ) into two instances ( R 1 , S 1 ) (R_1,S_1) ( R 1 , S 1 ) and ( R 2 , S 2 ) (R_2,S_2) ( R 2 , S 2 ) such that ∣ S i ∩ S ∣ ≤ 11 / 12 ∣ S ∣ |S_i\cap S|\le11/12|S| ∣ S i ∩ S ∣ ≤ 11/12∣ S ∣ for i = 1 , 2 i=1,2 i = 1 , 2 . This is accomplished by finding a shortest path π u v \pi_{uv} π uv between the vertices u u u and v v v on the single hole in ( R , S ) (R,S) ( R , S ) , using the shortest path separator from Theorem 3.19. Consequently, ( R 1 , S 1 ) (R_1,S_1) ( R 1 , S 1 ) and ( R 2 , S 2 ) (R_2,S_2) ( R 2 , S 2 ) still have a single hole, and they are set as the children of ( R , S ) (R,S) ( R , S ) in T T T .
For every Type-2 instance ( R , S ) (R,S) ( R , S ) , similar to Type-3 instances, we obtain the portal set on the path π u v \pi_{uv} π uv . We use Lemma 3.22 to obtain the set SplitPortals ( π u v , t , ε ) \operatorname{SplitPortals}(\pi_{uv},t,\varepsilon) SplitPortals ( π uv , t , ε ) . We set Portals ( R , S ) = ⋃ t ∈ S SplitPortals ( π u v , t , ε ) \operatorname{Portals}(R,S)=\bigcup_{t\in S}\operatorname{SplitPortals}(\pi_{uv},t,\varepsilon) Portals ( R , S ) = ⋃ t ∈ S SplitPortals ( π uv , t , ε ) . Since ( R 1 , S 1 ) (R_1,S_1) ( R 1 , S 1 ) and ( R 2 , S 2 ) (R_2,S_2) ( R 2 , S 2 ) split ( R , S ) (R,S) ( R , S ) , we set S i = ( S ∩ V ( R i ) ) ∪ Portals ( R , S ) S_i=(S\cap V(R_i))\cup\operatorname{Portals}(R,S) S i = ( S ∩ V ( R i )) ∪ Portals ( R , S ) for i = 1 , 2 i=1,2 i = 1 , 2 . In case ε = u v \varepsilon=uv ε = uv is a bridge edge, then we only add u u u and v v v to the portal set as the removal of π u v = e \pi_{uv}=e π uv = e disconnects the graph into ( R 1 , S 1 ) (R_1,S_1) ( R 1 , S 1 ) and ( R 2 , S 2 ) (R_2,S_2) ( R 2 , S 2 ) .
Algorithm 3: Reduce-Terminal ( ( R , S ) , ε ) ((R,S),\varepsilon) (( R , S ) , ε )
Input: a one-hole instance ( R , S ) (R,S) ( R , S ) and error parameter 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1
Output: two one-hole instances ( R 1 , S 1 ) (R_1,S_1) ( R 1 , S 1 ) and ( R 2 , S 2 ) (R_2,S_2) ( R 2 , S 2 ) with ∣ S i ∩ S ∣ ≤ 11 12 ∣ S ∣ |S_i \cap S| \le\frac{11}{12}|S| ∣ S i ∩ S ∣ ≤ 12 11 ∣ S ∣ for i = 1 , 2 i=1,2 i = 1 , 2
let u , v u,v u , v be the vertices computed by Theorem 3.19, and let π u v \pi_{uv} π uv be the shortest u u u -v v v path
if π u v \pi_{uv} π uv does not contain a bridge edge then
Portals ( R , S ) ← Portals ( R , S ) ∪ SplitPortals ( π u v , S , ε ) \operatorname{Portals}(R,S) \gets\operatorname{Portals}(R,S) \cup\operatorname{SplitPortals}(\pi_{uv},S,\varepsilon) Portals ( R , S ) ← Portals ( R , S ) ∪ SplitPortals ( π uv , S , ε )
/* the portal set SplitPortals ( ⋅ , ⋅ , ⋅ ) \operatorname{SplitPortals}(\cdot,\cdot,\cdot) SplitPortals ( ⋅ , ⋅ , ⋅ ) is from Lemma 3.22 */
let R 1 , R 2 R_1,R_2 R 1 , R 2 be the (non-empty) regions of R R R enclosed by the (non-simple) cycles formed by π u v \pi_{uv} π uv and its hole
else
Portals ( R , S ) ← Portals ( R , S ) ∪ { u , v } \operatorname{Portals}(R,S) \gets\operatorname{Portals}(R,S) \cup\{u,v\} Portals ( R , S ) ← Portals ( R , S ) ∪ { u , v }
let C C C and C ′ C' C ′ be the connected components of R ∖ { e } R \setminus\{e\} R ∖ { e }
/* e = u v e=uv e = uv is a bridge edge by Theorem 3.19 */
let R 1 ← R [ C ] ∪ { e } R_1 \gets R[C] \cup\{e\} R 1 ← R [ C ] ∪ { e } and R 2 ← R [ C ′ ] R_2 \gets R[C'] R 2 ← R [ C ′ ]
set S i ← ( S ∩ V ( R i ) ) ∪ Portals ( R , S ) S_i \gets(S \cap V(R_i)) \cup\operatorname{Portals}(R,S) S i ← ( S ∩ V ( R i )) ∪ Portals ( R , S ) for i = 1 , 2 i=1,2 i = 1 , 2
return ( R 1 , S 1 ) (R_1,S_1) ( R 1 , S 1 ) and ( R 2 , S 2 ) (R_2,S_2) ( R 2 , S 2 )
See Algorithm 3 for a summary of this procedure.
Using the construction above, it is not hard to see that the type of the instances on any root-to-leaf path in T T T monotonically decreases. Moreover, the depth of T T T is O ~ ( 1 ) \widetilde{O}(1) O ( 1 ) [21 Lemma 6.16] .
See Algorithm 4 for a summary of the initialization procedure.
To initialize T T T , we simply execute the algorithm on ( G , ∅ ) (G,\emptyset) ( G , ∅ ) , as described in Algorithm 5.
We can now construct the emulator for ( G , ∅ ) (G,\emptyset) ( G , ∅ ) in a bottom-up fashion using T T T , as follows.
Type-1 Emulator: For every Type-1 instance ( R , S ) (R,S) ( R , S ) , we compute an exact emulator ( H , S ) (H,S) ( H , S ) using Theorem 3.9. This results in an emulator of size ∣ H ∣ = O ( ∣ S ∣ 4 ) = poly ( log n ) |H| = O(|S|^4) = \operatorname{poly}(\log n) ∣ H ∣ = O ( ∣ S ∣ 4 ) = poly ( log n ) and takes O ( ∣ V ( R ) ∣ ⋅ ∣ S ∣ ) = O ~ ( n / τ ) O(|V(R)| \cdot|S|) = \widetilde{O}(n/\tau) O ( ∣ V ( R ) ∣ ⋅ ∣ S ∣ ) = O ( n / τ ) time.
Type-2 Emulator: For every Type-2 instance ( R , S ) (R,S) ( R , S ) with children ( R 1 , S 1 ) (R_1,S_1) ( R 1 , S 1 ) and ( R 2 , S 2 ) (R_2,S_2) ( R 2 , S 2 ) , we construct the emulator ( H , S ) (H,S) ( H , S ) for ( R , S ) (R,S) ( R , S ) using the emulators ( H 1 , S 1 ) (H_1,S_1) ( H 1 , S 1 ) and ( H 2 , S 2 ) (H_2,S_2) ( H 2 , S 2 ) of its children. Recall that these children result from splitting ( R , S ) (R,S) ( R , S ) . Thus, ( H , S ) (H,S) ( H , S ) is defined as the union of ( H 1 , S 1 ) (H_1,S_1) ( H 1 , S 1 ) and ( H 2 , S 2 ) (H_2,S_2) ( H 2 , S 2 ) , where each portal vertex in S 1 S_1 S 1 on π u v \pi_{uv} π uv is glued to its copy in S 2 S_2 S 2 . By straightforward induction, it follows that the emulator has a size of ∣ H ∣ = ∣ S ∣ / ε O ( 1 ) ⋅ poly ( log n ) |H| = |S|/\varepsilon^{O(1)} \cdot\operatorname{poly}(\log n) ∣ H ∣ = ∣ S ∣/ ε O ( 1 ) ⋅ poly ( log n ) .
Type-3 Emulator: For every Type-3 instance ( R , S ) (R,S) ( R , S ) with child ( R ′ , S ′ ) (R',S') ( R ′ , S ′ ) , we construct the emulator ( H , S ) (H,S) ( H , S ) for ( R , S ) (R,S) ( R , S ) using the emulator ( H ′ , S ′ ) (H',S') ( H ′ , S ′ ) of ( R ′ , S ′ ) (R',S') ( R ′ , S ′ ) . Specifically, ( H , S ) (H,S) ( H , S ) is obtained from ( H ′ , S ′ ) (H',S') ( H ′ , S ′ ) by gluing back every portal on π u v \pi_{uv} π uv with its copy on π u v \pi_{uv} π uv . Since this process merges some vertices to form ( H , S ) (H,S) ( H , S ) , it follows that ∣ H ∣ = ∣ S ∣ / ε O ( 1 ) ⋅ poly ( log n ) |H| = |S|/\varepsilon^{O(1)} \cdot\operatorname{poly}(\log n) ∣ H ∣ = ∣ S ∣/ ε O ( 1 ) ⋅ poly ( log n ) .
Type-4 Emulator: For every Type-4 instance ( R , S ) (R,S) ( R , S ) with children ( R 1 , S 1 ) , … , ( R k , S k ) (R_1,S_1),\ldots,(R_k,S_k) ( R 1 , S 1 ) , … , ( R k , S k ) , we define the emulator ( H , S ) (H,S) ( H , S ) as the union ⋃ i = 1 k ( H i , S i ) \bigcup_{i=1}^{k}(H_i,S_i) ⋃ i = 1 k ( H i , S i ) , where ( H i , S i ) (H_i,S_i) ( H i , S i ) is the emulator for ( R i , S i ) (R_i,S_i) ( R i , S i ) . By the Type-4 property and the guarantees of Theorem 3.18, it follows that each H i H_i H i has size O ~ ( n / τ ) \widetilde{O}(\sqrt{n/\tau}) O ( n / τ ) and there are O ( τ ) O(\tau) O ( τ ) such emulators. Consequently, ∣ H ∣ = O ~ ( n τ / ε O ( 1 ) ) |H| = \widetilde{O}(\sqrt{n\tau}/\varepsilon^{O(1)}) ∣ H ∣ = O ( n τ / ε O ( 1 ) ) .
Algorithm 4: Initialize-Instance(($R$, $S$), $\tau$, $\varepsilon$)
Input: an instance ($R$, $S$), target parameter $\tau$, and error parameter $0 < \varepsilon < 1$
Output: a decomposition tree $T$ rooted at ($R$, $S$)
1 Portals($R$, $S$) $\leftarrow S$. /* initialize the portal set */
2 if $R$ is not connected then /* handle the degenerate case */
3 let ($R_p$, $S_p$) be the parent of ($R$, $S$)
4 remove ($R$, $S$) from $T$
5 foreach connected component $C$ in $R$ do
6 add instance ($C$, $S \cap C$) as a child of ($R_p$, $S_p$) to $T$
7 Initialize-Instance(($C$, $S \cap C$), $\tau$, $\varepsilon$)
8 return
9 if ($R$, $S$) is of Type-1 then
10 return
11 else if the parent of ($R$, $S$) is of Type-2 or Type-3 and ($R$, $S$) is a one-hole instance then
12 let ($R_1$, $S_1$) and ($R_2$, $S_2$) be the instances returned by Reduce-Terminal(($R$, $S$), $\varepsilon$)
13 add instances ($R_1$, $S_1$) and ($R_2$, $S_2$) as children of ($R$, $S$) to $T$
14 else if the parent of ($R$, $S$) is of Type-3 or Type-4 with $|R| = O(n/\tau)$ and ($R$, $S$) is not a one-hole instance then
15 let ($R'$, $S'$) be the instance returned by Reduce-Hole(($R$, $S$), $\varepsilon$)
16 add instance ($R'$, $S'$) as the child of ($R$, $S$) to $T$
17 else /* ($R$, $S$) is of Type-4 */
18 Use {xref}`Theorem 3.18` on ($R$, $S$) to obtain the subgraphs ($R_1$, $S_1$), $\ldots$, ($R_k$, $S_k$)
19 foreach $i \in [1, k]$ do
20 Add instance ($R_i$, $(S \cup \partial_R R_i) \cap V(R_i)$) as a child of ($R$, $S$) to $T$
21 foreach child ($R'$, $S'$) of ($R$, $S$) in $T$ do
22 Initialize-Instance(($R'$, $S'$), $\tau$, $\varepsilon$).
Algorithm 5: Initialize($G$, $\tau$, $\varepsilon$)
Input: a planar graph $G$, target parameter $\tau$, and error parameter $0 < \varepsilon < 1$
Output: a decomposition tree $T$ with the instance ($G$, $\varnothing$) as its root
1 Create a decomposition tree $T$ consisting solely of a root node ($G$, $\varnothing$)
2 Initialize-Instance(($G$, $\varnothing$), $\tau$, $\varepsilon$).
Handling the Updates
Updates to ( G , ∅ ) (G,\varnothing) ( G , ∅ ) consist of edge insertions and deletions in G G G , as well as terminal additions and removals from its terminal set T T T (recall that at initialization, we have T = ∅ T=\varnothing T = ∅ ). We will explain how the data structure handles each type of update separately.55
Before proceeding with how updates are handled, we discuss the global rebuilding policy: for every instance ( R , S ) (R,S) ( R , S ) , updates can modify R R R or its terminal set S S S . The data structure recomputes ( R , S ) (R,S) ( R , S ) if R R R or S S S grows significantly relative to their initial size, thereby ensuring that the size of the maintained emulator remains within the desired bounds. More precisely,
For a Type-1 instance, whenever an update happens in ( R , S ) (R,S) ( R , S ) , we recompute its emulator.
For a Type-2 instance, whenever R R R undergoes Θ ~ ( ∣ S ∣ ) \widetilde{\Theta}(|S|) Θ ( ∣ S ∣ ) changes or Portals ( R , S ) \operatorname{Portals}(R,S) Portals ( R , S ) increases by a factor of ( 1 + Θ ( 1 / log 2 n ) ) \left(1+\Theta(1/\log^2 n)\right) ( 1 + Θ ( 1/ log 2 n ) ) compared to its initial size, we reinitialize ( R , S ) (R,S) ( R , S ) .
For a Type-3 instance, the reinitialization process is similar to the Type-2 case.
For a Type-4 instance, whenever R R R undergoes Θ ~ ( ∣ S ∣ ) \widetilde{\Theta}(|S|) Θ ( ∣ S ∣ ) changes, we reinitialize ( R , S ) (R,S) ( R , S ) .
This reinitialization removes the subtree of T \mathcal{T} T rooted at ( R , S ) (R,S) ( R , S ) and replaces it with a new subtree obtained by executing Algorithm 4 on ( R , S ) (R,S) ( R , S ) .
Terminal Addition to ( R , S ) (R,S) ( R , S ) . Upon the addition of a terminal t t t to S S S , we propagate this addition naturally to its children as follows.
If ( R , S ) (R,S) ( R , S ) is a Type-4 instance, then either t t t is a boundary vertex between its children (and thus already a terminal vertex in them) or it is entirely contained within one child, say ( R i , S i ) (R_i,S_i) ( R i , S i ) . In the latter case, we add t t t to S i S_i S i .
If ( R , S ) (R,S) ( R , S ) is a Type-3 instance, we add t t t to S S S and include SlicePortals ( π u v , t , ε ) \operatorname{SlicePortals}(\pi_{uv},t,\varepsilon) SlicePortals ( π uv , t , ε ) in Portals ( R , S ) \operatorname{Portals}(R,S) Portals ( R , S ) . We then propagate the addition of t t t to the child ( R ′ , S ′ ) (R',S') ( R ′ , S ′ ) of ( R , S ) (R,S) ( R , S ) .
If ( R , S ) (R,S) ( R , S ) is a Type-2 instance, we add t t t to S S S and include SplitPortals ( π u v , t , ε ) \operatorname{SplitPortals}(\pi_{uv},t,\varepsilon) SplitPortals ( π uv , t , ε ) in Portals ( R , S ) \operatorname{Portals}(R,S) Portals ( R , S ) . We then pass the addition of t t t to every child of ( R , S ) (R,S) ( R , S ) that contains t t t .
If ( R , S ) (R,S) ( R , S ) is a Type-1 instance and t t t is not already in S S S , we add t t t to S S S and then recompute the emulator ( H , S ) (H,S) ( H , S ) of ( R , S ) (R,S) ( R , S ) using Theorem 3.9.
This procedure affects O ~ ( 1 ) \widetilde{O}(1) O ( 1 ) instances in T \mathcal{T} T [21 Claims 6.30 to 6.32] .
Intuitively, the propagation of t t t through T \mathcal{T} T ensures that the emulator preserves the distances between the newly added terminal t t t and any other terminal. This is achieved by adding sufficient portals on the sliced paths of Type-2 and Type-3 instances, and recomputing the emulator for the Type-1 instance containing t t t .
Terminal Removal from ( R , S ) (R,S) ( R , S ) . Upon the removal of a terminal t t t from ( R , S ) (R,S) ( R , S ) , we simply remove t t t from S S S and propagate the deletion of t t t to the children of ( R , S ) (R,S) ( R , S ) that contain it. Note that this update does not change Portals ( R , S ) \operatorname{Portals}(R,S) Portals ( R , S ) ; however, once the number of portals increases significantly relative to its initial size, the rebuilding policy triggers a recomputation of ( R , S ) (R,S) ( R , S ) , thereby removing stale portals in a single rebuilding step.
Edge Deletion from ( R , S ) (R,S) ( R , S ) . The deletion of an edge e e e from ( R , S ) (R,S) ( R , S ) is propagated from ( R , S ) (R,S) ( R , S ) to its children. Note that if ( R , S ) (R,S) ( R , S ) is a Type-3 or Type-2 instance, the edge e e e may have two copies in the children of ( R , S ) (R,S) ( R , S ) if it was part of the split path π u v \pi_{uv} π uv . In such cases, we remove all copies of e e e from the children and propagate these deletions to deeper levels of T \mathcal{T} T .
If e e e is part of a hole, then its removal updates the hole to include the edges of the other face containing e e e prior to its deletion.
This process affects O ~ ( 1 ) \widetilde{O}(1) O ( 1 ) instances in T \mathcal{T} T [21 Lemma 6.22] .
Edge Insertion into ( R , S ) (R,S) ( R , S ) . Upon the insertion of an edge e = x y e=xy e = x y into ( R , S ) (R,S) ( R , S ) , the data structure adds e e e to R R R if the endpoints of e e e lie on a face that is not a hole in ( R , S ) (R,S) ( R , S ) . Otherwise, the data structure treats the endpoints x x x and y y y as terminals and processes their addition to ( R , S ) (R,S) ( R , S ) , as discussed earlier. This transition from edge insertion to terminal addition ensures that if e e e is not added directly to ( R , S ) (R,S) ( R , S ) , the distance information from x x x and y y y to other terminals is preserved, and directly adding e e e to the emulator results in the updated emulator.56
Similar to edge deletion, this process affects O ~ ( 1 ) \widetilde{O}(1) O ( 1 ) instances in T \mathcal{T} T [21 Lemma 6.22] .
In the following theorem, the guarantees of the data structure are summarized.
Theorem 5.4 ([21 Theorem 4.1] , Rephrased). Let ( G , T ) (G,T) ( G , T ) be a dynamic instance where G G G is an n n n -vertex planar graph undergoing edge insertions and deletions with weights in [ 1 , n c ] [1,n^c] [ 1 , n c ] for a constant c c c at all times,57 and T ⊆ V ( G ) T\subseteq V(G) T ⊆ V ( G ) is a terminal set of at most two vertices at any time. Let 1 ≤ τ ≤ n / log n 1\leq\tau\leq n/\log n 1 ≤ τ ≤ n / log n be a target parameter and 0 < ε < 1 0<\varepsilon<1 0 < ε < 1 be an error parameter.
Then, there is a deterministic data structure that explicitly maintains a collection P \mathcal{P} P of paths in G G G that induces a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate planar emulator ( M [ P ] , T ) (\mathcal{M}[\mathcal{P}],T) ( M [ P ] , T ) of instance ( G , T ) (G,T) ( G , T ) , such that for each batch B B B of updates in ( G , T ) (G,T) ( G , T ) (whether edge insertions or deletions in G G G , or terminal additions or removals in T ) T) T ) ,
Emulator Size: At any time, ∣ P ∣ = O ~ ( n τ / ε O ( 1 ) ) |\mathcal{P}|=\widetilde{O}(\sqrt{n\tau}/\varepsilon^{O(1)}) ∣ P ∣ = O ( n τ / ε O ( 1 ) ) , and
Emulator Recourse: The amortized number of paths added or deleted from P \mathcal{P} P after after processing a batch update B B B is O ~ ( ∣ B ∣ / ε O ( 1 ) ) \widetilde{O}(|B|/\varepsilon^{O(1)}) O ( ∣ B ∣/ ε O ( 1 ) ) , and
Update Time: The amortized update time is O ~ ( n ∣ B ∣ / ( ε O ( 1 ) τ ) ) \widetilde{O}(n|B|/(\varepsilon^{O(1)}\tau)) O ( n ∣ B ∣/ ( ε O ( 1 ) τ )) .
The data structure has an initialization time of O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) . Moreover, ( M [ P ] , T ) (\mathcal{M}[\mathcal{P}],T) ( M [ P ] , T ) is aligned with ( G , T ) (G,T) ( G , T ) .^58
Proof of Theorem 1.4. We use the same data structure and the same update procedure as in Theorem 5.4 . Thus it remains only to verify that the emulator maintained by the data structure is not merely a planar terminal emulator, but a planar pattern emulator.
Let T \mathcal{T} T be the current decomposition tree. For a node x = ( R , S ) ∈ V ( T ) x=(R,S)\in V(\mathcal{T}) x = ( R , S ) ∈ V ( T ) , let M x \mathcal{M}_x M x denote the emulator maintained for the subinstance ( R , S ) (R,S) ( R , S ) by the bottom-up construction. We prove that the graph M x \mathcal{M}_x M x is a planar pattern emulator for ( R , S ) (R,S) ( R , S ) , with respect to the embedding and the terminal order induced by the construction.
The proof is by induction on the height of x x x in T \mathcal{T} T . If x x x is a leaf, then x x x is a Type-1 instance. For such an instance we use the exact aligned planar emulator given by Theorem 3.9. In particular, the embedding of the emulator agrees with the embedding of the corresponding instance on the terminals, and therefore the emulator is a planar pattern emulator for the leaf instance.
Now consider an internal node x = ( R , S ) x=(R,S) x = ( R , S ) , and assume that we maintain emulators for all children x 1 = ( R 1 , S 1 ) , … , x k = ( R k , S k ) x_1=(R_1,S_1),\ldots,x_k=(R_k,S_k) x 1 = ( R 1 , S 1 ) , … , x k = ( R k , S k ) of x x x . By the induction hypothesis, each M x i \mathcal{M}_{x_i} M x i is a planar pattern emulator for ( R i , S i ) (R_i,S_i) ( R i , S i ) . The child instances are glued together along exactly the terminals, portals, copied portals, and separator vertices introduced by the decomposition step that produced them. Moreover, these vertices occur in the same cyclic order as in the original embedding: in the r r r -division step this is inherited from the embedded pieces, in the slicing step it is enforced by the copied path and copied portals, and in the terminal-reduction step it is enforced by the separator path and its portals. Hence the hypotheses of Lemma 3.13 apply. Therefore, replacing each child instance ( R i , S i ) (R_i,S_i) ( R i , S i ) by its pattern emulator M x i \mathcal{M}_{x_i} M x i and gluing the resulting graphs according to the same boundary identifications gives a planar pattern emulator for ( R , S ) (R,S) ( R , S ) .
If the bottom-up construction performs this replacement through an intermediate emulator, then the preceding paragraph shows that the intermediate graph is a pattern emulator for ( R , S ) (R,S) ( R , S ) , while the maintained graph M x \mathcal{M}_x M x is a pattern emulator for that intermediate graph. By Lemma 3.12 , M x \mathcal{M}_x M x is again a pattern emulator for ( R , S ) (R,S) ( R , S ) . This completes the induction step.
Applying the invariant to the root of T \mathcal{T} T shows that the maintained graph is a planar pattern emulator for the current instance ( G , T ) (G,\mathcal{T}) ( G , T ) . The size, recourse, and update-time bounds are unchanged from Theorem 5.4 , since the decomposition tree, the rebuilding policy, and the set of updated child instances are exactly the same. The only additional requirement is that the local emulators used at Type-1 leaves are chosen to be the aligned planar emulators of Theorem 3.9, which have the same asymptotic size and can be rebuilt within the same update-time bound. The success probability is also inherited directly from Theorem 5.4 .
Pattern Emulator Hierarchy: Proof of Theorem 1.1
In this subsection, we explain how to obtain Theorem 1.1.
Theorem 1.1. Let G G G be an n n n -vertex undirected planar graph undergoing edge insertions and deletions with capacities in [ 1 , n c ] [1,n^c] [ 1 , n c ] for some constant c c c at all times. Let 1 / poly ( log n ) < ε < 1 1/\operatorname{poly}(\log n)<\varepsilon<1 1/ poly ( log n ) < ε < 1 be an error parameter. Then, there is a deterministic data structure that supports edge updates and queries for the ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate minimum cut between any pair of vertices s , t ∈ V ( G ) s,t\in V(G) s , t ∈ V ( G ) in the current graph G G G . The data structure has an initialization time of O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) and an amortized update time and query time of n o ( 1 ) n^{o(1)} n o ( 1 ) .
To achieve a dynamic algorithm with subpolynomial update and query time, we adopt a similar approach as outlined in [FPGP24, Section 4]. Specifically, we use Theorem 1.4 from the previous subsection to construct an emulator hierarchy.
Theorem 1.4. Let ( G , T ) (G,T) ( G , T ) be a dynamic instance where G G G is an n n n -vertex planar graph undergoing edge insertions and deletions with weights [ 1 , n c ] [1,n^c] [ 1 , n c ] for a constant c c c at all times, and T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) is a terminal set of at most two vertices at any time. Let 1 ≤ τ ≤ n / log n 1 \le\tau\le n/\log n 1 ≤ τ ≤ n / log n be a target parameter and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter.
Then, there is a deterministic data structure that explicitly maintains a collection P \mathcal{P} P of paths in G G G that induces a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate planar pattern emulator ( M [ P ] , T ) (\mathcal{M}[\mathcal{P}],T) ( M [ P ] , T ) 59 of instance ( G , T ) (G,T) ( G , T ) , such that for each batch B B B of updates in ( G , T ) (G,T) ( G , T ) (whether edge insertions or deletions in G G G , or terminal additions or removals in T T T ),
Emulator Size: At any time, ∣ P ∣ = O ~ ( n τ / ε O ( 1 ) ) |\mathcal{P}|=\widetilde{O}(\sqrt{n\tau}/\varepsilon^{O(1)}) ∣ P ∣ = O ( n τ / ε O ( 1 ) ) , and
Emulator Recourse: The amortized number of paths added or deleted from P \mathcal{P} P after processing a batch update B B B is O ~ ( ∣ B ∣ / ε O ( 1 ) ) \widetilde{O}(|B|/\varepsilon^{O(1)}) O ( ∣ B ∣/ ε O ( 1 ) ) , and
Update Time: The amortized update time is O ~ ( n ∣ B ∣ / ( ε O ( 1 ) τ ) ) \widetilde{O}(n|B|/(\varepsilon^{O(1)}\tau)) O ( n ∣ B ∣/ ( ε O ( 1 ) τ )) .
The data structure has an initialization time of O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) . Moreover, ( M [ P ] , T ) (\mathcal{M}[\mathcal{P}],T) ( M [ P ] , T ) is aligned with ( G , T ) (G,T) ( G , T ) .
Intuitively, we employ the same idea we used in Subsection 5.2: the dynamic pattern emulator of Theorem 1.4 is significantly larger than the target size we are aiming for asking queries on. We thus use Theorem 1.4 recursively until we obtain a pattern emulator with desired size. More precisely, we form an L L L -sequence ( 1 + ε ˉ ) (1+\bar{\varepsilon}) ( 1 + ε ˉ ) -approximate pattern emulator, for suitable values of L L L and ε ˉ \bar{\varepsilon} ε ˉ , and initialize the data structure of Theorem 1.4 on each pattern emulator in the sequence. We formalize this in the definition followed after restating Definition 4.23.
Definition 4.23 (L L L -Sequence ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -Approximate Pattern Emulators of ( G , T ) (G,T) ( G , T ) ). Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter, and L L L be a positive integer. The L L L -sequence ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulators of ( G , T ) (G,T) ( G , T ) is a sequence ( H 1 , T ) , … , ( H L , T ) (H_1,T),\ldots,(H_L,T) ( H 1 , T ) , … , ( H L , T ) of ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulators defined recursively as follows.
( H 1 , T ) (H_1,T) ( H 1 , T ) is a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator of ( G , T ) (G,T) ( G , T ) obtained via Claim 4.22 .
For 1 ≤ i ≤ L − 1 1 \le i \le L-1 1 ≤ i ≤ L − 1 , ( H i + 1 , T ) (H_{i+1},T) ( H i + 1 , T ) is a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate pattern emulator of ( H i , T ) (H_i,T) ( H i , T ) obtained via Claim 4.22 .
Definition 5.5 (Emulator Hierarchy of ( G , T ) (G,T) ( G , T ) with Parameter ε \varepsilon ε ). Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a terminal set, $0 < \varepsilon < 1$ be an error parameter. Let L = log 2 / 3 n L=\log^{2/3}n L = log 2/3 n be the number of levels, ε ˉ = ε / ( 2 L ) \bar{\varepsilon}=\varepsilon/(2L) ε ˉ = ε / ( 2 L ) be the approximation parameter, and δ = 2 L \delta=2^L δ = 2 L be the size reduction parameter. Let ( G D , T D ) (G_D,T_D) ( G D , T D ) be the dual instance of ( G , T ) (G,T) ( G , T ) and let ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) be the dynamic instance based on $(G_D,T_D) as defined in Subsection 5.1. The emulator hierarchy of ( G , T ) (G,T) ( G , T ) is recursively constructed on an L L L -sequence ( 1 + ε ˉ ) (1+\bar{\varepsilon}) ( 1 + ε ˉ ) -approximate pattern emulators ( H 1 ∗ , T D ∗ ) , … , ( H L ∗ , T D ∗ ) (H_1^*,T_D^*),\ldots,(H_L^*,T_D^*) ( H 1 ∗ , T D ∗ ) , … , ( H L ∗ , T D ∗ ) of ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) , as defined in Definition 4.23, as follows.
Let ( M G D ∗ [ P ] , T D ∗ ) (\mathcal{M}_{G_D^*}[\mathcal{P}],T_D^*) ( M G D ∗ [ P ] , T D ∗ ) be the ( 1 + ε ˉ ) (1+\bar{\varepsilon}) ( 1 + ε ˉ ) -approximate pattern emulator of ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) maintained by initializing Theorem 1.4 on ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) with τ 0 = n 0 / δ \tau_0=n_0/\delta τ 0 = n 0 / δ , where n 0 = ∣ G D ∗ ∣ n_0=|G_D^*| n 0 = ∣ G D ∗ ∣ . The planar pattern emulator ( H 1 ∗ , T D ∗ ) (H_1^*,T_D^*) ( H 1 ∗ , T D ∗ ) of ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) is obtained from ( M H 0 ∗ [ P ] , T D ∗ ) (\mathcal{M}_{H_0^*}[\mathcal{P}],T_D^*) ( M H 0 ∗ [ P ] , T D ∗ ) by replacing every simple path in M H 0 ∗ [ P ] \mathcal{M}_{H_0^*}[\mathcal{P}] M H 0 ∗ [ P ] with an edge of weight equal to the length of its corresponding path.
For 1 ≤ i ≤ L − 1 1 \le i \le L-1 1 ≤ i ≤ L − 1 , let ( M H i ∗ [ P ] , T D ∗ ) (\mathcal{M}_{H_i^*}[\mathcal{P}], T_D^*) ( M H i ∗ [ P ] , T D ∗ ) be the ( 1 + ε ˉ ) (1+\bar{\varepsilon}) ( 1 + ε ˉ ) -approximate pattern emulator of ( H i ∗ , T D ∗ ) (H_i^*, T_D^*) ( H i ∗ , T D ∗ ) maintained by initializing Theorem 1.4 on ( H i ∗ , T D ∗ ) (H_i^*, T_D^*) ( H i ∗ , T D ∗ ) with τ i = n i / δ \tau_i=n_i/\delta τ i = n i / δ , where n i = ∣ H i ∗ ∣ n_i=|H_i^*| n i = ∣ H i ∗ ∣ . The planar pattern emulator ( H i + 1 ∗ , T D ∗ ) (H_{i+1}^*, T_D^*) ( H i + 1 ∗ , T D ∗ ) of ( H i ∗ , T D ∗ ) (H_i^*, T_D^*) ( H i ∗ , T D ∗ ) is obtained from ( M H i ∗ [ P ] , T D ∗ ) (\mathcal{M}_{H_i^*}[\mathcal{P}], T_D^*) ( M H i ∗ [ P ] , T D ∗ ) by replacing every simple path in ( M H i ∗ [ P ] , T D ∗ ) (\mathcal{M}_{H_i^*}[\mathcal{P}], T_D^*) ( M H i ∗ [ P ] , T D ∗ ) with an edge of weight equal to the length of its corresponding path.
Note that instead of forming the hierarchy directly on ( G , T ) (G,T) ( G , T ) as in [21 ] , we construct the hierarchy on the dynamic instance ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) of ( G , T ) (G,T) ( G , T ) as defined in Subsection 5.1, and maintain a planar pattern emulator hierarchy rather than a standard emulator hierarchy.
The remainder of this subsection is structured as follows. First, we initialize this hierarchy, then discuss how updates are handled, and finally prove the guarantees of Theorem 1.1 at the end of the subsection.
Initialization. We initialize Definition 5.5 . This initializes a sequence ( H 1 , T D ∗ ) , … , ( H L ∗ , T D ∗ ) (H_1,T_D^*),\ldots,(H_L^*,T_D^*) ( H 1 , T D ∗ ) , … , ( H L ∗ , T D ∗ ) of ( 1 + ε ˉ ) (1+\bar{\varepsilon}) ( 1 + ε ˉ ) -approximate pattern emulators, where L = log 2 / 3 n L=\log^{2/3} n L = log 2/3 n and ε ˉ = ε / ( 2 L ) \bar{\varepsilon}=\varepsilon/(2L) ε ˉ = ε / ( 2 L ) . Note that 2 L = ω ( log n ) 2^L=\omega(\log n) 2 L = ω ( log n ) , and so for every 1 ≤ i ≤ L − 1 1 \le i \le L-1 1 ≤ i ≤ L − 1 , τ i ≤ n i / log n i \tau_i \le n_i/\log n_i τ i ≤ n i / log n i , as required by Theorem 1.4.
Handling the updates. The updates are propagated through the hierarchy naturally in a top-down approach. More precisely, upon an update in G G G , we first pass the update to the data structure of the first level, thereby maintaining ( M H 0 [ P ] , T ) (\mathcal{M}_{H_0}[\mathcal{P}],T) ( M H 0 [ P ] , T ) . We then update H 1 H_1 H 1 based on the new M H 0 [ P ] \mathcal{M}_{H_0}[\mathcal{P}] M H 0 [ P ] , and propagate these updates to the data structure of the second level, continuing this process until we update ( H L , T ) (H_L,T) ( H L , T ) .
It is important to note that the updates on G G G consist solely of edge insertions and deletions (and not terminal additions or removals). Terminal additions and removals are handled dynamically during query processing for s , t ∈ V ( G ) s,t \in V(G) s , t ∈ V ( G ) , as explained below.
Answering the Queries. Upon a query on s , t ∈ V ( G ) s,t \in V(G) s , t ∈ V ( G ) , we identify f s , f t f_s,f_t f s , f t as the dual vertices in G D ∗ G_D^* G D ∗ corresponding to s s s and t t t , respectively, and add f s , f t f_s,f_t f s , f t to T D ∗ T_D^* T D ∗ . Subsequently, we update the data structures by passing the addition of f s , f t f_s,f_t f s , f t as terminals in a top-down manner, similar to what explained above.
After maintaining ( H L ∗ , T D ∗ ) (H_L^*,T_D^*) ( H L ∗ , T D ∗ ) as the pattern emulator of the dynamic instance ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) , we compute the primal ( H L , T ) (H_L,T) ( H L , T ) of ( H L ∗ , T D ∗ ) (H_L^*,T_D^*) ( H L ∗ , T D ∗ ) using a static algorithm. Since T D ∗ = { f s , f t } T_D^*=\{f_s,f_t\} T D ∗ = { f s , f t } , the primal ( H L , T ) (H_L,T) ( H L , T ) inherently contains s s s and t t t . To compute the minimum s s s -t t t cut in ( H L , T ) (H_L,T) ( H L , T ) , we utilize the following theorem.
Theorem 5.6 ([37 ] , Rephrased). Given an n n n -vertex planar graph G G G and vertices s , t ∈ V ( G ) s,t \in V(G) s , t ∈ V ( G ) , there is an algorithm that computes the s s s -t t t min-cut in O ~ ( n ) \widetilde{O}(n) O ( n ) time.
After answering the s s s -t t t query, we reverse all the changes in the data structure to restore the state of the emulator hierarchy to what it was before the query, ensuring that T D ∗ = ∅ T_D^*=\emptyset T D ∗ = ∅ .
We are now ready to prove Theorem 1.1.
Proof of Theorem 1.1. We first derive bounds on the size of the emulators and the size of the update batch they receive as a result of applying the update batch B B B to ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) .
Using straightforward induction, it follows that the batch B i B_i B i of updates applied to ( H i ∗ , T D ∗ ) (H_i^*,T_D^*) ( H i ∗ , T D ∗ ) is of size
∣ B i ∣ ≤ ∣ B ∣ ε ˉ c i , (15) |B_i| \le\frac{|B|}{\bar{\varepsilon}c^i}, \tag*{(15)} ∣ B i ∣ ≤ ε ˉ c i ∣ B ∣ , (15)
for 1 ≤ i ≤ L 1 \le i \le L 1 ≤ i ≤ L , where c c c is a sufficiently large constant in the exponent of ε ˉ \bar{\varepsilon} ε ˉ in Theorem 1.4.
We now show by induction that, for 0 ≤ i ≤ L 0 \le i \le L 0 ≤ i ≤ L , the size of ( H i ∗ , T D ∗ ) (H_i^*, T_D^*) ( H i ∗ , T D ∗ ) is
n i ≤ n ⋅ ( 1 ε c δ ) i . (16) n_i \le n \cdot\left(\frac{1}{\varepsilon^c\sqrt{\delta}}\right)^i . \tag*{(16)} n i ≤ n ⋅ ( ε c δ 1 ) i . (16)
For i = 0 i = 0 i = 0 , the size trivially follows.
Suppose that the size of ( H i ∗ , T D ∗ ) (H_i^*, T_D^*) ( H i ∗ , T D ∗ ) is n i n_i n i as defined in Definition 5.5 . By the construction of ( H i + 1 ∗ , T D ∗ ) (H_{i+1}^*, T_D^*) ( H i + 1 ∗ , T D ∗ ) and Theorem 1.4, it follows that n i + 1 ≤ n i / δ ⋅ 1 / ε c n_{i+1} \le\sqrt{n_i/\delta}\cdot1/\varepsilon^c n i + 1 ≤ n i / δ ⋅ 1/ ε c . Substituting the bound on n i n_i n i into this expression results in
n i + 1 ≤ n i δ ⋅ 1 ε c ≤ n i ⋅ ( 1 ε c δ ) ≤ n ⋅ ( 1 ε c δ ) i + 1 , n_{i+1} \le\sqrt{\frac{n_i}{\delta}}\cdot\frac{1}{\varepsilon^c} \le n_i\cdot\left(\frac{1}{\varepsilon^c\sqrt{\delta}}\right) \le n\cdot\left(\frac{1}{\varepsilon^c\sqrt{\delta}}\right)^{i+1}, n i + 1 ≤ δ n i ⋅ ε c 1 ≤ n i ⋅ ( ε c δ 1 ) ≤ n ⋅ ( ε c δ 1 ) i + 1 ,
as desired.
We now prove each guarantee separately.
Correctness: The correctness of maintaining the hierarchy directly follows from Theorem 1.4. The fact that ( H L , T ) (H_L,T) ( H L , T ) contains the s s s -t t t min-cut information follows from (1) the construction of ( H L ∗ , T D ∗ ) (H_L^*,T_D^*) ( H L ∗ , T D ∗ ) , which ensures that the shortest paths between the terminals in T D ∗ T_D^* T D ∗ are approximately maintained in H L ∗ H_L^* H L ∗ , and (2) the correspondence of min-cuts in the primal ( H L , T ) (H_L,T) ( H L , T ) is the union of paths between terminals in ( H L ∗ , T D ∗ ) (H_L^*,T_D^*) ( H L ∗ , T D ∗ ) by Theorem 3.14.
Approximation Quality: Using simple induction, it follows that ( H i ∗ , T D ∗ ) (H_i^*,T_D^*) ( H i ∗ , T D ∗ ) approximates ( G D ∗ , T D ∗ ) (G_D^*,T_D^*) ( G D ∗ , T D ∗ ) with quality ( 1 + ε ˉ ) i (1+\bar{\varepsilon})^i ( 1 + ε ˉ ) i for 1 ≤ i ≤ L 1 \le i \le L 1 ≤ i ≤ L . The quality for the primal ( H L , T ) (H_L,T) ( H L , T ) is then given by
( 1 + ε ˉ ) L = ( 1 + ε / ( 2 L ) ) L ≤ e ε / ( 2 L ) ⋅ L ≤ 1 + ε . (1+\bar{\varepsilon})^L=(1+\varepsilon/(2L))^L\le e^{\varepsilon/(2L)\cdot L}\le1+\varepsilon. ( 1 + ε ˉ ) L = ( 1 + ε / ( 2 L ) ) L ≤ e ε / ( 2 L ) ⋅ L ≤ 1 + ε .
O ~ ( ∣ B i ∣ n i ε c τ i ) = O ~ ( ∣ B i ∣ δ ) = O ~ ( ∣ B ∣ ε c ( i + 1 ) δ ) = log O ( L ) n , \widetilde{O}\left(|B_i|\frac{n_i}{\varepsilon^c\tau_i}\right)=\widetilde{O}\left(\frac{|B_i|}{\delta}\right)=\widetilde{O}\left(\frac{|B|}{\varepsilon^{c(i+1)}\delta}\right)=\log^{O(L)} n, O ( ∣ B i ∣ ε c τ i n i ) = O ( δ ∣ B i ∣ ) = O ( ε c ( i + 1 ) δ ∣ B ∣ ) = log O ( L ) n ,
where the last equality follows from the fact that ∣ B ∣ = O ~ ( 1 ) |B|=\widetilde{O}(1) ∣ B ∣ = O ( 1 ) , ε ˉ ≥ 1 / poly ( log n ) \bar{\varepsilon}\ge1/\operatorname{poly}(\log n) ε ˉ ≥ 1/ poly ( log n ) , and δ = 2 L \delta=2^L δ = 2 L . The amortized update time across all levels then follows as L = log 2 / 3 n L=\log^{2/3}n L = log 2/3 n and
O ~ ( L log O ( L ) n ) = 2 log 2 / 3 n ⋅ log log n = n o ( 1 ) . \widetilde{O}(L\log^{O(L)}n)=2^{\log^{2/3}n\cdot\log\log n}=n^{o(1)}. O ( L log O ( L ) n ) = 2 l o g 2/3 n ⋅ l o g l o g n = n o ( 1 ) .
For the query, we process the terminal addition of s , t s,t s , t throughout the hierarchy, which takes n o ( 1 ) n^{o(1)} n o ( 1 ) time as discussed above. To compute the primal ( H L , T ) (H_L,T) ( H L , T ) of ( H L ∗ , T D ∗ ) (H_L^*,T_D^*) ( H L ∗ , T D ∗ ) , by Equation (16) , we have
n L = n ⋅ ( 1 ε c δ ) L − 1 = n ⋅ log O ( L ) n ⋅ ( 1 2 log 2 / 3 n ) log 2 / 3 n − 1 2 = n o ( 1 ) . n_L=n\cdot\left(\frac{1}{\varepsilon^c\sqrt{\delta}}\right)^{L-1}
=n\cdot\log^{O(L)}n\cdot\left(\frac{1}{2^{\log^{2/3}n}}\right)^{\frac{\log^{2/3}n-1}{2}}
=n^{o(1)}. n L = n ⋅ ( ε c δ 1 ) L − 1 = n ⋅ log O ( L ) n ⋅ ( 2 l o g 2/3 n 1 ) 2 l o g 2/3 n − 1 = n o ( 1 ) .
Thus, computing the primal ( H L , T ) (H_L,T) ( H L , T ) and executing Theorem 5.6 on it takes n o ( 1 ) n^{o(1)} n o ( 1 ) time.
Initialization Time: By Theorem 1.4, each ( H i ∗ , T D ∗ ) (H_i^*, T_D^*) ( H i ∗ , T D ∗ ) is initialized in O ~ ( n i / ε c ) \widetilde{O}(n_i/\varepsilon^c) O ( n i / ε c ) time. Summing over all levels, we have
∑ i = 1 L n ⋅ ( 1 ε c δ ) i ⋅ 1 ε c = O ~ ( L n ) = O ~ ( n ) . \sum_{i=1}^{L} n \cdot\left(\frac{1}{\varepsilon^c\sqrt{\delta}}\right)^i \cdot\frac{1}{\varepsilon^c} = \widetilde{O}(Ln) = \widetilde{O}(n). i = 1 ∑ L n ⋅ ( ε c δ 1 ) i ⋅ ε c 1 = O ( L n ) = O ( n ) .
Acknowledgements
ChatGPT 4.4 was used to improve grammar and exposition in parts of the manuscript. This did not alter the scientific content, results, or conclusions. All edits were reviewed by the authors, who take full responsibility for the content.
Proof of Lemma 4.4 Using Cut Properties
In this section, we outline a more intuitive proof of Lemma 4.4 for constructing a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier of a one-hole instance ( G , T ) (G,T) ( G , T ) . The proof is based on the cut properties of ( G , T ) (G,T) ( G , T ) , as discussed in [18 Section 3.2] , and differs from our proof in Subsection 4.2.
Lemma 4.4. Let G G G be an n n n -vertex planar graph, T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a set of terminals all lying on a single hole, and 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 be an error parameter. Then, there is an algorithm that constructs a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) in time O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) with size ∣ H ∣ = O ~ ( ∣ T ∣ / ε O ( 1 ) ) |H| = \widetilde{O}(|T|/\varepsilon^{O(1)}) ∣ H ∣ = O ( ∣ T ∣/ ε O ( 1 ) ) .
The main ingredient in the proof is the following lemma. Intuitively, the lemma describes how minimum cuts in the instance ( G , T ) (G,T) ( G , T ) translate to shortest paths in the dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) .
Lemma A.1 ([18 Lemma 9] , Rephrased). Let G G G be a planar graph and T ⊆ V ( G ) T \subseteq V(G) T ⊆ V ( G ) be a set of terminals all lying on a single hole. Let ( G D , T D ) (G_D,T_D) ( G D , T D ) be the dual instance of ( G , T ) (G,T) ( G , T ) . Then, any minimum cut E ^ \widehat{E} E in ( G , T ) (G,T) ( G , T ) that separates terminals ∅ ⊂ R ⊂ T \varnothing\subset R \subset T ∅ ⊂ R ⊂ T from T ∖ R T \setminus R T ∖ R corresponds to a union of edge-disjoint shortest paths between some dual terminals in ( G D , T D ) (G_D,T_D) ( G D , T D ) .
Before outlining the proof of Lemma A.1, we show how it can be used to construct the desired terminal cut sparsifier of Lemma 4.4. For some error parameter 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 , the construction of the ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier ( H , T ) (H,T) ( H , T ) of ( G , T ) (G,T) ( G , T ) proceeds as follows.
Compute the dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) of ( G , T ) (G,T) ( G , T ) .
Compute a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate emulator ( H D , T D ) (H_D,T_D) ( H D , T D ) of ( G D , T D ) (G_D,T_D) ( G D , T D ) using Theorem 3.10 .
Declare the terminal cut sparsifier ( H , T ) (H,T) ( H , T ) to be the primal instance of ( H D , T D ) (H_D,T_D) ( H D , T D ) .
The following claim establishes the guarantees of this procedure, thus proving Lemma 4.4.
Claim A.2. The primal instance ( H , T ) (H,T) ( H , T ) obtained from the procedure above is a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) -approximate terminal cut sparsifier of ( G , T ) (G,T) ( G , T ) . Moreover, ( H , T ) (H,T) ( H , T ) can be computed in time O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) and has size ∣ H ∣ = O ~ ( ∣ T ∣ / ε O ( 1 ) ) |H| = \widetilde{O}(|T|/\varepsilon^{O(1)}) ∣ H ∣ = O ( ∣ T ∣/ ε O ( 1 ) ) .
Proof. We address each guarantee separately.
Construction Time: Since ∣ G D ∣ = O ( n ) |G_D| = O(n) ∣ G D ∣ = O ( n ) , the time required to compute ( H D , T D ) (H_D,T_D) ( H D , T D ) is O ~ ( n / ε O ( 1 ) ) \widetilde{O}(n/\varepsilon^{O(1)}) O ( n / ε O ( 1 ) ) by Theorem 3.10 . As dual graphs can be computed in O ( n ) O(n) O ( n ) time, the overall construction time for ( H , T ) (H,T) ( H , T ) follows.
Sparsifier Size: The bound on the size of H H H follows directly from Theorem 3.10 and the fact that there is a one-to-one correspondence between the terminals in T T T and T D T_D T D due to the construction of the dual instance.
Correctness: Let E ^ \widehat{E} E be a min-cut in G G G separating ∅ ⊂ R ⊂ T \varnothing\subset R \subset T ∅ ⊂ R ⊂ T from T ∖ R T \setminus R T ∖ R . By Lemma A.1, E ^ \widehat{E} E corresponds to the union E ^ D \widehat{E}_D E D of edges from edge-disjoint shortest paths between some dual terminals in G D G_D G D . Let P D P_D P D denote the set of pairs ( t 1 , t 2 ) (t_1,t_2) ( t 1 , t 2 ) that define E ^ D \widehat{E}_D E D , i.e., E ^ D \widehat{E}_D E D consists of all edges on the chosen shortest paths in G D G_D G D for every ( t 1 , t 2 ) ∈ P D (t_1,t_2) \in P_D ( t 1 , t 2 ) ∈ P D .
By the construction of the emulator, for every ( t 1 , t 2 ) ∈ P D (t_1,t_2) \in P_D ( t 1 , t 2 ) ∈ P D , there is a t 1 t_1 t 1 -t 2 t_2 t 2 shortest path in H D H_D H D whose length is within a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) factor of dist G D ( t 1 , t 2 ) \operatorname{dist}_{G_D}(t_1,t_2) dist G D ( t 1 , t 2 ) . Let E D E_D E D denote the set of edges that belong to the t 1 t_1 t 1 -t 2 t_2 t 2 shortest paths in H D H_D H D for every ( t 1 , t 2 ) ∈ P D (t_1,t_2) \in P_D ( t 1 , t 2 ) ∈ P D .
Since ( t 1 , t 2 ) ∈ P D (t_1,t_2) \in P_D ( t 1 , t 2 ) ∈ P D , E ‾ D \overline{E}_D E D consists of edges of the t 1 t_1 t 1 -t 2 t_2 t 2 shortest path P 12 P_{12} P 12 in H D H_D H D . Since ( H D , T D ) (H_D,T_D) ( H D , T D ) is aligned with ( G D , T D ) (G_D,T_D) ( G D , T D ) by Theorem 3.10 , the primal edges in H H H corresponding to the dual edges of P 12 P_{12} P 12 separate R R R from T ∖ R T \setminus R T ∖ R in H H H (note that the shortest paths constructing E ‾ D \overline{E}_D E D in H D H_D H D may overlap). Furthermore, the weight of this cut is within a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) factor of the weight of the min-cut separating R R R from T ∖ R T \setminus R T ∖ R in G G G , as P 12 P_{12} P 12 has length within a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) factor of the t 1 t_1 t 1 -t 2 t_2 t 2 shortest path in G D G_D G D .
The reverse direction (i.e., showing that every min-cut in H H H is within a ( 1 + ε ) (1+\varepsilon) ( 1 + ε ) factor of the corresponding min-cut in G G G ) follows in a similar way.
Proof Outline for Lemma A.1
Let E ^ \widehat{E} E be the minimum cut in G G G that separates ∅ ⊂ R ⊂ T \varnothing\subset R \subset T ∅ ⊂ R ⊂ T from T ∖ R T \setminus R T ∖ R . Suppose G ∖ E ^ G \setminus\widehat{E} G ∖ E consists of some connected components C 1 , … , C k C_1,\ldots,C_k C 1 , … , C k . For each 1 ≤ i ≤ k 1 \le i \le k 1 ≤ i ≤ k , we let T i = T ∩ V ( C i ) T_i = T \cap V(C_i) T i = T ∩ V ( C i ) be the set of terminals in C i C_i C i . Clearly, T i ∩ T j = ∅ T_i \cap T_j = \varnothing T i ∩ T j = ∅ for i ≠ j i \ne j i = j .
Since E ^ \widehat{E} E separates R R R from T ∖ R T \setminus R T ∖ R , it follows that for each 1 ≤ i ≤ k 1 \le i \le k 1 ≤ i ≤ k , either T i ⊆ R T_i \subseteq R T i ⊆ R or T i ⊆ T ∖ R T_i \subseteq T \setminus R T i ⊆ T ∖ R ; otherwise, C i C_i C i contains terminals from both R R R and T ∖ R T \setminus R T ∖ R , thus contradicting the fact that E ^ \widehat{E} E separates R R R from T ∖ R T \setminus R T ∖ R . Let t 1 , … , t k ′ t_1,\ldots,t_{k'} t 1 , … , t k ′ be all the terminals in T T T ordered clockwise on the hole.60 We interpret indices modulo k ′ k' k ′ .
For two terminals t a , t b ∈ T t_a,t_b \in T t a , t b ∈ T , let [ t a , t b ] ∘ [t_a,t_b]_{\circ} [ t a , t b ] ∘ denote the cyclic interval of terminals encountered when walking clockwise from t a t_a t a to t b t_b t b , including both endpoints. Similarly, let ( t a , t b ) ∘ (t_a,t_b)_{\circ} ( t a , t b ) ∘ denote the same interval but excluding the endpoints. We allow singleton intervals, and we also regard T T T itself as a cyclic interval.
For a nonempty set S ⊆ T S \subseteq T S ⊆ T , let hull ( S ) \operatorname{hull}(S) hull ( S ) be a cyclic interval of minimum cardinality containing S S S . Note that the terminal set T i T_i T i of C i C_i C i is the union of (at most ∣ T i ∣ |T_i| ∣ T i ∣ ) intervals, but all are covered by hull ( S ) \operatorname{hull}(S) hull ( S ) . On the other hand, in the following claim, we show that there is a connected component C l C_l C l whose terminal set T l T_l T l consists of only a single interval.
Claim A.3. There exists an index l ∈ [ k ] l \in[k] l ∈ [ k ] such that T l T_l T l is a cyclic interval of T T T .
Proof. We first state the only planar fact we need. Let C i C_i C i and C j C_j C j be two distinct connected components of G ∖ E ^ G \setminus\widehat{E} G ∖ E . Then there do not exist terminals a , b ∈ T i a,b \in T_i a , b ∈ T i and x , y ∈ T j x,y \in T_j x , y ∈ T j that appear in the cyclic order a , x , b , y a,x,b,y a , x , b , y on the boundary of the hole. Indeed, since C i C_i C i is connected, it contains an a a a -b b b path. Similarly, since C j C_j C j is connected, it contains an x x x -y y y path. These two paths are vertex-disjoint, because C i C_i C i and C j C_j C j are distinct connected components of G ∖ E ^ G \setminus\widehat{E} G ∖ E . But two vertex-disjoint paths whose endpoints alternate on the boundary of a face cannot both be drawn in the disk bounded by that face without crossing, contradicting planarity.
Now choose any connected component C l C_l C l . If T l T_l T l is a cyclic interval, we are done. Otherwise, T l T_l T l is not a cyclic interval.
Since T l T_l T l is not a cyclic interval, inside hull ( T l ) \operatorname{hull}(T_l) hull ( T l ) there are two consecutive maximal cyclic subintervals of T l T_l T l , say [ t a , t b ] ∘ [t_a,t_b]_{\circ} [ t a , t b ] ∘ and [ t c , t d ] ∘ [t_c,t_d]_{\circ} [ t c , t d ] ∘ such that the open gap J : = ( t b , t c ) ∘ J := (t_b,t_c)_{\circ} J := ( t b , t c ) ∘ is nonempty and contains no terminal of T l T_l T l . Thus t b , t c ∈ T l t_b,t_c \in T_l t b , t c ∈ T l , and every terminal in J J J belongs to some component different from C l C_l C l .
Pick any terminal x ∈ J x \in J x ∈ J , and let C l ′ C_{l'} C l ′ be the connected component of G ∖ E ^ G \setminus\widehat{E} G ∖ E containing x x x . We claim that T l ′ ⊆ J T_{l'} \subseteq J T l ′ ⊆ J . Suppose not. Then there is a terminal y ∈ T l ′ ∖ J y \in T_{l'} \setminus J y ∈ T l ′ ∖ J . Since x ∈ J = ( t b , t c ) ∘ x \in J = (t_b,t_c)_{\circ} x ∈ J = ( t b , t c ) ∘ and y ∉ J y \notin J y ∈ / J , the four terminals t b , x , t c , y t_b,x,t_c,y t b , x , t c , y appear in this cyclic order on the boundary of the hole. But t b , t c ∈ T l t_b,t_c \in T_l t b , t c ∈ T l and x , y ∈ T l ′ x,y \in T_{l'} x , y ∈ T l ′ , where C l C_l C l and C l ′ C_{l'} C l ′ are distinct connected components. This contradicts the planar non-crossing fact proved above. Hence T l ′ ⊆ J T_{l'} \subseteq J T l ′ ⊆ J .
Therefore ∣ hull ( T l ′ ) ∣ ≤ ∣ J ∣ < ∣ hull ( T l ) ∣ |\operatorname{hull}(T_{l'})| \le|J| < |\operatorname{hull}(T_l)| ∣ hull ( T l ′ ) ∣ ≤ ∣ J ∣ < ∣ hull ( T l ) ∣ . Thus, whenever we start with a component whose terminal set is not a cyclic interval, we can move to another component with nonempty terminal set whose cyclic hull is strictly smaller. Repeating this argument must terminate, because the quantity ∣ hull ( T l ) ∣ |\operatorname{hull}(T_l)| ∣ hull ( T l ) ∣ is a positive integer. The terminal component at which the process terminates cannot have a terminal set that is not a cyclic interval; otherwise the same argument would produce a strictly smaller hull. Hence for some index l l l , the set T l T_l T l is a cyclic interval.
For any connected component C i C_i C i , let E i : = E ( V ( C i ) , V ( G ) ∖ V ( C i ) ) E_i := E(V(C_i),V(G) \setminus V(C_i)) E i := E ( V ( C i ) , V ( G ) ∖ V ( C i )) be the edge set separating C i C_i C i from the rest of the graph. By definition, the min-cut separating R R R from T ∖ R T \setminus R T ∖ R is E ^ = ⋃ i = 1 k E i \widehat{E} = \bigcup_{i=1}^{k} E_i E = ⋃ i = 1 k E i .
In the following claim, we show that the edge set E l E_l E l of the specific connected component C l C_l C l from Claim A.3 corresponds to a shortest path in the dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) . We assume that E ^ \widehat{E} E is a minimal minimum cut separating R R R from ( T ∖ R ) (T \setminus R) ( T ∖ R ) ; this can be achieved by deleting redundant edges from an arbitrary minimum cut, thus merging the connected component with no terminals into other connected components.
Claim A.4. Let C l C_l C l be the connected component from Claim A.3 with the terminal set T l T_l T l as a cyclic interval of T T T . Let E l = E ( V ( C l ) , V ( G ) ∖ V ( C l ) ) E_l = E(V(C_l), V(G) \setminus V(C_l)) E l = E ( V ( C l ) , V ( G ) ∖ V ( C l )) . Then the dual edge set E l D E_l^D E l D in the dual instance ( G D , T D ) (G_D,T_D) ( G D , T D ) corresponding to E l E_l E l in ( G , T ) (G,T) ( G , T ) induces a shortest path between the two dual terminals that separates the dual interval T l T_l T l from T ∖ T l T \setminus T_l T ∖ T l .
Proof. Since E ^ \widehat{E} E separates R R R from T ∖ R T \setminus R T ∖ R , every terminal set T i T_i T i is contained either in R R R or in T ∖ R T \setminus R T ∖ R . Thus either T l ⊆ R T_l \subseteq R T l ⊆ R or T l ⊆ T ∖ R T_l \subseteq T \setminus R T l ⊆ T ∖ R . By symmetry, assume without loss of generality that T l ⊆ R T_l \subseteq R T l ⊆ R .
We first show that E l E_l E l is a minimum cut separating T l T_l T l from T ∖ T l T \setminus T_l T ∖ T l . Clearly, E l E_l E l separates T l T_l T l from T ∖ T l T \setminus T_l T ∖ T l , because C l C_l C l is a connected component of G ∖ E ^ G \setminus\widehat{E} G ∖ E and T l = T ∩ V ( C l ) T_l = T \cap V(C_l) T l = T ∩ V ( C l ) . Let F F F be a minimum cut in G G G separating T l T_l T l from T ∖ T l T \setminus T_l T ∖ T l . We claim that ( E ^ ∖ E l ) ∪ F (\widehat{E} \setminus E_l) \cup F ( E ∖ E l ) ∪ F is a cut separating R R R from T ∖ R T \setminus R T ∖ R . To see this, first observe that every edge of E l E_l E l has one endpoint in C l C_l C l and the other endpoint in a component of G ∖ E ^ G \setminus\widehat{E} G ∖ E whose terminals lie in T ∖ R T \setminus R T ∖ R . Indeed, all vertices of C l C_l C l lie in the same component as the terminals T l ⊆ R T_l \subseteq R T l ⊆ R . If some edge of E l E_l E l had its other endpoint in a component containing terminals of R R R , then deleting this edge from E ^ \widehat{E} E would still leave R R R separated from T ∖ R T \setminus R T ∖ R , contradicting the minimality of E ^ \widehat{E} E . The same contradiction holds if the other component contains no terminal. Hence E ^ ∖ E l \widehat{E} \setminus E_l E ∖ E l separates R ∖ T l R \setminus T_l R ∖ T l from T ∖ R ∪ T l T \setminus R \cup T_l T ∖ R ∪ T l . On the other hand, F F F separates T l T_l T l from T ∖ T l T \setminus T_l T ∖ T l , and in particular separates T l T_l T l from T ∖ R T \setminus R T ∖ R . Therefore the union ( E ^ ∖ E l ) ∪ F (\widehat{E} \setminus E_l) \cup F ( E ∖ E l ) ∪ F separates all terminals of R = ( R ∖ T l ) ∪ T l R = (R \setminus T_l) \cup T_l R = ( R ∖ T l ) ∪ T l from all terminals of T ∖ R T \setminus R T ∖ R . Since E ^ \widehat{E} E is a minimum cut separating R R R from T ∖ R T \setminus R T ∖ R , we have
w ( E ^ ) ≤ w ( ( E ^ ∖ E l ) ∪ F ) ≤ w ( E ^ ∖ E l ) + w ( F ) . w(\widehat{E}) \leq w((\widehat{E} \setminus E_l) \cup F) \leq w(\widehat{E} \setminus E_l) + w(F). w ( E ) ≤ w (( E ∖ E l ) ∪ F ) ≤ w ( E ∖ E l ) + w ( F ) .
Because E l ⊆ E ^ E_l \subseteq\widehat{E} E l ⊆ E , this gives w ( E l ) ≤ w ( F ) w(E_l) \leq w(F) w ( E l ) ≤ w ( F ) . But F F F was chosen as a minimum cut separating T l T_l T l from T ∖ T l T \setminus T_l T ∖ T l , and E l E_l E l itself is such a cut. Therefore E l E_l E l is a minimum cut separating T l T_l T l from T ∖ T l T \setminus T_l T ∖ T l .
Now write the cyclic interval T l T_l T l as T l = [ t a , t b ] ∘ T_l = [t_a,t_b]_\circ T l = [ t a , t b ] ∘ . Let p , q ∈ T D p,q \in T_D p , q ∈ T D be the two dual terminals corresponding to the two gaps on the boundary of the hole that separate this interval; namely, the gap between t a − 1 t_{a-1} t a − 1 and t a t_a t a , and the gap between t b t_b t b and t b + 1 t_{b+1} t b + 1 , where indices are interpreted cyclically.
By planar cut/path duality for one-face instances, an edge set in G G G separates the cyclic interval [ t a , t b ] ∘ [t_a,t_b]_\circ [ t a , t b ] ∘ from its complement if and only if the corresponding dual edge set contains a p p p -q q q path in G D G_D G D . Moreover, such a minimal cut corresponds exactly to a simple p p p -q q q path. Since E l E_l E l is a minimum cut separating T l T_l T l from ( T ∖ T l ) (T \setminus T_l) ( T ∖ T l ) , the dual edge set E l D E_l^D E l D is therefore a p p p -q q q path. It remains to show that this path is shortest. Suppose, for contradiction, that there is a p p p -q q q path P P P in G D G_D G D with w D ( P ) < w D ( E l D ) w_D(P) < w_D(E_l^D) w D ( P ) < w D ( E l D ) . Let P ∗ P^* P ∗ be the set of primal edges corresponding to the dual edges of P P P . Again by planar cut/path duality, P ∗ P^* P ∗ separates T l = [ t a , t b ] ∘ T_l = [t_a,t_b]_\circ T l = [ t a , t b ] ∘ from T ∖ T l T \setminus T_l T ∖ T l in G G G . Hence
w ( P ∗ ) = w D ( P ) < w D ( E l D ) = w ( E l ) , w(P^*) = w_D(P) < w_D(E_l^D) = w(E_l), w ( P ∗ ) = w D ( P ) < w D ( E l D ) = w ( E l ) ,
contradicting the fact that E l E_l E l is a minimum cut separating T l T_l T l from T ∖ T l T \setminus T_l T ∖ T l .
Thus E l D E_l^D E l D is a shortest p p p -q q q path in ( G D , T D ) (G_D,T_D) ( G D , T D ) .
We are now ready to prove Lemma A.1.
Proof of Lemma A.1. We prove the statement by induction on the number of edges in the cut: if E ^ \widehat{E} E is a minimum cut in G G G separating R R R from T ∖ R T \setminus R T ∖ R , then the dual edge set E ^ D \widehat{E}_{D} E D is a union of edge-disjoint shortest paths between dual terminals in ( G D , T D ) (G_{D}, T_{D}) ( G D , T D ) .
The base case is E ^ = ∅ \widehat{E} = \emptyset E = ∅ , in which case there is nothing to prove. Hence assume E ^ ≠ ∅ \widehat{E} \ne\emptyset E = ∅ , and assume the statement holds for every minimum terminal cut with fewer than ∣ E ^ ∣ \lvert\widehat{E} \rvert ∣ E ∣ edges.
Let C 1 , … , C k C_{1}, \ldots, C_{k} C 1 , … , C k be the connected components of G ∖ E ^ G \setminus\widehat{E} G ∖ E , and for each i ∈ [ k ] i \in[k] i ∈ [ k ] , define T i : = T ∩ V ( C i ) T_{i} := T \cap V(C_{i}) T i := T ∩ V ( C i ) . Since E ^ \widehat{E} E separates R R R from T ∖ R T \setminus R T ∖ R , each nonempty set T i T_{i} T i is contained entirely in R R R or entirely in T ∖ R T \setminus R T ∖ R .
We first discuss a simple consequence of the minimality of E ^ \widehat{E} E . Every edge of E ^ \widehat{E} E has its endpoints in two connected components of G ∖ E ^ G \setminus\widehat{E} G ∖ E whose terminal sets lie on opposite sides of the partition ( R , T ∖ R ) (R, T \setminus R) ( R , T ∖ R ) . Indeed, if an edge e ∈ E ^ e \in\widehat{E} e ∈ E joined two components both containing terminals only from R R R , or both containing terminals only from T ∖ R T \setminus R T ∖ R , then adding e e e back could not create a path between R R R and T ∖ R T \setminus R T ∖ R . Hence E ^ ∖ { e } \widehat{E} \setminus\{e\} E ∖ { e } would still separate R R R from T ∖ R T \setminus R T ∖ R , contradicting the minimality of E ^ \widehat{E} E . The same argument rules out an edge of E ^ \widehat{E} E incident to a component containing no terminal.
By Claim A.3, there exists a connected component C l C_{l} C l such that T l T_{l} T l is a cyclic interval of T T T . Define E l = E ( V ( C l ) , V ( G ) ∖ V ( C l ) ) E_{l} = E(V(C_{l}), V(G) \setminus V(C_{l})) E l = E ( V ( C l ) , V ( G ) ∖ V ( C l )) . Since C l C_{l} C l is a connected component of G ∖ E ^ G \setminus\widehat{E} G ∖ E , every edge leaving C l C_{l} C l belongs to E ^ \widehat{E} E , and therefore E l ⊆ E ^ E_{l} \subseteq\widehat{E} E l ⊆ E .
By Claim A.4, the dual edge set ( E l ) D (E_{l})_{D} ( E l ) D induces a shortest path in ( G D , T D ) (G_{D}, T_{D}) ( G D , T D ) between the two dual terminals that separate the cyclic interval T l T_{l} T l .
It remains to show that the remaining edge set E ^ ′ : = E ^ ∖ E l \widehat{E}' := \widehat{E} \setminus E_{l} E ′ := E ∖ E l can be handled recursively. Since T l T_{l} T l is contained in exactly one of R R R or T ∖ R T \setminus R T ∖ R , we distinguish two symmetric cases. Assume first that T l ⊆ R T_{l} \subseteq R T l ⊆ R . Define the residual terminal partition
R ′ : = R ∖ T l and Q ′ : = T ∖ R ∪ T l . R' := R \setminus T_{l} \qquad\text{and}\qquad Q' := T \setminus R \cup T_{l}. R ′ := R ∖ T l and Q ′ := T ∖ R ∪ T l .
If R ′ = ∅ R' = \emptyset R ′ = ∅ , then E ^ ′ = ∅ \widehat{E}' = \emptyset E ′ = ∅ . Indeed, by the minimality observation above, every edge of E ^ \widehat{E} E is incident to a component whose terminal set lies in R R R and a component whose terminal set lies in T ∖ R T \setminus R T ∖ R . Since C l C_{l} C l contains all terminals of R R R , every edge of E ^ \widehat{E} E is incident to C l C_{l} C l , and hence belongs to E l E_{l} E l . Therefore E ^ = E l \widehat{E} = E_{l} E = E l and there is no residual edge set. Thus assume R ′ ≠ ∅ R' \ne\emptyset R ′ = ∅ . We claim that E ^ ′ \widehat{E}' E ′ is a minimum cut separating R ′ R' R ′ from Q ′ Q' Q ′ .
First, E ^ ′ \widehat{E}' E ′ separates R ′ R' R ′ from Q ′ Q' Q ′ . To see this, consider any component of G ∖ E ^ G \setminus\widehat{E} G ∖ E whose terminal set lies in R ′ R' R ′ . Every edge leaving this component belongs to E ^ \widehat{E} E . Moreover, none of these edges belongs to E l E_{l} E l : an edge of E l E_{l} E l is incident to C l C_{l} C l , and by the minimality observation every edge of E l E_{l} E l has its other endpoint in a component whose terminals lie in T ∖ R T \setminus R T ∖ R . Hence all edges leaving every R ′ R' R ′ -component remain deleted in E ^ ′ \widehat{E}' E ′ . Therefore no terminal of R ′ R' R ′ can be connected in G ∖ E ^ ′ G \setminus\widehat{E}' G ∖ E ′ to any terminal of Q ′ = T ∖ R ∪ T l Q' = T \setminus R \cup T_{l} Q ′ = T ∖ R ∪ T l .
Next, we prove minimality of the weight of E ^ ′ \widehat{E}' E ′ . Let Y Y Y be a minimum cut separating R ′ R' R ′ from Q ′ Q' Q ′ in G G G . We claim that E l ∪ Y E_{l} \cup Y E l ∪ Y separates R R R from T ∖ R T \setminus R T ∖ R . Indeed, any path from a terminal in T l T_{l} T l to a terminal in R R R must leave the component C l C_{l} C l , and hence must use an edge of E l E_{l} E l . On the other hand, any path from a terminal in R ′ = R ∖ T l R' = R \setminus T_{l} R ′ = R ∖ T l to a terminal in Q ′ = T ∖ R Q' = T \setminus R Q ′ = T ∖ R must cross Y Y Y since T ∖ R ⊆ Q ′ T \setminus R \subseteq Q' T ∖ R ⊆ Q ′ and Y Y Y separates R ′ R' R ′ from Q ′ Q' Q ′ . Thus E l ∪ Y E_{l} \cup Y E l ∪ Y is a cut separating R R R from T ∖ R T \setminus R T ∖ R . Since E ^ \widehat{E} E is a minimum cut separating R R R from T ∖ R T \setminus R T ∖ R ,
w ( E ^ ) ≤ w ( E l ∪ Y ) ≤ w ( E l ) + w ( Y ) . (17) w(\widehat{E}) \leq w(E_{l} \cup Y) \leq w(E_{l}) + w(Y). \tag*{(17)} w ( E ) ≤ w ( E l ∪ Y ) ≤ w ( E l ) + w ( Y ) . (17)
As E ^ = E l ∪ E ′ ^ \widehat{E} = E_l \cup\widehat{E'} E = E l ∪ E ′ , this implies that w ( F ′ ) ≤ w ( Y ) w(F') \le w(Y) w ( F ′ ) ≤ w ( Y ) . But E ′ ^ \widehat{E'} E ′ itself is a cut separating R ′ R' R ′ from Q ′ Q' Q ′ , so E ′ ^ \widehat{E'} E ′ is a minimum cut separating R ′ R' R ′ from Q ′ Q' Q ′ .
Therefore E ′ ^ \widehat{E'} E ′ is a minimal minimum cut separating R ′ R' R ′ from Q ′ Q' Q ′ with fewer edges than E ^ \widehat{E} E . By the induction hypothesis, the dual edge set E ′ ^ D \widehat{E'}_{D} E ′ D is a union of edge-disjoint shortest paths between dual terminals. Since E l E_l E l and E ′ ^ \widehat{E'} E ′ are disjoint subsets of E ^ \widehat{E} E , their dual edge sets are also disjoint. Hence E ^ D = ( E l ) D ∪ E ′ ^ D \widehat{E}_{D} = (E_l)_{D} \cup\widehat{E'}_{D} E D = ( E l ) D ∪ E ′ D is a union of edge-disjoint shortest paths between dual terminals.
The case where T l ⊆ T ∖ R T_l \subseteq T \setminus R T l ⊆ T ∖ R is handled in a symmetric way.