Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Input: Please read [input.txt] as the initial parameter, the parameters will be separated by ' ' (whitespace) Output: Please output the results to [answer.txt], each

image text in transcribed

Input: Please read [input.txt] as the initial parameter, the parameters will be separated by ' ' (whitespace) Output: Please output the results to [answer.txt], each line outputs a set of calculated shortest path distances, please do not output Additional information in answer.txt (eg: Show list:/ Answer: ...) No need to print anything on the terminal Please implement Dijkstra Shortest Path Algorithm for this question, this question is not limited to STL Container The program file is in the same directory as input.txt and answer.txt, and only a single program file needs to be submitted, named [student number].c or [Student ID].cpp, put the program file in the [No28] folder and upload it together with other files. Wrong naming (cases are considered different), including any other files such as [input.txt] , [answer.txt] , [*.exe], [*.h], points will be deducted for those who output any message in the terminal. [input.txt] The first line: data ratio (0

image text in transcribed [answer.txt] Each line outputs a set of calculated shortest path distances (how many pieces of data there are, that is, how many lines are output) **Please output the shortest path distance as an integer (int) image text in transcribed

28. A computer company in the Silicon Valley area (see Figure 11-28) needs to route delivery vehicles between cities on the shortest route. Having studied data structures, you recognize that this is an application for Dijkstra's short- est path algorithm. To demonstrate your proposal, you decide to implement it on your computer. To do so you must complete the following tasks: a. Convert the map in Figure 11-28 to a network and present it to management. b. Modify the graph ADT to store weights in the are nodes. c. Write an interactive program that when given the start and destination displays the shortest route between them. San Rafael San Pablo Bay Pacific Ocean 12 18 3 3 Daly City San Francisco Oakland 19 18 31 21 San Francisco Bay San Lorenzo San Mateo 12 13 Hayward Dublin 6 7 9 Redwood City 5 Fremont 6 Palo Alto 6 Mountain View 35 14 6 / 24 8 Cunertino 7 San Jose FIGURE 11-28 Map of Silicon Valley Area input.txt 2 SanRafael SanMateo Oakland Redwood City output.txt 36 34<>

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

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions

Question

3-39. You want to be granted a business loan.

Answered: 1 week ago

Question

Explain the process of Human Resource Planning.

Answered: 1 week ago