0

Question is : Given a weighted graph G, first find a sub-graph H of G such that all vertices of H have the same weight and the number of vertices in H is maximized. Then find a minimum spanning tree(MSP) of H such that the total edge weights is minimized. Write a program to solve this problem. The input is a weighted graph G described by an adjacent list. Each vertex of G has an integer weight in the range of [1, floor(n/10)], where n is the number of vertices in G. Each edge has an integer weight in the range of [1,10n].


I have tried many ways to solve the problem but no progress. I assume graph to be undirected and complete graph. Can anyone help me with the solution?

  • What have you tried so far? – Enis Arik Nov 17 '20 at 19:51
  • I tried of grouping the vertices of the graph according to the weights and then finding the subgraph with maximum number of vertices. But grouping goes complex as I tried sorting the vertices according to weights. – Rishabh jain Nov 18 '20 at 03:49

0 Answers0