in Algorithms edited by
35,320 views
85 votes
85 votes
Let $G$ be a complete undirected graph on $4$ vertices, having $6$ edges with weights being $1, 2, 3,  4, 5,$ and $6$. The maximum possible weight that a minimum weight spanning tree of $G$ can have is __________
in Algorithms edited by
35.3k views

11 Comments

The question is  asked such a way that you have make the weight maximum in a MST.No matter how you draw the graph you can't make the weight more that 7,It may be 6 or 7 but they asked about maximum possible weight that the MST have.So 7 is the maximum, You can' make it more than that because that will not be MST.
7
7
abc Caption

8
8
You took a given graph- but the question does not restrict to just one possible graph. For that graph you are correct.
0
0
you have tried for only one possibility. there will be many ways to draw it but no matter how you draw you will get the maximum possible weight of the minimum spanning tree is 7.
0
0
My approach

you just make cycle with 3 min weight edge

so in this you will get two edges weight 1,2.

now 3 is included in cycle so we cant consider it

so now remaining 4,5,6

so min is 4 becouse complete graph we consider

so ans is 1+2+4
10
10
Here the question needs us to construct a graph with 4 vertices and 6 edges of given weights, such that the MST weight of the constructed graph is maximum. In order to maximize MST weight, we should try to sacrifice lower weight edges to form cycles.
2
2
Also to add one more point that the graph is undirected, if it would have been directed then further twist maybe possible.

As of now 7 is the answer.
0
0
would have been better if you could have explained how to get the answer instead of explaining what the answer would be...
0
0
It is not at all rocket science: Here is the solution

You pick up four min edges to get MST so you pick edge with weight 1 then 2 as no choice but when picking up 3 you can ask can I avoid this one so that I can pick 4 or above which has greater weight and answer is yes you simply make weight 3 edge as so that cycle is formed, and now will have to pick edge with weight 4 as you have no choice and no additional cycle can be formed as graph is complete 4
0
0
@arjun sir graph is complete that is all distinct vertices are connected with unique edge so only one graph structure is possible ?
Square shape with diagonal vertices connected
No of edges = 4*(4-1)/2 = 6 edges as given in graph
0
0
edited by

I think there are only 2 mst possible with min weight 6,7 so answer will be 7

this question gets to many view just due to  wrong interpretaion of question i.e. what actually asking in question is confusing means should we apply mst algo or not like this confusion .

0
0

18 Answers

144 votes
144 votes
Best answer
Many people here have not understood the question itself. Consider a complete graph of $4$ vertices. We have a total of $6$ edges of given weights but we do not have the exact graph. Many different graphs are possible each having a different structure. Consider these $2$ graphs, both of them are different. We do not know the exact structure of the graph, so what the question wants is to find the MST of all such structures and out of these tell the weight of the MST having maximum weight. The point about the MST of a graph with unique edge weights is valid for a given structure of the graph. With the same set of edge weights more than $1$ graph is possible and all of them can have different MSTs.

My solution: Draw a complete graph of $4$ vertices. Sort given edges $y$ weight in increasing order. Just like Kruskal's algorithm sort the edges by weight. MST of graph with $4$ vertices and $6$ edges will have $3$ edges. Now in any case we will have to include edges with weights $1$ and $2$ as they are minimum and Kruskal's algorithm includes minimum weight edge if it does not form a cycle. We can not have a cycle with $2$ edges. In Kruskals algorithm, an edge will be rejected if it forms a cycle with the edges already selected. To increase the weight of our MST we will try to reject the edge with weight $3.$ This can be done by forming a cycle. The graph in pic1 shows this case. This implies, the total weight of this graph will be $1+2+4 = 7.$
edited by
by

4 Comments

0
0

@Arjun sir images are not visible which he is referring to… plz update this ans with an image 

0
0

where is image ? :|      @Lakshman Bhaiya the ans need an update the image is missing !!

1
1
79 votes
79 votes

Graph $G$ can be like this:

edited by

4 Comments

What we do if edges weight are

1,2,3,4,5,6,7,8,9 and 10.

than find maximum possible weight that a minimum weight spanning tree of G have..???
0
0

@Vikas123

then we have to include minimum 4 edges to make a spanning tree and we put edges 1 ,2 and 3 in a cycle. so 3 will be rejected.

=> 1 + 2 + 4 + 5 = 12

0
0

@

we can have edges 1 and 2, edge 3 makes cycle with 1-2, so take edge 4.
Now edge 5 makes cycle with 1-4 and similarly edge 6 makes cycle with 2-4, so now we can only take edge 7.

max MST weight= 1+2+4+7=14.

1
1
30 votes
30 votes
ans is 7.

it is said maximum weight pssbl.

draw a triangle. 3 sides weight 1 2 3. and 4th point is in center. join it with tringle vertices.. got more 3 sides. new side weight 4 5 6. now draw mst. take 1 take 2. cant take 3, so take 4. 1+2+4=7
edited by

4 Comments

U should hav drawn the image of ur answer ...
1
1
explain why...dont only state
0
0

@puja.See this...

0
0
18 votes
18 votes

Corrections or suggestions are welcomed.

4 Comments

as in 2,3 (we need to select smaller one so 2 has been selected)

NOTE:-just take all possible maximum and out of all possible maximum pick minimum

0
0
@tanaya.... perfect one..thanks... finally it is clear
0
0
The best answer for this question
0
0
Answer:

Related questions