in Algorithms edited by
35,313 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

4 Comments

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

17 Comments

If the minimum of 3 value of the graph makes a cycle , just take next value to make MST
13
13
Yes, that's correct. We have to find the maximum weight, but it still has to be a Minimum spanning tree. Therefore you can't take 6 weight in the MST. Just take the next lightest weight.
2
2
why 6 cant be the ans??? adding 1 2 and 3 by different MST
0
0
@Soumya Sharma 1

bcoz it is asking for maximum weight of MST. 1,2,3 forms a MST but it's weight is not maximum.
1
1
why not 5,6? why 3 is avioded and 4 is only considered?
0
0
@Sunny Mukharjee Because that won't result in a MST.
0
0
yeah got it bro :-) thanks :-)
0
0

Again cut and cycle property asked.

Since for a graph of 4 vertices, a spanning tree would have 3 edges,

there is no doubt that edge with weights 1 and 2 would definitely be included in MST because with 2 edges you cannot form a cycle.

Now, we are left to choose one edge with weights remaining as 3,4,5 and 6.

We want to make the weight of MST maximum.

Assign 3 such that it forms a cycle and hence it is rejected.

And now for the imagine graph as a cut and edges 4,5,6 passing the cut.

The lightest edge passing the cut is now 4 and hence included in MST of this graph.

Hence, maximum possible weight is 1+2+4=7.

33
33

@ayush Sir can you pls help me somehow with this question...

https://gateoverflow.in/3813/gate2005-it-52

actually i am not understanding the "cutset" term and the relation of the question with that ....

if possible pls help 

0
0
It's simple. Imagine you have a graph with a bridge.Now no matter what the weight of this bridge is, this bridge will be included in MST of G.

Similarly, the question says you have graph and it's MST has maximum weight edge.

I think you know definition of cut set of G.

Now the cut property says you can decompose the graph into two set of vertices such that the edges crossing the cut would have one endpoint in set 1 of vertices and another end in other set of vertices.

Now your graph can be imagined as joint made between two subcomponents and this joint is represented by the edges crossing the cut.

so lightest edge of this cut is included in mst of G.

For more details refer theorem 23.1 of coremen.
3
3
Thank You so much for your help Sir... finally got it :-)
0
0
good explanation
0
0

@

cut property ==> Lightest weight edge in cut set is always included in MST

In a graph cut edge with MIN weight is always included in MST

In a graph cut edge with MAX weight always excluded in MST

are this statement right ?? please correct me if wrong..this topic is very confusing for me :(

0
0

@jatin -khachane 1-Your third statement is wrong.Consider a pendant edge and to this edge I assign a very heavy weight.You have to take this into MST without which your MST would be disconnected.

1
1
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