8.3 Duality, Sensitivity Analysis, and Integer Linear Programming

Key Takeaways

  • The shadow price (dual price) of a constraint quantifies the marginal change in the optimal objective value per unit increase in its right-hand side, remaining constant strictly within the allowable RHS range.
  • The Strong Duality Theorem guarantees that if a primal linear program has an optimal solution, its dual also has an optimal solution and their optimal objective values are strictly identical (Z* = W*).
  • Complementary Slackness dictates that if a primal constraint is non-binding (slack > 0), its corresponding dual shadow price must be zero; conversely, if a shadow price is strictly positive, the constraint must be tightly binding.
  • Integer linear programming (ILP) cannot be solved by simply rounding continuous LP relaxation solutions, as rounding frequently causes severe constraint violations or drastic suboptimality.
  • The Branch and Bound algorithm systematically searches integer solutions by branching on fractional variables and fathoming (pruning) subproblem nodes based on infeasibility, integrality, or bound inferiority.
Last updated: September 2026

8.3 Duality, Sensitivity Analysis, and Integer Linear Programming

Finding the optimal corner point of a linear program is rarely the end of an industrial engineer's task. Real-world parameters—material costs, labor rates, and machine capacities—are subject to supplier price changes, contract renegotiations, and equipment breakdowns. Sensitivity analysis evaluates how the optimal solution behaves when problem parameters change. Duality theory reveals the fundamental economic valuation embedded within every linear program. When decisions require discrete counts or binary yes/no choices, Integer Linear Programming (ILP) provides the necessary modeling tools.


1. Sensitivity Analysis & Post-Optimality Analysis

Sensitivity analysis (also known as post-optimality analysis) examines how changes in the original LP parameters affect the optimal solution without having to re-solve the entire problem from scratch.

1. Shadow Price (Dual Price, Marginal Value)

The shadow price ($y_i^$) of constraint $i$ represents the rate of improvement in the optimal objective function value ($Z^$) per unit increase in the right-hand-side capacity ($b_i$), assuming all other model parameters remain unchanged:

yi=Zbiy_i^* = \frac{\partial Z^*}{\partial b_i}

  • Maximization Problem:
    • For a $\le$ capacity constraint: $y_i^* \ge 0$. Acquiring more capacity expands the feasible region, allowing $Z^*$ to increase (or stay constant).
    • For a $\ge$ requirement constraint: $y_i^* \le 0$. Raising a minimum requirement tightens the feasible region, reducing total profit.
  • Non-Binding Constraints: If a constraint has positive slack ($s_i^* > 0$), the resource is not fully utilized. Adding more of an idle resource provides zero operational benefit, so its shadow price is strictly zero ($y_i^* = 0$).

2. Allowable Range of Right-Hand-Side Values ($b_i$)

The shadow price $y_i^*$ is not constant indefinitely. It remains valid only within an interval called the Allowable Range $[b_{i,\min}, b_{i,\max}]$, defined as:

biAllowable Decreasebibi+Allowable Increaseb_i - \text{Allowable Decrease} \le b_i \le b_i + \text{Allowable Increase}

  • Inside the Range: The current set of basic variables remains optimal. The coordinates of the optimal solution shift linearly, and the change in the optimal objective value is exact: ΔZ=yiΔbi\Delta Z^* = y_i^* \cdot \Delta b_i
  • Outside the Range: A basis change occurs. The current shadow price is no longer valid, and a new set of binding constraints governs the system.

3. Allowable Range of Objective Function Coefficients ($c_j$)

The allowable range for an objective coefficient $c_j$ defines the interval over which the current optimal corner point $(x_1^, x_2^, \dots, x_n^*)$ remains optimal:

cjAllowable Decreasecjcj+Allowable Increasec_j - \text{Allowable Decrease} \le c_j \le c_j + \text{Allowable Increase}

  • Inside the Range: The optimal production quantities ($x_j^*$) do not change at all! However, the total objective value updates directly: ΔZ=xjΔcj\Delta Z^* = x_j^* \cdot \Delta c_j
  • Reduced Cost of a Non-Basic Variable: For a variable currently at zero ($x_j^* = 0$), the reduced cost represents the amount by which $c_j$ must improve before it becomes economical to produce product $j$.

2. Duality Theory and Mathematical Foundations

Every linear program (called the Primal) has an associated mirror problem called the Dual. If the Primal is a resource allocation problem that maximizes profit, the Dual is a resource valuation problem that minimizes the imputed economic worth of the resources.

                  PRIMAL PROBLEM (Resource Allocation)
                  Maximize Z = c^T x  subject to Ax <= b, x >= 0
                                       │
                               Duality │ Relationship
                                       ▼
                    DUAL PROBLEM (Resource Valuation)
                  Minimize W = b^T y  subject to A^T y >= c, y >= 0

Primal-to-Dual Conversion Rules (The Canonical Form)

Primal Feature (Maximization)Dual Feature (Minimization)
Objective: Maximize $Z = \sum c_j x_j$Objective: Minimize $W = \sum b_i y_i$
Number of Decision Variables: $n$ variables ($x_j$)Number of Constraints: $n$ constraints
Number of Constraints: $m$ constraintsNumber of Decision Variables: $m$ variables ($y_i$)
Constraint Matrix: $A$ ($m \times n$)Constraint Matrix: $A^T$ ($n \times m$, transposed)
Right-Hand Side Vector: $\mathbf{b}$ ($m \times 1$)Dual Objective Coefficients: $\mathbf{b}^T$ ($1 \times m$)
Objective Coefficients: $\mathbf{c}$ ($1 \times n$)Dual Right-Hand Side Vector: $\mathbf{c}^T$ ($n \times 1$)
$i$-th constraint is $\le$$i$-th dual variable is non-negative ($y_i \ge 0$)
$i$-th constraint is $\ge$$i$-th dual variable is non-positive ($y_i \le 0$)
$i$-th constraint is $=$$i$-th dual variable is unrestricted in sign (URS)
$j$-th primal variable is $x_j \ge 0$$j$-th dual constraint is $\ge c_j$
$j$-th primal variable is URS$j$-th dual constraint is $= c_j$

Fundamental Duality Theorems

  1. Weak Duality Theorem: For any primal feasible solution $\mathbf{x}$ and any dual feasible solution $\mathbf{y}$: cTxbTy\mathbf{c}^T \mathbf{x} \le \mathbf{b}^T \mathbf{y} Any dual feasible solution provides an upper bound on the optimal primal objective value.

  2. Strong Duality Theorem: If either the primal or the dual problem has a finite optimal solution, then both have optimal solutions, and their optimal objective values are strictly equal: Z=cTx=bTy=WZ^* = \mathbf{c}^T \mathbf{x}^* = \mathbf{b}^T \mathbf{y}^* = W^*

  3. Infeasibility / Unboundedness Corollaries:

    • If the Primal is unbounded ($Z \to +\infty$), the Dual must be infeasible.
    • If the Dual is unbounded ($W \to -\infty$), the Primal must be infeasible.
    • If the Primal is infeasible, the Dual is either unbounded or infeasible.
  4. Complementary Slackness Theorem: Let $\mathbf{x}^$ and $\mathbf{y}^$ be feasible solutions to the primal and dual problems, respectively. They are both optimal if and only if: xj(Dual Slackj)=0,j=1,,nx_j^* \cdot (\text{Dual Slack}_j) = 0, \quad \forall j = 1, \dots, n yi(Primal Slacki)=0,i=1,,my_i^* \cdot (\text{Primal Slack}_i) = 0, \quad \forall i = 1, \dots, m Physical insight: If a resource is not fully consumed (Primal Slack $> 0$), its economic shadow price must be zero ($y_i^* = 0$). If a resource has a positive shadow price ($y_i^* > 0$), it must be fully exhausted with zero slack.


3. Integer Linear Programming (ILP) Formulations

In many practical engineering contexts, decision variables cannot take fractional values:

  • Pure Integer Linear Program (PILP): Every decision variable is restricted to integer values ($x_j \in \mathbb{Z}^+$).
  • Mixed-Integer Linear Program (MILP): Some variables are continuous (e.g., fluid volume, operating hours) while others are integer (e.g., number of machines, batches).
  • Binary (0-1) Integer Program: Variables are restricted to binary choices: $y_j \in {0, 1}$.

