Dual problem calculator: the dual and shadow prices of a linear program
Type a linear program with the line # asked: the dual problem and solve it here, no account needed: you get the shadow price (dual value) of each constraint, the price of one more unit of its limit. With a free account, the full walkthrough writes the dual out and shows that its optimal value equals the original one (strong duality). See the primal and dual table for the sign rules.
Solve it here
The example below is the Dual of the diet problem worked example; its saved answer, checked by the solver, is 20.4 (optimal).
How to type it
- First line:
maximizeorminimizeand the objective, such as3*a + 2*b. - Then
subject toand one constraint per line with<=,>=or=. a, b >= 0for nonnegative variables;integer: aorbinary: zfor whole-number or yes/no ones.- Lines starting with
#are notes, such as what a variable means.
What you get here
- the shadow price of each constraint: how much the optimal value changes per extra unit of its limit
- the optimal value and the value of each variable
- the proof label: exactly proven optimal
With a free account: the full step-by-step walkthrough, word problems, photos and voice, and your history.
Worked examples
- Dual of the diet problem
- Dual of a transportation problem
- LP dual with equality constraints
- Shadow prices of a production plan
Questions
What are the sign rules?
See the primal and dual table: a <= constraint in a maximization gets a dual value >= 0, an equation gets a free one, and so on, row by row.
Does it work for integer programs?
A whole-number problem has no exact dual. The app solves it, proves the answer optimal within the solver's gap tolerance, and explains why the dual of the version with fractions allowed can fall short.
More: all calculators · 50 solved examples · what the app solves
Try ProvenDecisions free: type, photograph or say an optimization problem; every answer is checked by a solver.