2

I have to solve this problem:

Given a weighted connected undirected graph G=(V,E) and vertex u in V. Describe an algorithm that finds MST for G such that the degree of u is minimal; the output T of the algorithm is MST and for each another minimal spanning tree T' being the degree of u in T less than or equal to the degree of u in T'.

I thought about this algorithm (after some googling I found this solution for similar problem here):

  • Temporarily delete vertex u.
  • For each of the resulting connected components C1,…,Cm find a MST using e.g. Kruskal's or Prim's algorithm.
  • Re-add vertex u and for each Ci add the cheapest edge between 1 and Ci.

EDIT:

I understood that this algorithm may get a wrong MST (see @AndyG comment) so I thought about another one:

  • let k be the minimal increment between each two weights in G and add 0 < x < k to each adjacent edge of u. (e.g. if all the weights are natural numbers so k=1 and x is fraction).
  • find a MST using Kruskal's algorithm.

This solution is based on the fact that Kruskal's algorithm iterate the edges ordered by weigh, so the difference between all the MSTs of G is each edge was chosen from among all edges of the same weight. Therefore, if we increase the degree of the adjacent edges of u, the algorithm will choose the others edges in the same degree and not the adjacent of u unless this edge is necessary for the MST and the degree of u will be the minimal in all the MSTs of G.

I still don't know if it works and how to prove the correctness of this algorithm.

I will appreciate any help.

Community
  • 1
  • 1
besad
  • 109
  • 9
  • I'm not so sure your algorithm can provide a true MST. Consider a graph with two connected components save for edges u-v and j-k. For the sake of argument assume Kruskal's or Prim's would have selected edge u-v to be in the MST. After deleting u, you are still left with a single connected component due to edge j-k. Upon re-adding u and adding in the cheapest edge to u (u-v), you are left with a spanning tree that has redundant edge j-k. – AndyG May 17 '15 at 00:44
  • I think your x has to have more restrictions than you suggest, but then I have a proof that your second algorithm is correct. See my answer. – Paul Hankin May 17 '15 at 02:59

1 Answers1

2

To summarize the suggested algorithm [with tightened requirements on epsilon (which you called x)]:

  • Pick a tiny epsilon (such that epsilon * deg(u) is less than d, the smallest non-zero weight difference between any pair of subgraphs). In the case all the original weights are natural numbers, epsilon = 1/(deg(u)+1) suffices.
  • Add the epsilon to the weights of all edges incident to u
  • Find a minimal spanning tree.

We'll prove that this procedure finds an MST of the original graph that minimizes the number of edges incident to u.

Let W be the weight of any minimal spanning tree in the original graph.

First, we'll show every MST of the new graph is an MST of the original graph. Any non-MST in the original graph must have weight at least W + d. Any MST in the new graph must have weight at most W + deg(u)*epsilon (since any MST in the original graph has at most this weight in the new graph). Since we chose epsilon such that deg(u)*epsilon < d, we conclude that any MST in the new graph is also an MST in the original graph.

Second, we'll show that the MST of the new graph is the MST of the original graph that minimizes the number of edges incident to u. An MST, T, of the original graph has weight W + k * epsilon in the new graph, where k is the number of edges of T incident to u. We've already shown that every MST of the new graph is also an MST of the original graph. Therefore, the MST of the new graph is the MST of the original graph that minimizes k (the number of edges incident to u).

Paul Hankin
  • 54,811
  • 11
  • 92
  • 118