Skip to main content
Log in

A practical greedy approximation for the directed Steiner tree problem

  • Published:
Journal of Combinatorial Optimization Aims and scope Submit manuscript

Abstract

The directed Steiner tree (DST) NP-hard problem asks, considering a directed weighted graph with n nodes and m arcs, a node r called root and a set of k nodes X called terminals, for a minimum cost directed tree rooted at r spanning X. The best known polynomial approximation ratio for DST is a \(O(k^\varepsilon )\)-approximation greedy algorithm. However, a much faster k-approximation, returning the shortest paths from r to X, is generally used in practice. We give two new algorithms : a fast k-approximation called Greedy\(_\text {FLAC}\) running in \(O(m \log (n)k + \min (m, nk)nk^2)\) and a \(O(\sqrt{k})\)-approximation called Greedy\(_\text {FLAC}^\triangleright \) running in \(O(nm + n^2 \log (n)k +n^2 k^3)\). We provide computational results to show that, Greedy\(_\text {FLAC}\) rivals in practice with the running time of the fast k-approximation and returns solution with smaller cost in practice.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12

Similar content being viewed by others

Notes

  1. The four algorithms were run with Java 1.7.0_025 on Ubuntu 12.10 with Intel Core 3.10 GHz processors. The code source can be found at https://github.com/mouton5000/DSTAlgoEvaluation.

References

  • Byrka J, Grandoni F, Rothvoss T, Sanità L (2013) Steiner tree approximation via iterative randomized rounding. JACM 60(1):1–33

    Article  MathSciNet  MATH  Google Scholar 

  • Charikar M, Chekuri C, Cheung T-Y, Dai Z, Goel A, Guha S, Li M (1999) Approximation algorithms for directed Steiner problems. J Algorithm 33(1):73–91

    Article  MathSciNet  MATH  Google Scholar 

  • Cheng X, Du D-Z (2001) Steiner trees in industry, vol 11. Springer, New York

    MATH  Google Scholar 

  • Chimani M, Woste M (2011) Contraction-based Steiner tree approximations in practice. In: Algorithms and computation, Springer, New York, pp 40–49

  • Chvatal V (1979) A greedy heuristic for the set-covering problem. Math Oper Res 4(3):233–235

    Article  MathSciNet  MATH  Google Scholar 

  • de Aragão MP, Uchoa E, Werneck RF (2001) Dual heuristics on the exact solution of large Steiner problems. Electron Notes Discret Math 7:150–153

    Article  MathSciNet  MATH  Google Scholar 

  • Drummond L, Santos M, Uchoa E (2009) A distributed dual ascent algorithm for Steiner problems in multicast routing. Networks 53(2):170–183

    Article  MathSciNet  MATH  Google Scholar 

  • Feige U (1998) A threshold of ln n for approximating set cover. JACM 45(4):634–652

    Article  MathSciNet  MATH  Google Scholar 

  • Floyd R (1962) Algorithm 97: shortest path. Commun ACM 5(6):345

    Article  Google Scholar 

  • Gundecha P, Feng Z, Liu H (2013) Seeking provenance of information using social media. In: Proceedings of the 22nd ACM international conference on conference on information & knowledge management, ACM, New York, pp 1691–1696

  • Halperin E, Krauthgamer R (2003) Polylogarithmic inapproximability. In: Proceedings of the thirty-fifth annual ACM symposium on theory of computing, pp 585–594

  • Helvig CS, Robins G, Zelikovsky A (2001) An improved approximation scheme for the group Steiner problem. Networks 37(1):8–20

    Article  MathSciNet  MATH  Google Scholar 

  • Hsieh M-I, Wu EH-K, Tsai M-F (2006) Fasterdsp: a faster approximation algorithm for directed Steiner tree problem. J Inf Sci Eng 22:1409–1425

    MathSciNet  Google Scholar 

  • Johnson DS (1973) Approximation algorithms for combinatorial problems. In: Proceedings of the fifth annual ACM symposium on theory of computing, pp 38–49

  • Karp RM (1972) Reducibility among combinatorial problems. Springer, New York

    Book  MATH  Google Scholar 

  • Koch T, Martin A, Voß S (2001) SteinLib: an updated library on Steiner tree problems in graphs. Springer, New York

    Google Scholar 

  • Kou L, Markowsky G, Berman L (1981) A fast algorithm for Steiner trees. Acta inform 15(2):141–145

    Article  MathSciNet  MATH  Google Scholar 

  • Lappas T, Terzi E, Gunopulos D, Mannila H (2010) Finding effectors in social networks. In: Proceedings of the 16th ACM SIGKDD international conference on Knowledge discovery and data mining, ACM, New York, pp 1059–1068

  • Novak R, Rugelj J, Kandus G (2001) A note on distributed multicast routing in point-to-point networks. Comput Oper Res 28(12):1149–1164

    Article  MathSciNet  MATH  Google Scholar 

  • Olsson P-M, Kvarnstrom J, Doherty P, Burdakov O, Holmberg K (2010) Generating uav communication networks for monitoring and surveillance. In: 11th international conference on control, automation robotics & vision (ICARCV), IEEE, p 1070–1077

  • Stanojevic M, Vujosevic M (2006) An exact algorithm for Steiner tree problem on graphs. Int J Comput Commun Control 1(1):41–46

    Article  Google Scholar 

  • Uchoa E, Werneck RFF (2010) Fast local search for Steiner trees in graphs. In: ALENEX, SIAM, 10:1–10

  • Voß S (2006) Steiner tree problems in telecommunications. In: Handbook of optimization in telecommunications, Springer, New York, pp 459–492

  • Watel D, Weisser M-A (2014) A practical greedy approximation for the Directed Steiner Tree problem. In: Combinatorial Optimization and Applications, vol 8881, Lecture notes in computer science, pp 200–215

  • Wong RT (1984) A dual ascent approach for Steiner tree problems on a directed graph. Math Program 28(3):271–287

    Article  MathSciNet  MATH  Google Scholar 

  • Zelikovsky A (1997) A series of approximation algorithms for the acyclic directed Steiner tree problem. Algorithmica 18(1):99–110

    Article  MathSciNet  MATH  Google Scholar 

  • Zelikovsky AZ (1993) An 11/6-approximation algorithm for the network Steiner problem. Algorithmica 9(5):463–470

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgments

