Assignment 4 — Duality — Primal to Dual
Five primals converted to their duals with the course's canonical method — every wrong-way constraint flipped, every equality split — and each dual checked against its primal by strong duality.
- Count the dual variables first: one per primal constraint, an equality counts twice.
- Canonical form: a Max primal needs every constraint ≤, a Min primal every constraint ≥. Multiply a wrong-way constraint by −1 (every coefficient and the RHS flip). Split each = into a ≤ and a ≥, and flip whichever half is the wrong way.
- Dual objective: Max ↔ Min; the canonical RHS values become the objective coefficients.
- Dual constraints: one per primal variable, reading down its column; RHS = that variable's objective coefficient; direction ≥ for a Max primal, ≤ for a Min primal.
- Sign restriction: all Y ≥ 0 (in canonical form).
Full procedure with the exam example: Unit 1 · Duality.
- The shortcut answer for an equality: the pair Y₃ − Y₄ (both ≥ 0) is the same as one unrestricted variable Y₃′. Either form earns full marks; the course writes the pair, so write the pair.
- Shape check before you hand it in: dual variables = primal constraints (equalities ×2); dual constraints = primal variables.
- Strong duality as a self-check: if both problems have optima, their values are equal. All three solvable pairs below were checked this way.
Q1 — Max Z = 7X₁ + 5X₂
Assignment 4 p. 1
- Step 1 — Count 5 constraints, 1 equality ⟹ the dual has 6 variables (Y₁, Y₂, Y₃, Y₄, Y₅, Y₆) and 2 constraints
- Step 2 — Canonical form
Original Action Canonical Dual var X₁ + 2X₂ ≤ 10 already ≤ X₁ + 2X₂ ≤ 10 Y₁ 3X₁ + X₂ ≥ 12 × (−1) −3X₁ − X₂ ≤ −12 Y₂ 2X₁ + 3X₂ ≤ 18 already ≤ 2X₁ + 3X₂ ≤ 18 Y₃ X₁ + X₂ = 7 the ≤ half X₁ + X₂ ≤ 7 Y₄ the other half, × (−1) −X₁ − X₂ ≤ −7 Y₅ 2X₁ − X₂ ≤ 6 already ≤ 2X₁ − X₂ ≤ 6 Y₆ - Step 3 — Dual objective (RHS values become coefficients) Min W = 10Y₁ − 12Y₂ + 18Y₃ + 7Y₄ − 7Y₅ + 6Y₆
- Step 4 — Dual constraints (one per primal variable, read down its column) Y₁ − 3Y₂ + 2Y₃ + Y₄ − Y₅ + 2Y₆ ≥ 7 2Y₁ − Y₂ + 3Y₃ + Y₄ − Y₅ − Y₆ ≥ 5
- Step 5 — The complete dual Min W = 10Y₁ − 12Y₂ + 18Y₃ + 7Y₄ − 7Y₅ + 6Y₆ Subject to: Y₁ − 3Y₂ + 2Y₃ + Y₄ − Y₅ + 2Y₆ ≥ 7 2Y₁ − Y₂ + 3Y₃ + Y₄ − Y₅ − Y₆ ≥ 5 Y₁, Y₂, Y₃, Y₄, Y₅, Y₆ ≥ 0Check (strong duality): primal optimum Z = 43.67; dual optimum W = 43.67 ✓
Q2 — Min Z = 5X₁ + 4X₂
Assignment 4 p. 1
- Step 1 — Count 3 constraints, 1 equality ⟹ the dual has 4 variables (Y₁, Y₂, Y₃, Y₄) and 2 constraints
- Step 2 — Canonical form
Original Action Canonical Dual var 2X₁ + X₂ ≥ 8 already ≥ 2X₁ + X₂ ≥ 8 Y₁ X₁ + 3X₂ ≤ 12 × (−1) −X₁ − 3X₂ ≥ −12 Y₂ 3X₁ + 2X₂ = 10 the ≥ half 3X₁ + 2X₂ ≥ 10 Y₃ the other half, × (−1) −3X₁ − 2X₂ ≥ −10 Y₄ - Step 3 — Dual objective (RHS values become coefficients) Max W = 8Y₁ − 12Y₂ + 10Y₃ − 10Y₄
- Step 4 — Dual constraints (one per primal variable, read down its column) 2Y₁ − Y₂ + 3Y₃ − 3Y₄ ≤ 5 Y₁ − 3Y₂ + 2Y₃ − 2Y₄ ≤ 4
- Step 5 — The complete dual
Max W = 8Y₁ − 12Y₂ + 10Y₃ − 10Y₄
Subject to:
2Y₁ − Y₂ + 3Y₃ − 3Y₄ ≤ 5
Y₁ − 3Y₂ + 2Y₃ − 2Y₄ ≤ 4
Y₁, Y₂, Y₃, Y₄ ≥ 0
Worth knowing: this primal has no feasible solution — solving it leaves an artificial variable in the basis — and its dual is correspondingly unbounded. That is the duality theorem at work: if one problem is infeasible, the other is unbounded or infeasible. The question only asks for the formulation, which is unaffected.
Q3 — Max Z = 4X₁ + 6X₂ + 3X₃
Assignment 4 p. 1
- Step 1 — Count 3 constraints, 1 equality ⟹ the dual has 4 variables (Y₁, Y₂, Y₃, Y₄) and 3 constraints
- Step 2 — Canonical form
Original Action Canonical Dual var 2X₁ + X₂ + 3X₃ ≤ 12 already ≤ 2X₁ + X₂ + 3X₃ ≤ 12 Y₁ X₁ + 3X₂ + 2X₃ ≥ 15 × (−1) −X₁ − 3X₂ − 2X₃ ≤ −15 Y₂ 3X₁ + 2X₂ + X₃ = 10 the ≤ half 3X₁ + 2X₂ + X₃ ≤ 10 Y₃ the other half, × (−1) −3X₁ − 2X₂ − X₃ ≤ −10 Y₄ - Step 3 — Dual objective (RHS values become coefficients) Min W = 12Y₁ − 15Y₂ + 10Y₃ − 10Y₄
- Step 4 — Dual constraints (one per primal variable, read down its column) 2Y₁ − Y₂ + 3Y₃ − 3Y₄ ≥ 4 Y₁ − 3Y₂ + 2Y₃ − 2Y₄ ≥ 6 3Y₁ − 2Y₂ + Y₃ − Y₄ ≥ 3
- Step 5 — The complete dual Min W = 12Y₁ − 15Y₂ + 10Y₃ − 10Y₄ Subject to: 2Y₁ − Y₂ + 3Y₃ − 3Y₄ ≥ 4 Y₁ − 3Y₂ + 2Y₃ − 2Y₄ ≥ 6 3Y₁ − 2Y₂ + Y₃ − Y₄ ≥ 3 Y₁, Y₂, Y₃, Y₄ ≥ 0Check (strong duality): primal optimum Z = 30; dual optimum W = 30 ✓
Q4 — Min Z = 6X₁ + 3X₂ + 5X₃
Assignment 4 p. 1
- Step 1 — Count 5 constraints, 1 equality ⟹ the dual has 6 variables (Y₁, Y₂, Y₃, Y₄, Y₅, Y₆) and 3 constraints
- Step 2 — Canonical form
Original Action Canonical Dual var X₁ + X₂ + 2X₃ ≥ 9 already ≥ X₁ + X₂ + 2X₃ ≥ 9 Y₁ 2X₁ + 3X₂ + X₃ ≤ 15 × (−1) −2X₁ − 3X₂ − X₃ ≥ −15 Y₂ X₁ + 2X₂ + X₃ ≥ 8 already ≥ X₁ + 2X₂ + X₃ ≥ 8 Y₃ 3X₁ + X₂ + 2X₃ = 12 the ≥ half 3X₁ + X₂ + 2X₃ ≥ 12 Y₄ the other half, × (−1) −3X₁ − X₂ − 2X₃ ≥ −12 Y₅ X₁ − X₂ + X₃ ≤ 5 × (−1) −X₁ + X₂ − X₃ ≥ −5 Y₆ - Step 3 — Dual objective (RHS values become coefficients) Max W = 9Y₁ − 15Y₂ + 8Y₃ + 12Y₄ − 12Y₅ − 5Y₆
- Step 4 — Dual constraints (one per primal variable, read down its column) Y₁ − 2Y₂ + Y₃ + 3Y₄ − 3Y₅ − Y₆ ≤ 6 Y₁ − 3Y₂ + 2Y₃ + Y₄ − Y₅ + Y₆ ≤ 3 2Y₁ − Y₂ + Y₃ + 2Y₄ − 2Y₅ − Y₆ ≤ 5
- Step 5 — The complete dual Max W = 9Y₁ − 15Y₂ + 8Y₃ + 12Y₄ − 12Y₅ − 5Y₆ Subject to: Y₁ − 2Y₂ + Y₃ + 3Y₄ − 3Y₅ − Y₆ ≤ 6 Y₁ − 3Y₂ + 2Y₃ + Y₄ − Y₅ + Y₆ ≤ 3 2Y₁ − Y₂ + Y₃ + 2Y₄ − 2Y₅ − Y₆ ≤ 5 Y₁, Y₂, Y₃, Y₄, Y₅, Y₆ ≥ 0Check (strong duality): primal optimum Z = 28.67; dual optimum W = 28.67 ✓
Q5 — Max Z = 3X₁ + 8X₂ + 6X₃
Assignment 4 p. 2
- Step 1 — Count 4 constraints, 1 equality ⟹ the dual has 5 variables (Y₁, Y₂, Y₃, Y₄, Y₅) and 3 constraints
- Step 2 — Canonical form
Original Action Canonical Dual var 2X₁ + X₂ + X₃ ≥ 10 × (−1) −2X₁ − X₂ − X₃ ≤ −10 Y₁ X₁ + 3X₂ + 2X₃ ≤ 15 already ≤ X₁ + 3X₂ + 2X₃ ≤ 15 Y₂ 3X₁ + 2X₂ + X₃ = 12 the ≤ half 3X₁ + 2X₂ + X₃ ≤ 12 Y₃ the other half, × (−1) −3X₁ − 2X₂ − X₃ ≤ −12 Y₄ X₁ + X₂ − X₃ ≥ 4 × (−1) −X₁ − X₂ + X₃ ≤ −4 Y₅ - Step 3 — Dual objective (RHS values become coefficients) Min W = −10Y₁ + 15Y₂ + 12Y₃ − 12Y₄ − 4Y₅
- Step 4 — Dual constraints (one per primal variable, read down its column) −2Y₁ + Y₂ + 3Y₃ − 3Y₄ − Y₅ ≥ 3 −Y₁ + 3Y₂ + 2Y₃ − 2Y₄ − Y₅ ≥ 8 −Y₁ + 2Y₂ + Y₃ − Y₄ + Y₅ ≥ 6
- Step 5 — The complete dual
Min W = −10Y₁ + 15Y₂ + 12Y₃ − 12Y₄ − 4Y₅
Subject to:
−2Y₁ + Y₂ + 3Y₃ − 3Y₄ − Y₅ ≥ 3
−Y₁ + 3Y₂ + 2Y₃ − 2Y₄ − Y₅ ≥ 8
−Y₁ + 2Y₂ + Y₃ − Y₄ + Y₅ ≥ 6
Y₁, Y₂, Y₃, Y₄, Y₅ ≥ 0
Worth knowing: this primal has no feasible solution — solving it leaves an artificial variable in the basis — and its dual is correspondingly unbounded. That is the duality theorem at work: if one problem is infeasible, the other is unbounded or infeasible. The question only asks for the formulation, which is unaffected.