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

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

View Full Document Right Arrow Icon
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 find 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 first, 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>();
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

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 Right Arrow Icon
Ask a homework question - tutors are online