Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the program that will help us find the shortest path between any two buildings in the Northeastern University Boston campus. Utilize the Dijkstra's Algorithm

Write the program that will help us find the shortest path between any two buildings in the Northeastern University Boston campus. Utilize the Dijkstra's Algorithm to implement the program.

To carry out this task, do the following:

1. Using any drawing software, design an undirected graph using the campus map available at: https://www.northeastern.edu/campusmap/printable/campusmap15.pdf

2. Only include 16 of the buildings in the area of the campus that is located inside Huntington Avenue, Ruggles Street, Massachusetts Avenue, and the Orange Line railroad. Select your buildings so that you have four buildings from each one of the following numbering range:20's, 30's, 40's, and 50s.

3. In your program use sequential indices (i.e., 0,1, 2, ...) to represent the vertices in the algorithm. However, use an appropriate data structure to map your program indices to the building numbers as shown in the map so that the user can only interface with your program using the map numbers.

4. Each vertex in your graph should represent the main entrance of each building in the map. If the main entrance is not known, use the center point of the building. You will need also to add vertices to represent roads intersections. You need enough intersection vertices so that none of the generated shortest paths will guide the user to walk on a nonpedestrian area.

5. The edges in your graph represent the roads between the vertices. The weight of an edge is determined by the distance between its two vertices. These distances can be measured utilizing Google map as explained in: https://support.google.com/maps/answer/1628031

6. Only add edges to the vertex's direct neighbors on the map. Do not include nonessential edges (e.g., edge AC that is longer than or equal AB+BC, where A, B, and C represent buildings in the map). Also, no need to consider the internal paths inside any building.

7. Create the text file to store your graph data, which includes: the number of vertices followed by the data of the graph edges. For each edge, provide its

8. Write a C++ program so that it starts by reading the graph text file you created in the previous step and then implement this graph using either an adjacencylist or an adjacency matrix.

9. When it runs, your program will read from a user the start and destination buildings (using the campus map numbers to refer to these buildings). The program will then use Dijkstra's algorithm to provide the user with the sequence of points on the map (e.g., buildings numbers) over the shortest path between the start and destination.

10. Verify your program shortest path results with the corresponding results given by Google maps for the "walking" directions.

In your homework report, include the following:

The drawing of the undirected graph you created in step (1).Have the graph labeled with the vertices numbers that match the numbers on the campus map. Also, have the edges labeled with the distances you calculated from google map.

In addition to including the screen shots of at least two sample runs of your program, include copies of the graph you created in step (1) on which you need to highlight the shortest path generated by your sample runs. Also, include screen shots of the Google map walking directions correspond to your sample runs.

Make sure to submit with your homework the text file that has your graph data.

Write a program that will help us find the shortest path between any two buildings in the Northeastern University Boston campus. Utilize the Dijkstra's Algorithm to implement the program.

To carry out this task, do the following:

1. Using any drawing software, design an undirected graph using the campus map available at: https://www.northeastern.edu/campusmap/printable/campusmap15.pdf

2. Only include 16 of the buildings in the area of the campus that is located inside Huntington Avenue, Ruggles Street, Massachusetts Avenue, and the Orange Line railroad. Select your buildings so that you have four buildings from each one of the following numbering range:20's, 30's, 40's, and 50s.

3. In your program use sequential indices (i.e., 0,1, 2, ...) to represent the vertices in the algorithm. However, use an appropriate data structure to map your program indices to the building numbers as shown in the map so that the user can only interface with your program using the map numbers.

4. Each vertex in your graph should represent the main entrance of each building in the map. If the main entrance is not known, use the center point of the building. You will need also to add vertices to represent roads intersections. You need enough intersection vertices so that none of the generated shortest paths will guide the user to walk on a nonpedestrian area.

5. The edges in your graph represent the roads between the vertices. The weight of an edge is determined by the distance between its two vertices. These distances can be measured utilizing Google map as explained in: https://support.google.com/maps/answer/1628031

6. Only add edges to the vertex's direct neighbors on the map. Do not include nonessential edges (e.g., edge AC that is longer than or equal AB+BC, where A, B, and C represent buildings in the map). Also, no need to consider the internal paths inside any building.

7. Create a text file to store your graph data, which includes: the number of vertices followed by the data of the graph edges. For each edge, provide its

8. Write your C++ program so that it starts by reading the graph text file you created in the previous step and then implement this graph using either an adjacencylist or an adjacency matrix.

9. When it runs, your program will read from a user the start and destination buildings (using the campus map numbers to refer to these buildings). The program will then use Dijkstra's algorithm to provide the user with the sequence of points on the map (e.g., buildings numbers) over the shortest path between the start and destination.

10. Verify your program shortest path results with the corresponding results given by Google maps for the "walking" directions.

In your homework report, include the following:

The drawing of the undirected graph you created in step (1).Have the graph labeled with the vertices numbers that match the numbers on the campus map. Also, have the edges labeled with the distances you calculated from google map.

In addition to including the screen shots of at least two sample runs of your program, include copies of the graph you created in step (1) on which you need to highlight the shortest path generated by your sample runs. Also, include screen shots of the Google map walking directions correspond to your sample runs.

Make sure to submit with your homework the text file that has your graph data.

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

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions

Question

5 What types of conflict are most likely in distribution networks?

Answered: 1 week ago