Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Overview In this practical, you will write a C program to find the shortest path on a graph using Dijkstra's algorithm. Instructions: 1 . Graph

Overview
In this practical, you will write a C program to find the shortest path on a graph using
Dijkstra's algorithm.
Instructions:
1. Graph Representation:
The graph will be represented as a CSV file where each row represents an edge with
the following format: 'Vertex1, Vertex2, Weight'. The vertex labels are always capital
letters and only one letter long.
2. Menu Options:
Your program should provide the following menu options:
-Add a new graph to be saved in CSV format.
-Choose to work with a specific graph from the saved CSV files.
-Choose to find the shortest path based on the active graph from the CSV.
3. Adding a New Graph:
-Prompt the user to enter the details of the new graph (vertexes and weights).
-Save the graph in a CSV file.
4. Working with a Specific Graph:
-List all CSV files in a specific folder directory dynamically.
-Prompt the user to choose a file to import.
5. Finding the Shortest Path:
-Prompt the user to enter the start and end vertexes.
-Use Dijkstra's algorithm to find the shortest path.
-Display the path and its total weight.
Example
This is an example of a graph (left) that could be provided on demo day. You should then
be able to input the details into your program and generate the resulting CSV file (right).
Note: Vertex labels are always capital letters and only one letter long. (File is provided).
A,B,3
A,C,2
B,D,2
C,D,1
C,E,4
D,B,2
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

Students also viewed these Databases questions

Question

(3) How does it influence development activity in the organization?

Answered: 1 week ago