Assume that the weights in a graph are positive, prove that you can rescale them by adding a constant to all of them or by multiplying them all by a constant without affecting the MSTs, provided that the new weights are positive.
Show that if a graph's edges all have distinct weights, the MST is unique.
Consider the assertion that a graph has a unique MST only if its edge weights are distinct. Give a proof or a counterexample.
Label the following points in the plane 0 through 5, respectively:
(1, 3) (2, 1) (6, 5) (3, 4) (3, 7) (5, 3)Taking edge lengths to be weights, give an MST of the graph defined by the edges
1-0 3-5 5-2 3-4 5-1 0-3 0-4 4-2 2-3
Suppose that a graph has distinct edge weights. Does its shortest edge have to belong to the MST? Prove that it does or give a counterexample.
Answer the previous question (textbook exercise 20.22) for the graph's longest edge.
Give a counterexample that shows why the following strategy does not necessarily find the MST: "Start with any vertex as a single-vertex MST, then add V-1 edges to it, always taking next a minimal edge incident upon the vertex most recently added to the MST."
Suppose that a graph has distinct edge weights. Does a minimal edge on every cycle have to belong to the MST? Prove that it does or give a counterexample.
Given an MST for a graph G, suppose that an edge in G is deleted. Describe how to find an MST of the new graph in time proportional to the number of edges in G .
Suppose that you use a priority-queue implementation that maintains a sorted list. What would be the worst-case running time for graphs with V vertices and E edges, to within a constant factor? When would this method be appropriate, if ever? Defend your answer.
An MST edge whose deletion from the graph would cause the MST weight to increase is called a critical edge. Show how to find all critical edges in a graph in time proportional to E lg V.
The following table from a published road map purports to give the length of the shortest routes connecting the cities. It contains an error. Correct the table. Also, add a table that shows how to execute the shortest routes, in the style of Figure 21.4.
Providence Westerly New London Norwich Providence - 53 54 48 Westerly 53 - 18 101 New London 54 18 - 12 Norwich 48 101 12 -
Draw the SPT from for the network defined in textbook exercise 21.1 and for its reverse. Give the parent-link representation of both trees.
Consider the edges in the network defined in Exercise 21.1 to be undirected edges such that each edge corresponds to equal-weight edges in both directions in the network. Answer the previous question (textbook exercise 21.11) for this corresponding network.
Change the direction of edge 0-2 in Figure 21.2. Draw two different SPTs that are rooted at 2 for this modified network.
Write a code fragment that, using a parent-link representation of an SPT, prints out each of the paths to the root.
Write a code fragment that, using a paths-matrix representation of all shortest paths in a network, prints out all of those paths, in the style of Figure 21.3.
Show, in the style of Figure 21.10, the result of using Dijkstra's algorithm to compute the SPT of the network defined in Exercise 21.1 with start vertex 0.
Develop an algorithm for finding an edge whose removal causes maximal increase in the shortest-path length from one given vertex to another given vertex in a given network.
Show that an MST of an undirected graph is equivalent to a bottleneck SPT of the graph: For every pair of vertices v and w, it gives the path connecting them whose longest edge is as short as possible.
Show, in the style of Figure 21.9, the result of using Dijkstra's algorithm to compute all shortest paths of the network defined in Exercise 21.1.
Back to the list of assignments.