hw8 - COP 3530 Assignment 8 Due: December 1st, 2010 In this...

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

View Full Document Right Arrow Icon
COP 3530 Assignment 8 Due: December 1 st , 2010 In this problem you will implement Dijkstra algorithm on a sample graph. As you may know this algorithm is a graph search algorithm that solves the single- source shortest path problem for an undirected graph with nonnegative edge path costs. We assume that the input graph is given as follows and we want to fine the minimum distance of a specific node, say A, to another node, say F in this example. Your program should find the minimum distance and also the nodes in this minimum path. For example for the graph above the sample output can be like this: Distance from start: 4 f g d a Program’s Format: Your program should include two inner classes to define Nodes and Edges. These two classes are used later to hold properties of the input graph. Thus, two global lists hold the values for nodes and edges and are named “nodes” and “edges”, respectively.
Background image of page 1

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

View Full DocumentRight Arrow Icon
vector < Node *> nodes ; vector < Edge *> edges ; class Node { public : Node (
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/15/2012 for the course COP 3530 taught by Professor Davis during the Summer '08 term at University of Florida.

Page1 / 4

hw8 - COP 3530 Assignment 8 Due: December 1st, 2010 In this...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online