Core 0-1 Binary Logical Formulations

                COMMON 0-1 BINARY LOGICAL CONSTRAINTS
                                  │
      ┌───────────────────────────┼───────────────────────────┐
      ▼                           ▼                           ▼
┌───────────────┐           ┌───────────────┐           ┌───────────────┐
│ FIXED-CHARGE  │           │   MUTUALLY    │           │ PRECEDENCE /  │
│  ACTIVATION   │           │   EXCLUSIVE   │           │ CONTINGENCY   │
│   x <= M * y  │           │  y_1 + y_2<= 1│           │  y_B <= y_A   │
└───────────────┘           └───────────────┘           └───────────────┘
  1. Fixed-Charge (Setup) Problems: A production process incurs a fixed setup cost $K$ if initiated, plus a variable cost $c$ per unit produced. Let continuous $x$ be production volume and binary $y \in {0, 1}$ indicate whether the line is active: Cost=Ky+cx\text{Cost} = K y + c x xMyx \le M \cdot y Where $M$ is a sufficiently large upper bound on maximum possible production ("Big-M"). If $y = 0$, $x \le 0 \implies x = 0$. If $y = 1$, $x \le M$ (unconstrained).

  2. Mutually Exclusive Alternatives: Select at most one project from a set of candidate investments: j=1kyj1\sum_{j=1}^{k} y_j \le 1

  3. Contingent / Precedence Decisions: Project B cannot be undertaken unless Project A is approved: yByAy_B \le y_A

  4. The 0-1 Knapsack Problem: Select items $j = 1, \dots, n$ with values $v_j$ and weights $w_j$ to maximize total value without exceeding capacity $W$: Maximize Z=j=1nvjyjsubject to j=1nwjyjW,yj{0,1}\text{Maximize } Z = \sum_{j=1}^{n} v_j y_j \quad \text{subject to } \sum_{j=1}^{n} w_j y_j \le W, \quad y_j \in \{0, 1\}


4. Solving ILP: Branch and Bound Fundamentals

Why Simple Rounding Fails

A frequent misconception is that an integer program can be solved by relaxing the integrality requirement, solving the continuous LP Relaxation, and rounding the variables to the nearest integer. Rounding is fundamentally flawed:

  • Rounding can produce an infeasible point that severely violates one or more constraints.
  • Even if feasible, rounded points can be drastically suboptimal compared to the true integer optimum, which may lie far from the continuous relaxation boundary.
Continuous Feasible Region vs. Integer Grid Lattice:
  x_2 ^
      │     / Constraint boundary: x_1 + 2 x_2 <= 5
    3 ┼    / 
      │   /  (LP Relaxation Optimum: x_1 = 0, x_2 = 2.5)
    2 ┼  ●─── [Rounding up to (0, 3) is INFEASIBLE!]
      │  │ ●─ [Rounding down to (0, 2) yields Z = 18]
    1 ┼  │   ●─ [True Integer Optimum could be (3, 1) yielding Z = 23!]
      │  │
    0 ┴──┼───┼───┼───┼──> x_1
         0   1   2   3

The Branch and Bound Algorithm

Branch and Bound solves ILPs through intelligent enumeration using a tree structure:

  1. LP Relaxation: Drop the integrality condition ($x_j \in \mathbb{Z}$) and solve as a continuous LP. For a maximization problem, the LP relaxation provides an Upper Bound (UB) on the optimal integer value ($Z_{\text{IP}}^* \le Z_{\text{LP}}^*$).
  2. Branching: If an integer-restricted variable takes a fractional value (e.g., $x_1 = 3.6$), create two mutually exclusive child subproblems: Child 1: x13andChild 2: x14\text{Child 1: } x_1 \le 3 \quad \text{and} \quad \text{Child 2: } x_1 \ge 4
  3. Bounding: Solve the LP relaxation at each newly created child node.
  4. Fathoming (Pruning) Criteria: A branch is pruned (terminated) without further exploration if any of three conditions occurs:
    • Fathomed by Infeasibility: The node's LP relaxation has no feasible solution.
    • Fathomed by Integrality: The node's LP relaxation solution satisfies all integer restrictions. If its objective value exceeds the current best known integer solution (Incumbent), it becomes the new incumbent ($Z_{\text{incumbent}} = Z_{\text{node}}$).
    • Fathomed by Bound: The node's LP relaxation objective value is worse than or equal to the current incumbent ($Z_{\text{node}} \le Z_{\text{incumbent}}$ for maximization). Since relaxing constraints can only degrade the bound further down the tree, no integer solution in that subtree can beat the incumbent.

