{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# hw6 - from Problem A Highlight the edges in the full...

This preview shows page 1. Sign up to view the full content.

AMS 301.2 (Spring, 2011) Estie Arkin Homework Set # 6 Due in class on Thursday, March 24, 2011. Recommended Reading: 3.3 (read the introduction on page 113, and then the section “Approximate Traveling Salesperson Tour Construction”, pages 117-120), 4.2, 4.1. Read also the handouts on the web about Dijkstra’s algorithm and the TSP tour construction. Do Problems: Problem A: Consider the following graph. A B C D E F 2 3 4 5 6 1 12 20 9 10 (a). Find a minimum spanning tree of the graph using Kruskal’s algorithm. List the edges in the order they are put into the tree. (b). Apply Prim’s algorithm to the same graph starting with node A. List the edges, in order added to the MST. (c). Edge (A,B) is currectly part of the minimum spanning tree. Suppose its cost is increased from 2 to 11. Will it still be part of the minimum spanning tree? Explain. Problem B: Apply Dijkstra’s algorithm to compute a tree of shortest paths, rooted at node A, in the graph
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: from Problem A. Highlight the edges in the full shortest path tree, after the conclusion of Dijkstra’s algorithm. Problem C: Use the quick (approximate) travelling salesperson construction to ±nd a tour for the cost matrix below. The ±rst node used should be node 1. In what order are nodes inserted by the algorithm? What is the total cost of the tour produced? Node 1 Node 2 Node 3 Node 4 Node 5 Node 6 Node 1 4 3 2 5 4 Node 2 4 2 4 5 4 Node 3 3 2 1 5 6 Node 4 2 4 1 2 5 Node 5 5 5 5 2 2 Node 6 4 4 6 5 2 Problem D: Suppose you are given a connected graph in which each edge has a colour, either red or blue. (The colouring is given, it cannot be changed.) How would you ±nd a spanning tree of the graph containing as many red edges as possible? For this problem I want you to either describe a new algortihm or modify one of the algorithms from class....
View Full Document

{[ snackBarMessage ]}