Practice: Integer Programs
Question
Recognition · Classification
A model decides how many delivery vans to hire and how many litres of fuel to buy. Which variables require integrality?
2 hints available, least help first.
Hint 1: Retrieval cue
Ask of each: does a fractional value describe anything real?
Hint 2: Concept cue
Half a van delivers nothing. Half a litre is fuel.
Direct application · Classification · Explanation
A hospital plans a month. It may commission any of four mobile clinics, each with a fixed monthly cost. It assigns nursing hours to whichever clinics run, and it purchases consumables by weight. It may also hire up to six agency staff.
List the variables, state which require integrality and why, classify the resulting program, and describe its feasible set.
Write your answer, then compare it with the worked solution.
2 hints available, least help first.
Hint 1: Retrieval cue
For each variable ask whether a fractional value describes something real.
Hint 2: Strategy cue
Distinguish the yes-or-no decisions from the counts and from the divisible quantities.
Compare with the worked solution
Comparing does not record a result. Judging your own written answer cannot show that you can do this without help.
Variables and restrictions.
Clinic commissioning. Four binary variables
Nursing hours. Continuous,
Consumables by weight. Continuous,
Agency staff. A general integer variable
Classification. Binary, general integer and continuous variables together: a mixed-integer program.
The feasible set. Not a polyhedron. Take the polyhedron defined by the linear constraints, then keep only the points whose clinic and staffing coordinates are whole numbers. The result is a family of slices, for each of the
What that costs. The optimum need not sit at a vertex of the underlying polyhedron, convexity arguments do not apply, and the simplex method alone will not produce an implementable answer: relaxed, it would return
On what was left continuous. Making hours or consumables integer would look tidier and would be a modelling error. It imposes restrictions the situation does not, raises cost sharply, and may exclude the true optimum.
A complete answer does each of these:
- identifies integer variables
- classifies program
- describes feasible set
- names lost results
Comparison · Method selection
A firm hires between zero and eight forklifts. Which restriction models this correctly?
2 hints available, least help first.
Hint 1: Retrieval cue
Is this a yes-or-no decision or a count?
Hint 2: Concept cue
Integrality and bounds are independent restrictions. Which does this situation impose?
Error diagnosis · Explanation · Evaluation
An analyst writes:
Integer programs are just linear programs where the answer has to be whole. I solved
and got
. Rounding to nearest gives , so that is the integer optimum, with value .
Evaluate both the method and the answer.
Write your answer, then compare it with the worked solution.
2 hints available, least help first.
Hint 1: Retrieval cue
Substitute the proposed point into the constraints before judging it.
Hint 2: Concept cue
What does integrality do to the feasible set, and does the vertex account survive it?
Compare with the worked solution
Comparing does not record a result. Judging your own written answer cannot show that you can do this without help.
Check the proposed answer first.
The true integer optimum. Checking feasible whole-number points:
The method is wrong, not merely unlucky. Rounding moves a point off the region, and nothing in the rounding step can detect that, checking feasibility afterwards is already more work than rounding claimed to save. It also fails in the other direction: a rounded point can be feasible and still beaten by a plan rounding cannot reach, because rounding only adjusts each coordinate to a neighbour.
The deeper error in the first sentence. An integer program is not a linear program whose answer must be whole. Integrality is a restriction in the program, and it changes the feasible set from a polyhedron into the whole-number points inside it, not convex, not connected, no interior. The optimum need not be at a vertex, and here it is not:
What follows for practice. The continuous answer is still useful, as a bound. It tells you no integer plan exceeds
A complete answer does each of these:
- identifies integer variables
- classifies program
- describes feasible set
- names lost results
Transfer · Interpretation · Evaluation
Two models describe the same factory and have the same number of variables and constraints. Model A finishes in under a second. Model B has been running for an hour and reports a range rather than a single answer.
The only structural difference is that forty of model B's variables are restricted to whole numbers.
Explain why the behaviour differs so sharply, what the reported range means, and why the difference is not a defect in the solver.
Write your answer, then compare it with the worked solution.
2 hints available, least help first.
Hint 1: Retrieval cue
What does the simplex method rely on that integrality removes?
Hint 2: Strategy cue
Ask what two numbers a solver could honestly report when it has not finished proving optimality.
Compare with the worked solution
Comparing does not record a result. Judging your own written answer cannot show that you can do this without help.
Why model A is fast. Its feasible set is a polyhedron, and the optimum of a linear objective over a polyhedron sits at a vertex. That reduces the search to a finite set of algebraically describable points, and the simplex method walks between adjacent ones improving each step. The geometry does the work.
Why model B is slow. Integrality destroys that geometry. The feasible set becomes the whole-number points inside the polyhedron, not convex, not connected, no interior. The optimum need not be at a vertex and generally is not, so the vertex reduction is unavailable and there is no local step with a direction to follow.
What replaces it. Methods that search systematically while pruning: solve the relaxation for a bound, branch on a fractional variable, and discard whole regions whose bound cannot beat the best plan found. The work is in the search tree, and forty integer variables give an enormous number of ways to fix them.
What the reported range means. Two numbers bracketing the optimum. The relaxation-based bound says no plan can be better than one end; the best integer plan found so far says the optimum is at least as good as the other. The solver has not failed. It is reporting exactly what it has proved, which is more informative than a single number with no guarantee attached.
Why it is not a defect. The difficulty is in the problem, not the software. There is no known method that solves integer programs in time comparable to linear ones, and this is believed to be intrinsic rather than a gap in current technique. A linear program with thousands of variables is routine; an integer program of the same size may be out of reach.
The practical consequence. Requiring integrality is a decision about computation as well as meaning. Impose it where a fractional value is meaningless, and nowhere else. Every unnecessary integer variable multiplies the search.
A complete answer does each of these:
- identifies integer variables
- classifies program
- describes feasible set
- names lost results
Session complete
Every question in this set has been through once. What you can do now depends on how it went — practising again is worth more than moving on if any of it was uncertain.
Practice data
Your practice record is stored in this browser only. Clearing it removes every answer and every scheduled review, and cannot be undone.