5. Step-by-Step Worked Engineering Examples

Worked Example 8.3.1: Sensitivity Report Analysis & Capacity Investment

Problem: A manufacturing plant operates a stamping press and an automated assembly cell. The optimal solution yields a weekly profit of $85,000. The sensitivity report provides the following data for the two capacity constraints:

ConstraintCurrent RHS ($b_i$)SlackShadow Price ($y_i^*$)Allowable IncreaseAllowable Decrease
Stamping Press400 hours0$65/hour60 hours40 hours
Assembly Cell500 hours45 hours$0/hour1E+30 ($\infty$)45 hours
  1. An equipment supplier offers to lease the plant 35 additional stamping press hours per week for a flat fee of $1,800. Should management accept the offer, and what is the net change in weekly profit?
  2. What would be the financial impact of acquiring 20 additional assembly cell hours?

Solution:

  1. Evaluate Stamping Press Lease:

    • Current available stamping hours = $400$. Proposed increase $\Delta b_1 = +35$ hours.
    • Check Allowable Range: The allowable increase is $60$ hours. Because $35 \le 60$, the proposed increase falls strictly within the allowable range.
    • The shadow price of $65/hour is valid.
    • Gross increase in optimal revenue: ΔZ=y1Δb1=($65/hour)×35 hours=$2,275\Delta Z^* = y_1^* \cdot \Delta b_1 = (\$65/\text{hour}) \times 35\text{ hours} = \$2{,}275
    • Subtract the flat lease cost: Net Profit Change=$2,275$1,800=+$475\text{Net Profit Change} = \$2{,}275 - \$1{,}800 = +\$475
    • Engineering Decision: Management should accept the offer; net profit increases by $475 per week.
  2. Evaluate Assembly Cell Expansion:

    • Current slack in Assembly Cell is $45$ hours, meaning $45$ hours currently sit idle.
    • The shadow price is $0/hour.
    • Adding $20$ more hours increases idle capacity from $45$ to $65$ hours.
    • Financial Impact: $0 change in profit. Acquiring additional capacity for a non-binding resource provides zero economic value.

Worked Example 8.3.2: Complete Primal-to-Dual Conversion

Problem: Formulate the mathematical dual of the following primal linear program:

