# ClassS04CS141/Hwk6

ClassS04CS141 | ClassS04CS141 | recent changes | Preferences

No diff available--this is the first major revision. (no other diffs)

## Hwk6, due Wednesday, week 10, at start of class

1. Given a connected, undirected graph with edge weights and a vertex S, a shortest path tree rooted at S is a spanning tree T such that for each vertex v in the graph, the length (sum of edge weights) of the shortest path from S to v in T is the same as the length of the shortest path from S to v in the original graph.

Disprove the following claim: given any undirected graph where all the edge weights are distinct and any start vertex S, there is at most one shortest path tree rooted at S. (That is, the shortest path tree rooted at S is unique.)

2. Given a connected, undirected graph with edge weights and two vertices S and T, an S,T-cut vertex is a vertex (other than S or T) whose removal from the graph separates S and T. (That is, a vertex w such that all paths from S to T go through w.)

2A: Give an example of a graph with 5 vertices (two of which are S and T) with three S,T-cut vertices.

2B: prove or disprove the following claim: In a DFS of the graph starting at S, every S,T-cut vertex must lie on the path from S to T in the resulting dfs tree.

2C: prove or disprove the following claim: In a DFS of the graph starting at S, every vertex on the path from S to T in the resulting DFS tree is an S,T-cut vertex.

2D: use low[] numbers (from CutVerticesByDFS) to give a necessary and sufficient condition for a vertex W on the path from S to T in the DFS tree to be an S,T-cut vertex.

3. Consider the following two rules. Starting with a connected graph G=(V,E) with edge weights:

• red rule: Choose any subset S of the vertices. Let L be the set of edges leaving S. That is, L = {(u,w) ∈ E : u is in S but w is not}. If L has no red edges, then choose an edge in L of minimum weight and color it red.
• blue rule: Choose any cycle C in the graph. If C has no blue edges, then choose an edge (u,w) in C of maximum weight and color it blue.

Prove or disprove the following claim: If you start with an undirected connected graph with edge weights, and apply the above rules repeatedly in any order, then the following property holds: There is a minimum spanning tree T containing all the red edges and none of the blue edges.

Hint: review MinimumSpanningTreesByKruskals

ClassS04CS141 | ClassS04CS141 | recent changes | Preferences