Open In App
Related Articles

Steiner Tree Problem

Improve Article
Save Article
Like Article

What is Steiner Tree? 

The Steiner Tree Problem is known to be NP-hard, which means that it is unlikely that there is an efficient algorithm that can solve the problem for large instances. However, there are several approximation algorithms that can provide a suboptimal solution with a guarantee on the quality of the solution.

One popular approximation algorithm for the Steiner Tree Problem is the Viterbi algorithm, which is based on dynamic programming. The algorithm computes the shortest path between all pairs of vertices in the graph, and then uses this information to construct a minimum cost tree that spans all the terminal nodes.

Given a graph and a subset of vertices in the graph, a Steiner tree spans through the given subset. The Steiner Tree may contain some vertices which are not in the given subset but are used to connect the vertices of the subset. The given set of vertices is called Terminal Vertices and other vertices that are used to construct the Steiner tree are called Steiner vertices. The Steiner Tree Problem is to find the minimum cost of Steiner Tree. 

See below for an example.


Spanning Tree vs Steiner Tree Minimum Spanning Tree is a minimum weight tree that spans through all vertices. If the given subset (or terminal) vertices are equal to the set of all vertices in the Steiner Tree problem, then the problem becomes the Minimum Spanning Tree problem. And if the given subset contains only two vertices, then it shortest path problem between two vertices. Finding out Minimum Spanning Tree is polynomial-time solvable, but the Minimum Steiner Tree problem is NP-Hard and the related decision problem is NP-Complete. 

Applications of Steiner Tree Any situation where the task is to minimize the cost of connection among some important locations like VLSI Design, Computer Networks, etc. 

Shortest Path-based Approximate Algorithm Since the Steiner Tree problem is NP-Hard, there are no polynomial-time solutions that always give optimal cost. Therefore, there are approximate algorithms to solve the same. Below is one simple approximate algorithm.

1) Start with a subtree T consisting of 
   one given terminal vertex
2) While T does not span all terminals
   a) Select a terminal x not in T that is closest 
      to a vertex in T.
   b) Add to T the shortest path that connects x with T

The above algorithm is (2-2/n) approximate, i.e., it guarantees that the solution produced by this algorithm is not more than this ratio of optimized solution for a given graph with n vertices. There are better algorithms also that provide a better ratio. Refer to the below reference for more details. 

Advantages of Steiner Tree :

The Steiner Tree has several advantages in various fields, such as telecommunications, transportation, and circuit design. 

Here are some of the main advantages:

  • Reducing costs: The Steiner Tree can help to reduce costs in many applications by finding the minimum cost tree that spans all the required nodes. For example, in telecommunication networks, the Steiner Tree can minimize the cost of laying cables or installing wireless access points.
  • Improving efficiency: By optimizing the routing of traffic or signals, the Steiner Tree can improve the efficiency of networks and systems. For example, in transportation networks, the Steiner Tree can optimize the routes of vehicles or minimize the travel time between destinations.
  • Increasing reliability: The Steiner Tree can also increase the reliability of systems by providing redundancy and backup paths. For example, in electrical power grids or water distribution networks, the Steiner Tree can provide alternate routes in case of failures or disruptions.
  • Enhancing performance: The Steiner Tree can enhance the performance of systems by optimizing the placement of components or devices. For example, in circuit design, the Steiner Tree can optimize the placement of components on a circuit board to minimize the signal delay and improve the performance of the circuit.

Disadvantages of Steiner Tree:-

While the Steiner Tree has several advantages, it also has some disadvantages that should be taken into consideration:

  • NP-hardness: The Steiner Tree Problem is known to be NP-hard, which means that finding the exact solution for large instances of the problem can be computationally infeasible.
  • Approximation algorithms: While there are several approximation algorithms for the Steiner Tree Problem, they may not always provide optimal solutions. In some cases, the quality of the solution may be significantly worse than the optimal solution, which can affect the performance and reliability of the system.
  • Sensitivity to changes: The Steiner Tree solution can be highly sensitive to changes in the input parameters, such as the location of the terminals or the cost of the edges. A small change in the input parameters can result in a significantly different Steiner Tree solution, which can make it difficult to compare different solutions or optimize the system.
  • Limited applicability: The Steiner Tree is mainly applicable to problems that involve connecting a set of terminals in a graph. It may not be suitable for other types of optimization problems, such as scheduling or resource allocation.

How the Viterbi algorithm is useful for approximation of steiner tree problem:

The Viterbi algorithm is a dynamic programming algorithm commonly used in the field of computational linguistics, speech recognition, and error-correcting codes. However, it can also be applied to solving the Steiner Tree Problem, which is a well-known problem in computer science and graph theory.

The Steiner Tree Problem involves finding the minimum-cost tree that spans a set of given vertices in an undirected, edge-weighted graph. This problem is known to be NP-hard, meaning that finding the exact solution to the problem is computationally infeasible for large instances. Therefore, heuristic algorithms are commonly used to approximate the optimal solution.

The Viterbi algorithm can be adapted to solve the Steiner Tree Problem by considering a modified version of the algorithm that finds the maximum probability path through a hidden Markov model. In this context, the vertices in the graph correspond to the states in the model, and the edges between vertices correspond to the transitions between states.

The Viterbi algorithm can be used to compute the cost of the minimum-cost tree that spans a subset of the vertices in the graph. Specifically, given a set of vertices to be spanned by the tree, the Viterbi algorithm can be used to compute the cost of the minimum-cost tree that spans those vertices and any additional vertices required to create a connected tree.

This approach is useful because it provides an approximation to the Steiner Tree Problem that is guaranteed to be within a constant factor of the optimal solution. The runtime of the algorithm is polynomial in the size of the graph and the number of vertices to be spanned by the tree, making it an efficient and practical solution for large instances of the problem.

Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!

Last Updated : 06 Jun, 2023
Like Article
Save Article
Similar Reads
Related Tutorials