Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Solutions Clrs | PDF | Vertex (Graph Theory) | Theoretica... https://www.scribd.

com/document/282770327/solutions-clrs

Read free for 30 days

Homework Solutions – Unit 4: Chapter 23


CMPSC 465

Disclaimer: This is a draft of solutions that has been prepared by the TAs and the instructor makes no guarantees that
solutions presented here contain the level of detail that would be expected on an exam. Any errors or explanations you find
unclear should be reported to either of the TAs for corrections first.

Exercise 23.1-2

Professor Sabatier conjectures the following converse of Theorem 23.1. Let G = (V , E ) be a connected, undirected graph with
a real-valued weight function w defined on E . Let A be a subset of E  that is included in some minimum spanning tree for G
let (S , V  – S ) be any cut of G that respects A, and let (u, v) be a safe edge for A crossing (S , V  – S ). Then, (u, v) is a light edge
for the cut. Show that the professor’s conjecture is incorrect by giving a counterexample.

Solution:

That is false. A safe edge (with respect to the set of edges  A) is defined to be any edge such that when we add it to  A, we still
have a subset of some minimum spanning tree. This definition does not reference light edges in any way. In the situation
from a counterexample, there may be multiple safe edges from S  to V  – S , not all of them have to be light.

A counterexample is shown below. Let S  = {a, b, c}, A = {(a, b), (b, c}, we can see that (a, d ), (b, e), (c, f ) are all safe edges
for A crossing (S , V  – S ), but only (b, e) is a light edge for the cut.

1 1
a b c

3 1 5 4
5
d e  f

Exercise 23.1-3

Show that if an edge (u, v) is contained in some minimum spanning tree, then it is a light edge crossing some cut of the graph.

Solution:

Suppose (u, v) T , a minimal spanning tree. Let A = {T  – (u, v)}. A contains two trees: A = T u  T v. T u is the tree in which
vertex u appears, and T v is the tree in which vertex v appears. Moreover, V u  V v = V , where V u contains the vertices of T u 
and V v contains the vertices of T v. That is, (V u, V v) is a cut, which is crossed by ( u, v) and which respects A. Any edge crossing
the cut rejoins the two trees. If there is a crossing edge ( x, y) with w( x, y) < w(u, v), then T’  = T u  T v ( x, y) is a spanning
tree with weight:
w(T’ ) = w(T u  T v) + w( x, y) as T’  = T u  T v  ( x, y)
= w(T u  T v) + w(u, v) + [w( x, y) – w(u, v)] by adding 0, that is w(u, v) – w(u, v)
= w(T ) – [w(u, v) – w( x, y)] as T  = T u  T v  (u, v)
< w(T )

This contradicts with that (u, v) is contained in some minimum spanning tree. So, w(u, v) < w( x, y) for all ( x, y) crossing the
cut (V u, V v). That is, (u, v) is a light edge crossing the cut.

Exercise 23.2-1

Kruskal’s algorithm can return different spanning trees for the same input graph G, depending on how it breaks ties when the
edges are sorted into order. Show that for each minimum spanning tree T of G, there is a way to sort the edges of G in
Kruskal’s algorithm so that the algorithm returns T .

Page 1 of 1 PSU CMPSC 465 Spring 2013

2 of 25 12/11/21, 4:22 PM

You might also like