The authors would like to thank the anonymous reviewer for his valuable comments and suggestions to improve the quality of the paper.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Dimitri Watel.

Additional information

This is an extended version of Watel and Weisser (2014).

Appendix: Correctness of the second implementaiton of Greedy\(_\text {FLAC}^\triangleright \)

Appendix: Correctness of the second implementaiton of Greedy\(_\text {FLAC}^\triangleright \)

This appendix is dedicated to the complete proof the result given in Sect. 5.3 where a second implementation of Greedy\(_\text {FLAC}^\triangleright \) is given. We want to prove this implementation returns the same tree than the first one which uses Algorithm 1.

We assume that no arc of \({\mathcal {I}}^\triangleright \) has a weight equal to 0. Note that, if some arcs have a weight equal to 0, the tree \(T_0\) returned by the first iteration of the two versions will have the same density but may not be equal. As a result, the greedy algorithms may return two different trees, although the \(O(\sqrt{k})\)-approximation ratio remains true for the two algorithms.

The main idea of this proof is that if the arc (uv) is saturated, then \(\bar{\omega }^\triangleright (u,v) = \omega ^\triangleright (u,v)\). Otherwise, the quantity of flow inside (uv) is lower than \(\omega ^\triangleright (u,v)\).

We prove by induction that, during the j-th iteration of the while loop of Greedy\(_\text {FLAC}\) (the line 2 of Algorithm 2), at the beginning of the i-th iteration of the while loop of FLAC (the line 8 of Algorithm 12), the state of the two versions of Greedy\(_\text {FLAC}^\triangleright \) is the same, except for the costs of the arcs.

We refer to the first version, which works with the constant costs \(\omega ^\triangleright \), as Greedy\(_\text {FLAC}^\triangleright \)1, and to the second version, working with the dynamic costs \(\bar{\omega }^\triangleright \), as Greedy\(_\text {FLAC}^\triangleright \)2. Those algorithms respectively runs Greedy\(_\text {FLAC}\)1 and FLAC1, and Greedy\(_\text {FLAC}\)2 and FLAC2. In order to differ the same variables of Greedy\(_\text {FLAC}^\triangleright \)1 and Greedy\(_\text {FLAC}^\triangleright \)2, we add an exponent 1 or 2 to the variable. For example the current elapsed time t of Greedy\(_\text {FLAC}^\triangleright \)1 and Greedy\(_\text {FLAC}^\triangleright \)2 are respectively written \(t^1\) and \(t^2\). In addition, we refer to the value of each variable at the beginning of the i-th iteration of FLAC during the j-th iteration of Greedy\(_\text {FLAC}\) by adding two indexes j and i to the variable. For example, the value of t of Greedy\(_\text {FLAC}^\triangleright \)1 is written \(t^1_{i,j}\). The number of the first iteration of a loop is 1. Finally, let \(i_j - 1\) be the iteration when FLAC returns a partial solution, during the j-th iteration of Greedy\(_\text {FLAC}\). We consider a fictive iteration \(i_j\). The value of a variable during that iteration is the value that variable would have if FLAC had not returned a result. The iteration following \(i_j\) is the first iteration of the next iteration of Greedy\(_\text {FLAC}\), if such an iteration exists.

We refer to the variable SAT as the set of saturated arcs (\((u,v) \in SAT \Leftrightarrow (u,v) \in {\varGamma }^-_{SAT}(v) \Leftrightarrow (u,v) \in {\varGamma }^+_{SAT}(u)\)).

