2
5.1
(a) 19
(b) 2
(c)
Edge included
Cut
AE
{
A, B, C, D
}
&
{
E, F, G, H
}
EF
{
A, B, C, D, E
}
&
{
F, G, H
}
BE
{
A, E, F, G, H
}
&
{
B, C, D
}
FG
{
A, B, E
}
&
{
C, D, F, G, H
}
GH
{
A, B, E, F, G
}
&
{
C, D, H
}
CG
{
A, B, E, F, G, H
}
&
{
C, D
}
GD
{
A, B, C, E, F, G, H
}
&
{
D
}
5.2
(a)
Vertex included
Edge included
Cost
A
0
B
AB
1
C
BC
3
G
CG
5
D
GD
6
F
GF
7
H
GH
8
E
AE
9
5.3 Since the graph is given to be connected, it will have an edge whose removal still leaves it connected,
if and only if it is not a tree i.e. has more than

V
 
1 edges. We perform a DFS on the graph until
we see

V

edges. If we can find

V

edges then the answer is “yes” else it is “no”. In either case, the
time taken is
O
(

V

).
5.4 Let
e
i
, n
i
denote the number of edges and vertices in the
i
th component. Since a connected graph on
t
vertices must have at least
t

1 edges,

E

=
k
i
=1
e
i
≥
k
i
=1
(
n
i

1) =
n

k
5.5
(a) The minimum spanning tree does not change. Since, each spanning tree contains exactly
n

1
edges, the cost of each tree is increased
n

1 and hence the minimum is unchanged.
(b) The shortest paths may change. In the following graph, the shortest path from
A
to
D
changes
from
AB

BC

CD
to
AD
if each edge weight is increased by 1.
B
A
C
D
1
1
5
1
5.6 Suppose the graph has two different MSTs
T
1
and
T
2
. Let
e
be the lightest edge which is present in
exactly one of the trees (there must be some such edge since the trees must differ in at least one edge).
Without loss of generality, say
e
∈
T
1
. Then adding
e
to
T
2
gives a cycle. Moreover, this cycle must
contain an edge
e
which is (strictly) heavier that
e
, since all lighter edges are also present in
T
1
, where
e
does not induce a cycle. Then adding
e
to
T
2
and removing
e
gives a (strictly) better spanning tree
than
T
2
which is a contradiction.
5.7 Multiply the weights of all the edges by 1.
Since both Kruskal’s and Prim’s algorithms work for
positive as well as negative weights, we can find the minimum spanning tree of the new graph. This is
the same as the maximum spanning tree of the original graph.