Reference no: EM131044321
Create an algorithm in java (or C++/ Python/PHP) which will provide the Dijkstras shortest path in a graph provided by the user.
The program should request input for the number of vertices, request a weighted Matrix, request a source and a destination. The output should display the shortest path
Objective:
Work in teams of up to 3 people to create an algorithm in java (or C++/ Python/PHP) which will provide the Dijkstras shortest path in a graph provided by the user. The program should request input for the number of vertices, request a weighted Matrix, request a source and a destination. The output should display the shortest path.
Requirements:
- Create a function called "dijkstraAlgorithm"
- Create a function called "evaluateNeighbours"
- Create a function called "main"
o Include an " int adjacency_matrix[][]";
o Include an " int number_of_vertices"
- Ask the User the following Questions:
o "Enter the number of vertices"
o "Enter the the Weighted Matrix for the graph"
o "Enter the source "
o "Enter the destination"
o Output: "The shortest path from " x "to " y" is " z
Documentation
- In the source code, there should be an introduction that explains how to run the code, and what the algorithm will do. This is in the form of comment at the beginning of the file. It should contain a brief explanation of the algorithm, the list of functions, and brief explanation of what they do.
- Each Function should have documentation explaining key parameters.
- There should be line comments for all important statements in the code.
- Include 2 sets of test cases: Include a suggested set of input data and then the corresponding output for reference.
Case of tracking the terrorists
: A bill has just been introduced in the Legislature, with wide bi-partisan support, that would create a database for creating a "network" of information by which to track non-documented workers and potential terrorists.
|
Under existing property insurance policy
: Dillon’s Camping Equipment was burglarized on 3/10/15. It is unclear how many items were stolen. Dillon and its insurance company are currently working to estimate the dollar value of the stolen goods in order to reach a financial settlement under th..
|
What is an observation schedule
: LaPiere conducted a study of the way restaurant owners granted or refused access to a Chinese couple. This is an example of observing behaviour in terms of:
|
Write an annotated bibliography about is a person born gay
: Write an annotated bibliography about Is a person born gay and if the environment affects one's sexuality? Create an annotated bibliography consisting of seven sources. Each entry will consist of a reference list citation.
|
Create an algorithm in java
: Create an algorithm in java which will provide the Dijkstras shortest path in a graph provided by the user - The output should display the shortest path.
|
Find the expected growth rate in the stock price
: The common stock for Hunter Corp. currently sells for $78. What dividend would the firm pay next year if the expected stock price will be $82 on the date the dividend is paid and investors require a 11% return? Find the expected growth rate (g) in th..
|
Emain same during the deposit and withdrawal time
: A man is planning to retire in 25 years. He wishes to deposit a regular amount every three months until he retires. He wants to withdraw $50,000 every year for the next ten years after this retirement. The first withdrawal will be made at the end of ..
|
Education loan
: The Wintergreens are planning ahead for their son's education. He's eight now and will start college in 10 years. How much will they have to set aside each year to have $65,000 when he starts if the interest rate is 7%?
|
Which could be subjected to a textual content analysis
: Which of the following could be subjected to a textual content analysis? Why did Warde sample food magazines from four different months in the year?
|