202501230401

Tags : Complexity Theory, Topics in Algorithms

Steiner Trees are NP Complete


The decision problem for Steiner Trees is the following:

Question

Given a graph and a weight , is there a Steiner Tree of weight in the graph.

The problem is clearly in as given a graph, it is very easy to check if its weight is less than and it covers all the necessary vertices.


Reduction

The proof for it being is a reduction from Exact 3 Cover as follows:

Given a set , st and set of 3-size subsets , one can construct the following graph:

  • Let
  • Let contain the following edges:
    • For each there is an edge
    • If for some then add the edge

Then there exists an exact 3 set cover of using iff the graph as a steiner tree of weight , where .


Proof

Left to right is easy, the solution to the Exact 3 cover gives us exactly the set of steiner vertices that are to be selected, namely the subset of which was the solution.

For the other direction, consider a steiner tree of size at most , this means that the tree contains vertices, 3p of them are in the bottom layer, and one is in the top layer. This means that there are exactly elements from the second layer. By construction, each element in as at most 3 children in any tree, and by php, there would have to be eactly , The set chosen here in the second layer is the solution to the Exact 3 Cover.


References