# E8-MST.pdf - Exercises 8 – minimal spanning trees(Prim...

• No School
• AA 1
• 3

This preview shows page 1 - 2 out of 3 pages.

Exercises 8 – minimal spanning trees (Prim and Kruskal) Questions 1. Suppose we have an undirected graph with weights that can be either positive or negative. Do Prim’s and Kruskal’s algorithim produce a MST for such a graph? 2. Consider the problem of computing a maximum spanning tree, namely the spanning tree that maximizes the sum of edge costs. Do Prim and Kruskal’s algorithm work for this problem (assuming of course that we choose the crossing edge with maximum cost)? 3. Prove that for any weighted undirected graph such that the weights are distinct (no two edges have the same weight), the minimal spanning tree is unique. (See lecture 8, slide ~15). 4. Cycle Property: Let G be an undirected connected weighted graph. Suppose the graph has at least one cycle (choose one). For that chosen cycle, let edge e be an edge that has strictly greater cost than all other edges in the cycle. (Such an edge might not exist, e.g. there might be two edges that have the same greatest cost). Show that e does not belong to any MST of G. 5. Consider a “reversed” Kruskal’s algorithm for computing a MST. Initialize T to be the set of all edges in the graph. Now, consider edges from largest to smallest cost. For each edge, delete it from T if that edge belongs to a cycle in T. (Never mind how to implement this. Just note that union-find does not allow deletions, so an inefficient implementation of this reversed Kruskal is not obvious.) Assuming all the edge costs are distinct, does this new algorithm correctly compute a MST? 6. (From Sedgewick’s course) Given a connected graph G with positive weights, which of the following will compute an MST of G? a) Change the weight of each edge from c(e) to c(e) + 17.

Subscribe to view the full document.

• Fall '19
• Graph Theory, Planar graph, Spanning tree, sum of edge costs

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes