1 Introduction

The Steiner tree problem (STP) is one of the most studied problems in the area of network design. We are given a graph G with nodes V(G), edges E(G), and a cost function \(c:E(G) \rightarrow {\mathbb{R}}_{\ge 0}\), as well as a set \(R \subseteq V(G)\) of required nodes (also called regular nodes or terminals). The objective is to find a minimum-cost tree T within G such that \(R \subseteq V(T)\). The Steiner tree problem is known to be APX-hard [8], and the currently best approximation algorithm has a performance guarantee of \(\ln {4} + \varepsilon \approx 1.387\) [25].

We consider the Steiner tree problem with respect to reoptimization, a framework for dynamic algorithms in the context of NP-hard problems. We are given two related instances I and \(I'\) of an algorithmic problem together with a solution \(\textsc{Sol}\) to the instance I, and our goal is to compute a solution to \(I'\). The relation between I and \(I'\) is determined by an operation that we call local modification.

The concept of reoptimization is motivated by the observation that instead of computing new solutions from scratch, oftentimes we can reuse the effort spent to solve problems similar to the one at hand. For instance, let us consider a large circuit where certain components have to be connected. The components are the required nodes and there are points that may be used by several connections, the Steiner nodes. Now suppose that a long and costly computation has led to an almost optimal solution. Afterwards the requirements change: either an additional component has to be placed to a point that previously was a Steiner node or a component is removed, which turns a required node into a Steiner node. In such a situation it would seem wasteful to discard the entire previous effort.

Classically, when considering reoptimization problems one assumes that \(\textsc{Sol}\) is an optimal solution. The reason for this assumption is that assuming optimality considerably reduces the formal overhead and therefore facilitates to concentrate on the main underlying properties of the reoptimization problem. We show, however, that assuming optimality is not without loss of generality. Let us assume that \(c(\textsc{Sol})\) is a \((1+\varepsilon )\) factor larger than the cost of an optimal solution. Then we say that a Steiner tree reoptimization algorithm is robust, if it is an approximation algorithm and its performance guarantee is \(\alpha \cdot (1+O(\varepsilon ))\), where \(\alpha\) is its performance guarantee when \(\varepsilon =0\). Intuitively, this definition ensures that for \(\varepsilon \rightarrow 0\), the performance guarantee converges smoothly towards \(\alpha\), independent of the given instance. We consider robustness of reoptimization algorithms to be a crucial feature, since in real-world applications close-to-optimal solutions are much more frequent than optimal solutions.

We address all local modifications that have previously been considered for Steiner tree reoptimization. We classify these modifications into two groups, according to their robustness. The first group contains those problems where obtaining a robust reoptimization algorithm implies to provide an approximation algorithm for the (non-reoptimization) Steiner tree problem with matching performance guarantee. The second group of problems allows for improved robust reoptimization algorithms compared to STP approximation algorithms.

For all reoptimization problems of the second group that have previously been considered (and that are known to be NP-hard [17]), we provide robust reoptimization algorithms that, for \(\varepsilon \rightarrow 0\), obtain better performance guarantees than the previous results with optimality assumption [13, 14].

After the journal submission of our manuscript, Bilò [9] published polynomial time approximation schemes for Steiner tree reoptimization with respect to four of the most important local modifications (see Table 1). The algorithms use some of our techniques as a building block.

1.1 Local Modifications and Our Contribution

There are ten local modifications that previously have been considered for the Steiner tree problem. The two most studied modifications address the set of required nodes: we either declare a required node to be a Steiner node, or a Steiner node to be a required node. Here, \(\mathrm{STP}^{R-}\) resp. \(\mathrm{STP}^{R+}\) denote the corresponding reoptimization problems. We show, in Sect. 4, that finding a robust reoptimization algorithm for \(\mathrm{STP}^{R-}\) is as hard as finding a Steiner tree approximation algorithm with matching approximation ratio. If one, however, excludes that the node t declared to be a Steiner node is a leaf in the given instance, we provide a robust reoptimization algorithm with improved performance ratio (see Table 1 for an overview of the achieved improvements). We show that in contrast to \(\mathrm{STP}^{R-}\), \(\mathrm{STP}^{R+}\) always allows for improved robust reoptimization algorithms. The next interesting type of local modification is to modify the cost of a single edge. We do not require the cost function to be metric. In particular, in the shortest path metric induced by the modified edge cost, the cost of several edges may be changed. We call the modification where the cost of one edge is increased \(\mathrm{STP}^{E+}\), and the converse local modification where the cost of one edge is decreased is \(\mathrm{STP}^{E-}\). We provide an improved robust reoptimization algorithm for \(\mathrm{STP}^{E+}\) and show that robust reoptimization for \(\mathrm{STP}^{E-}\) is as hard as approximating the Steiner tree problem itself (analogous to general \(\mathrm{STP}^{R-}\)). The two local modifications to remove an edge from the graph and to add an edge to the graph reduce to \(\mathrm{STP}^{E+}\) resp. \(\mathrm{STP}^{E-}\) in a straightforward manner.

The remaining four local modifications are the removal or addition of a required node or a Steiner node. It is known that the local modification where required or Steiner nodes are removed is as hard as Steiner tree approximation, even if we are given an optimal solution to the old problem [17]. We show that adding a required node or a Steiner node to the graph causes robust reoptimization to be as hard as STP approximation.

One of the key insights that leads to our improved algorithms is that for all local modifications that allow for robust reoptimization algorithms, we can replace the given Steiner tree by a k-restricted Steiner tree of about the same cost. A k-restricted Steiner tree has a limited size of the subgraphs where all required nodes are leaves (see Sect. 2 for a precise definition). At the same time, we have the promise that there is an almost optimal Steiner tree for the modified instance that is k-restricted. This property allows us to handle certain subgraphs of Steiner trees called full components. (i) We remove entire full components from the given Steiner tree and perform optimal computations to obtain a feasible solution to the modified instance, and (ii) we guess entire full components of the Steiner tree that we aim to compute. The new insights simplify and generalize the previous approaches to Steiner tree reoptimization and therefore give raise to more sophisticated analyses than before.Footnote 1

1.2 Related Work

The concept of reoptimization was first mentioned by Schäffter [31] in the context of postoptimality analysis for a scheduling problem. Since then, the concept of reoptimization has been investigated for several different problems, including the traveling salesman problem [1, 5, 7, 15, 16, 30], the minimum latency problem [4, 26], the rural postman problem [3], fast reoptimization of the spanning tree problem [23], the knapsack problem [2], covering problems [12], the shortest common superstring problem [10], maximum-weight induced hereditary problems [22], and scheduling [6, 21, 31]. There are several overviews on reoptimization [4, 19, 24, 33].

The Steiner tree reoptimization problem in general weighted graphs was previously investigated in [11, 13, 14, 17, 18, 28], see Table 1.

Table 1 Comparison of approximation ratios of the Steiner Tree Reoptimization problem for the different types of local modifications

2 Preliminaries

We denote a Steiner tree instance by (GRc), where G is an undirected graph, \(R \subseteq V(G)\) is the set of required nodes, and \(c:E(G) \rightarrow {\mathbb{R}}_{\ge 0}\) is a cost function. The Steiner nodes of (GRc) are the nodes \(S = V(G) {\setminus } R\).

Since c is symmetric, we sometimes use the simplified notation \(c(u,v) = c(v,u)\) instead of \(c(\{u,v\})\).

For two graphs \(G,G'\), we define \(G \cup G'\) to be the graph with node set \(V(G) \cup V(G')\) and edge set \(E(G) \cup E(G')\) (i.e., we do not keep multiple edges). For an edge e, \(G - e\) is G with e removed from E(G). We define \(G - G'\) to be the graph with node set \(V(G) {\setminus } (V(G') \cap S)\) and edge set \(E(G) {\setminus } E(G')\). We emphasize that we do not remove required vertices.

In Steiner tree algorithms, it is standard to consider the edge-costs to be metric. The reason is that forming the metric closure (i.e., using the shortest path metric) does not change the cost of an optimal solution: if we replace an edge of a Steiner tree by the shortest path between the two ends, we obtain a valid Steiner tree again.

In the context of reoptimization, however, we cannot assume the cost function to be metric without loss of generality, because the triangle inequality restricts the effect of local changes. Therefore in the following we have to carefully distinguish between metric and general cost functions.

For a given Steiner tree, its full components are exactly those maximal subtrees that have all leaves are in R and all internal nodes are in S. Note that for a given Steiner tree T, we may remove leaves if they are not in R; we still have a Steiner tree, and its cost did not increase. Therefore we may assume that T is composed of full components. A k-restricted Steiner tree is a Steiner tree where each full component has at most k nodes from R.

Lemma 1

(Borchers and Du [20]) For an arbitrary\(\varepsilon > 0\), let\(k \ge 2^{1/\varepsilon }\). Then for all Steiner tree instances (GRc) with optimal solution\(\textsc{Opt}\)of cost\(\mathrm{opt}\), there is ak-restricted Steiner treeTof cost at most\((1+\varepsilon ) \mathrm{opt}\)which can be obtained from\(\textsc{Opt}\)in polynomial time.

Let T be a k-restricted Steiner tree in graph G. We replace the edge costs c by the shortest-path metric of G. In particular, since G is connected, it is a complete graph with respect to the changed cost function c. We assume that within T, the Steiner nodes \(v \in V(T) \cap S\) have a degree of \(\deg (v) \ge 3\). This is without loss of generality, since \(\deg (v) \ge 2\) by the definition of k-restricted Steiner trees; if \(\deg (v) = 2\) and uw are the neighbors of v, \(c(u,v) + c(v,w) \ge c(u,w)\). We replace \(\{u,v\},\{v,w\}\) by \(\{u,w\}\) without increasing the cost of T and without changing the property that T is k-restricted.

Within the entire text, \(\textsc{Opt}\) denotes an optimal solution and \(\mathrm{opt}\) denotes the cost of an optimal solution. We will often add sub- and superscripts to \(\textsc{Opt}\) and \(\mathrm{opt}\) in order to distinguish between various types of (close to) optimal solutions.

3 Connecting Forests and Guessing Components

We state two algorithms that we will use repeatedly within the subsequent sections. The first algorithm, Connect, was introduced by Böckenhauer et al. [18] and has been used in all previous Steiner tree reoptimization results. The algorithm connects components of a Forest F of G in order to obtain a feasible Steiner tree T. The idea is that we start from a partial solution with few components that together contain all required vertices, and we use an exact computation to complete the solution. In Connect we use the following notation. Denote by \(G/V'\) for \(V' \subseteq V(G)\) the contraction of \(V'\) in G. We write G/F instead of G/V(F), if F is a subgraph of G. Note that after contracting a component there may be multiedges. Here, we treat multigraphs as simple graphs, where we only consider the cheapest edge of each multiedge. For ease of presentation, we slightly abuse notation and use the cost function c for both the graph before and the graph after the contraction.

figure a

Clearly, the graph T computed by Connect is a Steiner tree. If the number of components \(\ell\) of the forest F given as input is a constant and we use the Dreyfus–Wagner algorithm [27]Footnote 2 to compute \(T'\), Connect runs in polynomial time. The graph T computed by Connect is the minimum-cost Steiner tree that contains F, since all Steiner trees that contain F determine feasible solutions \(T'\).

The second algorithm of this section is called Guess. It is motivated by the CONNECT algorithm of [14] and we present it here in a different manner. The algorithm Guess provides a mechanism to profit from guessing full components of an optimal k-restricted Steiner tree: we contract the guessed full components \(S_i\) to single vertices \(r_i\) and this way we obtain a new instance to which we apply known approximation algorithms. We call \({\textsc{Guess}}\) by simply writing \({\textsc{Guess}} (\ell )\), if the instance and k are clear from the context and \({\mathscr{A}}\) is a \(\beta\)-approximation algorithm. For example \({\textsc{Guess}} (3k)\) means that \(\ell = 3k\).

figure b

Lemma 2

For an arbitrary\(\varepsilon > 0\), letkbe the parameter obtained from Lemma 1. Let\({\mathscr{A}}\)be a polynomial-time\(\beta\)-approximation algorithm for the Steiner tree problem. Furthermore, let\(\textsc{Opt} _k\)be an optimalk-restricted solution of cost\(\mathrm{opt} _k\)to the Steiner tree instance (GRc) wherecis a metric. Then, for\(\ell \in O_\varepsilon (1)\), Guessruns in polynomial time and computes a Steiner treeTof cost at most\((1+\varepsilon )(\beta - \beta \zeta + \zeta )\mathrm{opt}\), where\(\zeta \mathrm{opt} _k\)is the total cost of the\(\ell\)maximum-weight full components of\(\textsc{Opt} _k\)and\(\mathrm{opt}\)is the cost of an optimal solution.

The index \(\varepsilon\) in the notation \(O_\varepsilon (\cdot )\) means that \(\varepsilon\) is a constant.Footnote 3

Proof

We first analyze the running time of the algorithm. Since \({\mathscr{A}}\) runs in polynomial time, we only have to consider the number of families \({\mathscr{S}}\) that we have to test. This number is bounded from above by \(\bigl (\sum _{i=2}^{2k}\left( {\begin{array}{c}n\\ i\end{array}}\right) \bigr )^{\ell }\), since we only choose sets of size at most 2k. Since both k and \(\ell\) are constants, this number is polynomial in n.

Next we analyze the cost of T. Since we assume that for each Steiner node \(v \in S \cap V(\textsc{Opt} _k)\), \(\deg (v) \ge 3\), we conclude that all full components of \(\textsc{Opt} _k\) have at most 2k nodes. Therefore there is a family \({\mathscr{S}}\) considered by Guess such that the classes of \({\mathscr{S}}\) are exactly the node sets of the \(\ell\) maximum-weight full components of \(\textsc{Opt} _k\). Contracting a minimum spanning tree \(T_i\) is equivalent to contracting the full component with required nodes \(R \cap S_i\) in \(\textsc{Opt} _k\). We finish the proof by applying a standard argument that was used, for instance, by Böckenhauer et al. [16]. The cost of an optimal Steiner tree before expanding the full components is bounded from above by \(\mathrm{opt} _k - \zeta \mathrm{opt} _k\), and expanding the full components adds \(\zeta \mathrm{opt} _k\). Therefore we obtain \(c(T) \le \beta (\mathrm{opt} _k - \zeta \mathrm{opt} _k) + \zeta \mathrm{opt} _k = (\beta - \beta \zeta + \zeta ) \mathrm{opt} _k\). By our choice of k and Lemma 1, \(\mathrm{opt} _k \le (1+\varepsilon ) \mathrm{opt}\) and therefore \(c(T) \le (1+\varepsilon )(\beta - \beta \zeta + \zeta ) \mathrm{opt}\). \(\square\)

In the subsequent proofs, we will repeatedly obtain a value \(\eta\) such that \(\zeta \ge (\alpha -1-\varepsilon )\eta\), where \(\alpha\) is the actual performance ratio of the considered approximation algorithm. By simple arithmetics and assuming that \((1+\varepsilon )(\beta - \beta \zeta + \zeta )\) tends to \((\beta - \beta \zeta + \zeta )\) for \(\varepsilon\) chosen sufficiently small, Lemma 2 implies

$$\begin{aligned} \alpha \le \frac{\beta + \beta \eta - \eta + \varepsilon (\beta \eta -\eta )}{1+\beta \eta - \eta }. \end{aligned}$$
(1)

The reason for our assumption is that we can choose k in Lemma 1 and therefore the additional error is arbitrarily small.Footnote 4 We avoid complicated formalisms and instead slightly relax the approximation ratios in theorem statements by adding a value \(O_{\beta ,\varepsilon }(\delta )\) for a \(\delta > 0\) that can be chosen arbitrarily small whenever the proofs use (1).

4 A Required Node Becomes a Steiner Node

The variant of the minimum Steiner tree reoptimization problem where a node is declared to be a Steiner node (\(\mathrm{STP}^{R-} _\varepsilon\)) is defined as follows.

Given::

A parameter \(\varepsilon > 0\), a Steiner tree instance (GRc), a solution \(\textsc{Opt}_\varepsilon ^{\mathrm{old}}\) to (GRc) such that \(\mathrm{opt}^{\mathrm{old}}_\varepsilon \le (1+\varepsilon ) \mathrm{opt}^{\mathrm{old}}\), and a node \(t \in R\).

Solution::

A Steiner tree solution to \((G,R{\setminus } \{t\},c)\).

An instance of \(\mathrm{STP}^{R-} _\varepsilon\) is a tuple \(\left( G,R,c,\textsc{Opt}_\varepsilon ^{\mathrm{old}},t\right)\). If \(\varepsilon =0\), we skip the index and write \(\mathrm{STP}^{R-}\). Without loss of generality we assume that c is a metric: we may use the metric closure since the local modification does not change G or c.

The algorithm DeclareSteiner starts with reducing the instance to one where the changed required node has a degree of at least two, using a known technique. Afterwards it transforms the given solution to a k-restricted Steiner tree (note that the order of these two steps is important). The remaining algorithm outputs the best of three solutions that intuitively can be described as follows: we either keep the old solution; or we remove up to three full components incident to t to obtain a partial solution that we complete again using Connect; or we guess a partial solution that is at least as large as the 3k largest full-components of an optimal solution and complete these components to a solution using the best available approximation algorithm.

figure c

The following theorem indicates that in general we have to require \(\varepsilon = 0\) for instances of \(\mathrm{STP}^{R-} _\varepsilon\) with \(\deg (t)=1\).

Theorem 1

For an arbitrary\(\varepsilon > 0\), let\({\mathscr{A}}\)be a polynomial-time\(\alpha\)-approximation algorithm for\(\mathrm{STP}^{R-} _\varepsilon\). Then there is a polynomial-time\(\alpha\)-approximation algorithm for the Steiner tree problem.

Proof

Given a Steiner tree instance (GRc), let \(\mathrm{opt}^{\mathrm{new}}\) be the cost of an optimal solution. We construct a \(\mathrm{STP}^{R-} _\varepsilon\) instance \(\left( G',R',c', \textsc{Opt}_\varepsilon ^{\mathrm{old}},t\right)\) from (GRc). We first compute a minimum spanning tree \({\tilde{T}}\) of G[R]. Note that G[R] is a complete graph since we assume c to be metric, and \(c({\tilde{T}}) \le 2 \mathrm{opt}^{\mathrm{new}}\), as shown by Takahashi and Matsuyama [32]; we assume w.l.o.g. that \(\alpha < 2\). We obtain \(G'\) by combining G and a new node t as follows. We set \(V(G') := V(G) \cup \{t\}\) and \(E(G') = E(G) \cup \{t,t'\}\) for a node \(t' \in R\). Then we obtain \(c'\) from c by setting \(c'(t,t') = c({\tilde{T}}) \cdot \max \{1,(1-\varepsilon )/\varepsilon \}\) and forming the metric closure.Footnote 5 We set \(R' = R \cup \{t\}\) and obtain a solution to \((G',R',c')\) by adding \(\{t,t'\}\) to \({\tilde{T}}\). We show later that the computed solution is \(\textsc{Opt}_\varepsilon ^{\mathrm{old}}\). Finally, we obtain the Steiner tree T by applying \({\mathscr{A}}\) to \(\left( G',R',c',\textsc{Opt}_\varepsilon ^{\mathrm{old}},t\right)\).

Observe that T cannot contain an edge incident to t, since all of those edges have at least the cost of \({\tilde{T}}\). Therefore T is a Steiner tree of (GRc). Conversely, all Steiner trees of (GRc) are feasible solutions to \(\left( G',R',c',\textsc{Opt}_\varepsilon ^{\mathrm{old}},t\right)\). We conclude that T provides an \(\alpha\) approximation, i.e., T is a feasible solution to (GRc) and \(c(T) \le \alpha \mathrm{opt}^{\mathrm{new}}\).

To finish the proof, we have to show that \(\textsc{Opt}_\varepsilon ^{\mathrm{old}}\) was a valid solution given to \({\mathscr{A}}\), i.e., its cost \(\mathrm{opt}^{\mathrm{old}}_\varepsilon\) is at most a factor \((1+\varepsilon )\) larger than optimum. Clearly, \(\textsc{Opt}_\varepsilon ^{\mathrm{old}}\) is a Steiner tree of \((G',R',c')\). Let \(\mathrm{opt}^{\mathrm{old}}\) be the cost of an optimal Steiner trees for \((G',R',c')\).

$$\begin{aligned} \frac{\mathrm{opt}^{\mathrm{old}}_\varepsilon }{\mathrm{opt}^{\mathrm{old}}} = \frac{c({\tilde{T}}) + c(t,t')}{\mathrm{opt}^{\mathrm{new}} + c(t,t')} \le \frac{ 2 \mathrm{opt}^{\mathrm{new}} + c(t,t')}{\mathrm{opt}^{\mathrm{new}} + c(t,t')} \le 1 + \frac{\mathrm{opt}^{\mathrm{new}}}{\mathrm{opt}^{\mathrm{new}} + \mathrm{opt}^{\mathrm{new}} \cdot \frac{1-\varepsilon }{\varepsilon }} = 1+\varepsilon . \end{aligned}$$

\(\square\)

For all remaining cases, DeclareSteiner profits from knowing \(\textsc{Opt}_\varepsilon ^{\mathrm{old}}\).

Theorem 2

Let\(\left( G,R,c,\textsc{Opt}_\varepsilon ^{\mathrm{old}},t\right)\)be an instance of\(\mathrm{STP}^{R-} _\varepsilon\)with\(\deg _{\textsc{Opt}^{\mathrm{old}} _\varepsilon }(t) \ge 2\)or\(\varepsilon =0\). Then, for an arbitrary\(\delta > 0\), DeclareSteineris an approximation algorithm for\(\mathrm{STP}^{R-} _\varepsilon\)with performance guarantee

$$\begin{aligned} \frac{(10\beta - 7 +2\varepsilon -2\varepsilon \beta )(1+\varepsilon )}{7\beta - 4 +5\varepsilon -2\varepsilon \beta } + O_{\beta ,\varepsilon }(\delta ). \end{aligned}$$

For the approximation ratio \(\beta = \ln (4) + \varepsilon ''\) from [25] with \(\varepsilon ''\) and \(\delta\) chosen sufficiently small, we obtain an approximation ratio of less than \(1.204 \cdot (1+\varepsilon )\).

4.1 Proof of Theorem 2

Since k is a constant, all steps of DeclareSteiner except for the call of Connect clearly run in polynomial time. To see that also the call of Connect does, observe that removing the edges and Steiner nodes of a full component increases the number of connected components by at most \(k-1\).

We continue with showing the claimed upper bound on the performance guarantee. Before we show the main result, we introduce two simplification steps. First, we show that we can restrict our attention to the case \(\deg (t) =2\) in \(\textsc{Opt}_{\varepsilon ,k}^{\mathrm{old}}\). Our analysis simultaneously gives a new proof for the previous best reoptimization result [14]. Subsequently we reduce the class of considered instances to those where all optimal solution to \((G,R {\setminus } \{t\},c)\) have a special structure.

We start with analyzing the case where \(\deg (t)=1\). If this case appears in the while loop, by our assumption we have \(\varepsilon = 0\) and thus \(\textsc{Opt}_\varepsilon ^{\mathrm{old}}\) is an optimal solution. The transformation of DeclareSteiner within the while loop reduces the instance to one where \(\deg (t) \ge 2\) [18]. When transforming the resulting solution \(\textsc{Opt}_\varepsilon ^{\mathrm{old}}\) to \(\textsc{Opt}_{\varepsilon ,k}^{\mathrm{old}}\), generally t could become a degree-one vertex. We use, however, that this is not the case when applying the algorithm of Borchers and Du [20]: The algorithm considers the full components separately, which implies that initially the degrees of all required vertices are one. Each full component is replaced by a graph where each required vertex has a degree of at least one. Consequently, the degree of no required vertex is decreased.

For the remaining proof, we assume \(\deg _{\textsc{Opt}_{\varepsilon ,k}^{\mathrm{old}}}(t) \ge 2\). We prove the following technical lemma, which is needed for our subsequent argumentation.

Lemma 3

There is a collection\({\mathscr{C}}\)of at most 3kfull components of\(\textsc{Opt}_k^{\mathrm{new}}\)such that\(F \cup {\mathscr{C}}\)is a connected graph.

Proof

Observe that F has less than 3k connected components, and each of them contains nodes from R. We use that the full components of \(\textsc{Opt}_k^{\mathrm{new}}\) only intersect in R. Since \(\textsc{Opt}_k^{\mathrm{new}}\) is connected, by the pigeonhole principle it has a full component C that contains required nodes from two distinct components of F. Thus adding C to F reduces the number of components. Now the claim follows inductively. \(\square\)

Let \(\alpha = c(T)/\mathrm{opt}^{\mathrm{new}} \ge 1\) be the performance ratio of DeclareSteiner. Thus, in the following we want to determine an upper bound on \(\alpha\). We may assume

$$\begin{aligned} \mathrm{opt}^{\mathrm{old}}_{\varepsilon ,k} \ge \alpha \mathrm{opt}^{\mathrm{new}} \end{aligned}$$
(2)

since otherwise, \(T_1\) already gives an approximation ratio better than \(\alpha\).

We define \(\gamma = c({\textsc{Connect}} (F)) - c(F)\), the cost to connect F. Let d be the number of full components removed from \(\textsc{Opt}_{\varepsilon ,k}^{\mathrm{old}}\) to obtain F, i.e., \(d \in \{2,3\}\).

Lemma 4

For an arbitrary\(\delta >0\), the performance ratio\(\alpha\)ofDeclareSteineris bounded from above by\(1 + \frac{\beta - 1 + \varepsilon (\beta -1)(d+1)}{1 + (\beta -1)d + \varepsilon } + O_{\beta ,\varepsilon }(\delta ).\)

Proof

We have \(c(C^t_1) + c(C^t_2) + c(C^t_3) \ge d\cdot c(C^t_1)\) assuming \(c(C^t_1) \le c(C^t_i)\) for \(i \le d\).

We determine the following constraints. Since \(C^t_1 + \textsc{Opt}^{\mathrm{new}}\) contains a feasible solution to (GRc),

$$\begin{aligned} \mathrm{opt}^{\mathrm{new}} + c(C^t_1) \ge \mathrm{opt}^{\mathrm{old}}. \end{aligned}$$
(3)

Furthermore,

$$\begin{aligned} \mathrm{opt}^{\mathrm{old}}_{\varepsilon ,k}- c(C^t_1) - c(C^t_2) - c(C^t_3) + \gamma \ge \alpha \mathrm{opt}^{\mathrm{new}} \end{aligned}$$
(4)

since \(c(T_2)\) is at most as large as the left hand side of (4).

We use (3) to replace \(\mathrm{opt}^{\mathrm{old}} _{\varepsilon ,k}\) in (2) to obtain

$$\begin{aligned} c(C^t_1) \ge \frac{\alpha - 1- \varepsilon }{(1 + \varepsilon ) (1 + \delta )}\mathrm{opt}^{\mathrm{new}}. \end{aligned}$$
(5)

By applying (3) and (5) to (4), we obtain

$$\begin{aligned} \gamma \ge \frac{d}{(1+\varepsilon )(1+\delta )} \cdot (\alpha - 1-\varepsilon ) \mathrm{opt}^{\mathrm{new}}. \end{aligned}$$
(6)

Finally, \(\zeta \ge \gamma /\mathrm{opt}^{\mathrm{new}}_k\), by Lemma 3. Therefore, due to Lemma 2,

$$\begin{aligned} (1+\delta ) \left( \beta - \beta \gamma /\mathrm{opt}^{\mathrm{new}}_k + \gamma /\mathrm{opt}^{\mathrm{new}}_k \right) \ge \alpha . \end{aligned}$$
(7)

Now the claim follows if we replace \(\gamma\) in (7) by the right hand side of (6), where we used that \(\beta \ge 1\). \(\square\)

We note that for \(d=2\) and \(\varepsilon = 0\), the upper bound on the performance guarantee due to Lemma 4 matches the previously best performance guarantee [14]. For \(d=3\), the value is better than the aimed-for value from Theorem 2. Observe that a straightforward extension of DeclareSteiner would allow us to consider values of d larger than three.

Due to Lemma 4, in the following we may assume that \(\deg (t) = 2\). Next, we analyze the structure of \(\textsc{Opt}_{\varepsilon ,k}^{\mathrm{old}}\) and \(\textsc{Opt}^{\mathrm{new}}\). Let \(R_1 = (R \cap V(C^t_1)){\setminus } \{t\}\) and \(R_2 = (R \cap V(C^t_2)){\setminus } \{t\}\). We partition F into forests \(F_1\) and \(F_2\) such that \(F_1\) contains exactly the trees T of F with \(V(T) \cap R_1 \ne \emptyset\) and \(F_2\) contains the remaining trees \(T'\), with \(V(T') \cap R_2 \ne \emptyset\) (see Fig. 1).

Fig. 1
figure 1

Structure of \(\textsc{Opt}_{\varepsilon ,k}^{\mathrm{old}}\). The paths \(P_1\) and \(P_2\) are drawn with thick lines

Let \(v_1 \in V(C^t_1)\) and \(v_2 \in V(C^t_2)\) such that \(e_1 = \{t,v_1\} \in E(C^t_1)\) and \(e_2 = \{t,v_2\} \in E(C^t_2)\). Let \(P_1\) be a minimum-cost path in \(\textsc{Opt}_{\varepsilon ,k}^{\mathrm{old}}\) from t to \(R_1\) and let \(P_2\) be a minimum-cost path in \(\textsc{Opt}_{\varepsilon ,k}^{\mathrm{old}}\) from t to \(R_2\). Observe that \(P_1\) contains \(e_1\) and that \(P_2\) contains \(e_2\). We define \(\kappa _1 := c(P_1)\), \(\kappa '_1 := c(e_1)\), and \(\kappa ''_1 = c(P_1) - c(e_1)\). Analogously, \(\kappa _2 := c(P_2)\), \(\kappa '_2 := c(e_2)\), and \(\kappa ''_2 = c(P_2) - c(e_2)\). Note that we do not exclude that \(v_1 \in R_1\) or \(v_2 \in R_2\). In this case \(\kappa ''_1\) resp. \(\kappa ''_2\) are zero.

To simplify the presentation, we define \(\kappa ' := (\kappa '_1 + \kappa '_2)/2\) and \(\kappa '' := (\kappa ''_1 + \kappa ''_2)/2\). Since \(P_1,P_2\) are minimum-cost paths, \(c(C^t_1) \ge \kappa '_1 + 2 \kappa ''_1\) and \(c(C^t_2) \ge \kappa '_2 + 2 \kappa ''_2\), which implies

$$\begin{aligned} c(C^t_1) + c(C^t_2) \ge 2 \kappa ' + 4 \kappa ''. \end{aligned}$$
(8)

We have \(\mathrm{opt}^{\mathrm{new}} + \kappa '_1 + \kappa ''_1 \ge \mathrm{opt}^{\mathrm{old}}\) and \(\mathrm{opt}^{\mathrm{new}} + \kappa '_2 + \kappa ''_2 \ge \mathrm{opt}^{\mathrm{old}}\). Therefore,

$$\begin{aligned} \mathrm{opt}^{\mathrm{new}} + \kappa ' + \kappa '' \ge \mathrm{opt}^{\mathrm{old}}. \end{aligned}$$
(9)

Lemma 5

Suppose there are at least two edge-disjoint paths in\(\textsc{Opt}_k^{\mathrm{new}}\)between\(V(F_1)\)and\(V(F_2)\). Then, for an arbitrary\(\delta > 0\), the performance guarantee ofDeclareSteineris bounded from above by\(\frac{(11\beta - 8)(1+\varepsilon )}{8\beta - 5 + 3\varepsilon } + O_{\beta ,\varepsilon }(\delta ).\)

Proof

Let \(P'\) and \(P''\) be two edge-disjoint paths within \(\textsc{Opt}_k^{\mathrm{new}}\) between \(V(F_1)\) and \(V(F_2)\) such that none of their internal nodes are in \(V(\textsc{Opt}_{\varepsilon ,k}^{\mathrm{old}})\). Without loss of generality, we assume that \(c(P') \le c(P'')\). Then, additionally to the previous constraints, we obtain the following.

$$\begin{aligned}&\mathrm{opt}^{\mathrm{old}}_{\varepsilon ,k}- 2 \kappa ' + c(P') = \mathrm{opt}^{\mathrm{old}}_{\varepsilon ,k}- \kappa '_1 - \kappa '_2 + c(P') \ge \alpha \mathrm{opt}^{\mathrm{new}} \end{aligned}$$
(10)
$$\begin{aligned}&\zeta \cdot \mathrm{opt}^{\mathrm{new}}_k \ge c(P') + c(P'') \ge 2c(P') \end{aligned}$$
(11)

From (9) and (10), we obtain

$$\begin{aligned} (1+\delta ) \cdot c(P') \ge (\alpha -1-\varepsilon ) \mathrm{opt}^{\mathrm{new}} + (1-\varepsilon )\kappa ' - (1+\varepsilon )\kappa '', \end{aligned}$$
(12)

and thus, due to (11) and (2),(9),

$$\begin{aligned} \zeta \mathrm{opt}^{\mathrm{new}}_k&\ge 2((\alpha -1-\varepsilon ) \mathrm{opt}^{\mathrm{new}} + (1-\varepsilon )\kappa ' - (1+\varepsilon )\kappa '')/(1+\delta ) \\ &\ge \frac{4}{(1+\varepsilon )(1+\delta )}(\alpha -1-\varepsilon )\mathrm{opt}^{\mathrm{new}}- 4\kappa ''. \end{aligned}$$
(13)

Furthermore, by using (8) and (9) in (4), we obtain

$$\begin{aligned} (1 + O(\delta ))\gamma \ge (\alpha -1-\varepsilon )\mathrm{opt}^{\mathrm{new}} + (1-\varepsilon )\kappa ' + (3-\varepsilon ) \kappa ''. \end{aligned}$$

and thus, due to (2) and (9) and the fact that \(\zeta \mathrm{opt}^{\mathrm{new}}_k \ge \gamma\),

$$\begin{aligned} (1 + O(\delta ))\zeta \mathrm{opt}^{\mathrm{new}}_k \ge \frac{2}{(1+\varepsilon )}(\alpha -1-\varepsilon ) \mathrm{opt}^{\mathrm{new}} + 2 \kappa ''. \end{aligned}$$
(14)

A linear combination of (13) and (14) with coefficients one and two gives \((1+O(\delta ))\zeta \ge \frac{8(\alpha -1-\varepsilon )}{3(1+\varepsilon )}\). Using (1) we obtain

$$\begin{aligned} \alpha \le \frac{(11\beta - 8)(1+\varepsilon )}{8\beta - 5 + 3\varepsilon } + O_{\beta ,\varepsilon }(\delta ). \end{aligned}$$

\(\square\)

Since the value obtained by Lemma 5 is better than the aimed-for ratio, from now on we can restrict our focus to instances where in \(\textsc{Opt}_k^{\mathrm{new}}\), there are no two edge-disjoint paths between \(F_1\) and \(F_2\). In particular, this means that there is exactly one full component L in \(\textsc{Opt}_k^{\mathrm{new}}\) that connects \(F_1\) and \(F_2\). Since we assumed that there are no Steiner nodes of degree two in \(\textsc{Opt}_k^{\mathrm{new}}\), there is exactly one edge \(e_L\) in L such that removing \(e_L\) leaves two connected components of \(\textsc{Opt}_k^{\mathrm{new}}\), one containing \(R_1\) and the other one containing \(R_2\). Let \(P_L\) be a minimum-cost path between \(V(F_1)\) and \(V(F_2)\) in L (and thus \(P_L\) clearly contains \(e_L\)). Let \(P^1_L\) be the subpath of \(P_L\) between \(F_1\) and \(e_L\) and let \(P^2_L\) be the subpath of \(P_L\) between \(F_2\) and \(e_L\). We define \(\lambda := c(P_L)\), \(\lambda ' := c(e_L)\), \(\lambda ''_1 := c(P^1_L)\), and \(\lambda ''_2 := c(P^2_L)\). Similar to above, we define \(\lambda '' := (\lambda ''_1 + \lambda ''_2)/2\). Note that \(\lambda - \lambda ' = 2 \lambda ''\). It follows easily that \(c(L) \ge \lambda ' + 4 \lambda ''\). Let \(L'\) be a forest with a minimum number of full components from \(\textsc{Opt}_k^{\mathrm{new}}\) such that \(\textsc{Opt}_{\varepsilon ,k}^{\mathrm{old}}- C_1^t - C_2^t + L'\) is connected. From Lemma 3, we obtain that \(L'\) contains at most 3k full components and thus we considered guessing \(L'\) when computing \(T_3\) in DeclareSteiner. We define \(\xi := c(L') - \lambda ' - 4\lambda ''\). Since \(L'\) contains L, \(\xi\) is non-negative.

To find an upper bound on the value of \(\alpha\), we maximize \(\alpha\) subject to the constraints (2), (9) and the following constraints.

By removing \(e_L\) from \(\textsc{Opt}_k^{\mathrm{new}}\) and adding the paths \(P_1\) and \(P_2\), we obtain a feasible solution to (GRc); conversely, by removing \(e_1\) and \(e_2\) from \(\textsc{Opt}_{\varepsilon ,k}^{\mathrm{old}}\) and adding \(P_L\), we obtain a feasible solution to \((G,R{\setminus }{t},c)\) that is considered in \(T_2\). Therefore

$$\begin{aligned} \mathrm{opt}^{\mathrm{new}}_k + 2 \kappa ' + 2 \kappa '' - \lambda '&\ge \mathrm{opt}^{\mathrm{old}}, \end{aligned}$$
(15)
$$\begin{aligned} \mathrm{opt}^{\mathrm{old}}_{\varepsilon ,k}- 2\kappa ' + \lambda ' + 2\lambda ''&\ge \alpha \mathrm{opt}^{\mathrm{new}}. \end{aligned}$$
(16)

In \(T_2\) we also consider to remove \(C_1^t, C_2^t\) completely and to add \(L'\). Therefore

$$\begin{aligned} \mathrm{opt}^{\mathrm{old}}_{\varepsilon ,k}- 2\kappa ' - 4\kappa '' + \lambda ' + 4 \lambda '' + \xi \ge \alpha \mathrm{opt}^{\mathrm{new}}. \end{aligned}$$
(17)

Due to Lemma 2, we may assume

$$\begin{aligned} \beta - \beta \zeta + \zeta \ge \alpha /(1+\delta ). \end{aligned}$$
(18)

In \(T_3\), one of the considered guesses is \(L'\) and therefore

$$\begin{aligned} \zeta \cdot \mathrm{opt}^{\mathrm{new}}_k \ge \lambda ' + 4 \lambda '' + \xi . \end{aligned}$$
(19)

We scale the values such that \(\mathrm{opt}^{\mathrm{new}} = 1\). Then we perform the following replacements. We replace \(\mathrm{opt}^{\mathrm{old}}\) in (9) and in (15) by using (2); we use (9) to replace \(\mathrm{opt}^{\mathrm{old}}\) in (16); we use (9) to replace \(\mathrm{opt}^{\mathrm{old}}\) in (17). We keep (18) and (19). This way we obtain a linear program that maximizes \(\alpha\) subject to the following constraints, where we ignore the dependence on \(\delta\).

$$\begin{aligned} \begin{array}{rrrl} &{}&{} - \kappa ' - \kappa '' +\alpha /(1+\varepsilon ) &{}\le 1\\ &{}&{}- 2\kappa ' - 2\kappa '' + \lambda ' +\alpha /(1+\varepsilon ) &{}\le 1\\ &{}&{} (1-\varepsilon )\kappa ' - (1+\varepsilon )\kappa '' - \lambda ' - 2\lambda '' +\alpha &{}\le 1+\varepsilon \\ &{}&{} (1-\varepsilon )\kappa ' + (3-\varepsilon )\kappa '' - \lambda ' - 4\lambda '' - \xi +\alpha &{}\le 1+\varepsilon \\ &{}&{}(\beta -1) \zeta +\alpha &{}\le \beta \\ &{}&{}\lambda ' + 4\lambda '' + \xi - \zeta &{}\le 0 \end{array} \end{aligned}$$

Now we obtain the dual linear program

$$\begin{aligned} \begin{array}{rrrl} {\hbox {minimize}}\quad &{}&{} y_1 + y_2 + (1+\varepsilon )y_3 + (1+\varepsilon )y_4 + \beta y_5 &{} \\ {\hbox {s.t.:}}\quad &{}&{} - y_1 - 2 y_2 + (1-\varepsilon )y_3 + (1-\varepsilon ) y_4 &{} \ge 0\\ &{}&{} - y_1 - 2 y_2 - (1+\varepsilon )y_3 + (3-\varepsilon ) y_4 &{} \ge 0\\ &{}&{} y_2 - y_3 - y_4 + y_6 &{} \ge 0\\ &{}&{} - 2 y_3 - 4 y_4 + 4 y_6 &{} \ge 0\\ &{}&{} - y_4 + y_6 &{} \ge 0\\ &{}&{} (\beta -1) y_5 - y_6 &{} \ge 0\\ &{}&{} y_1/(1+\varepsilon ) + y_2/(1+\varepsilon ) + y_3 + y_4 + y_5 &{} \ge 1 \end{array} \end{aligned}$$

To finish the proof, we consider the following feasible solution. We set

$$\begin{aligned} \begin{array}{ll} y_1 = \frac{2(\beta -1)(1+\varepsilon )(1-2\varepsilon )}{7\beta -4+5\varepsilon -2\varepsilon \beta };&{}\quad y_2 = y_1/2;\\ y_3 = y_1/(1-2\varepsilon );&{}\quad y_4 = y_1/(1-2\varepsilon );\\ y_5 = \frac{3(1+\varepsilon )(1-2\varepsilon )}{(1-2\varepsilon )(7\beta -4+5\varepsilon -2\varepsilon \beta )};&{}\quad y_6 = \frac{3y_1}{2(1-2\varepsilon )}. \end{array} \end{aligned}$$

With these values, the objective function value matches the claimed value in Theorem 2. By weak duality, we obtained an upper bound on the value of \(\alpha\) in the primal linear program, which finishes the proof.

5 A Steiner Node Becomes a Required Node

In this section, instead of removing nodes from R, we consider the problem to add nodes to R, i.e., we declare a Steiner node to be a required node. Formally the problem \(\mathrm{STP}^{R+} _\varepsilon\) is defined as follows.

Given::

A parameter \(\varepsilon > 0\), a Steiner tree instance (GRc), a solution \(\textsc{Opt}_\varepsilon ^{\mathrm{old}}\) to (GRc) such that \(\mathrm{opt}^{\mathrm{old}}_\varepsilon \le (1+\varepsilon )\mathrm{opt}^{\mathrm{old}}\), and a Steiner node \(t \in V(G){\setminus } R\).

Solution::

A Steiner tree solution to \((G,R\cup \{t\},c)\).

figure d

Unlike in the case of terminal removal, in the following theorem we may allow \(\textsc{Opt}_\varepsilon ^{\mathrm{old}}\) with \(\varepsilon > 0\) without any exceptions.

Theorem 3

Let\(\left( G,R,c,\textsc{Opt}_\varepsilon ^{\mathrm{old}},t\right)\)be an instance of\(\mathrm{STP}^{R+} _\varepsilon\). Then, for an arbitrary\(\delta >0\), DeclareRequiredis a\(\left( \frac{ (10 + 7 \varepsilon )\beta - 7 \cdot (1+\varepsilon )}{7\beta - 4} + O_{\beta ,\varepsilon }(\delta ) \right)\)-approximation algorithm for\(\mathrm{STP}^{R+} _\varepsilon\).

5.1 Proof of Theorem 3

We prove the theorem in three steps, according to the degree of t in \(\textsc{Opt}_k^{\mathrm{new}}\).

Let us first assume that \(\deg (t)=1\). Then there is a well defined edge \(\{t,t'\}\) in \(\textsc{Opt}_k^{\mathrm{new}}\). Thus we may solve \((G,R,c,\textsc{Opt}_\varepsilon ^{\mathrm{old}},t')\) and add \(\{t,t'\}\) afterwards if t is not included. If \(t' \in R\), \(\textsc{Opt}_\varepsilon ^{\mathrm{old}}\) is good enough already. Otherwise \(\deg (t') \ge 2\) in the k-restricted optimal solution to \((G,R,c,\textsc{Opt}_\varepsilon ^{\mathrm{old}},t')\) that we obtain from \(\textsc{Opt}_k^{\mathrm{new}}\) by removing t. Adding \(\{t,t'\}\) after obtaining a solution to \((G,R,c,\textsc{Opt}_\varepsilon ^{\mathrm{old}},t')\) does not increase the approximation ratio since both the computed and the optimal solution are increased by the same amount. Note that in DeclareRequired, the transformation is implicitly contained. If \(t' \in R\), \(T_1\) provides a \((1+\varepsilon )\)-approximation. Since for both instances we consider the same full components C, \(T_2\) is at most as large as the solution obtained for \((G,R,c,\textsc{Opt}_\varepsilon ^{\mathrm{old}},t')\) together with \(\{t,t'\}\). In \(T_3\), we implicitly considered \(\deg (t)=1\) by choosing \(k+1\) as parameter, whereas k is sufficient for the remaining proof. Therefore, in the following we assume \(\deg (t) \ge 2\).

For the remaining proof where \(\deg (t) \ge 2\) in \(\textsc{Opt}_k^{\mathrm{new}}\), we introduce the following notation. Let us fix a close-to-optimal solution \(\textsc{Opt}_k^{\mathrm{new}}\) to \((G,R \cup \{t\},c)\).

We consider t as the root of \(\textsc{Opt}_k^{\mathrm{new}}\) and fix two subtrees \(F_1\) and \(F_2\) such that there is a full component L of \(\textsc{Opt}_\varepsilon ^{\mathrm{old}}\) with \(V(L) \cap V(F_1) \ne \emptyset\) and \(V(L \cap V(F_2) \ne \emptyset\). Thus L connects \(F_1\) and \(F_2\). We define \(\lambda = c(L)\). The trees \(F_1\) and \(F_2\) exist, because \(\textsc{Opt}_\varepsilon ^{\mathrm{old}}\) is a connected graph. Let us now consider the graph \(H = F_1 \cup F_2 \cup L\). Note that since nodes not in R have a degree of at least three, there is at most one edge \(e_L\) in L that is a cut edge of H. If \(e_L\) exists, we set \(\lambda ' = c(e_L)\); otherwise, \(\lambda ' = 0\). If there are more than one components of \(\textsc{Opt}_\varepsilon ^{\mathrm{old}}\) connecting \(F_1\) and \(F_2\), we change the names such that \(\lambda '\) is minimal.

We set \(R_1 := R \cap V(F_1)\) and \(R_2 := R \cap V(F_2)\). Then \(\rho := \min \{c(\{v_1,v_2\}) : v_1 \in R_1, v_2 \in R_2\}\). We define \(p_1 = \min \{c(\{r,t\}) : r \in R_1\}\), \(p_2 = \min \{c(\{r,t\}) : r \in R_2\}\), and \(p := \min \{c(\{r,t\}) : r \in R\}\). Furthermore, let \(P_1\) and \(P_2\) be the minimum-cost paths from t to \(R_1\) resp. \(R_2\) in \(\textsc{Opt}_k^{\mathrm{new}}\). Let \(e_1\) and \(e_2\) be the edges of \(P_1\) resp. \(P_2\) incident to t. We define, for \(i \in \{1,2\}\), \(p'_i := c(e_i)\) and \(p_i'':= c(P_i) - p'_i\). Then \(p' := (p'_1 + p'_2)/2\) and \(p'' := (p_1'' + p''_2)/2\). In particular,

$$\begin{aligned}&p \le p' + p''. \end{aligned}$$
(20)
$$\begin{aligned}&p_1+p_2 \le 2(p' + p''). \end{aligned}$$
(21)

Before we continue with the second case, let us state two general constraints. Since \(\textsc{Opt}^{\mathrm{new}}\) is a feasible solution to (GR), we have

$$\begin{aligned} \mathrm{opt}^{\mathrm{new}} \ge \mathrm{opt}^{\mathrm{old}}. \end{aligned}$$
(22)

We get

$$\begin{aligned} \mathrm{opt}^{\mathrm{old}}_\varepsilon + p \ge \alpha \mathrm{opt}^{\mathrm{new}}, \end{aligned}$$
(23)

since otherwise \(T_1\) is a good enough solution. The constraints (22) and (23) imply

$$\begin{aligned} p \ge (\alpha -1-\varepsilon ) \mathrm{opt}^{\mathrm{new}}. \end{aligned}$$
(24)

Next we reduce the problem to \(\deg (t)=2\).

Lemma 6

For an arbitrary\(\delta > 0\), DeclareRequiredis a\(\bigl (\frac{4\beta -3 + (3\beta -3)\varepsilon }{3\beta -2} + O_{\beta ,\varepsilon }(\delta ) \bigr )\)-approximation algorithm for instances\((G,R,c,\textsc{Opt}_\varepsilon ^{\mathrm{old}},t)\)with\(\deg (t) > 2\)in\(\textsc{Opt}_k^{\mathrm{new}}\).

Proof

By definition of p, we conclude that \(\zeta \mathrm{opt}^{\mathrm{new}}_k \ge 3 p\). Using (24), we conclude that \((1+\delta )\zeta \ge 3(\alpha -1-\varepsilon )\). Therefore, by (1), we obtain the claimed result. \(\square\)

For the last case where \(\deg (t)=2\), we obtain the following additional constraints. Since L contains a path between \(R_1\) and \(R_2\) of length at least \(\rho\), and \(e_L\) is the only cut edge (if there is any).

$$\begin{aligned} \lambda \ge 2\cdot \rho - \lambda ' \end{aligned}$$
(25)

In other words, if we double \(e_L\) then there are two edge-disjoint paths between \(R_1\) and \(R_2\) in \(\textsc{Opt}_k^{\mathrm{new}}\). Furthermore,

$$\begin{aligned} \mathrm{opt}^{\mathrm{new}}_k- 2p' + \rho \ge \mathrm{opt}^{\mathrm{old}} \end{aligned}$$
(26)

since adding a direct edge between \(F_1\) and \(F_2\) reconnects the graph after removing \(e_1\) and \(e_2\). From (23) and (26), we obtain

$$\begin{aligned} (1+\delta )p \ge (\alpha -1-\varepsilon )\mathrm{opt}^{\mathrm{new}} + (1+\varepsilon )(2p' - \rho ). \end{aligned}$$
(27)

To get a feasible solution to \((G,R\cup \{t\},c)\), we can remove \(e_L\) from L (if \(e_L\) exists) and connect the graph again by adding minimum-cost edges from \(R_1\) and \(R_2\) to t. Therefore \(T_2\) is good enough unless

$$\begin{aligned} \mathrm{opt}^{\mathrm{old}}_{\varepsilon ,k}- \lambda ' + p_1+p_2 \ge \alpha \mathrm{opt}^{\mathrm{new}}. \end{aligned}$$
(28)

We obtain the following constraint from (22) and (28).

$$\begin{aligned} p_1+p_2 \ge (\alpha -1-\varepsilon )\mathrm{opt}^{\mathrm{new}}/(1+\delta ) + \lambda '. \end{aligned}$$
(29)

Finally, in \(T_3\) we guess a collection of trees that combine the connected components of \(\textsc{Opt}_{\varepsilon ,k}^{\mathrm{old}}- L\), and therefore

$$\begin{aligned} \zeta \mathrm{opt}^{\mathrm{new}}_k \ge \lambda . \end{aligned}$$
(30)

Also from \(T_3\) we obtain

$$\begin{aligned} \zeta \mathrm{opt}^{\mathrm{new}}_k \ge 2p' + 4 p'' \ge 2p + 2 p''. \end{aligned}$$
(31)

From (25) and (30) we obtain

$$\begin{aligned} \zeta \mathrm{opt}^{\mathrm{new}}_k \ge 2\rho -\lambda '. \end{aligned}$$
(32)

From (21), (29), (32), we obtain

$$\begin{aligned} \rho /O_{\varepsilon }(1+\delta ) \le p ' + p'' + (\zeta +1 - \alpha + \varepsilon )\mathrm{opt}^{\mathrm{new}}/2. \end{aligned}$$
(33)

Then from (20), (27), (33) we obtain

$$\begin{aligned} (1+\varepsilon )(1+O_\varepsilon (\delta )) p'' \ge ( \alpha (3+\varepsilon ) - (3+\varepsilon )(1+\varepsilon ) - \zeta (1+\varepsilon )) \mathrm{opt}^{\mathrm{new}}/4 + \varepsilon p/2. \end{aligned}$$
(34)

From (34), together with (24) and (31), we get \((1 + O_{\varepsilon }(\delta ))\zeta \ge 7(\alpha -1-\varepsilon )/3\). Therefore applying (1) finishes the proof.

6 Increased Edge Cost

We now consider the reoptimization variant where the edge cost of one edge is increased, \(\mathrm{STP}^{E+} _\varepsilon\). If e is the edge of G with increased cost, we define \(c^{\mathrm{new}} :E(G) \rightarrow {\mathbb{R}}_{\ge 0}\) as \(c^{\mathrm{new}} (e') = c(e')\) for all edges \(e' \in E(G){\setminus } \{e\}\) and \(c^{\mathrm{new}} (e)\) is the increased cost. Then the formal definition of the reoptimization variant is as follows.

Given::

A parameter \(\varepsilon > 0\), a Steiner tree instance (GRc), a solution \(\textsc{Opt}_\varepsilon ^{\mathrm{old}}\) to (GRc) such that \(\mathrm{opt}^{\mathrm{old}}_\varepsilon \le (1+\varepsilon )\mathrm{opt}^{\mathrm{old}}\), and a cost \(c^{\mathrm{new}} (e) \ge c(e)\) for an edge \(e \in E(G)\).

Solution::

A Steiner tree solution to \((G,R,c^{\mathrm{new}})\).

Observe that the cost function obtained after applying the local modification in general is not a metric, and \(\textsc{Opt}_{\varepsilon ,k}^{\mathrm{new}}\) is assumed to live in the metric closure according to the new cost function.

figure e

Theorem 4

Let\(\left( G,R,c,\textsc{Opt}_\varepsilon ^{\mathrm{old}},e,c^{\mathrm{new}} (e)\right)\)be an instance of\(\mathrm{STP}^{E+} _\varepsilon\). Then, for an arbitrary\(\delta > 0\), EdgeIncreaseis a\(\bigl (\frac{ 7\beta - 4 +\varepsilon (4\beta -4)}{4\beta - 1} + O_{\beta ,\varepsilon }(\delta \bigr )\)-approximation algorithm for\(\mathrm{STP}^{E+} _\varepsilon\).

Proof

Let us introduce the following notation. To emphasize which of the two instances we consider, we write \(c^{\mathrm{old}} (e)\) instead of c(e), where e is the edge with increased cost. We assume that \(e \in E(\textsc{Opt}_{\varepsilon ,k}^{\mathrm{old}})\), as otherwise \(T_1\) would be good enough already. Therefore the graph \(\textsc{Opt}_{\varepsilon ,k}^{\mathrm{old}}- e\) has exactly two connected components \(F_1\) and \(F_2\). Similar to the previous proof, we define \(R_1 := R \cap V(F_1)\) and \(R_2 := R \cap V(F_2)\).

In \(\textsc{Opt}_{\varepsilon ,k}^{\mathrm{old}}\), let K be the full component that contains e. Let P be a minimum-cost path from \(R_1\) to \(R_2\) within K. Then we set \(\kappa := c(P) - c^{\mathrm{old}} (e)\).

In \(\textsc{Opt}_k^{\mathrm{new}}\), there is a full component L of cost \(\lambda\) such that V(L) contains nodes from both \(R_1\) and \(R_2\). If L has two edge-disjoint paths between \(R_1\) and \(R_2\), we define \(\lambda ' = 0\). Otherwise there is an edge \(e_L \in E(L)\) such that \(e_L\) is a cut edge in \(F_1 \cup F_2 \cup L\), and \(\lambda ' := c(e_L)\). We obtain the following inequalities, where as before \(\alpha = c(T)/\mathrm{opt}^{\mathrm{new}}\).

Removing e and adding a shortest path between \(R_1\) and \(R_2\) within L gives a feasible solution to \((G,R,c^{\mathrm{new}})\). Therefore \(T_2\) is good enough unless

$$\begin{aligned} \mathrm{opt}^{\mathrm{old}}_{\varepsilon ,k}- c^{\mathrm{old}} (e) + \lambda /2 + \lambda '/2 \ge \alpha \mathrm{opt}^{\mathrm{new}}. \end{aligned}$$
(35)

One feasible solution to the original instance is to remove \(e_L\) and to add P. Therefore we obtain

$$\begin{aligned} \mathrm{opt}^{\mathrm{new}}_k- \lambda ' + c^{\mathrm{old}} (e) + \kappa \ge \mathrm{opt}^{\mathrm{old}}. \end{aligned}$$
(36)

From (35) and (36), we obtain

$$\begin{aligned} (1+\varepsilon )(1+\delta )\kappa \ge (\alpha -1-\varepsilon )\mathrm{opt}^{\mathrm{new}} + \varepsilon \lambda ' + \lambda '/2 - \lambda /2. \end{aligned}$$
(37)

Since clearly \(\mathrm{opt}^{\mathrm{new}} \ge \mathrm{opt}^{\mathrm{old}}\), (35) implies

$$\begin{aligned} \lambda ' \ge 2(\alpha -1-\varepsilon )\mathrm{opt}^{\mathrm{new}}_{\varepsilon ,k}- \lambda . \end{aligned}$$
(38)

In (37) and (38), we have used that \(c^{\mathrm{old}} (e) \ge 0\) and therefore it can be omitted.

We obtain an additional constraint by observing that in addition to using \(e_L\), within \(\textsc{Opt}_k^{\mathrm{new}}\) the required vertices of K have to be connected. Let \(K_1\) be the tree of \(K - e\) that contains \(R_1 \cap V(K)\). We see \(K_1\) as a rooted tree with the root \(r_1\) contained in \(e=\{r_1,r_2\}\). Let us fix any two vertices \(u \ne u' \in V(K_1) {\setminus } \{r\}\), with parents \(v,v'\). Then the minimum distance between the two subtrees rooted at \(u,u'\) is at least \(\max \{c(u,v),c(u',v')\}\). The same argumentation holds for \(K_2\), which we define analogous to \(K_1\) (it contains \(R_2 \cap V(K)\), and has the root \(r_2\)). By traversing a path from \(V(K_1) \cap R_1\) to \(r_1\) within \(K_1\) and from \(V(K_2) \cap R_2\) to \(r_2\), and adding the distances, we conclude that there is a collection of at most k full components in \(\textsc{Opt}_k^{\mathrm{new}}\) that without counting \(e_L\) have a total cost of at least \(\kappa\). Therefore, using \(T_2\),

$$\begin{aligned} \zeta \mathrm{opt}^{\mathrm{new}}_k \ge \lambda ' + \kappa , \end{aligned}$$

which due to (37) implies

$$\begin{aligned} (1+\varepsilon )(1+\delta )\zeta \mathrm{opt}^{\mathrm{new}}_k \ge (\alpha -1-\varepsilon )\mathrm{opt}^{\mathrm{new}}_{\varepsilon ,k} + ((3+4\varepsilon )/2)\lambda ' - \lambda /2, \end{aligned}$$

and with (38) we obtain

$$\begin{aligned} (1+\delta )\zeta \mathrm{opt}^{\mathrm{new}}_k \ge 4(\alpha -1-\varepsilon )\mathrm{opt}^{\mathrm{new}}_{\varepsilon ,k}- 2 \lambda . \end{aligned}$$
(39)

By definition of \(T_2\),

$$\begin{aligned} \zeta \mathrm{opt}^{\mathrm{new}}_k \ge \lambda . \end{aligned}$$
(40)

The value \(\zeta\) is minimized subject to the constraints (39) and (40) if

$$\begin{aligned} \lambda = 4(\alpha -1-\varepsilon )/3. \end{aligned}$$

Now the claim follows from (1). \(\square\)

7 Decreased Edge Cost

We consider the reoptimization variant where the edge cost of one edge is decreased, \(\mathrm{STP}^{E-} _\varepsilon\). Similar to the previous section, if e is the edge of G with decreased cost, we define \(c^{\mathrm{new}} :E(G) \rightarrow {\mathbb{R}}_{\ge 0}\) as \(c^{\mathrm{new}} (e') = c(e')\) for all edges \(e' \in E(G){\setminus } \{e\}\) and \(c^{\mathrm{new}} (e)\) is the decreased cost. Then the formal definition of the reoptimization variant is as follows.

Given::

A parameter \(\varepsilon > 0\), a Steiner tree instance (GRc), a solution \(\textsc{Opt}_\varepsilon ^{\mathrm{old}}\) to (GRc) such that \(\mathrm{opt}^{\mathrm{old}}_\varepsilon \le (1+\varepsilon )\mathrm{opt}^{\mathrm{old}}\), and a cost \(c^{\mathrm{new}} (e) \le c(e)\) for an edge \(e \in E(G)\).

Solution::

A Steiner tree solution to \((G,R,c^{\mathrm{new}})\).

We show that decreasing the edge cost does not allow for a robust reoptimization better than STP approximation, similar to the case considered in Theorem 1. The proof of the following theorem is analogous to the proof of Theorem 1.

Theorem 5

For an arbitrary\(\varepsilon > 0\), let\({\mathscr{A}}\)be a polynomial-time\(\alpha\)-approximation algorithm for\(\mathrm{STP}^{E-} _\varepsilon\). Then there is a polynomial-time\(\alpha\)-approximation algorithm for the Steiner tree problem.

Proof

Given a Steiner tree instance (GRc), we construct a \(\mathrm{STP}^{E-} _\varepsilon\) instance \((G', R',c', e, c^{\mathrm{new}} (e))\). We first compute a minimum spanning tree \({\tilde{T}}\) of G[R]. As in the proof of Theorem 1, G[R] is a complete graph since w.l.o.g. we assume c to be metric, and \(c({\tilde{T}}) \le 2 \mathrm{opt}^{\mathrm{new}}\), as shown by Takahashi and Matsuyama [32]. Again, we assume w.l.o.g. that \(\alpha < 2\).

We obtain \(G'\) by combining G and a new node t as follows. We set \(V(G') := V(G) \cup \{t\}\) and \(E(G') = E(G) \cup \{t,t'\}\) for a node \(t' \in R\). Then we obtain \(c'\) from c by setting \(c'(t,t') = c({\tilde{T}}) \cdot \max \{1,(1-\varepsilon )/\varepsilon \}\) and forming the metric closure. We set \(R' = R \cup \{t\}\) and obtain \(\textsc{Opt}_\varepsilon ^{\mathrm{old}}\) by adding \(\{t,t'\}\) to \({\tilde{T}}\). Finally, we obtain the Steiner tree T by applying \({\mathscr{A}}\) to \((G',R',c',\{t,t'\},0)\).

Observe that reducing the cost in this case does not influence any edge costs in \(G'\) except for those edges incident to t. Therefore the new instance is equivalent to (GR).

To finish the proof, we have to show that \(\textsc{Opt}_\varepsilon ^{\mathrm{old}}\) was a valid solution given to \({\mathscr{A}}\), i.e., \(\mathrm{opt}^{\mathrm{old}}_\varepsilon\) is at most a factor \((1+\varepsilon )\) larger than optimum. This step is identical with the corresponding step in the proof of Theorem 1. \(\square\)

8 Changing the Node Set

Finally, we consider the local modifications where we remove nodes from the graph or add nodes to the graph. The results of this section are much simpler than the results of the previous sections and we sketch them for completeness, without formal definitions of the considered reoptimization problems.

Removing a required node or a Steiner node gives a reoptimization problem that is as hard as the original Steiner tree problem [17]. The idea is that if (GRc) is a Steiner tree instance that we want to solve, then we add a node t that has cost zero edges to all nodes in G, and therefore there is a trivial optimal Steiner tree of cost zero. Removing t, however, leaves us with the original problem instance; in this case the hardness does not even depend on the robustness, the problem is hard even if we are given an optimal solution.

Adding a node is at least as hard as decreasing the edge cost. If a Steiner node t is added, this is straightforward: if we want to decrease the cost of \(e=\{u,v\}\) in a Steiner tree instance (GRc), we add a Steiner node \(v'\) with \(c(v,v')=0\), \(c(u,v')\) the reduced cost, and \(c(v',w) = c(v,w)\) for all other \(w \in V(G)\).

If a required node t is added, we have to consider an additional step. Observe that decreasing the cost of \(e=\{u,v\}\) can only have an impact, if it is contained in all optimal solutions to the modified problem, as otherwise keeping the given solution is close to optimal. Therefore we can solve \(\mathrm{STP}^{E-} _\varepsilon\) by taking the best of the following two solutions: we either keep the given old optimal solution or we reduces the edge cost analogous to the case where t is a Steiner node.