Foundations to Frontier
Tests
A. Mathematical Foundations › A6 Optimization › Advanced

Combinatorial Optimization and Integer Programming

Many engineering decisions are discrete: which instruments fly, which order to visit targets, which antenna serves which spacecraft, which robot takes which task. Combinatorial optimization has no gradients and search spaces that grow exponentially. You will formulate problems as (mixed-)integer programs, bound them with LP relaxations, solve exactly with branch and bound and dynamic programming, use heuristics like greedy and 2-opt local search, and select a rover's science payload and plan its traverse.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Yes-or-no decisions

A lander can carry only so much mass. Each instrument either goes or doesn’t. You can’t take 0.37 of a spectrometer. With 30 instruments there are over a billion combinations. A rover must visit 12 sites; there are about 20 million possible orders. You can’t try them all, and there’s no slope to follow.

Combinatorial optimization finds the best choice anyway, by bounding how good unexplored options could possibly be (and skipping hopeless ones), or by smart rules of thumb that get very close quickly.

Shortest route through rover waypoints: heuristics vs the exact optimum
length: nearest neighbour 642.0 · 2-opt 613.8 (2 passes) · optimum 613.8 (2-opt excess 0.0%) · distinct tours (n−1)!/2 = 20,160
Choosing an order is a discrete decision. There's no gradient, and the number of possible tours grows factorially. Greedy nearest-neighbour is fast but leaves crossings. 2-opt removes them one swap at a time and typically lands within a few percent of optimal. Exact methods (dynamic programming here, branch-and-bound with LP relaxations in MILP solvers) certify optimality but scale exponentially in the worst case.
Why engineers care

Payload selection, observation scheduling (telescopes, the Deep Space Network), multi-robot task allocation, path planning on graphs and supply logistics are integer programs. Modern MILP solvers (Gurobi, CPLEX, HiGHS, SCIP) solve problems with millions of variables, but only if you formulate them well.

📝 Quick check (Level 0)
0/3 answered
  1. 1. An instrument either flies or doesn't. That's a…
  2. 2. Why can't we try every combination of 30 yes/no choices?
  3. 3. Skipping options that can't beat the best found so far is…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

Integer programs

MILP: min⁡c⊤x\min c^\top x s.t. Ax≤bAx\le b, with some xj∈Zx_j\in\mathbb Z (often {0,1}\{0, 1\}).

  • 0/1 knapsack (payload selection): max⁡∑vixi\max\sum v_ix_i s.t. ∑wixi≤W\sum w_ix_i\le W, xi∈{0,1}x_i\in\{0, 1\}.
  • Assignment: ∑jxij=1\sum_jx_{ij} = 1, ∑ixij=1\sum_ix_{ij} = 1. Its LP relaxation is already integral.
  • Travelling salesman (TSP): visit all sites once with minimum total distance.

LP relaxation

Replace x∈{0,1}x\in\{0, 1\} with 0≤x≤10\le x\le1 and solve the LP. For a maximization problem its value is an upper bound on the integer optimum. The ratio between the two is the integrality gap. For the knapsack, the relaxation is solved greedily: take items in order of value per weight, and a fraction of the first one that doesn’t fit.

📝 Quick check (Level 1)
0/3 answered
  1. 1. The LP relaxation of a maximization MILP gives…
  2. 2. The fractional knapsack is solved by…
  3. 3. Distinct tours for n = 5 cities (symmetric TSP) =

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 45 minUndergraduate students and practising engineers.

Exact methods

  • Branch and bound: split on a variable (xi=0x_i = 0 vs xi=1x_i = 1), bound each branch with the LP relaxation, and prune any branch whose bound can’t beat the best integer solution found so far (the incumbent). Good bounds prune almost everything.
  • Cutting planes: add valid inequalities that cut off fractional LP solutions (Gomory cuts, cover cuts). Branch-and-cut combines both and is the engine of modern MILP solvers.
  • Dynamic programming: knapsack in O(nW)O(nW) (pseudo-polynomial), and TSP by Held–Karp in O(n22n)O(n^22^n).
  • Greedy constructions (nearest neighbour, ratio-greedy) are fast with no guarantee.
  • Local search like 2-opt for the TSP (uncross two edges) usually lands within a few percent of optimal.
  • Metaheuristics (simulated annealing, tabu search, genetic algorithms) escape local optima.
  • Approximation algorithms have guarantees, e.g. Christofides is within 1.5× for metric TSP.

Complexity

Knapsack, TSP and general MILP are NP-hard: no known polynomial algorithm solves every instance. In practice, structure, good formulations (tight relaxations) and solvers make large instances tractable.

🐍 Exercise 1: branch and bound for payload selection
Implement the fractional-knapsack LP bound and depth-first branch and bound. Select rover science payloads under a mass budget, verify optimality against brute force, and count the nodes explored.
📝 Quick check (Level 2)
0/3 answered
  1. 1. Branch and bound prunes a node when…
  2. 2. Held–Karp solves the TSP in…
  3. 3. Modern MILP solvers use…