We finally assume that each node and each arc is numbered, and if a choice has to be made between two nodes or two arcs (for example, if \(t(u) = t(v)\), which one is the first node in \({\mathcal {F}}\)?), the node or the arc with the lowest number is chosen.

Definition 3

During the j-th iteration of Greedy\(_\text {FLAC}\)1 and Greedy\(_\text {FLAC}\)2, at the beginning of the i-th iteration of FLAC1 and FLAC2, we say the state of the two algorithms Greedy\(_\text {FLAC}^\triangleright \)1 and Greedy\(_\text {FLAC}^\triangleright \)2 is the same if and only if

  • (Solution equality) the current solutions are equal: \(T^1_{i,j} = T^2_{i,j}\) (we recall that T is, at the end of Greedy\(_\text {FLAC}\), the feasible solution that is returned);

  • (Terminals covered equality) \(X^1_{i,j} = X^2_{i,j}\);

  • (Saturated arcs equality) \(SAT^1_{i,j} = SAT^2_{i,j}\);

  • (Marked arcs equality) \({\mathcal {M}}^1_{i,j} = {\mathcal {M}}^2_{i,j}\);

  • (Elapsed time equality) \(t^1_{i,j} = t^2_{i,j}\);

  • (Flow rate equality) for each node v, the flow rate through v is the same: \(X^1_{v, i,j} = X^2_{v, i,j}\), \(k(v)^1_{i,j} = k(v)^2_{i,j}\);

  • (Flow equality) the flow in each arc is the same. There is no variable in which the flow is stored. However, the flow in the arc \((u,v) = {\varGamma }^-(v)[0]\) (the first arc in \({\varGamma }^-(v)\)) can be deduced from the weight of (uv), the current elapsed time, the flow rate and the saturation moment t(v):

    $$\begin{aligned} f(u,v)^1_{i,j}&= \omega ^\triangleright (u,v) - \left( t(v)^1_{i,j} - t^1_{i,j}\right) \cdot k^1_{i,j}(v)\\ f(u,v)^2_{i,j}&= \bar{\omega }^\triangleright (u,v) - \left( t(v)^2_{i,j} - t^2_{i,j}\right) \cdot k^2_{i,j}(v) \end{aligned}$$

    (Note that \({\varGamma }^-(v)[0]^1_{i,j}\) and \({\varGamma }^-(v)[0]^2_{i,j}\) are not necessarily equal). The Flow equality is satisfied, if, for all nodes v, with \(a^1 = {\varGamma }^-(v)[0]^1_{i,j}\) and \(a^2 = {\varGamma }^-(v)[0]^2_{i,j}\), either \(t(v)^1_{i,j}\), \(t(v)^2_{i,j}\), \(\omega ^\triangleright (a^1)\) or \(\bar{\omega }^\triangleright (a^2)\) is infinite, or \(f(a^1)^1_{i,j} = f(a^2)^2_{i,j}\).

We write Greedy\(_\text {FLAC}^\triangleright \)1 \(\equiv _{i,j}\) Greedy\(_\text {FLAC}^\triangleright \)2.

Lemma 12

Greedy\(_\text {FLAC}^\triangleright \)1 \(\equiv _{1,1}\) Greedy\(_\text {FLAC}^\triangleright \)2.

Proof

At the first iteration of Greedy\(_\text {FLAC}\)1 and Greedy\(_\text {FLAC}\)2, at the beginning of the first iteration of FLAC1 and FLAC2, the current solutions are empty, no terminal is covered, no arc is saturated or marked, \(t^1_{i,j} = t^2_{i,j} = 0\), and the initialization of k(v) and \(X_v\) is the same in the two algorithms. Thus, the six first equalities are proven.

We have to prove the Flow equality. If v is not a terminal, \(t(v)^1_{i,j}\) and \(t(v)^2_{i,j}\) are \(+\infty \). Otherwise, the values of those variables are respectively the weights of \(a^1 = {\varGamma }^-(v)[0]^1_{i,j}\) and \(a^2 = {\varGamma }^-(v)[0]^2_{i,j}\): \(t(v)^1_{i,j} = \omega ^\triangleright (a^1)\) and \(t(v)^2_{i,j} = \bar{\omega }^\triangleright (a^2)\). If we prove that the four values are equals, then \(\omega ^\triangleright (a^1) - (t(v)^1_{i,j} - t^1_{i,j}) k^1_{i,j}(v) = \bar{\omega }^\triangleright (a^2) - (t(v)^2_{i,j} - t^2_{i,j}) k^2_{i,j}(v) = 0\) and the lemma is proved.

In FLAC1, \(\omega ^\triangleright (a^1)\) is the minimum weight of a shortest path linking a node to v. In FLAC2 \(\bar{\omega }^\triangleright (a^2)\) is the minimum dynamic weight of an arc entering v. This weight is initialized with \(+\infty \) if \(a_2\) does not belong to the original instance \({\mathcal {I}}\), and with \(\omega (a_2)\) otherwise. Let \(a^2 = (u,v)\), then \(\omega (a^2)\) is no more than the weight of a shortest path linking u to v, thus, \(\omega (a^2) \ge \omega ^\triangleright (a^1)\). Finally, as all shortest paths to v use at least one arc entering v, no shortest path to v can be lower than \(\omega (a^2)\) and \(\omega (a^2) \le \omega ^\triangleright (a^1)\). Consequently, \(t(v)^1_{i,j} = \omega ^\triangleright (a^1) = \bar{\omega }^\triangleright (a^2) = t(v)^2_{i,j}\). \(\square \)

Lemma 13

We assume that the j-th iteration of the algorithms Greedy\(_\text {FLAC}\)1 and Greedy\(_\text {FLAC}\)2 exist. Let \(i = \min (i^1_j,i^2_j)\). If Greedy\(_\text {FLAC}^\triangleright \)1 \(\equiv _{i,j}\) Greedy\(_\text {FLAC}^\triangleright \)2, then either Greedy\(_\text {FLAC}^\triangleright \)1 and Greedy\(_\text {FLAC}^\triangleright \)2 stop together and return the same feasible solution or do not stop.

In that case, Greedy\(_\text {FLAC}^\triangleright \)1 \(\equiv _{1,j+1}\) Greedy\(_\text {FLAC}^\triangleright \)2.

Proof

We assume, without loss of generality, that \(i = i^1_j\). Then \(i^1_j - 1\) is the iteration when FLAC1 returns a partial solution \(T_0^1\), and as a consequence, when an arc outgoing from r is saturated: \(SAT^1_{i,j}\) contains an arc outgoing from r. Because of the Saturated arcs equality, this arc belongs to \(SAT^2_{i,j}\) too. And the algorithm FLAC2 returns also a partial solution \(T_0^2\) during the i-th iteration. As the saturated arcs are the same, \(T_0^1 = T_0^2\).

We now assume all the terminals in \(X^1_{i,j}\) are covered by \(T_0^1\). As a result, Greedy\(_\text {FLAC}^\triangleright \)1 stops. Because of the Covered terminals equality, and \(T_0^1 = T_0^2\), all the terminals in \(X^2_{i,j}\) are covered by \(T_0^2\) and Greedy\(_\text {FLAC}^\triangleright \)2 stops too. Finally, due to the Solution equality, and because the tree returned at the last iteration of Greedy\(_\text {FLAC}\) is the union of the current solution with \(T_0\), the two algorithms return the same feasible solution.

On the other hand, if not all terminals in \(X^1_{i,j}\) are covered by \(T_0^1\), because of the Covered terminals equality, and \(T_0^1 = T_0^2\), the \((j+1)\)-th iterations of Greedy\(_\text {FLAC}\)1 and Greedy\(_\text {FLAC}\)2 exist. The same terminals are removed from \(X^1_{i,j}\) and \(X^2_{i,j}\), the same arcs are added to \(T^1_{i,j}\) and \(T^2_{i,j}\), the sets \(SAT^1\), \(SAT^2\), \({\mathcal {M}}^1_{i,j}\) and \({\mathcal {M}}^2_{i,j}\)are emptied, and t(v), k(v), and \(X_v\) are initialized the same way than in the first iteration of Greedy\(_\text {FLAC}\)1 and Greedy\(_\text {FLAC}\)2, described in the proof of Lemma 12. Consequently, Greedy\(_\text {FLAC}^\triangleright \)1 \(\equiv _{1,j+1}\) Greedy\(_\text {FLAC}^\triangleright \)2. \(\square \)

The following lemmas prove that if i is not the last iteration of FLAC1 and FLAC2, the equivalence Greedy\(_\text {FLAC}^\triangleright \)1 \(\equiv _{i,j}\) Greedy\(_\text {FLAC}^\triangleright \)2 implies the equivalence Greedy\(_\text {FLAC}^\triangleright \)1 \(\equiv _{i+1,j}\) Greedy\(_\text {FLAC}^\triangleright \)2.

In order to simplify those lemma, we define the hypothesis \(({\mathcal {H}}_{i,j})\) as the following:

  • the j-th iterations of Greedy\(_\text {FLAC}\)1 and Greedy\(_\text {FLAC}\)2 exist

  • \(i < \min (i^1_j,i^2_j)\)

  • for all \(i_0 \le i\),Greedy\(_\text {FLAC}^\triangleright \)1 \(\equiv _{i_0,j}\) Greedy\(_\text {FLAC}^\triangleright \)2

  • if \(1 < i_0 \ge 1\), then, for all arc a in \(SAT^1_{i_0,j} \cup {\mathcal {M}}^1_{i_0,j}\), \(\bar{\omega }^\triangleright (a)_{i_0 - 1,j} = \omega ^\triangleright (a)\)

