https://github.com/mahmood-anaam/deterministic-dynamic-programming
This repository explores deterministic dynamic programming solutions for the Shortest Path Problem (SPP) and the Traveling Salesperson Problem (TSP). It includes graphical representations, a detailed Jupyter notebook, and practical implementations for optimizing travel routes and minimizing costs in various city-based scenarios.
https://github.com/mahmood-anaam/deterministic-dynamic-programming
dynamic-programming graph-theory jupyter-notebook numpy python shortest-path-problem traveling-salesperson-problem
Last synced: 10 months ago
JSON representation
This repository explores deterministic dynamic programming solutions for the Shortest Path Problem (SPP) and the Traveling Salesperson Problem (TSP). It includes graphical representations, a detailed Jupyter notebook, and practical implementations for optimizing travel routes and minimizing costs in various city-based scenarios.
- Host: GitHub
- URL: https://github.com/mahmood-anaam/deterministic-dynamic-programming
- Owner: Mahmood-Anaam
- Created: 2024-08-09T00:18:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-10T01:48:20.000Z (over 1 year ago)
- Last Synced: 2025-02-08T21:11:40.030Z (12 months ago)
- Topics: dynamic-programming, graph-theory, jupyter-notebook, numpy, python, shortest-path-problem, traveling-salesperson-problem
- Language: Jupyter Notebook
- Homepage:
- Size: 96.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Shortest Path & Traveling Salesperson Problems
## Deterministic Dynamic Programming
## Overview
This project explores solutions to the Shortest Path Problem (SPP) and the Traveling Salesperson Problem (TSP) using deterministic dynamic programming. It involves finding the shortest path between cities with specified energy costs and determining the optimal sequence for visiting multiple cities in TSP scenarios.
## Code Structure
```markdown
deterministic-dynamic-programming/
│
├── README.md # overview and instructions
├── Practical_Deterministic_Dynamic_Programming.ipynb # Jupyter notebook for solving SPP and TSP with detailed explanations
├── graph_shortest_path_problem.png # Graphical representation of the Shortest Path Problem
├── graph_traveling_salesperson_problem.png # Graphical representation of the Traveling Salesperson Problem
```
## Usage
1. **Open the Notebook:**
- Run the Jupyter notebook to explore the deterministic dynamic programming solution for both SPP and TSP:
```bash
jupyter notebook Practical_Deterministic_Dynamic_Programming.ipynb
```
2. **View Graphs:**
- The images `graph_shortest_path_problem.png` and `graph_traveling_salesperson_problem.png` illustrate the SPP and TSP respectively.


## Key Concepts
- **Deterministic Dynamic Programming:** Used to calculate the least-cost paths in both the SPP and TSP scenarios.
- **Optimization of Travel Routes:** Applied to minimize the total energy cost or distance traveled across cities.