Midterm Exam. (Special topics on graph algorithms)

Download (0)

Loading.... (view fulltext now)

全文

(1)

Midterm Exam. (Special topics on graph algorithms)

Instructor: Kun-Mao Chao

April 15, 2004

Unless specified explicitly, a graph G is assumed to be simple and undirected, and the edge weights are nonnegative.

1. (10%) Assume the vertex set V = {1, 2, 3, 4, 5, 6, 7}. Decode the following Pr¨ufer sequences: (a)

P = (1, 2, 3, 4, 5), and (b) P = (1, 1, 3, 5, 7).

2. (10%) Let F1, F2, . . . , Fk be a spanning forest of G, and let (u, v) be the smallest of all edges with only

one endpoint u ∈ V (F1). Prove that there is a minimum spanning tree containing (u, v) among all

spanning trees containing all edges in ∪k

i=1E(Fi).

3. (10%) Apply the Bellman-Ford algorithm to Figure 1, and show how it detects the negative cycle in the graph.             

Figure 1: A directed graph with a negative-weight cycle.

4. (15%) (a) What is a minimum routing cost spanning tree of a complete graph with unit length on each edge? Prove your answer. (b) What is a maximum routing cost spanning tree of a complete graph with unit length on each edge? Prove your answer.

5. (10%) (a) Give a tree with two centroids. (b) Show that any tree can have at most two centroids. 6. (10%) Construct an example where its minimum spanning tree has a routing cost Θ(n) times that of

a minimum routing cost spanning tree.

7. (15%) Prove that a shortest-paths tree rooted at the median of a graph is a 2-approximation of a minimum routing cost spanning tree of the graph.

8. (10%) Let P = (p1, p2, ..., pk) be a path separator of bT . It is easy to see that a centroid must be in

V (P ). Let pq be a centroid of bT . Construct R = SPG(p1, pq) ∪ SPG(pq, pk). In class, we show that

X v∈V dG(v, R) ≤ X v∈V dbT(v, P ) + (n/12)w(P ).

Explain why we could have the coefficient n/12 instead of n/6 as in the case using only two end vertices

p1 and pk.

9. (10%) We are given a tree T with positive edge weights. Suppose that P = SPT(v1, v2) is a diameter.

Starting at v1 and traveling along the path P , we compute the distance dT(u, v1) for each vertex u

on the path. Let u1 be the last encountered vertex such that dT(v1, u1) ≤ 12w(P ) and u2 be the next

vertex to u1. Prove that u1 or u2is a center of the tree.

數據

Figure 1: A directed graph with a negative-weight cycle.

Figure 1:

A directed graph with a negative-weight cycle. p.1

參考文獻

相關主題 :