Combinatorial Optimization
- Introductory problems for beginners learning combinatorial optimization.
Objective
- Learn the basics and applications of mathematical optimization, especially combinatorial optimization.
Problems and How to Proceed
Preparation
- Introduction
Optimization (mathematical optimization) is a broad field related to applied mathematics, dealing with methods for finding the optimal solution to a problem.
Problems where variables (such as "X" in a quadratic function or the quantity of products) take real values are classified as continuous optimization problems,
while problems involving discrete values such as integers are classified as combinatorial optimization (discrete optimization) problems.

Examples:
- Continuous optimization problems:
- Finding the minimum/maximum of a quadratic function in high school math
- Optimization functions in machine learning (SGD, Adam, etc.)
- Combinatorial optimization (discrete optimization) problems:
- Knapsack problem, Traveling Salesman Problem, etc.
Optimization materials from a university open campus
- Continuous Optimization
This covers finding the minimum value (equilibrium state) of potential energy in physics, optimizing loss functions in machine learning, and similar topics. It is very mathematical.

- Combinatorial Optimization
Many problems are related to real-world scenarios, such as determining which combination of materials to prepare to maximize sales.
Combinatorial optimization overview
Problems to Work On
Here is a selection of well-known optimization problems.
Read through the examples to understand the solution approaches.
Then, based on what you learned from the examples, try solving the problems.
Also, read through the references as supplementary material.
Continuous Optimization
- Simple continuous optimization
- Example(PuLP)
- Reference: Minimizing a quartic function(Simulated annealing)
- Reference: Minimizing a circle(Particle swarm optimization)
Combinatorial Optimization
-
Simple combinatorial optimization (minimization problem)
- Example(Greedy algorithm)
-
Knapsack Problem
- Problem(Dynamic programming)
- Problem: Maximize calories at Saizeriya for 1000 yen Menu(Reference: Quantum annealing)
- Reference: A slightly more complex knapsack(Dynamic programming)
- Reference(Linear programming)
- Reference: paiza (Dynamic programming)
-
Traveling Salesman Problem
- Example(Dijkstra)
- Problem: Stamp Rally
- Distance data between stores(Small number of stores)
- Problem: Plan a date course(Solve without using PuLP)
- Reference(Local search 2-opt, multi-start strategy)
- Reference: paiza(Beam search)(Dijkstra)(Greedy algorithm)
-
Scheduling Problem
- Example: Interval scheduling (Greedy algorithm)
- Problem: Nurse scheduling (Genetic algorithm)(You may solve it without using DEAP)
- Reference: Job shop problem(Genetic algorithm)(Includes illustrations and code, but in Chinese -- please use Google Translate or similar)
-
N Queens Problem
- Example: 8 Queens (Genetic algorithm)
-
Four Color Problem (also featured in the movie "The Devotion of Suspect X")
- Example: Color Japanese prefectures (PuLP)(You don't need to use ortoolpy)
- Reference: Graph-theoretic approach
-
Matching Problem
- Example(Graph theory)
- Problem: Photo restoration
- Reference: Kotsuki-san's code(Note: The return type of the
max_weight_matchingfunction has changed due to a networkx version upgrade)
- Reference: Kotsuki-san's code(Note: The return type of the
- Reference: Explanation of bipartite matching problem
-
Assignment Problem
- Example(Hungarian method)
-
Shortest Path Problem
- Example(Dijkstra)
-
Set Cover Problem
- Example: Comiket(Greedy algorithm)
-
Maximum Flow Problem
-
Example(Ford-Fulkerson)
(Despite saying "queue", a stack is used, so the explanation and code are inconsistent)
-
-
Transportation Problem
-
Rectangle Packing Problem
-
Comprehensive Problem Collection
Useful Links
First Problems?
- https://www.yamagata-univ-derp.org/wp-content/uploads/2019/04/%E6%9C%80%E9%81%A9%E5%8C%96%E5%95%8F%E9%A1%8C%E3%82%92Python%E3%81%A7%E8%A7%A3%E6%B1%BA%E3%81%99%E3%82%8B%EF%BC%81-1.pdf (Note: Many problems require referring to a specific textbook)
Combinatorial Optimization
-
http://www-or.amp.i.kyoto-u.ac.jp/files/%e9%9b%a2%e6%95%a3%e6%95%b0%e7%90%86%e5%88%86%e9%87%8e2016(%e5%b0%82%e6%94%bbHP).pdf (About graph theory)
-
Two-pointer technique (https://nashidos.hatenablog.com/entry/2020/02/02/165319)
Optimization 100 Knocks-Style Problems?
- https://data-scientist.hatenadiary.jp/entry/2019/02/24/210100
- http://www.logopt.com/python_learning/wp-content/uploads/2014/05/mipproblem2.pdf
- https://qiita.com/shouta-dev/items/1970c2746c3c30f6b39e
- https://books.google.co.jp/books?id=rXzlDwAAQBAJ&pg=PA172&lpg=PA172&dq=python%E3%80%80%E6%9C%80%E9%81%A9%E5%8C%96+%E7%94%9F%E7%94%A3%E8%A8%88%E7%94%BB&source=bl&ots=BX4SreBxBu&sig=ACfU3U2CpDAfQFK18hjjfNVUbBf5NXujXg&hl=ja&sa=X&ved=2ahUKEwjltNSz8abqAhWbHXAKHRgYDMoQ6AEwCXoECAsQAQ#v=onepage&q=python%E3%80%80%E6%9C%80%E9%81%A9%E5%8C%96%20%E7%94%9F%E7%94%A3%E8%A8%88%E7%94%BB&f=false
Books
- Practical Guide to Mathematical Optimization (Covers continuous optimization in an organized manner. However, it does not include programming code.)