Abstract
The Outerplanar Diameter Improvement problem asks, given a graph G and an integer D, whether it is possible to add edges to G in a way that the resulting graph is outerplanar and has diameter at most D. We provide a dynamic programming algorithm that solves this problem in polynomial time. Outerplanar Diameter Improvement demonstrates several structural analogues to the celebrated and challenging Planar Diameter Improvement problem, where the resulting graph should, instead, be planar. The complexity status of this latter problem is open.
Research supported by the Languedoc-Roussillon Project “Chercheur d’avenir” KERNEL and the French project EGOS (ANR-12-JS02-002-01). The sixth author was co-financed by the European Union (European Social Fund ESF) and Greek national funds through the Operational Program “Education and Lifelong Learning” of the National Strategic Reference Framework (NSRF) - Research Funding Program: ARISTEIA II.
Access provided by Autonomous University of Puebla. Download conference paper PDF
Similar content being viewed by others
Keywords
- Diameter improvement
- Outerplanar graphs
- Completion problems
- Polynomial-time algorithms
- Dynamic programming
1 Introduction
A graph completion problem asks whether it is possible to add edges to a given graph in order to make it satisfy some target property. There are two different ways of defining the optimization measure for such problems. The first, and most common, is the number of edges to be added, while the second is the value of some graph invariant on the resulting graph. Problems of the first type are Hamiltonian Completion [14], Interval Graph Completion [16], Proper Interval Graph Completion [15, 20], Chordal Graph Completion [20, 24], and Strongly Chordal Graph Completion [20].
We focus our attention on the second category of problems where, for some given parameterized graph property \(\mathcal{P}_{k}\), the problem asks, given a graph G and an integer k, whether it is possible to add edges to G such that the resulting graph belongs to \(\mathcal{P}_{k}\). Usually \(\mathcal{P}_{k}\) is a parameterized graph class whose graphs are typically required (for every k) to satisfy some sparsity condition. There are few problems of this type in the bibliography. Such a completion problem is the Planar Disjoint Paths Completion problem that asks, given a plane graph and a collection of k pairs of terminals, whether it is possible to add edges such that the resulting graph remains plane and contains k vertex-disjoint paths between the pairs of terminals. While this problem is trivially NP-complete, it has been studied from the point of view of parameterized complexity [1]. In particular, when all edges should be added in the same face, it can be solved in \(f(k)\cdot n^{2}\) steps [1], i.e., it is fixed parameter tractable (FPT in short; for details about fixed parameter tractability, refer to the monographs [10, 12, 21]).
Perhaps the most challenging problem of the second category is the Planar Diameter Improvement problem (PDI in short), which was first mentioned by Dejter and Fellows [7] (and made an explicit open problem in [10]). Here we are given a planar graph G and we ask for the minimum integer D such that some completion (by addition of edges) of G is a planar graph with diameter at most D. Note that according to the general formalism, all planar graphs with diameter at most D verify this parameterized property \(\mathcal{P}_{D}\). The computational complexity of Planar Diameter Improvement is open, as it is not even known whether it is an NP-complete problem, even in the case where the embedding is part of the input. Interestingly, Planar Diameter Improvement is known to be FPT: it is easy to verify that, for every D, its Yes-instances are closed under taking minorsFootnote 1 which, according to the meta-algorithmic consequence of the Graph Minors series of Robertson and Seymour [22, 23], implies that Planar Diameter Improvement is FPT. Unfortunately, this implication only proves the existence of such an algorithm for each D, while it does not give any way to construct it. Whether this problem is uniformly FPT Footnote 2 remains as one of the most intriguing open questions in parameterized algorithm design. To our knowledge, when it comes to explicit algorithms, it is not even clear how to get an \(O(n^{f(D)})\)-algorithm for this problem (in parameterized complexity terminology, such an algorithm is called an XP-algorithm).
Notice that, in both aforementioned problems of the second type, the planarity of the graphs in \(\mathcal{P}_{D}\) is an important restriction, as it is essential for generating a non-trivial problem; otherwise, one could immediately turn a graph into a clique that trivially belongs to \(\mathcal{P}_{1}\). For practical purposes, such problems are relevant where instead of generating few additional links, we mostly care about maintaining the network topology. The algorithmic and graph-theoretic study on diameter improvement problems has focused both on the case of minimizing the number (or weight) of added edges [2–4, 9, 11, 17], as well as on the case of minimizing the diameter [3, 13]. In contrast, the network topology, such as acyclicity or planarity, as a constraint to be preserved has received little attention in the context of complementing a graph; see for example [11]. See also [18, 19] for other completion problems in outerplanar graphs, where the objective is to add edges in order to achieve a prescribed connectivity.
In this paper we study the Outerplanar Diameter Improvement problem, or OPDI in short. An instance of OPDI consists of an outerplanar graph \(G=(V,E)\) and a positive integer D, and we are asked to add a set F of missing edges to G so that the resulting graph \(G'=(V,E\cup F)\) has diameter at most D, while \(G'\) remains outerplanar. Note that we are allowed to add arbitrarily many edges as long as the new graph is outerplanar. Given a graph \(G=(V,E)\), we call \(G'=(V,E\cup F)\) a completion of G.
It appears that the combinatorics of OPDI demonstrate some interesting parallelisms with the notorious PDI problem. We denote by \(\mathbf{opdi}(G)\) (resp. \(\mathbf{pdi}(G)\)) the minimum diameter of an outerplanar (resp. planar) completion of G. It can be easily seen that the treewidth of a graph with bounded \(\mathbf{pdi}(G)\) is bounded, while the pathwidth of a graph with bounded \(\mathbf{opdi}(G)\) is also bounded. In that sense, the OPDI can be seen as the “linear counterpart” of PDI. We stress that the same “small pathwidth” behavior of OPDI holds even if, instead of outerplanar graphs, we consider any class of graphs with bounded outerplanarity. Note also that both \(\mathbf{pdi}(G)\) and \(\mathbf{opdi}(G)\) are trivially 2-approximable in the particular case where the embedding is given. To see this, let \(G'\) be a triangulation of a plane (resp. outerplane) embedding of G where, in every face of G, all edges added to it have a common endpoint. Then, for each edge uv in each shortest path in an optimal completion of G, a u-v-path of length at most two exists in \(G'\). Thus, for both graph invariants, the diameter of \(G'\) does not exceed twice the optimal value.
Our Results. In this work, we show that Outerplanar Diameter Improvement is polynomial-time solvable. Our algorithm, described in Sect. 2, is based on dynamic programming and works in full generality, even when the input graph may be disconnected. Also, our algorithm does not assume that the input comes with some specific embedding (in the case of an embedded input, the problem becomes considerably easier to solve).
2 Description of the Algorithm
The aim of this section is to describe a polynomial-time dynamic program that, given an outerplanar graph G and an integer D, decides whether G admits an outerplanar completion with diameter at most D, denoted diameter- D outerplanar completion for simplicity. By repeated use of this algorithm, we can thus determine in polynomial time the smallest integer D such that G admits a diameter-D outerplanar completion.
Before describing the algorithm, we show some properties of outerplanar completions. In particular, Subsect. 2.1 handles the case where the input outerplanar graph has cut vertices. Its objective is to prove that we can apply a reduction rule to such a graph which is safe for the OPDI problem. In Subsect. 2.2 we deal with 2-vertex separators, and in Subsect. 2.3 we present a polynomial-time algorithm for connected input graphs. Finally, we present the algorithm for disconnected input graphs in Subsect. 2.4.
Some Notation. We use standard graph-theoretic notation, see for instance [8]. It is well known that a graph is outerplanar if and only if it excludes \(K_4\) and \(K_{2,3}\) as a minor. An outerplanar graph is triangulated if all its inner faces (in an outerplanar embedding) are triangles. An outerplanar graph is maximal if it is 2-connected and triangulated. Note that, when solving the OPDI problem, we may always assume that the completed graph \(G'\) is maximal.
2.1 Reducing the Input Graph When There Are Cut Vertices
Given a graph G, let the eccentricity of a vertex u be \({\text {ecc}}(u,G) = \max _{v\in V(G)}{\text {dist}}_{G}(u,v)\). Given an outerplanar graph G, a vertex \(u\in V(G)\), and an integer D, let us define \({\text {ecc}}_D^*(u,G)\) as \(\min _{H} {\text {ecc}}(u,H)\) over all the diameter-D outerplanar completions H of G. We set this value to \(+\infty \) if no such completion of G exists. Unless said otherwise, we assume henceforth that D is a fixed given integer, so we may just write \({\text {ecc}}^*(u,G)\) instead of \({\text {ecc}}_D^*(u,G)\). (The value of D will change only in the description of the algorithm at the end of Subsect. 2.3, and in that case we will make the notation explicit).
As admitting an outerplanar completion with bounded eccentricity (for a fixed vertex u) is a minor-closed property, let us observe the following:
Lemma 1
(\(\star \))Footnote 3 For any connected outerplanar graph G, any vertex \(v\in V(G)\), and any connected subgraph H of G with \(v\in V(H)\), we have that \({\text {ecc}}^*(v,H) \le {\text {ecc}}^*(v,G)\).
Consider a connected graph G with a cut vertex v, and let \(C_1,\ldots ,C_t\) be the vertex sets of the connected components of \(G\setminus \{v\}\). For \(1\le i\le t\), we call the vertex set \(B_i = C_i\cup \{v\}\) a branch of G at v. To shorten notations, we abbreviate \(B_i\cup \ldots \cup B_j=:B_{i\ldots j}\). Also, when referring to the eccentricity, we simply write \(B_i\) to denote the subgraph of G that is induced by \(B_i\) (i.e. \(G[B_i]\)). Thus, the value \({\text {ecc}}^*(v,B_{1\ldots i})\) refers to the minimum eccentricity with respect to v that a diameter-D outerplanar completion of the graph \(G[B_{1\ldots i}]\) can have. The following lemma, crucial in our polynomial-time algorithm, implies that it is safe to ignore most of the branches of G at a cut vertex v.
Lemma 2
(\(\star \)) Consider a connected outerplanar graph G with a cut vertex v that belongs to at least 7 branches. Denote these branches \(B_1,\ldots ,B_t\) with \(t\ge 7\), in such a way that \({\text {ecc}}^*(v,B_1) \ge \ldots \ge {\text {ecc}}^*(v,B_t)\). The graph G has an outerplanar completion with diameter at most D if and only if \({\text {ecc}}^*(v,B_{1\ldots 6}) + {\text {ecc}}^*(v,B_7) \le D\).
Our algorithm computes the minimal eccentricity of a given “root” vertex r in a diameter-D outerplanar completion of G, i.e. \({\text {ecc}}^*(r,G)\). Then, however, the branch containing the root (\(B_0\) in Algorithm 1, Subsect. 2.3) should not be removed. Therefore, although Lemma 2 already implies that G has a diameter-D outerplanar completion if and only if \(G[B_{1\ldots 7}]\) does, we instead use the following corollary to identify removable branches.
Corollary 1
(\(\star \)) Let G be a connected outerplanar graph with a cut vertex v that belongs to at least 8 branches. Denote these branches \(B_1,\ldots ,B_t\), with \(t\ge 8\), in such a way that \({\text {ecc}}^*(v,B_1) \ge \ldots \ge {\text {ecc}}^*(v,B_t)\). For each \(8\le i\le t\), the graph \(G_i = \bigcup _{j\in \{1,\ldots ,7,i\}} B_j\) has a diameter-D outerplanar completion if and only if G does.
2.2 Dealing with 2-Vertex Separators
In this subsection, we extend the definition of eccentricity to the pairs (u, v) such that \(uv\in E(G)\). Namely, \({\text {ecc}}(u,v,G)\) is defined as the set of pairs obtained by taking the maximal elements of the set \(\{({\text {dist}}_{G}(u,w),{\text {dist}}_{G}(v,w))\ |\ w\in V(G)\}\). The pairs are ordered such that \((d_1,d_2) \le (d'_1,d'_2)\) if and only if \(d_1\le d'_1\) and \(d_2\le d'_2\). As u and v are adjacent, note that \({\text {dist}}_{G}(u,w)\) and \({\text {dist}}_{G}(v,w)\) differ by at most one. Hence, \({\text {ecc}}(u,v,G)\) is equal to one of \(\{(d,d)\}\), \(\{(d,d+1)\}\), \(\{(d+1,d)\}\), and \(\{(d,d+1),(d+1,d)\}\), for some positive integer d. As before, we abbreviate \({\text {ecc}}(u,v,G[X])\) by \({\text {ecc}}(u,v,X)\). Given a graph G and a subset \(S \subseteq V(G)\), we denote by \(\partial (S)\) the set of vertices in S that have at least one neighbor in \(V(G) \setminus S\).
Lemma 3
(\(\star \)) Consider a connected graph G with \(V(G)=: X \) and a triangle uvw and two sets \(X_u, X_v \subseteq X\) such that \(X_u \cup X_v = X\), \(X_u \cap X_v = \{w\}\), \(\partial (X_u) \subseteq \{u,w\}\), and \(\partial (X_v) \subseteq \{v,w\}\). Then \({\text {ecc}}(u,v,G)\) equals the maximal elements of the set
Given a connected outerplanar graph G, for any two vertices \(u,v\in V(G)\) and any vertex set \(X\subseteq V(G)\) with \(u,v \in X\) such that \(\partial (X) \subseteq \{u,v\}\), let us define \({\text {ecc}}^*_D(u,v,X)\) (or \({\text {ecc}}^*(u,v,X)\)) as the minimal elements of the set
If this set is empty, we set \({\text {ecc}}^*_D(u,v,X)\) to \(\{\{(\infty ,\infty )\}\}\). Here, \({\text {ecc}}(u,v,H) \le {\text {ecc}}(u,v,H')\) if and only if for any \((d_1,d_2)\in {\text {ecc}}(u,v,H)\) there exists \((d'_1,d'_2)\in {\text {ecc}}(u,v,H')\) such that \((d_1,d_2) \le (d'_1,d'_2)\). According to the possible forms of \({\text {ecc}}(u,v,H)\), we have that \({\text {ecc}}^*(u,v,X)\) is of one of the following five forms (for some positive integer d):
-
\(\{\{(d,d)\}\}\),
-
\(\{\{(d,d+1)\}\}\),
-
\(\{\{(d+1,d)\}\}\),
-
\(\{\{(d,d+1),(d+1,d)\}\}\), or
-
\(\{\{(d,d+1)\},\{(d+1,d)\}\}\) (when the minima come from different values of H)
Considering \({\text {ecc}}^*(u,X)\) for some u and X, note that u has at least one incident edge uv on the outer face in an outerplanar completion achieving \({\text {ecc}}^*(u,X)\). Thus, we can observe the following.
Observation 1
\({\text {ecc}}^*(u,X) = \min _{v\in X}\min _{S\in {\text {ecc}}^*(u,v,X)}\max _{(d_u,d_v)\in S} d_u\).
2.3 The Algorithm for Connected Outerplanar Graphs
We now proceed to describe a polynomial-time algorithm that solves Outerplanar Diameter Improvement when the input outerplanar graph is connected. In Subsect. 2.4 we will deal with the disconnected case. In a graph, a block is either a maximal 2-vertex-connected component or a bridge. Before proceeding to the formal description of the algorithm, let us provide a high-level sketch.
Algorithm 1 described below receives a connected outerplanar graph G, an arbitrary non-cut vertex r of G, called the root (such a vertex is easily seen to exist in any graph), and a positive integer D. In order to decide whether G admits a diameter-D outerplanar completion, we compute in polynomial time the value of \({\text {ecc}}^*_D(r,G)\), which by definition is finite if and only if G admits a diameter-D outerplanar completion.
In order to compute \({\text {ecc}}^*_D(r,G)\), the algorithm proceeds as follows. In the first step (lines 1–9), we consider an arbitrary block B of G containing r (line 1), and in order to reduce the input graph G, we consider all cut vertices v of G in B. For each such cut vertex v, we order its corresponding branches according to their eccentricity w.r.t. v (line 8), and by Corollary 1 it is safe to keep just a constant number of them, namely 8 (line 9). For computing the eccentricity of the branches not containing the root (lines 5–7), the algorithm calls itself recursively, by considering the branch as input graph, and vertex v as the new root.
In the second step of the algorithm (lines 10–17), we try all 2-vertex separators u, v in the eventual completed graph \(G'\) (note that \(G'\) cannot be 3-connected, as otherwise it would contain a \(K_{2,3}\)-minor or a \(K_4\)-minor), together with a set X consisting of a subset of the connected components of \(G' \setminus \{u,v\}\), not containing the root r. For each such triple (u, v, X), our objective is to compute the value of \({\text {ecc}}^*_D(u,v,X)\). To this end, after initializing its value (lines 11–12), we consider all possible triples \(w, X_u, X_v\) chosen as in Lemma 3 after adding the triangle uvw to G[X] (line 13), for which we already know the values of \({\text {ecc}}^*_D(u,w,X_u)\) and \({\text {ecc}}^*_D(w,v,X_v)\), since the sets X are processed by increasing size. Among all choices of one element in \({\text {ecc}}^*_D(u,w,X_u)\) and another in \({\text {ecc}}^*_D(w,v,X_v)\) (line 14), only those whose corresponding completion achieves diameter at most D are considered for updating the value of \({\text {ecc}}^*_D(u,v,X)\) (line 15). For updating \({\text {ecc}}^*_D(u,v,X)\) (line 17), we first compute \({\text {ecc}}_D(u,v,X)\) using Lemma 3 (line 16).
Finally, once we have computed all values of \({\text {ecc}}^*_D(u,v,X)\), we can easily compute the value of \({\text {ecc}}^*_D(u,X)\) by using Observation 1 (line 18). The formal description of the algorithm can be found in Fig. 1.
The correctness of Algorithm 1 follows from the results proved in Subsects. 2.1 and 2.2, and the following fact (whose proof is straightforward), which guarantees that the value of \({\text {ecc}}_D^*(u,v,X)\) can indeed be computed as done in lines 13–17.
Fact 1
There exists an outerplanar completion H of G[X] with the edge uv on the outer boundary if and only if there is \(w\in X\) and two sets \(X_u, X_v\) such that:
-
(a)
\(X_u\cup X_v=X\), \(X_u\cap X_v=\{w\}\),
-
(b)
\(\partial _G(X_u)\subseteq \{u,w\}\) and \(\partial _G(X_v)\subseteq \{v,w\}\), and
-
(c)
there exists an outerplanar completion \(H_u\) of \(G[X_u]\) with the edge uw on the outer boundary, and an outerplanar completion \(H_v\) of \(G[X_v]\) with the edge vw on the outer boundary.
It remains to analyze the running time of the algorithm.
Running Time Analysis of Algorithm 1. Note that at line 6 each \(B_i\) is recursively replaced by an equivalent (by Corollary 1) subgraph such that its cut vertices have at most 8 branches attached.
Let us first focus on the second step of the algorithm, that is, on lines 10–17. The algorithm considers in line 10 at most \(O(n^2)\) pairs \(\{u,v\}\). As each of u and v has at most 7 attached branches avoiding the root, and \(G \setminus \{u,v\}\) has at most 2 connected components with vertices adjacent to both u and v (as otherwise G would contain a \(K_{2,3}\)-minor), there are at most \(2^{7} \cdot 2^{7} \cdot 2^{2} = 2^{16}\) possible choices for assigning these branches or components to X or not. In line 13, the algorithm considers O(n) vertices w. Similarly, as w belongs to at most 7 branches not containing u nor v, there are at most \(2^7\) choices for assigning these branches to \(X_u\) or \(X_v\). In lines 14–17, the algorithm uses values that have been already computed in previous iterations, as the sets X are considered by increasing order. Note that each of \({\text {ecc}}^*_D(u,w,X_u)\) and \({\text {ecc}}^*_D(w,v,X_v)\) contains at most 2 elements, so at most 4 choices are considered in line 14. Again, at most 4 choices are considered in line 15. Therefore, lines 14–17 are executed in constant time.
As for the first step of the algorithm (lines 1–9), the algorithm calls itself recursively. The number of recursive calls is bounded by the number of blocks of G, as by construction of the algorithm each block is assigned a single root. Therefore, the number of recursive calls is O(n). Once the algorithm calls itself and the corresponding branch has no cut vertex other than the root, the algorithm enters in lines 10–17, whose time complexity has already been accounted above. (Note that each triple (u, v, X) is considered only once, and the value of \({\text {ecc}}^*_D(u,v,X)\) is stored in the tables.)
Finally, in line 18, the algorithm considers O(n) vertices, and for each of them it chooses among constantly many numbers. Summarizing, we have that the algorithm has overall complexity \(O(n^3)\).
It is worth mentioning that Algorithm 1 can also compute the actual completion achieving diameter at most D, if any, within the same time bound. Indeed, it suffices to keep track of which edges have been added to G when considering the guessed triangles uvw (recall that we may assume that the completed graph is triangulated).
Theorem 1
Algorithm 1 solves Outerplanar Diameter Improvement for connected input graphs in time \(O(n^3)\).
Note that we can compute \(\mathbf{opdi}(G)\) by calling Algorithm 1 with an arbitrary root \(r\in V(G)\) (such that \(G \setminus \{r\}\) is connected) for increasing values of D, or even binary search on these values.
Corollary 2
Let G be a connected outerplanar graph. Then, \(\mathbf{opdi}(G)\) can be computed in time \(O(n^3\log {n})\).
2.4 The Algorithm for Disconnected Outerplanar Graphs
In this subsection we will focus on the case where the input outerplanar graph is disconnected. The radius of a graph is defined as the eccentricity of a “central” vertex, that is, the minimum eccentricity of any of its vertices.
Lemma 4
([6], Theorem 3 ). Let G be a maximal outerplanar graph of diameter D and radius r. Then, \(r\le \lfloor D/2\rfloor +1\).
In the following, we denote the minimum radius of a diameter-D outerplanar completion of a graph or connected component G by \(r^*({G})\). If G has no diameter-D outerplanar completion, then let \(r^*({G}) = \infty \).
Definition 1
Let G be a connected graph and let D be an integer. Let \(G'\) be the graph resulting from G by adding an isolated vertex v. Let \(G^*\) be a diameter-D outerplanar completion of \(G'\) that minimizes the eccentricity of v. Then, \(G^*\) is called escalated completion of (G, D) with respect to v and the eccentricity \({\text {ecc}}(v,G^*)\), denoted by \(r^+({G})\), is called escalated eccentricity of (G, D). Again, if such a \(G^*\) does not exist, let \(r^+({G}) = \infty \).
We will apply Definition 1 also to connected components of a graph and, if clear from context, we omit D. Note that we can compute \(r^+({G})\) by guessing an edge between the isolated vertex v and G and running OPDI-Connected, the algorithm for connected graphs. Hence this can be done in \(O(n^4)\) time. Also note that \(r^*({G})\le r^+({G})\le r^*({G})+1\).
Lemma 5
(\(\star \)) Given a graph G with a connected component C such that \(r^+({C}) < D/2\), then G has a diameter-D outerplanar completion if and only if \(G\setminus C\) does.
Observation 2
(\(\star \)) Let C be a connected component of G, let \(G'\) be an outerplanar completion of G and let \(C'\) be a connected component of \(G' \setminus C\). Then, there is a vertex \(v\in C\) at distance at least \(r^+({C})\) to each vertex of \(C'\) in \(G'\).
Observation 2 immediately implies that any cutset separating two connected components \(C_1\) and \(C_2\) of G in \(G'\) has distance at least \(r^+({C_1})\) and \(r^+({C_2})\) to some vertex in \(C_1\) and \(C_2\), respectively. Thus, these two vertices are at distance at least \(r^+({C_1})+r^+({C_2})\) in \(G'\).
Corollary 3
Let \(C_1\) and \(C_2\) be connected components of G such that \(r^+({C_1})+r^+({C_2})>D\) and let \(G'\) be a diameter-D outerplanar completion of G. Then, \(C_1\) and \(C_2\) are adjacent in \(G'\), i.e. \(G'\) has an edge with an end in \(C_1\) and an end in \(C_2\).
Corollary 3 allows us to conclude that all connected components C with \(r^+({C})> D/2\) have to be pairwise adjacent in any diameter-D outerplanar completion of G. Thus, there cannot be more than three such components.
Lemma 6
(\(\star \)) An outerplanar graph G with more than 3 connected components C such that \(r^+({C})> D/2\) has no diameter-D outerplanar completion. On the other hand, if G has no connected component C such that \(r^+({C})> D/2\), then G necessarily has a diameter-D outerplanar completion.
Hence, assume G has \(p=1,2\), or 3 connected components C such that \(r^+({C})> D/2\). By Corollary 3 these p components are pairwise adjacent in the desired completion. Note that with \(O(n^{2p-2})\) tries, we can guess \(p-1\) edges connecting all such components into one larger component. Thus, in the following, we assume that there is only one component C with \(r^+({C})> D/2\), denoted \(\mathcal {C}_{\text {max}}\).
Lemma 7
(\(\star \)) Consider an outerplanar graph G with exactly one connected components \(\mathcal {C}_{\text {max}}\) such that \(D/2 < r^+({\mathcal {C}_{\text {max}}}) < \infty \). If \(r^*({\mathcal {C}_{\text {max}}})\le D/2\), then G necessarily has a diameter-D outerplanar completion.
Let us now distinguish two cases according to the parity of D.
Lemma 8
(\(\star \)) For odd D, if an outerplanar graph G has at most one component \(\mathcal {C}_{\text {max}}\) such that \(D/2 < r^+({\mathcal {C}_{\text {max}}}) < \infty \), then G has a diameter-D outerplanar completion.
The case where D is even is more technical.
Lemma 9
(\(\star \)) For even D, Let p and q respectively denote the number of connected components C such that \(D/2 < r^+({C}) < \infty \) and \(r^+({C}) = D/2\), of an outerplanar graph G. If \(p\ge 2\) and \(p+q \ge 5\), then G has no diameter-D outerplanar completion.
Lemma 10
(\(\star \)) For even D, if an outerplanar graph G has one component, denoted \(\mathcal {C}_{\text {max}}\), such that \(D/2 < r^*({\mathcal {C}_{\text {max}}}) < \infty \), and at least 4 other components C such that \(D/2 \le r^+({C}) < \infty \), then G has no diameter-D outerplanar completion.
Hence, assume G has \(q=0,1,2\), or 3 connected components C such that \(r^+({C}) = D/2\). By Corollary 3 these q components are adjacent to each of the p components such that \(r^+({C}) > D/2\). Note that with \(O(n^{2q})\) tries, we can guess q edges connecting each of the q components to one of the p component. Then we are left with a connected graph, and we can call OPDI-Connected.
The Algorithm Itself. We now describe a polynomial-time algorithm that solves the Outerplanar Diameter Improvement problem when the input contains a disconnected outerplanar graph. Algorithm 2 described in Fig. 2 receives a (disconnected) outerplanar graph G, and a positive integer D.
At the beginning, the algorithm computes \(r^+({C})\) and \(r^*({C})\) for each connected component C of G. For computing \(r^+({C})\) the algorithm adds a vertex v, guessing (with O(n) tries) an edge connecting v to C, and then calls OPDI-Connected for this component and root v. For computing \(r^*({C})\) the algorithm guesses a root u (with O(n) tries), and then calls OPDI-Connected for C and root u.
If \(r^*({C})=\infty \) for some component C then, as \(r^*({G}) \ge r^*({C})\), G has no diameter-D outerplanar completion.
Then, as they could be added in a diameter-D outerplanar completion (by Lemma 5), the algorithm removes the components C with small escalated eccentricity, that is those such that \(r^+({C}) < D/2\).
Then the algorithm tests if there is no component C such that \(r^+({C}) > D/2\), or if there is only one component C such that \(r^+({C}) > D/2\), and if \(r^*({C}) \le D/2\). In both cases by Lemmas 6 and 7, G is a positive instance.
Then the algorithm tests if there are more than 3 components C such that \(r^+({C}) > D/2\). In this case, by Lemma 6, G is a negative instance. Otherwise, G has \(p=1\), 2, or 3 such connected components, and the algorithm guesses \(p-1\) edges (in time \(O(n^{2p-2})\)) to connect them (as they should be by Corollary 3). For each such graph we call algorithm OPDI-Connected to check that this graph has a diameter-D outerplanar completion.
Then the algorithm proceeds differently according to D’s parity. If D is odd, then G is a positive instance (By Lemma 8). If D is even, if G has (still) more than \(5-p\) connected components (by Lemmas 9 and 10), then G is a negative instance. Then we are left with a graph G with \(1+q\) connected components, and again the algorithm guesses q edges (in time \(O(n^{2q})\)), connecting G. For each of these graphs the algorithm calls OPDI-Connected(G, v, D) (for any v) to check whether this graph admits a diameter-D outerplanar completion.
Finally if none of these “guessed” connected graphs has a diameter-D outerplanar completion, then the algorithm concludes that G is a negative instance.
Theorem 2
(\(\star \)) Algorithm 2 solves Outerplanar Diameter Improvement for disconnected input graphs in polynomial time. For odd D the running time is \(O(n^7)\), while it is \(O(n^{9})\) for even D.
3 Conclusions and Further Research
Our algorithm for OPDI runs in time \(O(n^3)\) for connected input graphs, and in time \(O(n^{7})\) or \(O(n^{9})\) for disconnected input graphs, depending on whether D is odd or even, respectively. The main contribution of our work is to establish the computational complexity of OPDI and there is room for improvement of the running time.
We believe that our approach might be interesting for generalizations or variations of the OPDI problem, such as the one where we demand that the augmented graph has fixed outerplanarity or is series-parallel.
By the Graph Minors series of Robertson and Seymour [22, 23], we know that for each fixed integer D, the set of minor obstructions Footnote 4 of OPDI is finite. We have some preliminary results in this direction, but we managed to obtain a complete list only for small values of D. Namely, we obtained a partial list of forbidden substructures (not necessarily minimal), by using the notion of parallel matching. These partial results can be found in the arXiv version of this article, see [5].
Settling the computational complexity of PDI remains the main open problem in this area. An explicit FPT-algorithm, or even an XP-algorithm, would also be significant. The interested reader can find in the arXiv version [5] of this paper a NP-completeness result for a modified version of PDI involving edge weights.
Notes
- 1.
To see this, if a graph G can be completed into a planar graph \(G'\) of diameter D, then \(G'\) is also a valid completion of any subgraph \(H\subseteq G\). Similarly, by merging two adjacent vertices uv in both G and \(G'\), the latter is still a completion of the first and their diameters can only decrease.
- 2.
As opposed to having a possibly different algorithm for each D, a problem is uniformly FPT if the algorithm solving the problem is the same for each D.
- 3.
The proofs of results annotated with (\(\star \)) appear in the Appendix. For the full version of the paper, see [5].
- 4.
The minor obstruction set of OPDI for some D is the smallest family \(\mathcal {F}\) of graphs such that a graph G has an outerplanar completion of diameter D if and only if no graph of \(\mathcal {F}\) is a minor of G.
References
Adler, I., Kolliopoulos, S.G., Thilikos, D.M.: Planar disjoint-paths completion. In: Marx, D., Rossmanith, P. (eds.) IPEC 2011. LNCS, vol. 7112, pp. 80–93. Springer, Heidelberg (2012)
Alon, N., Gyárfás, A., Ruszinkó, M.: Decreasing the diameter of bounded degree graphs. J. Graph Theor. 35(3), 161–172 (2000)
Bilò, D., Gualà, L., Proietti, G.: Improved approximability and non-approximability results for graph diameter decreasing problems. Theor. Comput. Sci. 417, 12–22 (2012)
Chepoi, V., Estellon, B., Nouioua, K., Vaxès, Y.: Mixed covering of trees and the augmentation problem with odd diameter constraints. Algorithmica 45(2), 209–226 (2006)
Cohen, N., Gonçalves, D., Kim, E.J., Paul, C., Sau, I., Thilikos, D.M., Weller, M.: A polynomial-time algorithm for outerplanar diameter improvement. CoRR, abs/1403.5702 (2014)
Dankelmann, P., Erwin, D., Goddard, W., Mukwembi, S., Swart, H.: A characterisation of eccentric sequences of maximal outerplanar graphs. Australas. J. Comb. 58(3), 376–391 (2014)
Dejter, I.J., Fellows, M.: Improving the diameter of a planar graph. Technical report, Computer Science department at the University of Victoria, May 1993
Diestel, R.: Graph Theory, 3rd edn. Springer, Heidelberg (2005)
Dodis, Y., Khanna, S.: Design networks with bounded pairwise distance. In: Proceedings of the 31st Annual ACM Symposium on Theory of Computing (STOC), pp. 750–759 (1999)
Downey, R.G., Fellows, M.R.: Parameterized Complexity. Springer, New York (1999)
Erdös, P., Gyárfás, A., Ruszinkó, M.: How to decrease the diameter of triangle-free graphs. Combinatorica 18(4), 493–501 (1998)
Flum, J., Grohe, M.: Parameterized Complexity Theory. Springer, Heidelberg (2006)
Frati, F., Gaspers, S., Gudmundsson, J., Mathieson, L.: Augmenting graphs to minimize the diameter. In: Cai, L., Cheng, S.-W., Lam, T.-W. (eds.) Algorithms and Computation. LNCS, vol. 8283, pp. 383–393. Springer, Heidelberg (2013)
Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman and Co., New York (1979)
Golumbic, M.C., Kaplan, H., Shamir, R.: On the complexity of DNA physical mapping. Adv. Appl. Math. 15(3), 251–261 (1994)
Heggernes, P., Paul, C., Telle, J.A., Villanger, Y.: Interval completion with few edges. In: Proceedings of the 39th Annual ACM Symposium on Theory of Computing (STOC), pp. 374–381(2007)
Ishii, T.: Augmenting outerplanar graphs to meet diameter requirements. J. Graph Theor. 74(4), 392–416 (2013)
Jasine, B., Basavaraju, M., Chandran, L.S., Rajendraprasad, D.: 2-connecting outerplanar graphs without blowing up the pathwidth. Theor. Comput. Sci. (2014, to appear). http://dx.doi.org/10.1016/j.tcs.2014.04.032
Kant, G.: Augmenting outerplanar graphs. J. Algorithms 21(1), 1–25 (1996)
Kaplan, H., Shamir, R., Tarjan, R.E.: Tractability of parameterized completion problems on chordal, strongly chordal, and proper interval graphs. SIAM J. Comput. 28(5), 1906–1922 (1999)
Niedermeier, R.: Invitation to Fixed-Parameter Algorithms. Oxford University Press, Kettering (2006)
Robertson, N., Seymour, P.D.: Graph minors. XIII. The disjoint paths problem. J. Comb. Theor. Ser. B 63(1), 65–110 (1995)
Robertson, N., Seymour, P.D.: Graph minors. XX. Wagner’s conjecture. J. Com. Theor. Ser. B 92(2), 325–357 (2004)
Yannakakis, M.: Computing the minimum fill-in is NP-complete. SIAM J. Algebraic Discrete Methods 2(1), 77–79 (1981)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Appendix
Appendix
Proof
(of Lemma 1 ). Let \(G'\) be an outerplanar completion of G such that \({\text {ecc}}(v,G') = {\text {ecc}}^*(v,G)\). Contracting the edges of \(G'\) that have at least one endpoint out of V(H) one obtains an outerplanar completion \(H'\) of H (as outerplanar graphs are minor-closed). As contracting an edge does not elongate any shortest path, we have that \({\text {dist}}_{H'}(v,u) \le {\text {dist}}_{G'}(v,u)\) for any vertex \(u\in V(H)\), and in particular the diameter of \(H'\) is at most the diameter of \(G'\), so \({\text {ecc}}^*(v,H) \le {\text {ecc}}(v,H') \le {\text {ecc}}(v,G') = {\text {ecc}}^*(v,G)\). \(\square \)
Proof
(of Lemma 2 ). “\(\Leftarrow \)”: If \({\text {ecc}}^*(v,B_{1\ldots 6}) + {\text {ecc}}^*(v,B_7) \le D\), gluing on v the outerplanar completions of \(G[B_{1\ldots 6}], G[B_7],\ldots ,G[B_t]\), respectively achieving \({\text {ecc}}^*(v,B_{1\ldots 6}), {\text {ecc}}^*(v,B_7), \ldots , {\text {ecc}}^*(v,B_t)\), one obtains a diameter-D outerplanar completion \(G'\) of G. Indeed,
-
The graph obtained is outerplanar and contains G.
-
Two vertices x, y of \(G[B_{1\ldots 6}]\) (resp. of \(G[B_i]\) for \(7\le i\le t\)) are at distance at most D from each other, as \({\text {ecc}}^*(v,B_{1\ldots 6}) < \infty \) (resp. as \({\text {ecc}}^*(v,B_i) < \infty \)).
-
Any vertex x of \(G[B_{1\ldots 6}]\) and y of \(G[B_i]\), with \(7\le i\le t\), are respectively at distance at most \({\text {ecc}}^*(v,B_{1\ldots 6})\) and \({\text {ecc}}^*(v,B_i)\le {\text {ecc}}^*(v,B_7)\) from v. They are thus at distance at most \({\text {ecc}}^*(v,B_{1\ldots 6}) + {\text {ecc}}^*(v,B_7) \le D\) from each other.
-
Any vertex x of \(G[B_i]\) and y of \(G[B_j]\), with \(7\le i<j\le t\), are respectively at distance at most \({\text {ecc}}^*(v,B_i)\le {\text {ecc}}^*(v,B_1) \le {\text {ecc}}^*(v,B_{1\ldots 6})\) (By Lemma 1) and \({\text {ecc}}^*(v,B_j)\le {\text {ecc}}^*(v,B_7)\) from v. They are thus at distance at most D from each other.
“\(\Rightarrow \)”: In the following, we consider towards a contradiction an outerplanar graph G admitting a diameter-D outerplanar completion, but such that
Among the triangulated diameter-D outerplanar completions of G, let \(G'\) be one that maximizes the number of branches at v. Let \(t'>0\) be the number of branches at v in \(G'\), and denote these branches \(B'_1,\ldots ,B'_{t'}\), in such a way that \({\text {ecc}}^*(v,G')={\text {ecc}}^*(v,B'_1) \ge {\text {ecc}}^*(v,B'_2) \ge \ldots \ge {\text {ecc}}^*(v,B'_{t'})\). Let \(S_{i'}:=\{i\mid B_i\subseteq B'_{i'}\}\) for all \(1\le i'\le t'\) (note that \(\{S_1,\ldots ,S_{t'}\}\) is a partition of \(\{1,\ldots ,t\}\)). Furthermore, among all \(B'_{i'}\) maximizing \({\text {ecc}}^*(v,B'_{i'})\), we choose \(B'_1\) such that \(\min S_1\) is minimal. Then, since \(G'\) has diameter at most D and shortest paths among distinct branches of \(G'\) contain v, it is clear that
The branches \(B'_{i'}\) with \(|S_{i'}|=1\) are called atomic.
Claim 1
Let \(B'_{i'}\) be a non-atomic branch and let \(S'\subsetneq S_{i'}\). Then, \({\text {ecc}}^*(v,\bigcup _{i\in S'}B_i) + {\text {ecc}}^*(v, \bigcup _{i\in S_{i'} \setminus S'}B_i ) > D\).
Proof
Let \(\mathcal {B}:=\bigcup _{i\in S'} B_i\) and \(\bar{\mathcal {B}}:=B'_{i'}\setminus \mathcal {B}\). If the claim is false, then \({\text {ecc}}^*(v,\mathcal {B})+{\text {ecc}}^*(v,\bar{\mathcal {B}})\le D\). Furthermore, for all \(j'\ne i'\),
and, likewise, \({\text {ecc}}^*(v,\bar{\mathcal {B}})+{\text {ecc}}^*(v,B'_{j'})\le D\). Thus, the result of replacing \(G'[B'_{i'}]\) with the disjoint union of an outerplanar completion achieving \({\text {ecc}}^*(v,\mathcal {B})\) and an outerplanar completion achieving \({\text {ecc}}^*(v,\bar{\mathcal {B}})\) yields a diameter-D outerplanar completion containing more branches than \(G'\), contradicting our choice of \(G'\).
In the following, we abbreviate \(|S_1|=:s\).
Claim 2
\(S_1=\{j \mid 1\le j\le s\}\).
Proof
Towards a contradiction, assume that there is some \(i\notin S_1\) with \(i+1\in S_1\). Let \(i'>1\) be such that \(B_i\subseteq B'_{i'}\). Note that \(B'_1\) is not atomic, as otherwise \({\text {ecc}}^*(v,B'_1) ={\text {ecc}}^*(v,B_{i+1}) \le {\text {ecc}}^*(v,B_{i}) \le {\text {ecc}}^*(v,B'_{i'})\), contradicting the numbering of the \(B'_j\)’s. Then,
contradicting Claim 1.
Claim 3
For all i, we have \({\text {ecc}}^*(v,B_{1\ldots i}) + {\text {ecc}}^*(v,B_{i+1})> D\) if and only if \(i< s\).
Proof
“\(\Leftarrow \)”: Towards a contradiction, assume there is some \(i< s\) such that \({\text {ecc}}^*(v,B_{1\ldots i}) + {\text {ecc}}^*(v,B_{i+1}) \le D\). Then the graph obtained from the diameter-D outerplanar completions of \(B_{1\ldots i}\) and \(B_j\) for all \(i<j\le t\), respectively achieving \({\text {ecc}}^*(v,B_{1\ldots i})\) and \({\text {ecc}}^*(v,B_j)\), would be a diameter-D outerplanar completion of G with more branches than \(G'\), a contradiction.
“\(\Rightarrow \)”: Assume towards a contradiction that there is some \(i\ge s\) such that \({\text {ecc}}^*(v,B_{1\ldots i}) + {\text {ecc}}^*(v,B_{i+1}) > D\). By (2) and Lemma 1, we have \(D\ge {\text {ecc}}^*(v,B_{1\ldots s}) + {\text {ecc}}^*(v,B_{i+1})\) and, hence \({\text {ecc}}^*(v,B_{1\ldots i}) > {\text {ecc}}^*(v,B_{1\ldots s})\). But this contradicts Lemma 1, as \({\text {ecc}}^*(v,B_{1\ldots s})= {\text {ecc}}(v,G') \ge {\text {ecc}}^*(v,G)\).
By (1), Claim 3 implies that \(s\ge 7\).
Claim 4
Let \(S'\subseteq \{1,\ldots ,t\}\) and let \(\mathcal {B}:=\bigcup _{i\in S'}B_i\). Then, there is a vertex in \(\mathcal {B}\) that is, in \(G'\), at distance at least \({\text {ecc}}^*(v,\mathcal {B})\) to every vertex of \(V(G)\setminus (\mathcal {B}\setminus v)\).
Proof
Towards a contradiction, assume that for every vertex \(u \in \mathcal {B}\) there exists a vertex \(w \in V(G)\setminus (\mathcal {B}\setminus v))\) such that \({\text {dist}}_{G'}(u,w) < {\text {ecc}}^*(v,\mathcal {B})\). From \(G'\), contracting all vertices of \(V(G)\setminus \mathcal {B}\) onto v yields a graph H with a path between u and v of length strictly smaller than \({\text {ecc}}^*(v,\mathcal {B})\). As this argument holds for every vertex \(u \in \mathcal {B}\), it implies that \({\text {ecc}}(v,H)<{\text {ecc}}^*(v,\mathcal {B})\). Since H is an outerplanar completion of \(G[\mathcal {B}]\), this contradicts the definition of \({\text {ecc}}^*\).
Two sub-branches \(B_i\) and \(B_j\) of \(B'_1\) are linked if \(G'\) contains an edge from a vertex of \(B_i\setminus \{v\}\) to a vertex of \(B_j\setminus \{v\}\).
Claim 5
Let \(1\le i< j \le s\) and let \({\text {ecc}}^*(v,B_{1\ldots i}) + {\text {ecc}}^*(v,B_j) > D\). Then \({\text {ecc}}^*(v,B_{1\ldots i}) + {\text {ecc}}^*(v,B_j) = D+1\), and \(B_{j}\) is linked to one of \(B_1,\ldots ,B_i\).
Proof
By Claim 4, there is a vertex \(x\in B_j\) that is, in \(G'\), at distance at least \({\text {ecc}}^*(v,B_j)\) to every vertex in \(B_{1\ldots i}\subseteq V(G)\setminus (\mathcal {B}\setminus v)\). Likewise, there is a vertex \(y\in B_{1\ldots i}\) that is, in \(G'\), at distance at least \({\text {ecc}}^*(v,B_{1\ldots i})\) to every vertex in \(B_j\). Let P be any shortest path of \(G'\) between x and y (hence P has length at most D). By construction, the maximal subpath of P in \(B_{j}\setminus v\) containing x has length at least \({\text {ecc}}^*(v,B_j)-1\) and the maximal subpath of P in \(B_{1\ldots i}\setminus v\) containing y has length at least \({\text {ecc}}^*(v,B_{1\ldots i})-1\). Since these subpaths are vertex disjoint the remaining part of P has length \(d_P\ge 1\). Hence \(D\ge {\text {ecc}}^*(v,B_j) + {\text {ecc}}^*(v,B_{1\ldots i}) +d_P-2\). As \({\text {ecc}}^*(v,B_{1\ldots i}) + {\text {ecc}}^*(v,B_{j}) > D\), we have that \(d_P=1\), and thus there is a single edge in P linking \(B_{j}\) and \(B_{1\ldots i}\). This also yields to \({\text {ecc}}^*(v,B_j) + {\text {ecc}}^*(v,B_{1\ldots i}) = D+1\).
In the following, consider the graph L on the vertex set \(\{1,\ldots ,t\}\) such that ij is an edge of L if and only if \(B_i\) is linked to \(B_j\) in \(G'\). For all \(1\le k\le t\), let \(L_k\) be the subgraph of L that is induced by \(\{1,\ldots ,k\}\). A consequence of the next claim will be that \(B_{i+1}\) is linked to exactly one of these branches.
Claim 6
For each \(1\le k\le s\), the graph \(L_k\) is a path.
Proof
Let \(1\le k\le s\). Then,
-
1.
\(L_k\) is connected. Indeed Claims 3 and 5 clearly imply that for any \(1\le i< s\), \(B_{i+1}\) is linked to one of \(B_1,\ldots ,B_i\), i.e. that there is a path from any k to 1 in \(L_k\).
-
2.
\(L_k\) has maximum degree 2: towards a contradiction, assume that some branch \(B_i\) is linked to three branches \(B_{j_1}\), \(B_{j_2}\), and \(B_{j_3}\). As each of \(B_i\setminus v\), \(B_{j_1}\setminus v\), \(B_{j_2}\setminus v\), and \(B_{j_3}\setminus v\) induces a connected graph in \(G'\), these four sets together with v induce a \(K_{2,3}\)-minor in \(G'\), contradicting its outerplanarity.
-
3.
\(L_k\) is not a cycle since otherwise, as each \(B_i\setminus v\) induces a connected graph in \(G'\), these sets together with v would induce a \(K_4\)-minor in \(G'\) (since \(s\ge 3\)), contradicting its outerplanarity.
Hence, for any \(1\le i\le s\), the graph \(G'[B_{1\ldots i}\setminus v]\) is connected.
Claim 7
For any \(3\le i < s\), \({\text {ecc}}^*(v,B_{1\ldots i}) > {\text {ecc}}^*(v,B_{1\ldots i-2})\).
Proof
The monotonicity property given by Lemma 1 implies that \({\text {ecc}}^*(v,B_{1\ldots i})\ge {\text {ecc}}^*(v,B_{1\ldots i-1}) \ge {\text {ecc}}^*(v,B_{1\ldots i-2})\). Towards a contradiction suppose that \({\text {ecc}}^*(v,B_{1\ldots i}) = {\text {ecc}}^*(v,B_{1\ldots i-1}) = {\text {ecc}}^*(v,B_{1\ldots i-2}) =: c\). Then, Claim 3 implies that \(c + {\text {ecc}}^*(v,B_{j}) > D\) for all \(j\in \{i-1,i,i+1\}\). Thus, by Claim 5, each of \(B_{i-1}\), \(B_{i}\), and \(B_{i+1}\) is linked to one of \(B_1,\ldots ,B_{i-2}\). As each of \(B_{1\ldots i-2}\setminus v\), \(B_{i-1}\setminus v\), \(B_{i}\setminus v\), and \(B_{i+1}\setminus v\) induces a connected graph in \(G'\), these sets together with vertex v induce a \(K_{2,3}\)-minor, contradicting the outerplanarity of \(G'\).
In the following let q be any integer such that \(3\le q\le s\) and \(B_q\) is not linked to \(B_1\). Let \(p<q\) be such that \(B_p\) and \(B_q\) are linked. Note that p is unique since otherwise, \(L_q\) would not be a path, contradicting Claim 6.
Consider a shortest cycle containing v, a vertex \(u\in B_p\) and some vertex of \(B_q\). Since \(G'\) is triangulated, this cycle is a triangle. Thus, u is a neighbor of v (in \(G'\)) with \(u\in B_p\) and u is adjacent to some vertex in \(B_q\setminus v\) (see Fig. 3 for an illustration).
Since, by Claim 6, all paths in \(G'\) between a vertex in \(B_1\) and a vertex in \(B_q\) contain u or v, it is clear that \(\{v,u\}\) separates \(B_1\setminus v\) and \(B_q\setminus v\). Let (X, Y) be a separation of \(G'\) (that is, two sets \(X,Y \subseteq V(G')\) such that \(X \cup Y = V(G')\) and such that there are no edges between \(X \setminus Y\) and \(Y \setminus X\)) such that \(X\cap Y =\{v,u\}\), \(B_{1\ldots q-1}\setminus B_p\subsetneq X\) and \(B_q\subseteq Y\) (such a separation exists by Claim 6).
Claim 8
\({\text {ecc}}^*(v,B_{1\ldots q}) = {\text {ecc}}^*(v,B_{1\ldots q-1})\).
Proof
By Lemma 1, it suffices to show \({\text {ecc}}^*(v,B_{1\ldots q}) \le {\text {ecc}}^*(v,B_{1\ldots q-1})\). To this end, let H be the outerplanar completion of \(B_{1\ldots q}\) obtained from \(G'\) by contracting every branch \(B_i\), with \(i>q\), onto v. Since H is a minor of \(G'\), H is a diameter-D outerplanar completion of \(B_{1\ldots q}\). We show \({\text {ecc}}(v,H)\le {\text {ecc}}^*(v,B_{1\ldots q-1})\).
Consider any vertex \(x\in X\), and let \(y\in B_q \subseteq Y\) be a vertex that is at distance at least \({\text {ecc}}^*(v,B_q)\) to both v and u (such a vertex y exists by Claim 4). As all shortest paths between x and y (of length at most D) contain v or u, the vertex x is at distance at most \(D -{\text {ecc}}^*(v,B_q)\) to v or u. As v and u are adjacent, the vertex x is at distance at most \(D +1 -{\text {ecc}}^*(v,B_q)\) (\(= {\text {ecc}}^*(v,B_{1\ldots q-1})\) by Claim 5, which is applicable since, by Claim 3, \({\text {ecc}}^*(v,B_{1\ldots q-1}) + {\text {ecc}}^*(v,B_q) > D\)) to v. Since x is chosen arbitrarily in X, every vertex in X is at distance at most \({\text {ecc}}^*(v,B_{1\ldots q-1})\) to v in H.
Consider now any vertex \(y\in Y\cap V(H)\), and let \(x\in B_1 \subsetneq X\) be a vertex that is at distance at least \({\text {ecc}}^*(v,B_1)\) to both v and u (such a vertex x exists by Claim 4). As a shortest path between x and y (of length at most D) goes through v or u, the vertex y is thus at distance at most \(D -{\text {ecc}}^*(v,B_1)\) to v or u. As v and u are adjacent, the vertex y is at distance at most \(D +1 -{\text {ecc}}^*(v,B_1)\) (\(= {\text {ecc}}^*(v,B_2)\) by Claim 5, which is applicable since, by Claim 3, \({\text {ecc}}^*(v,B_1)+{\text {ecc}}^*(v,B_2)>D\)) to v. As \({\text {ecc}}^*(v,B_2) \le {\text {ecc}}^*(v,B_{1\ldots q-1})\) by Lemma 1, every vertex \(y\in Y\cap V(H)\) is at distance at most \({\text {ecc}}^*(v,B_{1\ldots q-1})\) to v in H. \(\square \)
We now claim that there exist two consecutive such values q between 3 and 6. Indeed, by Claim 6 \(B_1\) is linked to at most two other branches, and by Claims 3 and 5 \(B_2\) is linked to \(B_1\), so it follows that \(B_1\) is linked to at most one branch \(B_j\) with \(j \ge 3\). Therefore, for \(3 \le q \le 6\), there are at least two consecutive values of q such that \(B_q\) is not linked to \(B_1\). Once we have these two consecutive values, say \(i-1\) and i, we have by Claim 8 that \({\text {ecc}}^*(v,B_{1\ldots i-2}) = {\text {ecc}}^*(v,B_{1\ldots i})\), for some \(i\le 6\), contradicting Claim 7. This concludes the proof of the lemma. \(\square \)
Proof
(of Corollary 1 ). Recall that the property of having an outerplanar completion with bounded diameter is minor closed. Thus \(G_i\) being a minor of G, we have that if G admits a diameter-D outerplanar completion, then so does \(G_i\).
On the other hand, if \(G_i\) admits a diameter-D outerplanar completion, by Lemma 2 applied to \(G_i\) we have that \({\text {ecc}}^*(v,B_{1\ldots 6}) + {\text {ecc}}^*(v,B_7) \le D\). Thus gluing on v the outerplanar completions of \(G[B_{1\ldots 6}], G[B_7],\ldots ,G[B_t]\), respectively achieving \({\text {ecc}}^*(v,B_{1\ldots 6}), {\text {ecc}}^*(v,B_7), \ldots , {\text {ecc}}^*(v,B_t)\), one obtains a diameter-D outerplanar completion of G. \(\square \)
Proof
(of Lemma 3 ). It is clear from the fact that a shortest path from \(X_u \setminus \{u\}\) to u does not go through \(X_v \setminus \{w\}\) (as it should go through \(w\in N(u)\)), from the fact that a shortest path from \(X_u\) to v goes through \(\{u,w\}\subseteq N(v)\), and from the fact that any subpath of a shortest path is a shortest path (for some pair of vertices). \(\square \)
Proof
(of Lemma 5 ). In a diameter-D outerplanar completion of \(G\setminus C\) there is a vertex v with eccentricity at most \(\lfloor D/2\rfloor +1\), by Lemma 4. In this completion, adding the completion of \(C+v\) achieving \(r^+({C}) < D/2\), yields a diameter-D outerplanar completion of G. \(\square \)
Proof
(of Observaton 2 ). Let the result of contracting all vertices in \(G' \setminus (C\cup C')\) onto vertices in C and contracting \(C'\) onto a single vertex u be \(G''\). Then, \(G''\) is a subgraph of an outerplanar completion of the result of adding u as isolated vertex to \(G'[C]\). By definition, \({\text {ecc}}(u,G'')\ge r^+({C})\), implying that there is a vertex \(v\in C\) at distance at least \(r^+({C})\) to u in \(G''\). Thus, v is at distance at least \(r^+({C})\) to each vertex of \(C'\) in \(G'\). \(\square \)
Proof
(of Lemma 6 ). The first statement comes from the above comments. The proof of the second statement is similar to the one of Lemma 5. For some component C of G, let v be such that \(ecc(v,C)= r^*({C}) \le r^+({C})\le D/2\), and complete C in order to achieve this value. Then for the other components \(C'\) consider their escalated completion with respect to v. As \(r^+({C'})\le D/2\) this graph has diameter at most D. \(\square \)
Proof
(of Lemma 7 ). Same proof as Lemma 6 \(\square \)
Proof
(of Lemma 8 ). Indeed, by Lemma 5 it is sufficient to consider the component \(\mathcal {C}_{\text {max}}\) alone. As \( r^+({\mathcal {C}_{\text {max}}}) < \infty \), \(\mathcal {C}_{\text {max}}\) has a diameter-D outerplanar completion, and so does G. \(\square \)
Proof
(of Lemma 9 ). By Corollary 3, in a diameter-D outerplanar completion \(G'\) of G the p components are pairwise adjacent, and any of the q components is adjacent to every of the p ones. For \(p=2\), as \(q\ge 3\), this would induce a \(K_{2,3}\)-minor in \(G'\), a contradition. For the other cases, this would induce a \(K_{4}\)-minor. \(\square \)
Proof
(of Lemma 10 ). Let us denote \(C_1,C_2,C_3,\) and \(C_4\) the connected components such that \(r^+({C_i}) \ge D/2\), distinct from \(\mathcal {C}_{\text {max}}\). Assume for contradiction that G admits a diameter-D outerplanar completion, denoted \(G'\).
Claim 9
For each \(C_i,C_j\), either \(C_i\) and \(C_j\) are adjacent in \(G'\), or \(C_i\) and \(C_j\) have a common neighbor in \(G'\).
Proof
Assume for contradiction that \(C_i\) and \(C_j\) are not adjacent and do not have a common neighbor in \(G'\). Let us now construct the graph \(G''\) from \(G'\) as follows. For any component C of \(G'\setminus (C_i\cup C_j)\) that is not adjacent to both \(C_i\) and \(C_j\), contract C onto vertices of \(C_i\) or \(C_j\) (According to the one C is neighboring). As \(G''\) is obtained from \(G'\) by contracting edges, \(G''\) also is a diameter-D outerplanar completion (for some graph containing \(C_i\) and \(C_j\)). Let \(N_i:=N_{G''}(C_i)\), let \(N_j:=N_{G''}(C_j)\), and note that \(C_i\cap N_j=\emptyset \), \(N_i\cap C_j=\emptyset \), and \(N_i\cap N_j=\emptyset \). Then, by Observation 2 (as \(G''\setminus C_i\) and \(G''\setminus C_j\) are connected), there are vertices \(v_i\in C_i\) and \(v_j\in C_j\) at distance at least D / 2 to each vertex in \(N_i\) and \(N_j\), respectively, in \(G''\). Since \(N_i\) and \(N_j\) are at distance at least one, \(v_i\) and \(v_j\) are at distance at least \(D+1\), contradicting \(G''\) having diameter D.
Claim 10
There is a vertex \(u\in \mathcal {C}_{\text {max}}\) that is adjacent in \(G'\) to 3 of the components \(C_1,C_2,C_3,\) and \(C_4\).
Proof
First, note that there is a vertex u and 3 components, say \(C_1,C_2,C_3\), with \(u\in N_{G'}[C_i]\) for all \(1\le i\le 3\), since otherwise, there would be internally vertex-disjoint paths between each two of the four components \(C_i\), implying the existence of a \(K_4\)-minor in \(G'\).
If u is neither in \(\mathcal {C}_{\text {max}}\) nor in \(C_i\), for \(1\le i\le 3\), then, since all the \(C_i\) are adjacent to \(\mathcal {C}_{\text {max}}\) (by Corollary 3), \(G'\) would have a \(K_{2,3}\)-minor on the vertex sets \(\{u,\mathcal {C}_{\text {max}}\}\) and \(\{C_1,C_2,C_3\}\).
Hence, in the following, we assume that \(u\in C_1\). Let z be a neighbor of \(C_1\) in \(\mathcal {C}_{\text {max}}\) and, for \(i\in \{2,3\}\) let \(w_i\) denote a neighbor of \(C_4\) in \(N[C_i]\). We note that \(w_2\ne z\) and \(w_3\ne z\), since otherwise, the claim follows and we are done. Furthermore, \(w_2\ne u\) and \(w_3\ne u\), since otherwise there is a \(K_{2,3}\)-minor on the vertex sets \(\{u,\mathcal {C}_{\text {max}}\}\) and \(\{C_2,C_3,C_4\}\). Let \(X:=(C_4\cup \{w_2,w_3\})\setminus (C_2\cup C_3)\) and note that X is adjacent to \(C_2\) and \(C_3\), respectively. Let Y be the connected component of \(\mathcal {C}_{\text {max}}\setminus \{w_2,w_3\}\) containing z, and note that Y is adjacent to \(C_1\) and X. Finally, since X, Y, \(C_1\), \(C_2\), and \(C_3\) are pairwise disjoint, \(G'\) has a \(K_{2,3}\)-minor on the vertex sets \(\{X,C_1\}\) and \(\{C_2,C_3,Y\}\).
Let v denote a vertex of \(\mathcal {C}_{\text {max}}\) that is at distance at least \(D/2+1\) to u in \(G'\) and consider the result \(G' \setminus \{u\}\) of removing u from \(G'\). Let C denote the connected component of \(G' \setminus \{u\}\) that contains v. Towards a contradiction, assume there is a connected component \(C_i\) that is adjacent to u but not to C in \(G'\), then all paths between v and any vertex in \(C_i\) contain u. Since \(G'\) has diameter D, all vertices in \(C_i\) are at distance at most \(D/2-1\) to u in \(G'\), contradicting \(r^+({C_i})\ge D/2\). Thus there is a \(K_{2,3}\)-minor in \(G'\) on the vertex sets \(\{C_1,C_2,C_3\}\) and \(\{u,X\}\) where X is the connected component of \(G'\setminus (C_1\cup C_2\cup C_3\cup \{u\})\) containing v. This concludes the proof of the lemma. \(\square \)
Proof
(of Theorem 2 ). Indeed, the algorithm runs in time \(O(n^7)\) for odd D (at most \(O(n^4)\) at line 16, times \(O(n^3)\) for the call to OPDI-Connected in line 18). The algorithm runs in \(O(n^{2p+2q+1})\) time for even D (\(O(n^{2p-2})\) in line 16, times \(O(n^{2q})\) in line 22, times \(O(n^3)\) for the call to OPDI-Connected in line 23), where p and q respectively denote the number of connected components C such that \(r^+({C}) > D/2\) and \(r^+({C}) = D/2\). As \(p+q \le 4\), we are done.
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this paper
Cite this paper
Cohen, N. et al. (2015). A Polynomial-Time Algorithm for Outerplanar Diameter Improvement. In: Beklemishev, L., Musatov, D. (eds) Computer Science -- Theory and Applications. CSR 2015. Lecture Notes in Computer Science(), vol 9139. Springer, Cham. https://doi.org/10.1007/978-3-319-20297-6_9
Download citation
DOI: https://doi.org/10.1007/978-3-319-20297-6_9
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-20296-9
Online ISBN: 978-3-319-20297-6
eBook Packages: Computer ScienceComputer Science (R0)