Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective: In this project, you will explore the Shortest Path problem and implement two popular algorithms to solve it: Depth - First Search ( DFS

Objective: In this project, you will explore the Shortest Path problem and implement two popular algorithms to solve it: Depth-First Search (DFS) and Breadth-First Search (BFS). Design, develop, and present a complete solution to finding the shortest path between two cities in a given network.
Data Structures:
Graph: You will need to implement an appropriate data structure to represent the network of cities. This could be an adjacency list or an adjacency matrix, depending on your chosen algorithms and performance considerations.
Queue/Stack: Both DFS and BFS require additional data structures to manage their exploration process. DFS utilizes a Stack to keep track of visited nodes and backtrack when necessary, while BFS uses a Queue to process nodes level by level.
Deliverables:
A Java program (.java source code and .jar file) capable of:
Upload and parse the network data from the provided file.
Implement both DFS and BFS algorithms for finding the shortest path between two user-selected cities.
Provide a user interface for interacting with the program and selecting cities.
Produce the shortest path as a sequence of cities connected by their distances.
This is the content of .csv file that should be parsed by the code:
,Istanbul,Ankara,Izmir,Bursa,Adana,Gaziantep,Konya,Diyarbakir,Antalya,Mersin,Kayseri,Urfa,Malatya,Samsun,Denizli,Batman,Trabzon
Istanbul,0,449,99999,153,99999,99999,645,99999,690,956,776,99999,99999,737,649,99999,99999
Ankara,449,0,591,389,484,705,266,1003,483,501,317,848,682,402,483,99999,732
Izmir,99999,591,0,333,898,1118,560,99999,451,911,874,99999,99999,1003,238,99999,99999
Bursa,153,389,333,0,856,1075,507,99999,546,869,715,1212,1049,750,480,99999,1091
Adana,99999,484,898,856,0,225,346,525,649,95,307,369,389,719,758,618,851
Gaziantep,99999,705,1118,1075,225,0,568,315,785,311,357,151,251,803,974,409,838
Konya,645,266,560,507,346,568,0,866,303,360,306,702,729,663,386,964,896
Diyarbakir,99999,1003,99999,99999,525,315,866,0,99999,610,571,182,235,803,1276,97,586
Antalya,690,483,451,546,649,785,303,99999,0,631,610,924,99999,99999,217,99999,99999
Mersin,956,501,911,869,95,311,360,610,631,0,99999,99999,99999,99999,99999,99999,99999
Kayseri,776,317,874,715,307,357,306,571,610,99999,0,99999,99999,99999,99999,99999,99999
Urfa,99999,848,99999,1212,369,151,702,182,924,99999,99999,0,99999,99999,99999,99999,99999
Malatya,99999,682,99999,1049,389,251,729,235,99999,99999,99999,99999,0,99999,99999,99999,99999
Samsun,737,402,1003,750,719,803,663,803,99999,99999,99999,99999,99999,0,99999,858,99999
Denizli,649,483,238,480,758,974,386,1276,217,99999,99999,99999,99999,99999,0,99999,99999
Batman,99999,99999,99999,99999,618,409,964,97,99999,99999,99999,99999,99999,858,99999,0,99999
Trabzon,99999,732,99999,1091,851,838,896,586,99999,99999,99999,99999,99999,99999,99999,99999,0
First row and column are headers.

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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

Understand a department managers role in locating job candidates

Answered: 1 week ago