Lemma 14

If (\({\mathcal {H}}_{i,j}\)) is true and (uv) is the arc saturated or marked by FLAC1 during the i-th iteration, then \(\bar{\omega }^\triangleright (u,v) = \omega ^\triangleright (u,v)\).

Proof

Let w be the successor of u in a shortest path from u to v. Note that the dynamic weight of (uw) is initialized to \(\omega (u,w)\), and that \(\omega (u,w) = \omega ^\triangleright (u,w)\) (otherwise, (uw) would not belong to a shortest path). Thus \(\bar{\omega }^\triangleright _{i,j}(u,w) = \omega (u,w)\). Consequently, \(\omega ^\triangleright (u,v) = \omega ^\triangleright (u,w) + \omega ^\triangleright (v,w) = \omega (u,w) + \omega ^\triangleright (v,w)\).

As we assumed, at the beginning of the section, that no weight equals 0, \(\omega ^\triangleright (u,v) > \omega ^\triangleright (w,v)\). Because the arcs entering v are saturated or marked by order of weight in FLAC1, there is an iteration \(\varphi < i\) during when (wv) is satured or marked in FLAC1. As for each \(i_0 \le i\), Greedy\(_\text {FLAC}^\triangleright \)1 \(\equiv _{i_0,j}\) Greedy\(_\text {FLAC}^\triangleright \)2, because of the Saturated arcs and the Marked arcs equalities, (wv) is saturated or marked during the iteration \(\varphi \) in FLAC2. Furthermore, as (wv) is saturated during the \(\varphi \)-th iteration, \(\bar{\omega }^\triangleright (w,v)_{\varphi ,j} = \omega ^\triangleright (w,v)\).

When this arc is saturated or marked in FLAC2, the dynamic weight \(\bar{\omega }^\triangleright (u,v)\) is updated. Consequently,

$$\begin{aligned} \bar{\omega }^\triangleright (u,v)_{\varphi +1,j}&= \min (\bar{\omega }^\triangleright (u,v)_{\varphi ,j}, \bar{\omega }^\triangleright (u,w)_{\varphi ,j} + \bar{\omega }^\triangleright (w,v)_{\varphi ,j})\\&= \min (\bar{\omega }^\triangleright (u,v)_{\varphi ,j}, \omega (u,w) + \omega ^\triangleright (w,v))\\&= \min (\bar{\omega }^\triangleright (u,v)_{\varphi ,j}, \omega ^\triangleright (u,v))\\&= \omega ^\triangleright (u,v) \end{aligned}$$

As the dynamic weight is always greater than the constant weight of (uv), the dynamic weight remains contantly equal to the constant weight from the \(\varphi \)-th iteration to the i-th iteration. \(\square \)

Lemma 15

If (\({\mathcal {H}}_{i,j}\)) is true and (uv) is the arc saturated or marked by FLAC1 during the i-th iteration, then (uv) is, during the i-th iteration of FLAC2 the arc entering v of minimum dynamic weight (\((u,v) = {\varGamma }^-(v)^2_{i,j}[0]\)).

Proof

As (uv) is saturated, then \((u,v) = {\varGamma }^-(v)^1_{i,j}[0]\). Let \(a = {\varGamma }^-(v)^2_{i,j}[0]\).

As the dynamic weight of a is minimum among all the arcs entering v

$$\begin{aligned} \bar{\omega }^\triangleright (a)&\le \bar{\omega }^\triangleright (u,v) \end{aligned}$$

By Lemma 14

$$\begin{aligned} \bar{\omega }^\triangleright (a)&\le \omega ^\triangleright (u,v) \end{aligned}$$

As the constant weight of (uv) is minimum among all the arcs entering v

$$\begin{aligned} \bar{\omega }^\triangleright (a)&\le \omega ^\triangleright (a) \end{aligned}$$

Finally, as the dynamic weight is greater than the constant weight

$$\begin{aligned} \bar{\omega }^\triangleright (a) \le \bar{\omega }^\triangleright (u,v)&= \omega ^\triangleright (u,v) \le \omega ^\triangleright (a) \le \bar{\omega }^\triangleright (a)\\ \end{aligned}$$

Thus \(\bar{\omega }^\triangleright (a) = \bar{\omega }^\triangleright (u,v) = \omega ^\triangleright (a) = \omega ^\triangleright (u,v)\). We recall that each arc is associated with a number and if two arcs have the same weight, the first arc in \({\varGamma }^-(v)\) is the one with the smallest number. As (uv) is before a in \({\varGamma }^-(v)^1_{i,j}\) and the contrary occurs in \({\varGamma }^-(v)^2_{i,j}\), \(a = (u,v)\). \(\square \)

Lemma 16

If (\({\mathcal {H}}_{i,j}\)) is true and (uv) is the arc saturated or marked by FLAC1 during the i-th iteration, then \(t(v)^1_{i,j} = t(v)^2_{i,j}\).