\text{Maximize } & Z = 50 x_1 + 80 x_2 \\ \text{Subject to: } & 1 x_1 + 2 x_2 \le 32 \quad (\text{Machining, hrs}) \\ & 3 x_1 + 4 x_2 \le 84 \quad (\text{Finishing, hrs}) \\ & 1 x_1 + 0 x_2 \le 18 \quad (\text{Component A limit}) \\ & x_1 \ge 0, \quad x_2 \ge 0 \end{aligned}$$ **Solution**: 1. **Determine Dual Variables and Dimensions**: - Primal has 3 constraints $\implies$ Dual has 3 decision variables: $y_1, y_2, y_3$. - Because all primal constraints are $\le$ and primal objective is Maximize, dual variables are non-negative: $y_1, y_2, y_3 \ge 0$. 2. **Formulate Dual Objective Function**: - Primal RHS vector $\mathbf{b} = [32, 84, 18]^T$ becomes dual objective coefficients: $$\text{Minimize } W = 32 y_1 + 84 y_2 + 18 y_3$$ 3. **Formulate Dual Constraints (Transpose Matrix $A^T$)**: - Primal column 1 coefficients (for $x_1$) are $[1, 3, 1]^T$, with primal objective coefficient $c_1 = 50$: $$1 y_1 + 3 y_2 + 1 y_3 \ge 50$$ - Primal column 2 coefficients (for $x_2$) are $[2, 4, 0]^T$, with primal objective coefficient $c_2 = 80$: $$2 y_1 + 4 y_2 + 0 y_3 \ge 80 \implies 2 y_1 + 4 y_2 \ge 80$$ 4. **Dual Non-Negativity**: $$y_1 \ge 0, \quad y_2 \ge 0, \quad y_3 \ge 0$$ ### Worked Example 8.3.3: Branch and Bound Tree Traversal **Problem**: A project manager maximizes investment returns using binary integer programming. At the root node (Node 0), the continuous LP relaxation yields $Z_{\text{LP}} = 145.8$ with $y_1 = 0.6, y_2 = 1.0, y_3 = 0.4$. An initial feasible integer solution is known with $Z_{\text{incumbent}} = 120$. Branching on $y_1$ produces: - Node 1 ($y_1 = 0$): Solves to continuous $Z_{\text{LP}} = 118.5$ with $y_2 = 1.0, y_3 = 0.8$. - Node 2 ($y_1 = 1$): Solves to continuous $Z_{\text{LP}} = 141.2$ with $y_2 = 0.7, y_3 = 0.0$. Explain how the Branch and Bound algorithm processes Node 1 and Node 2. **Solution**: - **Evaluation of Node 1 ($y_1 = 0$)**: The LP relaxation upper bound at Node 1 is $Z_{\text{LP}} = 118.5$. The current best known integer solution has $Z_{\text{incumbent}} = 120$. Because $118.5 \le 120$, **Node 1 is Fathomed by Bound Inferiority**. No integer solution in this branch can ever exceed 118.5, so Node 1 is pruned without further exploration. - **Evaluation of Node 2 ($y_1 = 1$)**: The LP relaxation upper bound is $Z_{\text{LP}} = 141.2$. Since $141.2 > 120$, this branch could contain an integer solution superior to the current incumbent. However, the solution is not yet all-integer ($y_2 = 0.7$ is fractional). Therefore, **Node 2 cannot be fathomed**. The algorithm must branch further on $y_2$ ($y_2 = 0$ and $y_2 = 1$). --- ## 6. NCEES Reference Handbook Tips & Realistic Exam Traps - **Extrapolating Shadow Prices Beyond Allowable Limits**: On the FE exam, questions frequently test whether you remember the allowable range. If a question asks for the profit increase from adding 100 hours when the allowable increase is only 60 hours, multiplying $100 \times y^*$ is incorrect! Beyond 60 hours, the basis changes and the shadow price decreases. - **Sign Conventions for Dual Prices**: Be cautious with constraint senses. For a $\ge$ requirement in a maximization problem, increasing the RHS restricts the feasible space, making the shadow price negative. In minimization problems, increasing capacity reduces total cost, giving a negative shadow price. - **Transposing the Constraint Matrix**: When converting primal to dual, remember that primal constraint rows become dual constraint columns. Missing the transpose operation ($A \to A^T$) is the single most common algebraic error on duality exam problems. - **Big-M Value Selection**: In fixed-charge models $x \le M y$, choosing $M$ too small restricts valid production levels, while choosing $M$ excessively large ($10^{12}$) introduces severe numerical round-off instability in Simplex solvers.
Test Your Knowledge

An industrial facility operates two production departments. The current optimal production schedule generates a total weekly profit of $120,000. For the CNC machining center constraint (current capacity = 500 hours), the software sensitivity report displays: Shadow Price = $45 per hour, Allowable Increase = 80 hours, and Allowable Decrease = 50 hours. The plant manager is offered 60 additional hours of CNC machining capacity at a flat lease cost of $2,000 per week. What is the net change in total facility weekly profit if these hours are acquired?

A
B
C
D
Test Your Knowledge

Consider the following primal linear programming model: Maximize Z = 8x1 + 5x2, subject to 2x1 + x2 <= 16, x1 + 3x2 <= 18, and x1, x2 >= 0. Let y1 and y2 represent the dual decision variables associated with the first and second constraints, respectively. What is the mathematically correct dual linear program?

A
B
C
D
Test Your Knowledge

In a Branch and Bound algorithm for a profit-maximization integer linear program, the current best known integer incumbent solution has an objective value of Z_incumbent = 240. A pending subproblem node (Node 4) is evaluated by solving its continuous LP relaxation, yielding an optimal objective value of Z_LP = 232 with fractional decision variables x1 = 3.4 and x2 = 5.8. How must the Branch and Bound algorithm handle Node 4?

A
B
C
D