Integer Programming — IP and Mixed-Integer Programming (MIP)

Decision Sciences
Introduced by
Ralph Gomory (cutting planes, 1958); land-and-doig branch-and-bound (1960)
Year
1958
Type
Mathematical optimisation — exact combinatorial method

What does it do?

Integer programming (IP), also called mixed-integer programming (MIP) when only some variables are restricted to whole numbers, is a branch of mathematical optimisation in which some or all decision variables must take integer or binary values.

Building on linear programming, it was formalised through Ralph Gomory's cutting-plane method (1958) and the Land-and-Doig branch-and-bound algorithm (1960), and it has since become the standard exact framework for scheduling, assignment, routing, and resource-allocation problems.

The intuition behind the method

Ordinary linear programming finds the best point in a continuous feasible region. But many real decisions are discrete — you cannot staff 2.7 nurses or open half a warehouse. Integer programming adds the constraint that some or all variables must be whole numbers (or binary 0/1 choices). The price of that constraint is computational: the feasible set is no longer a smooth surface but a scattered set of points, and finding the best one can require examining an enormous number of candidate solutions. Solvers manage this by intelligently splitting the problem into smaller sub-problems (branching) and pruning branches that cannot beat the best solution found so far (bounding), while also tightening the continuous approximation through added inequalities (cutting planes).

History

Integer programming developed in the late 1950s as researchers sought to extend linear programming to discrete decisions. Ralph Gomory's 1958 cutting-plane method added valid inequalities to the LP relaxation to push solutions toward integrality; whether such a procedure terminates in finitely many steps depends on the specific cut and pivoting scheme used. Land and Doig (1960) formalised branch-and-bound, which became a central exact algorithm alongside cutting planes. Nemhauser and Wolsey (1988) and Wolsey (1998) provide the canonical textbook treatments on which the field's standard theory rests. Later work combined branching with cutting planes in branch-and-cut solvers, and continued improvements in solver software have made large applied instances tractable.

When to use it

Choose integer programming when some decisions are genuinely discrete, such as binary go/no-go choices, whole-unit counts, or on/off logic linking variables, and when the objective and constraints can be written linearly. It is well suited when you need an optimal or provably near-optimal plan for a problem that can be fully stated in advance, as in scheduling, assignment, routing, facility location, capital budgeting, and portfolio selection. Do not use it when all decisions are continuous, since linear programming is simpler and faster in that case. If the objective or constraints are nonlinear and cannot be linearised, a mixed-integer nonlinear formulation is needed instead. For very large instances where a good feasible plan matters more than proof of optimality, a gap tolerance or a heuristic approach may be more practical.

Limitations and considerations

  • Integer programming is NP-hard in general, so worst-case solve time can grow exponentially with problem size and with poor formulation.
  • A weak LP relaxation (a large integrality gap) leads to deep, expensive search trees and long runtimes.
  • Binary expansion of large-cardinality categorical variables can substantially increase model size.
  • For very large instances, solvers may need to be stopped early under a gap tolerance rather than reaching zero gap.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Produces a solution with a certified optimality gap. Branch-and-bound returns a bound and gap for the given model, which many heuristics do not provide by default.
  • Handles binary and general integer variables natively, making it a natural framework for combinatorial decisions such as yes/no selections and integer counts.
  • Applies to a wide range of problems, including scheduling, routing, assignment, and knapsack-type selection, using the same modelling machinery.
  • Branch-and-cut solvers can handle instances far too large for exhaustive enumeration, although solve time for a given instance is hard to predict in advance.

Applications

  • Staff and nurse scheduling — assigning shifts to meet coverage requirements while respecting work-hour regulations.
  • Vehicle routing and logistics — finding minimum-cost delivery routes under capacity and time-window constraints.
  • Facility location — deciding which warehouses or plants to open to minimise total distribution cost.
  • Capital budgeting — selecting a portfolio of investment projects within a budget to maximise total return.
  • Production planning — determining integer lot sizes across time periods to balance setup costs and holding costs.
  • Network design — choosing which links to install in a communication or transportation network.

How it works

How it works

1

The problem is cast as a mathematical programme: define the decision variables (declaring them integer or binary where the problem requires it), write a linear objective to minimise or maximise, and list all linear constraints. A tight formulation, whose continuous (LP) relaxation lies close to the true integer optimum, substantially reduces solve time.