Proof

As (uv) is saturated, then \((u,v) = {\varGamma }^-(v)^1_{i,j}[0]\). The value of \(t(v)^1_{i,j}\) is finite (otherwise, for every node v, \(t(v)^1_{i,j} = +\infty \), which means the flow cannot reach the root). Thus \(\omega ^\triangleright (u,v)\) is finite too and \(k(v)^1_{i,j} > 0\). Thus by Lemma 14, \(\bar{\omega }^\triangleright (u,v)\) is finite, and due to the Flow rates equality, \(k(v)^2_{i,j} = k(v)^1_{i,j} > 0\), \(t(v)^2_{i,j}\) is finite.

By Lemma 15, \((u,v) = {\varGamma }^-(v)^2_{i,j}[0]\).

Because of the Flow equality,

$$\begin{aligned} \omega ^\triangleright (u,v) - (t(v)^1_{i,j} - t^1_{i,j}) k^1_{i,j}(v)&= \bar{\omega }^\triangleright (u,v) - (t(v)^2_{i,j} - t^2_{i,j}) k^2_{i,j}(v) \end{aligned}$$

Thus, the Elapsed time equality and the Flow rates equality prove

$$\begin{aligned} t(v)^2_{i,j}&= t(v)^1_{i,j} \end{aligned}$$

\(\square \)

Lemma 17

If (\({\mathcal {H}}_{i,j}\)) is true and (uv) is the arc saturated or marked by FLAC1 during the i-th iteration, then v is the node minimizing \(t(v)^2_{i,j}\) and (uv) is saturated or marked by FLAC2 during the same iteration.

Proof

As (uv) is saturated, then \((u,v) = {\varGamma }^-(v)^1_{i,j}[0]\). The value of \(t(v)^1_{i,j}\) is finite. By Lemma 16, \(t(v)^2_{i,j}\) is finite too.

If w is another node such that \(t(w)^2_{i,j} < t(v)^2_{i,j}\), then \(t(w)^2_{i,j}\) is finite. Let \(a^1 = {\varGamma }^-(w)^1_{i,j}\) and \(a^2 = {\varGamma }^-(w)^2_{i,j}\) thus \(k(w)^2_{i,j} > 0\) and \(\bar{\omega }^\triangleright (a^2))\) is finite. As \(\omega ^\triangleright (a^1) \le \omega ^\triangleright (a^2) \le \bar{\omega }^\triangleright (a^2)\), it is finite too. Finally, as Greedy\(_\text {FLAC}^\triangleright \)1 \(\equiv _{i,j}\) Greedy\(_\text {FLAC}^\triangleright \)2, the Flow rates equality proves that \(k(w)^2_{i,j} = k(w)^1_{i,j} > 0\), thus \(t(w)^1_{i,j}\) is finite. Consequently,

$$\begin{aligned} \omega ^\triangleright (a^1) - (t(w)^1_{i,j} - t^1_{i,j}) k^1_{i,j}(v)&= \bar{\omega }^\triangleright (a^2) - (t(w)^2_{i,j} - t^2_{i,j}) k^2_{i,j}(v) \end{aligned}$$

However \(\omega ^\triangleright (a^1) \le \bar{\omega }^\triangleright (a^2)\) and by Lemma 16 \(t(w)^2_{i,j} < t(v)^2_{i,j} = t(v)^1_{i,j} \le t(w)^1_{i,j}\)

$$\begin{aligned} \omega ^\triangleright (a^1) - (t(w)^1_{i,j} - t^1_{i,j}) k^1_{i,j}(v)&< \bar{\omega }^\triangleright (a^2) - (t(w)^2_{i,j} - t^2_{i,j}) k^2_{i,j}(v) \end{aligned}$$

This is a contradiction. Thus v is chosen by FLAC2 during the i-th iteration. Consequently, by Lemma 15, (uv) is saturated or marked during the i-th iteration of FLAC2. \(\square \)

Lemma 18

(\({\mathcal {H}}_{i,j}\)) implies (\({\mathcal {H}}_{i+1,j}\)).

Proof

We have to prove that Greedy\(_\text {FLAC}^\triangleright \)1 \(\equiv _{i+1,j}\) Greedy\(_\text {FLAC}^\triangleright \)2, and, for all arc a in \(SAT^1_{i+1,j} \cup {\mathcal {M}}^1_{i+1,j}\), \(\bar{\omega }^\triangleright (a)_{i,j} = \omega ^\triangleright (a)\).

The second part is proven by (\({\mathcal {H}}_{i,j}\)) and Lemma 14.

Let (uv) be the arc saturated or marked by FLAC1 during the i-th iteration. By Lemma 17, (uv) is also saturated of marked during the i-th iteration of FLAC2. Because of the Saturated arcs, Marked arcs and Flow rates equalities, (uv) is saturated by FLAC1 if and only if it is saturated by FLAC2. Thus, the Saturated arcs and Marked arcs equalities are satified at the beginning of the \((i+1)\)-th iteration. If the arc is marked, no other variable than \({\mathcal {M}}\) is changed.

