Shortest Path in Bayonne

Python • Graph Theory • A* • Dijkstra • Bellman-Ford-Kalaba • Visualization

Graph overview

Project Overview

This project models part of the city of Bayonne as a graph and compares classic shortest-path algorithms in terms of route and performance. I implemented A*, Dijkstra and a Bellman-Ford-Kalaba (BFK), and display the results on a simplified city map with step-by-step visualizations.

The visualizations show how each algorithm explores the graph (different colors per algorithm) and highlight the final shortest path.

  • Language: Python 3
  • Libraries: NetworkX (optional), Matplotlib, Zelle graphics (or equivalent), Pandas, NumPy
  • Theme: Graph theory and path optimization (A*, Dijkstra, BFK)

Project Videos

A* algorithm visualization.

Bellman-Ford-Kalaba (BFK) visualization.

Dijkstra algorithm visualization.

What I Learned

This project strengthened my understanding of heuristic search (A*), greedy algorithms (Dijkstra), and relaxation-based methods (BFK). I also improved how to convert mathematical algorithms into informative visual demonstrations using Python.

The visual comparison clarifies trade-offs: A* reduces exploration with a good heuristic, Dijkstra is efficient for non-negative weights, and BFK can handle negative edges (at a higher cost).