This repository contains code and documentation for our final project in ENG EC 504: Advanced Data Structures at Boston University.
- Kashyap Panda - [email protected]
- Jordan Koseski - [email protected]
- John Burke - [email protected]
- Ritesh Rana - [email protected]
This project implements two graph search algorithms, Dijkstra's algorithm and the A* search algorithm, to find efficient driving routes between cities in the contiguous United States.
The code reads in a dataset of US cities and constructs a graph representation where edges connect cities within a specified distance threshold. Dijkstra's algorithm iteratively explores the graph to find shortest paths from a start city to all possible destinations. In contrast, A* selectively explores the graph using a heuristic function to find a least-cost path from start to goal without considering all nodes.
Both algorithms output an optimal path of cities to travel between a given start and end location, providing intermediate stopovers for long trips.
To use this project:
- Clone the repository
- Run
make
to compile the C++ code - Execute
./GeoDataAnalysis
to run the program - Enter a source and destination city when prompted
- View the printed output path and timing comparisons
Output files containing the generated routes are saved to the output/
directory for each city pair analyzed.
src/
: Source code for the projectinput/
: Input data filesoutput/
: Output files with generated routesmakefile
: Compilation scripts
- C++ compiler
- Makefile
See the final report for a list of references and data sources.