Download slides PDF

Linear programming and duality

Plan for the three-hour class

What makes a model linear?

Running example: two production routes

The production LP

Objective contours and the best feasible point

Why compare extreme points?

An LP can have many optimal solutions

Infeasible and unbounded are different

Quick check: feasibility before profit

Slack variables and standard form

A basis selects the variables we solve for

The Simplex decision at each step

Pivot 1: x enters, s₂ leaves

Dictionary after the first pivot

Pivot 2: y enters, s₁ leaves

The final dictionary certifies optimality

Degeneracy and starting feasibility

Practice: change the contribution

Practice solution: one pivot is enough

Break

The dual prices the resources

Primal and dual side by side

Signs depend on the formulation

Weak duality gives an upper bound

Dual geometry: tighten the upper bound

Solve the dual and compare

Strong duality for linear programs

The duality gap separates two kinds of waste

Complementary slackness

LP duality is KKT in a special form

Practice: a dual certificate

Practice solution: zero price for unused capacity

Shadow prices: value per extra unit

Allowable RHS range: resource 1

Beyond the range, the shadow price changes

Allowable RHS range: resource 2

Objective sensitivity rotates the contour

Reduced cost: should we introduce a new product?

Read solver output with the sign convention

Practice: capacity purchase decision

Capacity purchase: worked solution

Exit ticket: explain, calculate, certify

Exit ticket: answers and reasoning

What an LP solution should tell us

References and optional follow-up