Oakland University Implement Dijkstras Algorithm Project

User Generated

qngnpngrq_tvey

Programming

Oakland University

Description

Implement Dijkstra's algorithm to find a minimum weight path between two vertices in a graph. Specifications of the program:

Input: The input graph is given in a file in the following format: the first line contains just the number of vertices (which are assumed to be labeled with the numbers 1 up to the number of vertices), the second line contains two vertices between which we want to find a minimum weight path (from the first to the second!), and then the edges are listed by specifying the two endpoints and the corresponding weight of the edge (each line contains info about one edge, you may assume that the graph has no loops or multiple edges).

Output: The program should print into a file the vertices in the order they are explored (starting with the first vertex). At the end, it should print the path of minimum weight it found between the two vertices or state that there is no such path (if the two vertices lie in different components)

Make a source code of the program as a simple text file and the resulting outputs for the given sample inputs. In addition, e-mail me documentation of the program (this may partially be in the source code), explaining the data structures and the main variables.

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

View attached ex...

Related Tags