Formula
\min_{x,y}\; c^{\top}x + d^{\top}y \quad \text{s.t.}\quad Ax + Dy \ge b,\quad x \ge 0,\quad y \in \mathbb{Z}_{+}
2

The integrality restrictions are temporarily dropped to obtain the LP relaxation, which can be solved quickly with linear programming methods. For a minimisation problem its optimal value is a lower bound on the true integer optimum; for a maximisation problem it is an upper bound. If the relaxation solution already happens to be all-integer, it is optimal for the original problem. Otherwise, the gap between the relaxation value and the best integer solution found so far guides the search.

Formula
\min_{x,y}\; c^{\top}x + d^{\top}y \quad \text{s.t.}\quad Ax + Dy \ge b,\quad x \ge 0,\quad y \ge 0 \;\Rightarrow\; z_{\mathrm{LP}} \le z^{*}_{\mathrm{IP}}
3

A fractional variable in the relaxation solution is selected and the problem is split into two sub-problems: one requiring that variable to be rounded down, the other rounded up. Each sub-problem is itself relaxed and solved, which builds a search tree. Branches whose relaxation bound is worse than the best integer solution found so far are pruned without further exploration.

4

Cutting planes are valid linear inequalities that remove part of the LP-relaxation feasible region without removing any integer feasible point. Strong cuts (Gomory cuts, cover inequalities, clique cuts) tighten the LP bound and reduce the number of nodes the solver must explore.

5

The best integer feasible solution found across all explored nodes is returned as the optimum. The optimality gap, the percentage difference between the best integer solution and the best remaining bound, is reported; a gap of zero certifies global optimality. For large NP-hard instances, the solver may terminate early under a user-specified gap tolerance, returning a near-optimal solution with a provable bound.

Common pitfalls

  • Declaring variables as continuous when they should be integer, or the reverse, silently produces wrong solutions; verify that variable types match the physical reality of the problem.
  • A loose formulation with a large LP relaxation gap causes excessive branching; tighten the formulation (strong inequalities, symmetry breaking) before solving.
  • Reading the solver's objective value as the global optimum without checking the gap: the reported value is the best integer solution found, and it is only certified optimal when the gap is zero.
  • Applying a linear IP model to nonlinear objectives or constraints misrepresents the problem; use a linearisation or a mixed-integer nonlinear formulation instead.
  • In scheduling or routing models, omitting valid inequalities such as clique or cover cuts leaves substantial solver performance unused.

Frequently asked questions

What is the difference between IP and MIP?

In pure integer programming (IP) every decision variable must be an integer. In mixed-integer programming (MIP), some variables are integers or binary while others are allowed to be continuous. MIP is the more general and more commonly used framework in practice, because most real problems mix discrete choices with continuous quantities.

Why is integer programming NP-hard if linear programming is polynomial?

Linear programming optimises over a convex polytope and can be solved in polynomial time. Adding integrality constraints shatters this convexity: the feasible set becomes a finite but potentially astronomically large set of integer points, and no polynomial-time algorithm is known to find the best one in general. The LP relaxation provides a bound but not a direct solution.

How do I know whether my solution is optimal?

The solver reports an optimality gap — the percentage difference between the best integer solution found and the best remaining lower bound. A gap of 0% certifies global optimality. For large problems you may set a gap tolerance (e.g., 1%) and accept a near-optimal solution; the bound still guarantees that the true optimum cannot be more than that percentage better.

What makes a 'tight' formulation and why does it matter?

A tight formulation is one whose LP relaxation gives a bound close to the integer optimum, leaving a small integrality gap. When the gap is small, branch-and-bound needs to explore fewer nodes and terminates faster. Adding valid inequalities such as Gomory cuts, cover inequalities, or clique cuts tightens the formulation and is often the most impactful way to speed up a solver.

Related methods

Sources

  1. Wolsey, L.A. (1998). Integer Programming. Wiley.

    ISBN: 9780471283669
  2. Nemhauser, G.L. & Wolsey, L.A. (1988). Integer and Combinatorial Optimization. Wiley.

    ISBN: 9780471359432
  3. Numerical Methods in Finance and Economics: A MATLAB-Based Introduction, p. 565