Cutting Planes
Branch and bound works best when the LP relaxation is tight. Cutting planes tighten it: they are linear inequalities that every integer-feasible point satisfies but the current fractional LP solution violates. Adding them cuts off the fractional point without losing any integer solution. Combined with branching, this is branch and cut, the method inside every modern MIP solver.
The ideal formulation
The integer hull is the convex hull of the integer feasible points. If you could describe it with linear inequalities, the LP over it would have integer vertices and solve the integer program directly. Cutting planes approximate the integer hull from outside, only near the optimum.
Chvátal-Gomory cuts
Take any valid inequality for non-negative integer (for example a non-negative combination of constraints). Rounding down the coefficients keeps it valid, , and since the left side is now an integer, the right side can be rounded too:
Example: from , divide by 2 to get , then is valid for integers and cuts off the fractional point .
Gomory cuts from the simplex tableau
Ralph Gomory (1958) showed how to read a cut directly from an optimal simplex tableau: a row with fractional right-hand side gives the cut , where is the fractional part. Repeating "solve LP, add cut" converges in theory; in practice cuts are added a few rounds at a time inside branch and bound.
import numpy as np
from scipy.optimize import linprog
# maximize x + y s.t. 2x + 2y <= 3, x, y >= 0 integer
c = np.array([-1.0, -1.0])
A = [[2.0, 2.0]]; b = [3.0]
r = linprog(c, A_ub=A, b_ub=b, bounds=[(0, None)] * 2, method="highs")
print("LP relaxation:", np.round(r.x, 4), " value", -r.fun)
# Chvatal-Gomory cut from (1/2) * first row: x + y <= floor(1.5) = 1
A2 = A + [[1.0, 1.0]]; b2 = b + [1.0]
r2 = linprog(c, A_ub=A2, b_ub=b2, bounds=[(0, None)] * 2, method="highs")
print("after the cut:", np.round(r2.x, 4), " value", -r2.fun)LP relaxation: [1.5 0. ] value 1.5
after the cut: [1. 0.] value 1.0
One cut closed the whole gap: the relaxation's value dropped from 1.5 to the integer optimum 1.
Cover inequalities for knapsacks
For a knapsack constraint with binary , a cover is a set of items whose total weight exceeds . Not all of them fit, so
import numpy as np
from scipy.optimize import linprog
v = np.array([12.0, 11.0, 10.0, 9.0]); w = np.array([6.0, 5.0, 5.0, 4.0]); W = 10.0
r = linprog(-v, A_ub=[w], b_ub=[W], bounds=[(0, 1)] * 4, method="highs")
print("LP:", np.round(r.x, 3), " bound", round(-r.fun, 3))
# items {0, 1} weigh 11 > 10: a cover -> x0 + x1 <= 1 ; items {1, 2, 3} weigh 14 > 10 -> x1 + x2 + x3 <= 2
A = [w, [1, 1, 0, 0], [0, 1, 1, 1]]; b = [W, 1, 2]
r2 = linprog(-v, A_ub=A, b_ub=b, bounds=[(0, 1)] * 4, method="highs")
print("with cover cuts:", np.round(r2.x, 3), " bound", round(-r2.fun, 3))
best = max(float(v @ s) for s in np.array(np.meshgrid(*[[0, 1]] * 4)).T.reshape(-1, 4) if w @ s <= W)
print("integer optimum:", best)LP: [0. 1. 0.2 1. ] bound 22.0
with cover cuts: [0.167 0.833 0.167 1. ] bound 21.833
integer optimum: 21.0
The cuts tighten the bound toward the integer optimum, which means far fewer branch-and-bound nodes.
Families of cuts in solvers
| Cut family | Derived from |
|---|---|
| Gomory mixed-integer | simplex tableau rows |
| cover, lifted cover | knapsack rows |
| flow cover | fixed-charge network structure |
| clique | conflicts between binaries |
| MIR (mixed-integer rounding) | aggregated rows |
| problem-specific (subtour elimination for TSP) | the model's combinatorics, added lazily |
In software
- Solvers generate these cuts automatically; parameters such as Gurobi's
Cutsor SCIP's separator settings control how aggressively. - Lazy constraints let you add problem-specific cuts on demand, as in TSP solvers that add a subtour-elimination constraint whenever the current solution contains a short cycle.
Exercises
Exercise 1: A Chvátal-Gomory cut
From with integer , derive a cut by dividing by 3.
Answer
.
Solution
Divide: . Round coefficients down: is still valid since , and the integer left side allows .
Exercise 2: Find a cover
Weights , capacity 10. Give two minimal covers.
Answer
(weight 12) and (weight 12), numbering items from 1.
Solution
A minimal cover exceeds 10 but every proper subset fits: with 7 and 5 each fitting; with every pair fitting. Also () and ( is not more than 10, so not a cover).
Exercise 3: Is the cut valid? (code)
Check by enumeration that holds for every non-negative integer point with .
Answer
Yes, every feasible integer point satisfies it.
Solution
pts = [(x, y) for x in range(3) for y in range(3) if 2 * x + 2 * y <= 3]
print(pts, all(x + y <= 1 for x, y in pts))[(0, 0), (0, 1), (1, 0)] True
Test yourself
A cutting plane must…
- be satisfied by all integer feasible points and violated by the current LP solution
- remove some integer solutions
- be an equality
- make the LP infeasible
For binary , if items in weigh more than the capacity together, a valid cut is…
- for all
Branch and cut means…
- adding cutting planes inside branch and bound
- cutting the problem in half
- removing variables
- a heuristic without guarantees