In addition to knowing the optimal solution to a linear program, it is helpful to know whether all of the available resources are being used. The term slack is used for the amount of a resource that is not used. For a less-than-or-equal-to constraint,
In the Flair Furniture example, there were 240 hours of carpentry time available. If the company decided to produce 20 tables and 25 chairs instead of the optimal solution, the amount of carpentry time used
For the optimal solution
The term surplus is used with greater-than-or-equal-to constraints to indicate the amount by which the right-hand side of a constraint is exceeded. For a greater-than-or-equal-to constraint,
Suppose there had been a constraint in the example that required the total number of tables and chairs combined to be at least 42 units (i.e.,
meaning that 3 units more than the minimum were produced. For the optimal solution (30, 40) in the Flair Furniture problem, if this constraint had been in the problem, the surplus would be
So the slack and surplus represent the difference between the left-hand side (LHS) and the right-hand side (RHS) of a constraint. The term slack is used when referring to less-than-or-equal-to constraints, and the term surplus is used when referring to greater-than-or-equal-to constraints. Most computer software for linear programming will provide the amount of slack or surplus that exists for each constraint in the optimal solution.
A constraint that has zero slack or surplus for the optimal solution is called a binding constraint. A constraint with positive slack or surplus for the optimal solution is called a nonbinding constraint. Some computer outputs will specify whether a constraint is binding or nonbinding.