Professional Documents
Culture Documents
1. Given a complete graph with vertex set {A, B, C, D, E, F } and the following weights
on the edges.
A B C D E F
A 0 6 9 11 5 9
B 6 0 3 6 5 2
C 9 3 0 0 4 4
D 11 6 0 0 5 6
E 5 5 4 5 0 8
F 9 2 4 6 8 0
2. Given a connected undirected graph G with positive weights on the edges. By use
of Dijkstra’s algorithm, all shortest paths starting at vertex r have been found. The
union of these paths forms a tree, which we will call the Dijkstra tree at r.
3. At each step of Kruskal’s algorithm it has to be checked if the candidate edge creates
a circuit. Think of a way to implement this, and deduce un upper bound for the
complexity of the algorithm as a function of the number of vertices.
4. If some arcs of a directed graph D have negative length, but no circuit has a negative
length, then there exists a shortest path between any two nodes of D. However,
Dijkstra’s algorithm does not work anymore.
1
6. The table below gives the weights (lengths) w(x, y) of the arcs in a directed graph
(x corresponds to the row, and y to the column).
A B C D E F
A 0 8 8 8 8 2
B 8 0 −2 7 6 2
C 8 4 0 3 2 3
D 8 4 0 0 −1 4
E 8 2 2 3 0 8
F 8 3 2 −1 4 0