Level 3: Advanced

★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.

Why the relaxation bounds the optimum

Every integer-feasible xx is also feasible for the relaxation ({0,1}⊂[0,1]\{0, 1\}\subset[0, 1]). Maximizing over a larger set can only give a value at least as large: zLP≥zIPz_{\text{LP}}\ge z_{\text{IP}}. ∎ Branching fixes variables, shrinking the relaxation, so bounds tighten down the tree.

Greedy solves the fractional knapsack

Suppose an optimal fractional solution takes less of item ii while taking some of item jj with a lower ratio vj/wj<vi/wiv_j/w_j < v_i/w_i. Shifting weight δ\delta from jj to ii changes the value by δ(vi/wi−vj/wj)>0\delta(v_i/w_i - v_j/w_j) > 0. That’s a contradiction, so the optimum fills items in ratio order. ∎

Why crossings are never optimal (Euclidean TSP)

If edges (a,b)(a, b) and (c,d)(c, d) cross at a point pp, the triangle inequality gives ∣ac∣+∣bd∣≤(∣ap∣+∣pc∣)+(∣bp∣+∣pd∣)=∣ab∣+∣cd∣|ac| + |bd|\le(|ap| + |pc|) + (|bp| + |pd|) = |ab| + |cd|, with strict inequality unless the points are collinear. Reconnecting as (a,c),(b,d)(a, c), (b, d) (a 2-opt move) shortens the tour. ∎

Exercise 3.1: Distinct tours for 6 cities

(6−1)!/2=60(6 - 1)!/2 = 60. For 12 cities it’s about 2 × 10⁷, and for 20 it’s about 6 × 10¹⁶.

📝 Quick check (Level 3)
0/3 answered
  1. 1. z_LP ≥ z_IP for maximization because…
  2. 2. The greedy-ratio argument is an…
  3. 3. A crossing in a Euclidean tour can be removed by a…

Level 4: Expert

★★★★★ Expert⏱ 40 minResearchers: original papers and open problems.

Planning a rover sol: payload and route

Payload: 14 candidate instruments with masses and science values, and a 40% mass budget. Branch and bound with LP bounds finds the provably optimal set while exploring only a few dozen of the 16,384 subsets. Here the relaxation bound is essentially tight, so almost everything is pruned.

Route: to visit 9 science waypoints, nearest neighbour gives a tour several percent longer than optimal. 2-opt removes the crossings and lands within a fraction of a percent of the Held–Karp optimum.

Mission planners for Mars rovers and orbiters combine exactly these ingredients: integer programs for selection and scheduling, and heuristics with local search for routing (Rabideau et al., 1999; Chien et al., 2000).

🐍 Exercise 2 (research): routing rover waypoints
Implement nearest-neighbour construction, 2-opt local search and the Held–Karp exact DP for the TSP. Measure the heuristics' excess over the optimum on several random waypoint sets.

Combinatorial optimization in AI, robotics and aerospace

  • Spacecraft and rover operations planning: ASPEN/CASPER schedule activities under resource constraints (Chien et al., 2000). Deep Space Network antenna scheduling uses MILP and heuristics (Johnston et al., 2014).
  • Multi-robot task allocation: assignment and auction methods (Gerkey and Matarić, 2004).
  • Motion planning with discrete choices: mixed-integer convex programs for footstep planning and obstacle avoidance (Deits and Tedrake, 2014).
  • Learning-augmented solvers: ML for branching decisions and heuristics (Gasse et al., 2019; Bengio, Lodi and Prouvost, 2021).

References

  1. G. Nemhauser, L. Wolsey (1988). Integer and Combinatorial Optimization. Wiley.
  2. A. Land, A. Doig (1960). “An automatic method of solving discrete programming problems.” Econometrica, 28(3).
  3. M. Held, R. Karp (1962). “A dynamic programming approach to sequencing problems.” SIAM Journal on Applied Mathematics, 10(1).
  4. S. Lin, B. Kernighan (1973). “An effective heuristic algorithm for the traveling-salesman problem.” Operations Research, 21(2).
  5. N. Christofides (1976). “Worst-case analysis of a new heuristic for the travelling salesman problem.” CMU Technical Report 388.
  6. S. Chien et al. (2000). “ASPEN — automated planning and scheduling for space mission operations.” SpaceOps.
  7. B. Gerkey, M. Matarić (2004). “A formal analysis and taxonomy of task allocation in multi-robot systems.” IJRR, 23(9).
  8. R. Deits, R. Tedrake (2014). “Footstep planning on uneven terrain with mixed-integer convex optimization.” Humanoids.
  9. M. Gasse et al. (2019). “Exact combinatorial optimization with graph convolutional neural networks.” NeurIPS.
  10. M. Johnston et al. (2014). “Automated scheduling for NASA’s Deep Space Network.” AI Magazine, 35(4).