As \(SAT^1_{i,j} = SAT^2_{i,j}\) and, for each node v, \(X^1_{i+1,j} = X^2_{i+1,j}\), (uv) is marked by FLAC1 if and only if it is marked by FLAC2. In that case, \({\mathcal {M}}^1_{i+1,j} = {\mathcal {M}}^2_{i+1,j}\), and the other variables do not change. If the arc is saturated, \({\mathcal {M}}^1\) and \({\mathcal {M}}^2\) do not change and \(SAT^1_{i+1,j} = SAT^2_{i+1,j}\), \(t^1_{i+1,j} = t(v)^1_{i,j} = t(v)^2_{i,j} = t^2_{i+1,j}\) and the flow rate is updated the same way for every node.

Finally, we check for each node the Flow equality. For a node w, t(w) changes if the flow rate through w changes, if \(w = v\) as an entering arc of v is saturated or if the dynamic weight of an arc entering w changes. Note that, as only the weights of the arcs entering v changes, the third case is the same as the second one. We recall that t(w) is updated by Algorithm 7 for the first case and Algorithm 8 for the second one.

In the first case, \(w \ne v\), as the flow rate through v is not updated. As a consequence, the dynamic weight of an arc entering w does not change. Let \(a^1 = {\varGamma }^-(w)^1_{i+1,j}\) and \(a^2 = {\varGamma }^-(w)^2_{i+1,j}\).

If, on the one hand, \(k(w)^1_{i,j} = k(w)^2_{i,j} = 0\), then Algorithm 7 updates the time \(t(w)^1_{i+1,j}\) with \(t^1_{i+1,j} + \frac{\omega ^\triangleright (a^1)}{k(w)^1_{i+1,j}}\), and the time \(t(w)^2_{i+1,j}\) with \(t^2_{i+1,j} + \frac{\bar{\omega }^\triangleright (a^2)}{k(w)^2_{i+1,j}}\). Thus, if \(\omega ^\triangleright (a^1)\) and \(\bar{\omega }^\triangleright (a^2)\) are not infinite, \(t(w)^1_{i+1,j}\) and \(t(w)^2_{i+1,j}\) are finite and

$$\begin{aligned} \omega ^\triangleright (a^1) - (t(v)^1_{i+1,j} - t^1_{i+1,j}) k^1_{i+1,j}(v)&= 0\\ \bar{\omega }^\triangleright (a^2) - (t(v)^2_{i+1,j} - t^2_{i+1,j}) k^2_{i+1,j}(v)&= 0 \end{aligned}$$

The Flow equality is then satisfied.

On the other hand, if \(k(w)^1_{i,j} = k(w)^2_{i,j} \ne 0\), then the operations made by Algorithm 7 are

$$\begin{aligned} t(w)^1_{i+1,j}&\leftarrow t^1_{i+1,j} + \frac{(t(w)^1_{i,j} - t^1_{i+1,j}) \cdot k(w)^1_{i,j}}{k(w)^1_{i+1,j}}\\ t(w)^2_{i+1,j}&\leftarrow t^2_{i+1,j} + \frac{(t(w)^2_{i,j} - t^2_{i+1,j}) \cdot k(w)^2_{i,j}}{k(w)^2_{i+1,j}} \end{aligned}$$

We assume \(\omega ^\triangleright (a^1)\), \(\bar{\omega }^\triangleright (a^2)_{i+1,j}\), \(t(w)^1_{i+1,j}\) and \(t(w)^2_{i+1,j}\) are finite.

$$\begin{aligned} \omega ^\triangleright (a^1) - (t(v)^1_{i+1,j} - t^1_{i+1,j}) k^1_{i+1,j}(v)&= \omega ^\triangleright (a^1) - (t(v)^1_{i,j} - t^1_{i+1,j}) k(v)^1_{i,j}\\ \omega ^\triangleright (a^1) - (t(v)^1_{i+1,j} - t^1_{i+1,j}) k^1_{i+1,j}(v)&= \omega ^\triangleright (a^1) - (t(v)^1_{i,j} - t^1_{i,j}) k(v)^1_{i,j} \\&\quad + (t^1_{i+1,j} - t^1_{i,j})k(v)^1_{i,j} \end{aligned}$$

As \(\omega ^\triangleright (a^1)\), \(\bar{\omega }^\triangleright (a^2)_{i+1,j}\), \(t(w)^1_{i+1,j}\) and \(t(w)^2_{i+1,j}\) are finite, \(t(w)^1_{i,j}\) and \(t(w)^2_{i,j}\) are finite too. Moreover, the dynamic weight of \(a^2\) is not updated during the i-th iteration as no entering arc of w is saturated or marked, and \(a^2 = {\varGamma }^-(v)^2_{i,j}[0]\). Thus \(\bar{\omega }^\triangleright (a^2)_{i,j} = \bar{\omega }^\triangleright (a^2)_{i+1,j}\) is finite. Consequently, we can apply the Flow equality for the i-th iteration.

