# lab8 - IE170 Lab#8 Prof Linderoth IE 170 Lab#8 Spanning...

This preview shows pages 1–2. Sign up to view the full content.

IE170 Lab #8 Prof. Linderoth IE 170 – Lab #8: Spanning Trees Due Date: March 19, 2006. 11AM. 1 Description and Objectives In this lab, we will implement the well-known algorithm of Prim to ﬁnd minimum spanning trees and compare its running time to Kruskal’s algorithm presented in class. Also, we will use our code to determine the expected distance of a spanning tree of a Euclidean graph on n nodes. Lab Objectives 1. Understand different graph data structures and their representation. 2. Understand how to use the Java Collections to implement graphs 3. Grasp the differences between the well-known MST algorithms of Kruskal and Prim 4. Have Fun! Useful Hints A Reasonable template for the graph data structure has been provided. LOOK at this code ﬁrst, and see if you understand what is going on in the code. 2 Prim’s Algorithm I would suggest that we don’t get too fancy with our priority queue implementation, but rather implement Prim’s algorithm using data structures like HashMap<Node, Double> Q = new HashMap<Node, Double>();

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 08/06/2008 for the course IE 170 taught by Professor Ralphs during the Spring '07 term at Lehigh University .

### Page1 / 3

lab8 - IE170 Lab#8 Prof Linderoth IE 170 Lab#8 Spanning...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online