Integer Programs
An integer program is a linear program with some variables restricted to whole numbers. The restriction looks small and changes everything: the feasible set becomes a scatter of isolated points rather than a polyhedron, its optimum need not sit at a corner, and the geometric account that makes the simplex method work no longer applies.
Definition
An integer linear program has the form
where
Three cases by which variables are restricted. When
The feasible set. Dropping integrality leaves a polyhedron. Imposing it keeps only the points of that polyhedron with whole-number coordinates in the restricted positions. The result is generally not convex, not connected, and has no interior: it is a scatter of isolated points.
What stops being true. The objective no longer attains its optimum at a vertex of the polyhedron, because the optimal point is usually not a vertex at all. Convexity arguments do not apply. Moving between neighbouring feasible points is not a local operation with a direction. The simplex method solves the wrong problem.
What remains true. The objective is still linear, the constraints are still linear, and feasibility is still decided by substitution. An integer program with bounded variables has finitely many feasible points, so an optimum exists whenever any feasible point does.
Formal statement
Assumptions and scope
Integrality is a restriction on the variables, stated in the program. It is not a property of the answer to be arranged afterwards, and a program whose integrality lives only in the modeller's intention is a linear program.
The feasible set of an integer program is generally non-convex and has no interior, so convexity arguments and the vertex characterisation of optima do not apply to it.
An integer program with bounded variables has finitely many feasible points, so if one is feasible an optimum exists. Unbounded integer variables can still produce an unbounded program.
Requiring integrality of a variable that is genuinely divisible costs computation and buys nothing. Tonnes of flour do not need to be whole numbers.
Integer programs are computationally much harder than linear ones of the same size. The difficulty is intrinsic to the restriction rather than a deficiency of current solvers.
Worked material
Example
The same constraints, with and without integrality
Take
As a linear program. The binding constraints meet where
Now require
The integer optimum is
What to notice. The continuous optimum was
Non-example
When integrality is not what is needed
Not an integer program: a divisible quantity that happened to come out whole. A blending model returns exactly
Not an integer restriction: a bound.
Not binary: a general integer variable. Hiring vans is indivisible but not a yes-or-no choice;
Not a repair: rounding the continuous answer. Rounding
Not an integer program: a linear program the modeller intends to round. If integrality is not written into the program it is not part of the problem, whatever anyone plans to do with the output. The solver optimises what it is given.
Contrast
Why rounding a relaxed solution fails
The most common account of integer programming is that you solve the linear program and round. It is wrong in two separate ways, shown concretely below.
Rounding can be infeasible. In the example above the continuous optimum is
Rounding can be feasible and wrong. Consider
The relaxation pushes everything into
Why this keeps happening. The continuous and integer optima are answers to different questions. The constraints binding at one need not bind at the other, so there is no reason the integer optimum should be near the fractional one. In larger problems they can be far apart.
What the relaxation is actually for. Not the answer. A bound, and a starting point for methods that search properly. That is the subject of its own unit, and the distinction between a bound and an answer is the thing to carry there.
Common errors
Common misconception
An integer program is solved by solving the linear program and rounding the answer to whole numbers, so integrality is a finishing step rather than part of the problem.
Related units
Requires
Connected
- Extreme Points and Basic Feasible Solutions (contrasts with)
- Modelling with Binary Variables (used by)
- The Linear Relaxation and Its Bound (used by)
Learn this topic
Used in
Sources
- Integer Programming (2020)