$$\begin{aligned} \omega ^\triangleright (a^1) - \left( t(v)^1_{i+1,j} - t^1_{i+1,j}\right) k^1_{i+1,j}(v)&= \bar{\omega }^\triangleright (a^2) - \left( t(v)^2_{i,j} - t^2_{i+1,j}\right) k(v)^2_{i,j} \\&\quad + \left( t^1_{i+1,j} - t^1_{i,j}\right) k(v)^1_{i,j} \end{aligned}$$

Due to the Flow rate equality and the Elapsed time equality

$$\begin{aligned} \omega ^\triangleright (a^1) - \left( t(v)^1_{i+1,j} - t^1_{i+1,j}\right) k^1_{i+1,j}(v)&= \bar{\omega }^\triangleright (a^2) - \left( t(v)^2_{i,j} - t^2_{i+1,j}\right) k(v)^2_{i,j} \\&\quad + \left( t^2_{i+1,j} - t^2_{i,j}\right) k(v)^2_{i,j}\\ \omega ^\triangleright (a^1) - \left( t(v)^1_{i+1,j} - t^1_{i+1,j}\right) k^1_{i+1,j}(v)&= \bar{\omega }^\triangleright (a^2) - \left( t(v)^2_{i+1,j} - t^2_{i+1,j}\right) k^2_{i+1,j}(v) \end{aligned}$$

The Flow equality is then satisfied.

In the last case, we have to check the Flow equality for the node v. Let \(a^1\) be the arc \({\varGamma }^-(v)[0]^1_{i+1,j}\) (we recall that (uv) is \({\varGamma }^-(v)[0]^1_{i,j}\)), then the Algorithm 8 updates \(t(v)^1_{i+1,j}\) with \(t^1_{i+1,j} + \frac{\omega ^\triangleright (a^1) - \omega ^\triangleright (u,v)}{k(v)^1_{i+1,j}}\). Thus, \(\omega ^\triangleright (a^1) - (t(v)^1_{i+1,j} - t^1_{i+1,j}) k^1_{i+1,j}(v) = \omega ^\triangleright (u,v)\). Similarly, \(\bar{\omega }^\triangleright (a^1) - \left( t(v)^1_{i+1,j} - t^1_{i+1,j}\right) k^1_{i+1,j}(v) = \bar{\omega }^\triangleright (u,v)\). By Lemma 14, \(\omega ^\triangleright (u,v) = \bar{\omega }^\triangleright (u,v)\), thus the flow equality is proved for v.

As a result, Greedy\(_\text {FLAC}^\triangleright \)1 \(\equiv _{i+1,j}\) Greedy\(_\text {FLAC}^\triangleright \)2 and \(({\mathcal {H}}_{i+1,j})\) is satisfied. \(\square \)

Lemma 19

We assume that the j-th iterations of the algorithms Greedy\(_\text {FLAC}\)1 and Greedy\(_\text {FLAC}\)2 exist, and that the i-th iteration of FLAC1 and FLAC2 exist, then Greedy\(_\text {FLAC}^\triangleright \)1 \(\equiv _{i,j}\) Greedy\(_\text {FLAC}^\triangleright \)2.

Proof

Lemmas 1213 and 18 prove, by induction over the indexes i and j that Greedy\(_\text {FLAC}^\triangleright \)1 \(\equiv _{i,j}\) Greedy\(_\text {FLAC}^\triangleright \)2. \(\square \)

Theorem 6

Greedy\(_\text {FLAC}^\triangleright \)1 and Greedy\(_\text {FLAC}^\triangleright \)2 return the same feasible solution.

Proof

Let \(j_1\) be the last iteration of the algorithm Greedy\(_\text {FLAC}\)1 and \(j_2\) be the last iteration of the algorithm Greedy\(_\text {FLAC}\)2. Let \(j = \min (j^1,j^2)\). We assume without loss of generality that \(j = j^1\). Let \(i = \min (i^1_j,i^2_j)\). By Lemma 19, FLAC1 \(\equiv _{i,j}\) = FLAC2. As j is the last iteration of Greedy\(_\text {FLAC}\)1, Greedy\(_\text {FLAC}^\triangleright \)1 stops. By Lemma 13, Greedy\(_\text {FLAC}^\triangleright \)2 stops too and returns the same feasible solution. \(\square \)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Watel, D., Weisser, MA. A practical greedy approximation for the directed Steiner tree problem. J Comb Optim 32, 1327–1370 (2016). https://doi.org/10.1007/s10878-016-0074-0

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10878-016-0074-0

Keywords

Navigation