Skip to content

A Python-based collection of algorithms for solving classic combinatorial optimization problems, including TSP, knapsack, and graph-based solutions.

Notifications You must be signed in to change notification settings

DoNguyenAnhTuan/Combinatorial-Optimization

Repository files navigation

# 🧮 Combinatorial Optimization

This repository contains Python implementations of classic **combinatorial optimization algorithms**, tackling problems where the goal is to find the best solution from a finite set of possible solutions.

---

## 🧠 Covered Algorithms

- **Travelling Salesman Problem (TSP)** – Brute-force, Greedy, Dynamic Programming
- **0/1 Knapsack Problem** – Recursive, Memoization, Tabulation (DP)
- **Graph Problems** – Shortest paths, MST (Kruskal, Prim)
- **Scheduling** – Greedy job selection
- **Set Cover, Subset Sum**, etc.

---

## 📂 Project Structure

Combinatorial-Optimization/ ├── tsp/ │ └── tsp_greedy.py │ └── tsp_dp.py ├── knapsack/ │ └── knapsack_recursive.py │ └── knapsack_dp.py ├── graphs/ │ └── prims.py │ └── kruskal.py ├── utils/ │ └── data_loader.py ├── README.md


---

## 🧪 How to Run

```bash
# Example: Run the TSP greedy solution
python tsp/tsp_greedy.py

Each file contains a main() function for demonstration and testing.


📌 Sample: TSP Output

Visited path: A → D → B → C → A
Total distance: 142

🎯 Applications

  • Logistics & routing
  • Scheduling tasks
  • Resource allocation
  • Game AI
  • Network design

👨‍💻 Author

Do Nguyen Anh Tuan 🎓 MSc in Information Technology @ Lac Hong University 🏢 FabLab @ EIU | Passionate about optimization, AI & ML 🌐 Portfolio Website

About

A Python-based collection of algorithms for solving classic combinatorial optimization problems, including TSP, knapsack, and graph-based solutions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages