{"id":19693060,"url":"https://github.com/christs8920/shortest-path-algorithms","last_synced_at":"2026-06-12T00:31:41.825Z","repository":{"id":251181045,"uuid":"836642664","full_name":"ChrisTs8920/shortest-path-algorithms","owner":"ChrisTs8920","description":"An implementation and analysis of 3 shortest path algorithms with Python.","archived":false,"fork":false,"pushed_at":"2024-08-03T09:58:43.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T11:58:35.260Z","etag":null,"topics":["algorithms","bellman-ford","bellman-ford-algorithm","dijkstra","dijkstra-algorithm","floyd-warshall","floyd-warshall-algorithm","python","shortest-path-algorithm"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChrisTs8920.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-01T09:03:44.000Z","updated_at":"2024-08-03T09:58:46.000Z","dependencies_parsed_at":"2025-02-27T10:09:37.610Z","dependency_job_id":null,"html_url":"https://github.com/ChrisTs8920/shortest-path-algorithms","commit_stats":null,"previous_names":["christs8920/shortest-path-algorithms"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ChrisTs8920/shortest-path-algorithms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrisTs8920%2Fshortest-path-algorithms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrisTs8920%2Fshortest-path-algorithms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrisTs8920%2Fshortest-path-algorithms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrisTs8920%2Fshortest-path-algorithms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChrisTs8920","download_url":"https://codeload.github.com/ChrisTs8920/shortest-path-algorithms/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrisTs8920%2Fshortest-path-algorithms/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34224103,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","bellman-ford","bellman-ford-algorithm","dijkstra","dijkstra-algorithm","floyd-warshall","floyd-warshall-algorithm","python","shortest-path-algorithm"],"created_at":"2024-11-11T19:15:37.212Z","updated_at":"2026-06-12T00:31:41.763Z","avatar_url":"https://github.com/ChrisTs8920.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Implementation and analysis of shortest path algorithms using Python\n\n## Description\n\nThis repository implements and analyzes 3 shortest path algorithms in Python:\n\n- Dijkstra's\n- Floyd-Warshall\n- Bellman-Ford\n\n\u003e*This project was made during my Graph theory course in university.*\n\n## Summary\n\nThese algorithms find the shortest path between 2 vertices in a **weighted** graph. A graph is a collection of **vertices** connected by **edges**, which can represent real networks. For **example** in a computer network, the computers are the vertices and the connections between them are the edges (i.e. cables). In a weighted graph, each edge has an associated value attached to it, which represents the cost, the distance or the time it takes to traverse them. A graph can be directed or undirected.\n\nThese algorithms have many different applications in the real world, including:\n\n- **Network routing:** Determine the most efficient path for data packets in computer networks.\n- **Geographic Information Systems (GIS):** Used in mapping and navigation services (Google maps) to find optimal routes and minimize distances.\n- **Robotics:** Path planning for autonomous robots to navigate in environments.\n- **VLSI design:** Find optimal routes for connecting various circuit components such as gates and transistors.\n\n### Dijkstra's\n\n- Invented by Edsger W. Dijkstra in 1956.\n- Finds the shortest path from a given vertice to any other vertice. Can also find the shortest path between a given start vertice and a destination vertice.\n- Used in graphs where the weights are **positive** numbers.\n- Time complexity: $O(n^2)$, where $n$ the number of vertices.\n\n### Floyd-Warshall\n\n- Also known as Floyd or Roy-Warshall, published in it's current form by Robert Floyd in 1962.\n- Finds shortest path between **all** pairs of vertices.\n- Can be used in graphs where the weights are either **positive** or **negative**.\n- Time complexity: $O(n^3)$, where $n$ the number of vertices.\n\n### Bellman-Ford\n\n- Proposed by Alfonso Shimbel in 1955 but got named after Richard Bellman and Lester Ford Jr.\n- Finds the shortest path from a given vertice to any other vertice. Can also find the shortest path between a given start vertice and a destination vertice.\n- Slower than Dijkstra's, but more flexible since it can be used in graphs with **positive** or **negative** weights.\n- Time complexity: $O(n*m)$, where $n$ the number of vertices, $m$ the number of edges.\n\n## Example graphs used\n\n\u003eA visualization of the graphs used in code\n\n### Example 1\n\n![Example graph 1](https://github.com/ChrisTs8920/shortest-path-algorithms/blob/main/graphs/ex1.png?raw=true)\n\n### Example 2\n\n![Example graph 2](https://github.com/ChrisTs8920/shortest-path-algorithms/blob/main/graphs/ex2.png?raw=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrists8920%2Fshortest-path-algorithms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrists8920%2Fshortest-path-algorithms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrists8920%2Fshortest-path-algorithms/lists"}