Abstract
The underlying models of many practical problems in various engineering fields are equivalent to the Steiner tree problem in graphs, which is a typical NP-hard combinatorial optimization problem. Thus, developing a fast and effective heuristic for the Steiner tree problem in graphs is of universal significance. By analyzing the advantages and disadvantages of the fast classic heuristics, we find that the shortest paths and Steiner points play important roles in solving the Steiner tree problem in graphs. Based on the analyses, we propose a Steiner point candidate-based heuristic algorithm framework (SPCF) for solving the Steiner tree problem in graphs. SPCF consists of four stages: marking
Introduction
The Steiner tree problem in graphs (GSTP) is a classic combinatorial optimization problem and is the underlying model for many practical problems in various engineering fields, such as the multiple destination routing of communication networks,1–3 the physical design of very large scale integrated circuits (VLSI),4,5 the transportation systems,6–8 and the pipe systems.9,10
The GSTP has been proved to be NP-hard. 11 Since the 1960s, researchers have focused on solving this problem. Exact algorithms,12,13 approximation algorithms,14,15 heuristics,16–18 local search algorithms,19–22 computational intelligence algorithms,1–3 and reduction techniques23–25 are suggested. Although the exact algorithms can provide an optimal solution to a GSTP, they require exponential running time. Contrary, the approximation algorithms are polynomial-time algorithms, and the approximation ratio of the GSTP has been improved from 2 to 1.39. 15 The classic heuristics (shortest path heuristic (SPH) 16 and distance network heuristic (DNH) 17 ), which are fast and simple, are widely employed in engineering applications4,5,26 and are used to construct initial feasible solutions for iterative methods, such as local search and computational intelligence algorithms. However, the solution quality of classic heuristics has significant room for improvement.2,22 Key node-based minimum cost path heuristic (KBMPH) 27 is a variant of SPH which can obtain better solutions than SPH. The average distance heuristic (ADH)18,28 is a well-known heuristic that can come up with much better solutions than those obtained by the classic algorithms with longer running time. Local search algorithms start from an initial feasible solution and perform a local search strategy iteratively until they obtain the local optimum solutions. Computational intelligence algorithms contain a cooperative multi-start local search strategy and a stochastic search strategy to improve the initial feasible solution quality. 1 Due to the unpredictable number of iterations, the local search and computational intelligence algorithms require significant running time. In addition, the running time and solution quality of these iterative methods are sensitive to the choice of initial feasible solution. The reduction technique is a preprocessor procedure for the GSTP that reduces the running time of the construction algorithm (CA) by reducing the size of the input instance equivalently. It is not discussed in this paper.
Since researchers pay more attention to reduce the approximation ratio rather than the running time, the high computational complexity of the approximation algorithms interferes with solving practical instances. In the engineering fields, there are large size GSTP problems, and the CA requests high real-time performance and excellent solution quality. A fast and effective heuristic for the GSTP is of universal significance for a wide range of applications. Here, we focus on improving the solution quality of the classic algorithms with reasonable running times. By analyzing the advantages and disadvantages of the fast classic heuristics, we find that the shortest paths and Steiner points play important roles in solving the GSTP. Based on the analyses, we present a Steiner point candidate-based heuristic algorithm framework (SPCF) for solving a GSTP. By finding the shortest path clusters between vertex sets, a series of methods are proposed to mark the first type of Steiner point candidates
To verify the rationality and validity of the algorithm framework, numerous experiments are conducted on the well-known SteinLib benchmarks. 29 The effectiveness and efficiency of the proposed strategies of the framework are illustrated. Experimental results show that the proposed algorithm greatly improves solution quality of the two classic heuristics.16,17 Compared with the ADH, 28 KBMPH, 27 the loss-contracting algorithm (LCA), 14 and LP-based iterative randomized rounding (LPIRR), 15 the proposed algorithm achieves better solution quality within shorter running times. LCA and LPIRR are the most recent approximation algorithms with approximation ratios of 1.55 and 1.39, respectively. The Dreyfus–Wagner (DW) algorithm 12 is a practical exact algorithm that applies a dynamic programming approach. If the number of the terminals is a constant, DW algorithm can obtain an optimal Steiner tree in polynomial time. In our testing environment, the DW algorithm is unable to solve instances in which the number of terminals is greater than 20.
The remainder of this paper is organized as follows. In section Preliminaries, we present basic descriptions of the GSTP and Voronoi diagram, review two classic heuristics,16,17 and discuss the importance of the shortest path and the Steiner point in the GSTP. The SPCF framework and related strategies are presented in section Steiner Point Candidate Based Heuristic Algorithms. Experimental comparisons are described in section Computational Experiments, and conclusions and suggestions for future work are presented in section Conclusion.
Preliminaries
Steiner tree problem in graphs
Definition 1
In the GSTP, given a weighted undirected connected graph
In a Steiner tree, let “node” denote a nonterminal vertex, let “Steiner point” denote a node with a degree of at least three. Together, the Steiner points and terminals are referred to as a “key-vertex.” Let “key-path” be a path, of which the ends are key-vertices and each internal vertex is a node with a degree of two.
Voronoi diagram and construction
The Voronoi diagram method is a very effective tool for solving the GSTP.22,30,31
Given a weighted undirected connected graph
Definition 2
Given a weighted undirected connected graph
In this paper, a seed S can be a set of vertices, and then
Let
Between two adjacent Voronoi cells
If a vertex and its neighbors belong to more than three Voronoi cells, this vertex is denoted as an adjacent vertex of the Voronoi diagram.
Property 1
The Voronoi diagram of a weighted undirected connected graph
Classic heuristic algorithms
DNH17 and SPH, 16 the classic heuristics discussed in this paper, are two well-known heuristics for the GSTP. Although they are both 2-approximation algorithms, they can obtain a good solution for most instances in practice and require short running time. Researchers usually employ them as independent construction methods for various practical GSTP problems.1–5,19–22,26,32–34
DNH
The original DNH, which reduces the GSTP to a minimum-weight terminal spanning tree, has a worst-case time complexity of Divide the graph G into l Voronoi cells by considering each terminal as a seed. The span of the main bridge of each pair of adjacent Voronoi cells is considered the weight of the virtual edge between the responding two seeds (terminals). Then, connect the terminals with the virtual edges using a minimum spanning tree algorithm.
SPH
The original SPH can be considered a modified version of Prim’s algorithm for the GSTP, which requires a worst case time of Initialize the partial solution By implementing Dijkstra’s algorithm, find the closest terminal Repeat step (2) until
Similar to Prim’s algorithm, the solution quality of SPH is sensitive to the choice of the starting terminal.
Although DNH has less worst-case complexity, SPH, which is approximately as fast as DNH in practice, can achieve a better implementation. 31
Shortest paths and Steiner point candidates
Finding the shortest path is a basic greedy strategy employed by the classic heuristics to construct the Steiner tree.
Property 2
For any optimal solution of the GSTP, any key-path is a shortest path between a pair of key-vertices.
Proof
By contradiction, the property is obviously true. ▪
Definition 3
In a GSTP, A Steiner point candidate is a nonterminal vertex, which is expected to be passed by the constructed Steiner tree.
A good Steiner point candidate can induce the constructed Steiner tree to pass through or close to a Steiner point of some optimal solution, which can improve the solution quality. Different strategies can mark different Steiner point candidates.
Property 3
Given a feasible solution
Thus, if we set all the key-vertices of some optimal solution as the Steiner point candidates, we can construct an optimal solution by using DNH to connect the terminals and Steiner point candidates with the shortest paths. Unfortunately, determining which nonterminal vertex is a Steiner point is difficult and is equivalent to solving the GSTP. 28 Thus, determining how to locate the Steiner point candidates is the key of solving a GSTP.
A general algorithm framework based on finding the Steiner point candidates is proposed in Rayward-Smith and Clare
28
(denoted with RS framework). First, the Steiner points of a feasible solution obtained by the heuristics for the GSTP are marked as the Steiner point candidates. Then, the final solution is constructed by employing a minimum-weight terminal spanning tree algorithm to connect the terminals and the Steiner point candidates. This framework improves the quality of the solution obtained by the corresponding heuristic. Our algorithm is in line with this framework, and we propose two methods to locate two types of Steiner point candidates (
Steiner point candidate-based heuristic algorithms
Our algorithms consist of four stages: marking the Steiner point candidates
Marking the Steiner point candidates
We extend the shortest paths between two vertices to the shortest path clusters between two vertex sets.
Definition 4
Inspired by the classic heuristics and RS framework, the Steiner point candidates, which can reduce the weight of the constructed Steiner tree, are generally located along some shortest paths. In each step of the classic heuristics, the choice from the available shortest paths could generate different overlapping edges, which can reduce the weight of the Steiner tree. We cannot determine which shortest path is the best choice among all of the available shortest paths. Thus, we employ shortest paths clusters to connect terminals rather than the shortest paths. The connected points which are nonterminals are marked as a Steiner point candidate
Depending on the different connecting strategies, we develop three types of SPSH algorithm: single source shortest path cluster heuristic (SS_SPSH), multi-source shortest path cluster heuristic (MS_SPSH), and multi-source parallel shortest path cluster heuristic (MSP_SPSH).
Single source shortest path cluster heuristic
In each iteration of the SS_SPSH, we connect a closest terminal to the connected vertex set with a shortest path cluster until the connected vertex set contains all of the terminals.
The detailed iterative procedure is as follows.
In the initial phase, a connected vertex set is initialized with an arbitrary terminal and denoted as In the spreading phase, we find a closest terminal to (4) In the tracing-back phase, we obtain the shortest path cluster In the updating phase, we update
With the exception of the first iteration, Dijkstra’s algorithm does not need to start from scratch. We only need to continue Dijkstra’s algorithm by considering newly inserted vertices of
Property 4
The computation complexity of the SS_SPSH is
Proof
The SS_SPSH consists of SS_SPSH pseudocode.
The detailed pseudo code of the SS_SPSH is shown in Figure 1.
Multi-source shortest path cluster heuristic
In each iteration of the MS_SPSH, we connect the closest two connected vertex sets with a shortest path cluster until only one connected vertex set remained.
The detailed iterative procedure is as follows:
In the initial phase, each terminal is used to initialize a connected vertex set, and l connected vertex sets In the spreading phase, we find a pair of closest connected vertex sets In the tracing-back phase, we collect the shortest path cluster In the updating phase, we update the connected vertex sets by creating a new connected vertex set
With the exception of the first iteration, the Voronoi diagram method does not need to start from scratch. We only need to continue the Voronoi diagram method by considering
Property 5
The computation complexity of the MS_SPSH is
Proof
The MS_SPSH consists of
Compared with SS_SPSH, MS_SPSH must maintain a minimum-priority queue to sort the bridges with the spans and expand the spreading range of the Dijkstra’s algorithm to find all main bridges between the closest two connected vertex sets in the spreading phase. The detailed pseudo code of the MS_SPSH is shown in Figures 2 and 3.
MS_SPSH pseudocode. TraceBack2 pseudocode.

Multi-source parallel shortest path cluster heuristic
In each iteration of the MSP_SPSH, we connect several pairs of closest connected vertex sets with the shortest path clusters until only one connected vertex set remained.
The detailed iterative procedure is as follows.
The initial phase, tracing-back phase, and updating phase are all similar to MS_SPSH, with the exception that the Voronoi seeds are all unstamped in the initial and updating phases, and there are several shortest path clusters that must be handled in the tracing-back and updating phases.
In the spreading phase, we find several pairs of closest connected vertex sets with the Voronoi diagram method. The Voronoi diagram method begins by considering each connected vertex set as a seed. There is a sub iteration to find a pair of closest unstamped connected vertex sets that is similar to the spreading phase of MS_SPSH. Then, this pair of connected vertex sets is stamped. If a connected vertex set is stamped, the spreading procedure of the corresponding Voronoi cell is suspended and the associated bridges are discarded in this iteration. The Voronoi diagram method is suspended when all seeds are stamped.
With the exception of the first iteration, the Voronoi diagram method does not need to start from scratch; we only need to continue the Voronoi diagram method by considering the new connected vertex sets as new seeds.
Property 6
The computation complexity of the MSP_SPSH is
Proof
The MSP_SPSH consists of at most
Compared with SS_SPSH and MS_SPSH, MSP_SPSH must take the bridges, which are not yet processed, along to the next iteration. The detailed pseudo code of the MSP_SPSH is shown in Figures 4 and 5.
MSP_SPSH pseudocode. TraceBack3 pseudocode.

Construction algorithms
We consider the Steiner point candidates as the terminals and employ a classic heuristic to construct a feasible solution that can connect the Steiner point candidates and the terminals. Since the Steiner point candidates are fake terminals, some unnecessary paths may be generated. In these paths, the intermediate vertices are all nodes with a degree of two, and one of the ends is a nonterminal vertex with a degree of one. An additional pruning operation is employed to delete the unnecessary paths. Although DNH has less worst-case complexity, SPH, which is approximately as fast as DNH in practice, can achieve a better implementation. 31 In this paper, the SPH is employed as the CA except where otherwise noted.
Eliminating the detour paths
A bad Steiner point candidate may result in the constructed Steiner tree containing some detour paths which are key-paths and not shortest paths, as shown in Figure 6(a) and (b).
Example of eliminating the detour paths.
Two strategies for eliminating the detour paths are proposed and denoted as EDP_RS and EDP_KPE, respectively. EDP_RS, which is in line with RS framework,
28
marks the Steiner points of the presolution as the Steiner point candidate, as shown in Figure 6(b)–(d), and executes the CA repeatedly until the quality of the solution cannot be improved. Unfortunately, we cannot forecast the number of loops, which is small in the experiments. We set five as the bounding number of loops. Thus, the computation complexity of EDP_RS is
SPCII-based refining strategies
SPSH and classic heuristics are all shortest path-based greedy methods which can used for marking the Steiner point candidates. For some specific GSTP instances, the shortest path-based methods cannot pass through some Steiner points of the optimal solutions of these instances. This type of Steiner points is referred to as hard-nodes, and this type of GSTP instances are referred to as hard GSTP instances. Classic heuristics generally generate poor quality solutions for hard GSTP instances. SPSH algorithms cannot mark the location of the hard-nodes. As shown in
Definition 5
A complete-wheel graph is a GSTP instance where G is a complete graph and
An optimal solution of the complete-wheel graph consists of l wheel arm edges with weight
As shown in Figure 7, there is a complete-wheel graph with Illustration of a complete-wheel graph 
Property 7
If a GSTP instance contains some complete-wheel graphs or partial complete-wheel graphs, the center vertices are the adjacent vertices of the Voronoi diagram which is built by look the terminals as seeds.
Proof
Based on Definition 5, there are at least three neighbor vertices of each center vertex are terminals. Thus, the center vertices are the adjacent vertices of the Voronoi diagram which is built by look the terminals as seeds. ▪
Based on Property 7, three alternative strategies, which are used to refine the quality of the solutions obtained by the shortest path-based algorithms for hard GSTP instances, are proposed and denoted as IS-I, IS-II, and IS-III.
First, a Voronoi diagram is constructed by considering each terminal as a seed in G.
In IS-I, all of the adjacent vertices of the Voronoi diagram are looked as
Property 8
The computation complexity of the IS-I is
Proof
By
IS-I is effective with longer running time. IS-II reduces the number of
Property 9
The computation complexity of the IS-II is
Proof
There are at most
IS-III adopts a Steiner tree merging method rather than iteratively executing the CA to further increase efficiency. A graph (denoted as NG), which is composed of the union of the edges of the presolution and the
Property 10
The computation complexity of the IS-III is
Generally, the CA employed by the IS strategies does not contain an EDP strategy to save running time. Otherwise, the IS which contains an EDP strategy is denoted as IS#, which requires more time and obtains a better solution.
Main framework of the SPCF
Here, a three-stage main framework of SPCF is presented for the GSTP. The pseudo code is shown in Figure 8. The computation complexities of four types of strategies outlined in the previous section are summarized in Table 1. Based on the SPCF, a variety of algorithms can be constituted using the proposed strategies to find an appropriate tradeoff between solution quality and running time. As shown in Table 2, we list nine groups of SPCF algorithms. Each group of algorithms consists of three algorithms with different SPSH strategies. The first six groups focus on improving the solution quality by inserting or exchanging the strategies, and the last three groups focus on saving running time by exchanging the strategies.
SPCF pseudocode. Computational complexities of the mentioned strategies. IS-I# represents that the construction algorithm of refining strategy IS-I contains the corresponding EDP strategy. Computational complexities of the nine groups of SPCF algorithms. ‘*’ represents “MSP,” “MS,” and “SS” shortest path cluster heuristics. IS-I# represents that the construction algorithm of refining strategy IS-I contains the corresponding EDP strategy.
Computational experiments
Basic information for SteinLib TestCase instances.
We conducted two tests to examine the performance of SPCF algorithms for solving the GSTP. First, we tested the nine groups of SPCF algorithms to evaluate the effectiveness of the proposed strategies. Second, we compare the most effective SPCF algorithm with five typical algorithms.12,14,15,27,28
The percentage relative error with respect to the best-known solutions is commonly used to evaluate the quality of solutions found by a specific algorithm. As shown in expression (2),
As suggested by Aragão and Werneck,
31
to achieve a language- and machine-independent aggregate time, Prim’s algorithm implemented with a binary heap is selected as the baseline method to measure the relative running time of each instance. For an instance, the relative running time is shown in expression (5), where
Our SPCF algorithms and the compared algorithms are implemented in C++ and compiled using GCC 4.4.7. The Floyd–Warshall algorithm is used to build the metric closure of G for KBMPH, ADH, and DW. The DW algorithm is employed to construct the k-full-component for LCA and LPIRR. IBM CPLEX is adopted to solve the LP problem in LPIRR. Although a larger parameter k of LCA and LPIRR can yield a better solution, execution of algorithms with large k values would require excessively long running time. The parameter k of LCA is set to 3, and the algorithm is denoted as LCA-3. The parameter k of LPIRR is set to 3 and 4, and the corresponding algorithms are denoted as LPIRR-3 and LPIRR-4, respectively. All experiments are performed on a PC with four 3.20 GHz Intel Core i5 processors and 16 GB memory running CentOS 6.4. Except for LPIRR, the programs run sequentially on a single processor. LPIRR uses IBM CPLEX, a multithread-based software package.
Evaluating the performance of the proposed strategies
Comparison with other approaches
Five typical algorithms12,14,15,27,28 are compared with the proposed SS_SPCF-V algorithm.
Conclusion
In this study, we present a Steiner point candidate-based heuristic algorithm framework for the GSTP that consists of the Steiner point candidates
In future, an appropriate combination of the proposed strategies in line with SPCF can be developed for specific engineering application problems. The proposed algorithm framework can also be extended to efficiently solve GSTPs with constraints such as the delay-constraint in multiple destination routing and a via minimization constraint in the routing stage of VLSI.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the National Key Basic Research Special Foundation (NKBRSF) of China (No. 2011CB808000), by the National Natural Science Foundation of China (No. 71231003, No. 11271002) by the Natural Science Foundation of Fujian Province, China (No.2016J01754), by the Educational Commission of Fujian Province of China (No. JA15069), by the Research Foundation of Fuzhou University (No. XRC-1557).
Appendix 1
TestCase class consists of 389 instances, of which numbers of the terminals are not more than 20 and numbers of the vertices are not more than 1000, from SteinLib. The names of the TestCase instances are presented below:
B01,B02,B04,B05,B07,B08,B10,B11,B13,B16,C01,C02,C06,C07,C11,C12,C16,C17,D01,D02,D06,D07,D11,D12,D16,D17,DIW0250,DIW0260,DIW0313,DIW0393,DIW0460,DIW0495,DIW0513,DIW0540,DMXA0296,DMXA0628,DMXA0734,DMXA0848,DMXA0903,DMXA1109,DMXA1304,DMXA1516,es10fst01,es10fst02,es10fst03,es10fst04,es10fst05,es10fst06,es10fst07,es10fst08,es10fst09,es10fst10,es10fst11,es10fst12,es10fst13,es10fst14,es10fst15,es20fst01,es20fst02,es20fst03,es20fst04,es20fst05,es20fst06,es20fst07,es20fst08,es20fst09,es20fst10,es20fst11,es20fst12,es20fst13,es20fst14,es20fst15,GAP1307,GAP1413,GAP1500,GAP1810,GAP2800,GAP2975,GAP3036,GAP3100,i320-001,i320-002,i320-003,i320-004,i320-005,i320-011,i320-012,i320-013,i320-014,i320-015,i320-021,i320-022,i320-023,i320-024,i320-025,i320-031,i320-032,i320-033,i320-034,i320-035,i320-041,i320-042,i320-043,i320-044,i320-045,i320-101,i320-102,i320-103,i320-104,i320-105,i320-111,i320-112,i320-113,i320-114,i320-115,i320-121,i320-122,i320-123,i320-124,i320-125,i320-131,i320-132,i320-133,i320-134,i320-135,i320-141,i320-142,i320-143,i320-144,i320-145,i080-001,i080-002,i080-003,i080-004,i080-005,i080-011,i080-012,i080-013,i080-014,i080-015,i080-021,i080-022,i080-023,i080-024,i080-025,i080-031,i080-032,i080-033,i080-034,i080-035,i080-041,i080-042,i080-043,i080-044,i080-045,i080-101,i080-102,i080-103,i080-104,i080-105,i080-111,i080-112,i080-113,i080-114,i080-115,i080-121,i080-122,i080-123,i080-124,i080-125,i080-131,i080-132,i080-133,i080-134,i080-135,i080-141,i080-142,i080-143,i080-144,i080-145,i080-201,i080-202,i080-203,i080-204,i080-205,i080-211,i080-212,i080-213,i080-214,i080-215,i080-221,i080-222,i080-223,i080-224,i080-225,i080-231,i080-232,i080-233,i080-234,i080-235,i080-241,i080-242,i080-243,i080-244,i080-245,i080-301,i080-302,i080-303,i080-304,i080-305,i080-311,i080-312,i080-313,i080-314,i080-315,i080-321,i080-322,i080-323,i080-324,i080-325,i080-331,i080-332,i080-333,i080-334,i080-335,i080-341,i080-342,i080-343,i080-344,i080-345,i160-001,i160-002,i160-003,i160-004,i160-005,i160-011,i160-012,i160-013,i160-014,i160-015,i160-021,i160-022,i160-023,i160-024,i160-025,i160-031,i160-032,i160-033,i160-034,i160-035,i160-041,i160-042,i160-043,i160-044,i160-045,i160-101,i160-102,i160-103,i160-104,i160-105,i160-111,i160-112,i160-113,i160-114,i160-115,i160-121,i160-122,i160-123,i160-124,i160-125,i160-131,i160-132,i160-133,i160-134,i160-135,i160-141,i160-142,i160-143,i160-144,i160-145,i640-001,i640-002,i640-003,i640-004,i640-005,i640-011,i640-012,i640-013,i640-014,i640-015,i640-021,i640-022,i640-023,i640-024,i640-025,i640-031,i640-032,i640-033,i640-034,i640-035,i640-041,i640-042,i640-043,i640-044,i640-045,lin01,lin02,lin03,lin04,lin05,lin06,lin07,lin08,lin09,lin10,lin11,lin12,lin13,MSM0580,MSM1008,MSM1234,MSM1707,MSM1844,MSM1931,MSM2000,MSM2326,MSM3676,MSM4038,MSM4114,MSM4190,MSM4224,MSM4414,MSM4515,P455,P456,P457,P458,P459,P460,P463,P464,P401,P402,P403,P404,P405,P406,P407,P408,cc3-4p,cc3-4u,cc3-5p,cc3-5u,cc6-2p,cc6-2u,P619,P620,P621,P622,P623,P624,P625,P626,P630,P631,P602,P603,P604,P605,P606,P607,P608,P609,P613,P614,antiwheel5,design432,oddcycle3,oddwheel3,se03,TAQ0023,TAQ0631,TAQ0739,TAQ0741,TAQ0891,TAQ0910,TAQ0920,TAQ0978,BERLIN52.
