0

Let G be a weighted undirected graph and e be an edge with maximum weight in G.Suppose there is a minimum weight spanning tree in G containing the edge e.Which of the following statements is always TRUE?

a.There exists a cut in g having all edges of maximum weight

b.There exists a cycle in G having all edges of maximum weight

c.Edge e can not be contained in a cycle

d.All edges in G have the same weight

Is a previous year exam questing .i am having trouble to under stand it can any one explain it to me .

Xax
  • 185
  • 6
  • 18
  • 3
    This question appears to be off-topic for Stack Overflow because it is about graph theory rather than programming. It might be on topic at [cs.SE] or [math.SE] Stack Exchange. – Ilmari Karonen Dec 24 '13 at 16:17

2 Answers2

2

The bottom three are false, and the following simple graph is a counter-example to all three:

     1
  a --- b
  |    /
2 |   /
  |  / 2
  | /
  c

Any minimum-weight spanning tree contains either the edge <a,c> or the edge <b,c>. In either case, it is easy to check that (b), (c), and (d) all fail.

Edit: (a) is true. Here is a proof:

Let e be an edge of M which is of maximum weight in G, and let M be a minimum-weight spanning tree for G containing the edge e. If the edge e cuts the graph G, then (a) is obviously true. So, let G' be obtained from G by removing the edge e, and suppose G' is connected.

Let M' be obtained from M by removing the edge e. Now we know that M' consists of two components, because M is a tree, and removing one edge from a tree disconnects it into two components. Furthermore every vertex of G' belongs to M', and G' is connected, so we can obtain a spanning tree of G' by adding a single edge of G' to M'. I claim that every such edge is of maximum weight in G.

To see why, suppose there is an edge e' in G' which connects the two components of M', but is of sub-maximal weight in G. Then, we could remove the edge e from M (our original spanning tree), add this edge e' to M to obtain a new spanning tree of G, but it would be of total weight less than that of M, contradicting the minimal-weight of M.

So, consider the set of all edges of G' which connect the two components of M'. These edges together with e form an edge-cut-set of G, and all must be of maximal weight in G.

Andrey Mishchenko
  • 3,986
  • 2
  • 19
  • 37
  • let (a,c) is edge e .but we can also chose (b,c).so e may be or may be not in the minimum spanning tree depending on the choise @Andery – Xax Dec 24 '13 at 16:11
  • 1
    Sure, you can choose ``. Then there is a minimal-weight spanning tree of `G` containing `e = `, namely the tree having the two edges `` and ``, and the same arguments hold. – Andrey Mishchenko Dec 24 '13 at 16:12
  • @Andery can u give counter example of option c . i am understanding your proof – Xax Dec 24 '13 at 16:27
  • 1
    @avi Let `G` be the graph in my diagram. Clearly every edge is contained in a cycle. Now, let `M` be any minimum-weight spanning tree of `G`. (There are only two.) Let `e` be an edge of `M`, which is of maximum weight in `G`. (Having chosen `M`, there is only one option for `e`.) Then `e` is contained in a cycle of `G`. – Andrey Mishchenko Dec 24 '13 at 16:29
  • a-----b------c let ab and ac have same weight e .contradicting option 1.@Andrey – Xax Dec 24 '13 at 16:42
  • No, either edge is a cut-edge in that graph, so option (a) holds. – Andrey Mishchenko Dec 24 '13 at 16:43
  • @avi deleting the edge between `a` and `b` cuts the graph, and if the two edges have the same weight then each is of maximum weight. – Andrey Mishchenko Dec 24 '13 at 16:43
  • a cut does not include all the edges of maximum weight. is lets us only one choice . there are two cut – Xax Dec 24 '13 at 16:44
  • 1
    @avi The way I read the option (and almost certainly what was meant) is that "there exists a cut, so that every edge of the cut is of maximum weight in `G`," as opposed to "there exists a cut, consisting of every edge of `G` having maximum weight in `G`." – Andrey Mishchenko Dec 24 '13 at 16:45
  • ok that's clear every thing. i was considering the second meaning as u said . by the way if it meant that "there exists a cut, consisting of every edge of G having maximum weight in G." then what will you think c is the best choice ?? – Xax Dec 24 '13 at 16:50
  • @avi if you feel that your question has been adequately answered then you should consider accepting one of the answers. – Andrey Mishchenko Dec 24 '13 at 16:51
0

Let's start from the simple ones - d is wrong - take any MST, and reduce one of the weights to some unique new value in some edge (not e) - it's still an MST, but not all edges have the same weight

c is false - if e was heavier that any other edge it would have been true because if it was in a cycle, you could have removed e from the MST (and if required for connectivity - pick any other edge instead and receive a lighter MST). However, e can be in a cycle if the alternative edges are all of the same weight.

b is false - say e is the heaviest, but not in a cycle, just connects the graph to some remote vertice (that isn't connected otherwise).

a - i'm not sure if you meant that the cut is max weight or all the edges of max weight are there (that's not the same thing), please clarify

Leeor
  • 19,260
  • 5
  • 56
  • 87
  • @avi The problem statement says, "let `M` be a minimum-weight spanning tree and let `e` be a maximum-weight edge of `G` which is also an edge of `M`." – Andrey Mishchenko Dec 24 '13 at 16:15
  • what i am saying that in your example bc an ac are light edge. we can chose any one of them @Andrey – Xax Dec 24 '13 at 16:19
  • 1
    You have to first pick a minimum-weight spanning tree. Once you have chosen a minimum-weight spanning tree, you then have to pick a maximum-weight edge from *within that spanning tree*. In my example you have no choice about the edge once you have chosen your tree. – Andrey Mishchenko Dec 24 '13 at 16:21
  • 1
    @avi, i'm only removing `e` as part of proving it's impossible (you'd have a lighter MST so the original one containing `e` isn't an MST at all!). And even that is for the case `e` is known to be heavier than any other edge (which is not the case in the question). If other edges can have the same weight, then `e` can be part of the given MST as well as part of a cycle, since any other spanning tree without `e` would have the same weight - this is shown nicely in Andreys example – Leeor Dec 24 '13 at 16:27
  • when edge e is on a pendent vertex then we have to have add e .@Leeor – Xax Dec 24 '13 at 16:32
  • @avi, we're discussing the case where `e` is on a cycle in the original graph `G`, so there's an alternative (the other edges connecting `e`'s vertices). You won't have a cycle in the original MST, but removing `e` must introduce another edge instead. Since this case is possible, statement `c` is wrong – Leeor Dec 24 '13 at 16:35