Skip to content

ceenaa/shortest_path

Repository files navigation

README: Shortest Path Algorithm Notebook


Overview

Welcome to the Shortest Path Algorithm Notebook! This repository is designed to guide you through the fundamental concepts and implementations of various shortest path algorithms. Whether you're a beginner or seeking a refresher, this resource aims to provide you with comprehensive tutorials, code examples, GIFs, videos, and more.

Subjects Covered

  1. Heap and Priority Queue (Construction of Dijkstra)

    • Understand the importance of heaps and priority queues in implementing Dijkstra's algorithm efficiently.
  2. Dijkstra's Algorithm

    • Dive into one of the most popular and widely used algorithms for finding the shortest path between nodes in a graph.
  3. Bellman-Ford Algorithm

    • Explore the Bellman-Ford algorithm, which handles graphs with negative edge weights and detects negative cycles.
  4. Shortest Path Optimality Condition

    • Learn about the conditions that define the optimality of the shortest path in a graph.
  5. Negative Cycle Detection

    • Understand how to detect negative cycles in graphs and their significance in shortest path algorithms.
  6. Difference Constraint System

    • Explore the concept of a difference constraint system and its applications in solving optimization problems.
  7. Johnson's Algorithm and All Pairs Shortest Paths

    • Delve into Johnson's algorithm, which efficiently computes all pairs shortest paths in a graph, even with negative edge weights.

How to use

you just need to clone the repo and run all blocks of the shortest_path.ipynb in google colab or on your local to see the videos.

Getting Started

To make the most out of this notebook, follow these steps:

  1. Review the Materials: Take some time to review the tutorials, codes, GIFs, and videos provided for each subject.
  2. Experiment with Code: Experiment with the provided code examples to deepen your understanding of the algorithms.
  3. Engage with Visuals: Visual aids such as GIFs and videos can help you grasp complex concepts more effectively.
  4. Practice Problems: Test your understanding by solving practice problems related to each algorithm.
  5. Contribute and Share: Feel free to contribute additional materials or share your insights with the community to enhance the learning experience.