01 / 22

Sensitivity
Analysis

Discover how small changes in parameters affect optimal solutions in linear programming: what stays the same, what breaks, and why it matters.

Finite Mathematics

What Is Sensitivity Analysis?

After solving a linear programming problem, you have an optimal solution. But what happens if the data changes slightly? Sensitivity analysis answers: how sensitive is the optimal solution to changes in the problem's parameters?

The LP Foundation

Recall: a linear program has an objective function and constraints. We optimize:

\( c_j \) : Objective Coefficients
The profit or cost per unit of each decision variable
\( b_i \) : RHS Values
The available resources for each constraint
\( a_{ij} \) : Coefficients
How much of resource \( i \) each unit of \( x_j \) consumes

Graphical Intuition

\(x_1\) \(x_2\) Optimal Iso-profit Constraint 1 Constraint 2 Constraint 3

Two Core Questions

1. Objective Coefficient Ranges
By how much can a profit/cost coefficient \( c_j \) change before the current optimal basis (set of corner-point variables) changes?
2. Right-Hand-Side Ranges
By how much can a resource limit \( b_i \) change while the current set of binding constraints remains the same? This leads to the concept of shadow prices.

Objective Coefficient Ranges

Consider maximizing \( Z = c_1 x_1 + c_2 x_2 \). The iso-profit lines have slope \( -c_1/c_2 \). The optimal vertex stays optimal as long as this slope stays between the slopes of the two binding constraint lines.

\(x_1\) \(x_2\) Binding 1 (steep) Binding 2 (shallow) Optimum Current slope Steep limit Shallow limit Allowable range

Shadow Prices & RHS Ranges

The shadow price (or dual value) of constraint \( i \) measures the rate of improvement in \( Z \) per unit increase in \( b_i \), assuming all other data stays fixed.

Binding Constraint
Shadow price \( y_i^{*} > 0 \): adding more of this resource improves \( Z \)
Non-binding Constraint
Shadow price \( y_i^{*} = 0 \): this resource has slack, so adding more doesn't help

Objective Range vs. RHS Range

Objective Coefficient Range RHS (Resource) Range
What changes? Profit/cost coefficient \( c_j \) Resource limit \( b_i \)
What stays the same? Optimal basis (same vertex) Same set of binding constraints
Effect on \( Z^{*} \)? \( Z^{*} \) changes (new coefficient, same point) \( Z^{*} \) changes by \( y_i^{*} \cdot \Delta b_i \)
Key output Allowable increase/decrease for \( c_j \) Shadow price \( y_i^{*} \) + allowable range for \( b_i \)

How to Apply Sensitivity Analysis

1
Solve the LP. Find the optimal solution \( x^{*} \) and optimal value \( Z^{*} \) using the simplex method or graphically.
2
Read the sensitivity report. Identify the allowable increase and decrease for each objective coefficient \( c_j \) and each RHS value \( b_i \).
3
Check if the change is within range. If \( \Delta c_j \) or \( \Delta b_i \) falls within the allowable range, the current basis remains optimal.
4
Compute the new \( Z^{*} \). For RHS changes: \( Z^{*}_{\text{new}} = Z^{*} + y_i^{*} \cdot \Delta b_i \). For objective changes: recompute \( Z \) at the same vertex with the new coefficient.
5
If outside range: re-solve. The old optimal basis is no longer valid. You must solve the modified LP from scratch.

Example 1: Problem Setup

To find the optimal solution, we solve both constraints as equalities (since the optimum lies at their intersection):

Optimal Point
\( x_1^{*} = 7.5 \), \( x_2^{*} = 35 \)
Optimal Value
\( Z^{*} = 40(7.5) + 50(35) = 300 + 1750 = 2050 \)

Example 1: Verification

Let's verify both constraints are binding at \( (7.5, 35) \):

Wood constraint
\( 2(7.5) + 3(35) = 15 + 105 = 120 \) ✓ Binding
Labor constraint
\( 4(7.5) + 2(35) = 30 + 70 = 100 \) ✓ Binding

Example 1: Reading the Report

The shadow prices are found from the dual: \( 2y_1 + 4y_2 = 40 \) and \( 3y_1 + 2y_2 = 50 \), giving \( y_1 = 15 \) and \( y_2 = 2.5 \). The sensitivity report gives us:

Constraint Shadow Price \( y_i^{*} \) Allowable Increase Allowable Decrease
Wood (\( b_1 = 120 \)) 15 30 70
Labor (\( b_2 = 100 \)) 2.5 140 20

Example 2: Objective Coefficient Change

Now suppose the profit per table changes from \( c_2 = 50 \) to \( c_2 = 60 \). The sensitivity report says:

Variable Current \( c_j \) Allowable Increase Allowable Decrease
\( x_1 \) (Chairs) 40 60 6.67
\( x_2 \) (Tables) 50 10 30

Example 3: Outside the Allowable Range

What if wood supply drops to \( b_1 = 40 \)? That's a change of \( \Delta b_1 = -80 \).

!
The shadow price of 15 is no longer valid for this magnitude of change.
!
The current basis changes: the set of binding constraints shifts, so you must re-solve the entire LP with \( b_1 = 40 \).
!
You cannot simply compute \( 2050 + 15 \cdot (-80) \) and trust the answer. That formula only works within range.

Visualizing RHS Changes

\(x_1\) \(x_2\) Original \(b_1\) Increased \(b_1\) Decreased \(b_1\) Constraint 2

Common Mistakes

✕ Using Shadow Price Outside Range
The shadow price is only valid within the allowable range for \( b_i \). Applying it to larger changes gives incorrect results.
✕ Confusing the Two Ranges
Objective coefficient ranges keep the basis (vertex) the same. RHS ranges keep the binding constraints the same. They answer different questions.
✕ Non-binding Shadow Price
Assuming every constraint has a positive shadow price. Non-binding constraints have shadow price \( = 0 \) because there's already slack.

Summary of Key Concepts

Concept Definition Key Insight
Shadow Price Rate of \( Z^{*} \) change per unit of \( b_i \) Only valid within RHS range
Allowable Increase Max upward change before basis changes Basis stays optimal up to this limit
Allowable Decrease Max downward change before basis changes Check magnitude, not sign
Binding Constraint Constraint with zero slack Shadow price \( > 0 \) (typically)
Non-binding Constraint with positive slack Shadow price \( = 0 \)

Question 1 of 5

A constraint has a shadow price of 8 and an allowable increase of 15. If the RHS increases by 10 units, by how much does \( Z^{*} \) change?

Question 2 of 5

A non-binding constraint has 12 units of slack. What is its shadow price?

Question 3 of 5

The allowable increase for the objective coefficient \( c_1 \) is 20 and the allowable decrease is 10. If \( c_1 \) currently equals 30, for which new value of \( c_1 \) does the current basis remain optimal?

Question 4 of 5

Changing an objective coefficient \( c_j \) within its allowable range affects:

Question 5 of 5

A constraint's RHS has an allowable decrease of 25. If you decrease the RHS by 30, what should you do?