Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program to find the shortest route in an airline network from a given start city to a given destination city using Depth First

Write a program to find the shortest route in an airline network from a given start city to a given destination city using Depth First Search. Similar to previous assignment, submission should be three files: airline.h, airline.cpp and airlineMain.cppEnter name of network file: c:
etworkfile.txt
The Digraph's Adjacency-List Representation:
1: Los_Angeles--346
2: San_Francisco--134
3: Denver--123
4: Chicago--38
5: Boston--46
6: New_York--478
7: Miami--835
8: New_Orleans--17
Number of start city? 1
Number of destination? 2
Shortest path from Los Angeles to San Francisco is:
1 Los_Angeles
v
3 Denver
v
2 San_Francisco
More (Y or N)?Y
Number of start city? 6
Number of destination? 4
Shortest path from New York to Chicago is:
6 New_York
v
4 Chicago
More or N
An unweighted digraph represented by its adjacency list is used for the network, and the information needed to construct is read from a network file.
Network file to download Network file Download download Network file
Network file content:
Los_Angeles
3346
San_Francisco
3134
Denver
3127
Chicago
238
Boston
246
New_York
3478
Miami
3835
New_Orleans
217
Network file details
The order of cities are arranged from LA(1), SAN(2), DEN(3), CHI(4), BOS(5), NYK(6), MIA(7), NOL(8).
First digit is the number of out-degrees; other digits are the destinations of out-degrees.
Example: New Orleans -217: New Orleans connects to LA (1) and MIA (7).
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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago