Strategic Cost Management · Linear Programming
Sensitivity Analysis and Special Cases in Linear Programming
Updated 11 October 2026 · Fact-checked
Sensitivity analysis shows how far a profit coefficient or resource limit can change before the optimal solution or its shadow price changes. Special cases are infeasibility (no feasible point), unboundedness (objective grows without limit), degeneracy (tie in the ratio test) and alternative optima. Read the final simplex table or graph to spot each.
Understand Sensitivity Analysis and Special Cases
A linear programme gives you one optimal plan for one set of numbers. In practice, selling prices, costs and machine hours keep changing. Sensitivity analysis tells you how much they can change before your plan, or the value of a resource, changes.
There are two kinds of change. A change in an objective coefficient (contribution per unit) can alter the best product mix. A change in a right-hand side (hours, kilograms, rupees available) alters the value of Z and may alter the mix. The range of optimality is the span of a coefficient over which the current mix stays optimal. The range of feasibility is the span of a resource over which the current set of binding constraints stays the same, so its shadow price stays valid.
The shadow price of a constraint is the change in Z from one more unit of that resource, within its range of feasibility. A constraint with unused slack has a shadow price of zero, because extra units are not needed. A scarce resource has a positive shadow price. This is the maximum premium over normal cost you should pay for an extra unit.
In the final simplex table, the Zj − Cj row (maximisation) for a non-basic variable is its opportunity cost. It shows how much Z falls for each unit of that variable forced into the plan. The Zj − Cj entries under the slack columns are the shadow prices.
Some problems do not have a single clean optimum. Infeasible: constraints conflict, so no point satisfies all of them. Unbounded: the feasible region is open and Z can keep rising (maximisation), which usually signals a missing constraint in the formulation. Degenerate: a basic variable equals zero, often seen as a tie in the minimum ratio test. Alternative optima: the objective line is parallel to a binding constraint, so more than one plan gives the same optimal Z.
Key rules to remember
- Shadow price
- Shadow price = ΔZ ÷ Δb (change in optimal Z per unit change in a resource), valid only within the range of feasibility
- In a maximisation final table, read it from the Zj − Cj value under that constraint's slack variable.
- Range of optimality (two variables, graphical)
- Optimum stays unchanged while the slope of the objective line lies between the slopes of the two binding constraints
- For constraints a1x + b1y and a2x + b2y at the optimal corner, c_x ÷ c_y must lie between a1 ÷ b1 and a2 ÷ b2.
- Range of feasibility
- Vary one RHS b, recompute the basic variables, and keep b within the limits where all basic variables stay ≥ 0
- Outside this range the shadow price changes or the basis changes.
- Complementary slackness
- Slack > 0 ⇒ shadow price = 0; shadow price > 0 ⇒ slack = 0
- Use it to check which resources are worth buying more of.
- Optimality test (maximisation)
- Optimal when all Zj − Cj ≥ 0 (equivalently Cj − Zj ≤ 0)
- A zero value for a non-basic variable signals alternative optima.
- Special-case signals in the simplex table
- Unbounded: entering column has no positive entry. Infeasible: an artificial variable remains in the basis at a positive value at the end. Degenerate: tie for the minimum ratio, giving a basic variable at zero.
- Check these before you declare an answer.
How to solve Sensitivity Analysis and Special Cases questions
Use this order for any sensitivity or special-case question, whether it comes with a graph, a final simplex table or a formulation.
- 1Identify the optimal solution and the binding constraints (slack = 0) from the graph or final table.
- 2Read the shadow prices. In a table, take the Zj − Cj entries under the slack columns. Graphically, solve the binding constraint equations for the dual values.
- 3State the interpretation in rupees per unit of resource. A positive slack means the shadow price is zero.
- 4Find the range of optimality for the coefficient asked. Compare slopes (graphical) or keep all Zj − Cj of non-basic variables with the right sign (table).
- 5Find the range of feasibility for the resource. Express basic variables in terms of the changed RHS and keep each ≥ 0.
- 6Check the special-case signals: no positive entry in the entering column (unbounded), an artificial variable left in the basis (infeasible), a tie in ratios (degenerate), a zero Zj − Cj for a non-basic variable (alternative optima).
- 7Convert the numbers into a decision: pay the premium only if it is below the shadow price, and only up to the upper limit of the range.
- 8Write a one-line recommendation with the revised Z where the question asks for it.
Quickest way: Read the final table first, compute only what is asked
When to use it: Use when a final simplex table or a two-variable graph is given and time is short.
- Circle the slack columns. Their Zj − Cj entries are your shadow prices. Do not recompute.
- Zero slack in the solution column means a binding resource. Positive slack means shadow price zero.
- For range of feasibility on one resource, write x = old value + (Δb × slack column entry) for each basic variable and set each ≥ 0.
- For a two-variable graph, get the optimality range from the slopes of the two binding constraints. No full re-solve needed.
- Scan for the four signals (unbounded, infeasible, degenerate, alternative optima) in 10 seconds before writing the final statement.
Common mistakes in Sensitivity Analysis and Special Cases
Applying a shadow price beyond its range of feasibility
Students treat the shadow price as a permanent rate.
Fix: Always compute the range. State the premium is worth paying only up to the upper limit of that range.
Giving a positive shadow price to a resource with unused slack
They confuse a resource being used with a resource being scarce.
Fix: If slack > 0 the shadow price is zero. Only fully used resources carry a positive shadow price.
Declaring a problem unbounded when it is only badly formulated or infeasible
They do not separate the two cases in the table.
Fix: Unbounded means the feasible region exists but Z can rise without limit. Infeasible means no feasible point exists, with an artificial variable stuck in the basis.
Saying degeneracy means the answer is wrong
A zero basic variable looks like an error.
Fix: A degenerate solution is still valid. It only means a tie in the ratio test, and the iterations may need care to avoid cycling.
Missing alternative optima
They stop at the first optimal table without checking Zj − Cj of non-basic variables.
Fix: If a non-basic variable has Zj − Cj = 0 at optimality, bring it in for another plan with the same Z, and say so.
Treating the range of optimality as a range for the resource
Both are called a range of change.
Fix: Optimality range is about the coefficient in Z. Feasibility range is about the right-hand side. Name which one you compute.
Worked examples
Example 1
A firm makes products X and Y. Contribution is ₹40 per unit of X and ₹30 per unit of Y. Machine hours: 2X + Y ≤ 100. Labour hours: X + Y ≤ 80. (a) Find the optimal mix and Z. (b) Find the shadow price of each resource. (c) Find the range of optimality for X's contribution and the range of feasibility for machine hours. (d) Extra machine time can be bought at ₹8 per hour above normal cost, and extra labour at ₹25 above normal. Advise.
Show the solution
- Corner points: (50, 0) gives Z = ₹2,000. (0, 80) gives Z = ₹2,400. The intersection of 2X + Y = 100 and X + Y = 80 gives X = 20, Y = 60 and Z = 800 + 1,800 = ₹2,600. The optimum is X = 20, Y = 60, Z = ₹2,600. Both constraints are binding.
- Shadow prices: solve 2u + v = 40 and u + v = 30. This gives u = ₹10 per machine hour and v = ₹20 per labour hour. Check: 100 × 10 + 80 × 20 = ₹2,600, which matches Z.
- Range of optimality for X: the binding constraint slopes give 2 ÷ 1 = 2 and 1 ÷ 1 = 1. The ratio c_x ÷ 30 must lie between 1 and 2. So X's contribution can vary from ₹30 to ₹60 without changing the mix.
- Range of feasibility for machine hours b: keep X + Y = 80 and 2X + Y = b. Then X = b − 80 and Y = 160 − b. Both must be ≥ 0, so 80 ≤ b ≤ 160. The shadow price of ₹10 is valid for machine hours from 80 to 160.
- Decision on machine time: the premium ₹8 is below the shadow price ₹10, so buy extra. The limit is 160 − 100 = 60 hours. Net gain = 60 × (10 − 8) = ₹120.
- Decision on labour: the premium ₹25 is above the shadow price ₹20, so do not buy extra labour.
Answer: Make 20 units of X and 60 units of Y for a contribution of ₹2,600. Shadow prices are ₹10 per machine hour and ₹20 per labour hour. The mix stays optimal for X's contribution between ₹30 and ₹60, and the machine-hour shadow price holds from 80 to 160 hours. Buy up to 60 extra machine hours at a ₹8 premium (net gain ₹120). Do not buy extra labour at a ₹25 premium.
Example 2
Identify the special case in each LPP and explain what you would do. (a) Maximise Z = 3x + 2y subject to x + y ≤ 4, x + y ≥ 6, x, y ≥ 0. (b) Maximise Z = x + y subject to x − y ≤ 2, x, y ≥ 0. (c) Maximise Z = 2x + 2y subject to x + y ≤ 10, x ≤ 8, x, y ≥ 0.
Show the solution
- (a) x + y cannot be both at most 4 and at least 6. No point satisfies both, so the feasible region is empty. In the simplex method an artificial variable would stay in the basis at a positive value. This is an infeasible problem. Re-check the data or relax a constraint.
- (b) Take x = y = t. Then x − y = 0 ≤ 2, so every t ≥ 0 is feasible, and Z = 2t rises without limit. The feasible region is open in the direction of increase of Z. This is an unbounded problem. In the simplex table the entering column would have no positive entry. Check for a missing constraint such as a resource limit.
- (c) The objective line 2x + 2y is parallel to the constraint x + y = 10. Corner (0, 10) gives Z = 20. Corner (8, 2) gives Z = 16 + 4 = 20. Every point on x + y = 10 with 0 ≤ x ≤ 8 gives Z = 20. This is a case of alternative optima. In the final table a non-basic variable would have Zj − Cj = 0. Management can choose any of these plans on other grounds such as ease or demand.
Answer: (a) Infeasible: no solution exists. (b) Unbounded: Z increases without limit, so the model is missing a constraint. (c) Alternative optima: Z = ₹20 (in the units of the problem) along x + y = 10 for 0 ≤ x ≤ 8, so choose on non-numerical grounds.
Exam tips
- Interpret every number. A shadow price without the unit (₹ per hour) and the range loses marks.
- When a final table is given, do not re-solve. Read shadow prices and opportunity costs directly from the Zj − Cj row.
- Always state the range of feasibility next to any recommendation to buy more of a resource.
- In MCQs, match the signal to the case: no positive entry in the entering column is unbounded, artificial variable left in the basis is infeasible, ratio tie is degenerate, Zj − Cj = 0 for a non-basic variable is alternative optima.
- End a written answer with a clear recommendation in rupees, not just a list of values.
Practice questions from Linear Programming
- A feed mix must supply at least 10 units of protein and at least 8 units of fibre. Ingredient X costs ₹6 per kg and gives 2 units of protein…
- Bharat Tools maximises Z = 4x + 2y subject to 2x + y ≤ 10, x ≤ 4, y ≤ 8 and x, y ≥ 0. Which statement is correct?
- Kaveri Ltd maximises Z = 5x + 4y subject to 6x + 4y ≤ 24 and x + 2y ≤ 6, x, y ≥ 0. What is the optimal value of Z?
- A Pune furniture firm's optimal LP plan makes 20 chairs (A) and 15 tables (B). The carpentry-hours constraint is 3A + 2B ≤ 100. How many car…
- In the final simplex table of a maximisation problem for Rao Textiles, the Zj - Cj entry under the slack variable of the cutting-hours const…
Sensitivity Analysis and Special Cases in other exams
The same ground in other exams, if you are preparing for more than one or want another angle on it.
Sensitivity Analysis and Special Cases: frequently asked questions
What is the difference between shadow price and opportunity cost?
A shadow price belongs to a resource (constraint) and shows the gain in Z from one more unit of it. Opportunity cost belongs to a product not in the plan and shows the fall in Z for each unit forced in. Both are read from the Zj − Cj row of the final table.
How do I know if an LPP is infeasible or unbounded from the simplex table?
If an artificial variable stays in the basis at a positive value when optimality is reached, the problem is infeasible. If a variable can enter but every entry in its column is zero or negative, so no ratio can be formed, the problem is unbounded.
Does degeneracy make the solution invalid?
No. A degenerate solution has a basic variable at zero, usually after a tie in the minimum ratio test. The solution is still feasible and can still be optimal. The only risk is extra iterations, or cycling in rare cases.
Is the shadow price always valid for any extra units?
No. It holds only within the range of feasibility of that resource. Beyond the range the binding constraints change, and so does the shadow price.