Lawfare Academy

Business Analytics: Optimization and Simulation · Chapter 2 of 8

Solve the linear program and verify a primal certificate

Return to the linked course unit →

DEVELOPED COURSE TEXT

Solve the linear program and verify a primal certificate

Enumerate the meaningful corners

For Helix, the labor and machine boundaries intersect at 2 x+y=100 and x+2 y=80. Solving gives x=40, y=20, but the A demand bound x≤30 excludes that intersection. It is a common modeling error to solve only the resource equalities and ignore a demand limit. The feasible corner at x=30 on the machine boundary is y=25. At x=0, the B limit and machine capacity both allow y=40. At y=0, the A demand limit gives x=30. The additional corner x=30, y=0 and the origin are feasible but have lower contribution.
The objective values are 1950 at(30,25),1200 at(0,40),1200 at(30,0) and 0 at(0,0). The upper feasible boundary connects the relevant extreme points; labor is slack throughout the segment between(0,40) and(30,25). Thus the optimum is(30,25). Enumerating vertices is manageable here; in larger problems a solver supplies a candidate and dual information, while independent checks verify feasibility and objective consistency.

Understand pivots as movement among bases

A standard-form linear program adds slack variables to convert inequalities into equalities. A basic solution chooses a set of columns that can solve the equalities with the remaining variables fixed at bounds. Simplex methods move between adjacent feasible bases while improving the objective or certifying that no improving feasible direction remains. The algebra tracks a basis, not an arbitrary sequence of trial guesses. Degeneracy can make several bases represent the same physical point.
This conceptual picture helps interpret solver sensitivity reports. A shadow value or allowable range usually refers to a basis remaining optimal under a parameter change. At a degenerate point there may be alternative valid dual solutions, and local values can be direction-dependent. The business analyst need not hand-pivot a large model to use it responsibly, but should understand why an optimal objective and a sensitivity number depend on the active constraint structure.

Construct an upper bound matching the candidate

A direct optimality certificate is available without enumerating every corner. Multiply machine capacity x+2 y≤80 by 15 and the A demand bound x≤30 by 25. Adding gives 40 x+30 y≤15×80+25×30=1950. Every feasible plan obeys that upper bound. Since the candidate(30,25)attains 1950, it is globally optimal. The unused labor and B upper bounds receive zero multipliers in this certificate.
This argument is an instance of weak duality: a nonnegative combination of resource limits that covers each objective coefficient provides an upper bound for a maximization problem. It is stronger than observing that a solver stopped improving. A numerical certificate also helps catch unit mistakes or an incorrectly signed constraint. If the claimed plan has value above a valid upper bound, at least one calculation or formulation is inconsistent.

Inspect alternate objectives and tie cases

Suppose A contribution falls to 15 while B remains 30. On the machine boundary, y=(80-x)/2, so contribution becomes 15 x+30(80-x)/2=1200. Every feasible point on that boundary segment ties. The original optimum remains optimal but is no longer unique. A secondary criterion such as lower labor use can choose among ties; the chosen criterion should be disclosed rather than presented as an implication of the contribution objective.
If A contribution falls below 15, all-B becomes preferred under the remaining assumptions. If A contribution rises, the demand bound may remain binding but its shadow value changes. These contrasts show that a single returned solution does not describe the full set of economically equivalent alternatives. A complete report gives the objective, feasibility checks, active constraints and material alternative optima or sensitivity. This makes the recommendation reviewable and implementable rather than a black-box coordinate pair.

Worked records

Record 1

Use the deterministic Helix formulation. Solver output:x=30, y=25, objective 1950, slacks labor 15, machine 0, A demand 0, B demand 15.

Develop the reasoning

Primal feasibility holds. The nonnegative multiplier certificate(0,15,25,0)gives resource-bound value 0×100+15×80+25×30+0×40=1950. It covers A contribution 15+25=40 and B contribution 2×15=30. Equality of feasible primal value and feasible upper bound proves global optimality. The executable analysis independently verifies this with scipy.optimize.linprog.

Progressive practice — optional

1. Foundation

Why is resource intersection(40,20)invalid?

Compare the worked reasoning

It violates A demand bound 30.

Change the record

A demand bound is removed.

Compare the changed-record reasoning

The point becomes feasible and earns 2200; with both resource bounds binding it is the optimum, as can be verified by dual multipliers labor 50/3, machine 20/3.

2. Application

Show that the dual certificate bounds every feasible objective.

Compare the worked reasoning

15(x+2 y)+25 x=40 x+30 y≤15×80+25×30=1950.

Change the record

Machine capacity rises to 90 while the same active structure holds.

Compare the changed-record reasoning

The bound becomes 2100 and plan(30,30)attains it, so it is optimal.

3. Transfer

What if A contribution becomes 15?

Compare the worked reasoning

Every feasible point on the binding machine segment ties at 1200.

Change the record

A secondary objective minimizes labor.

Compare the changed-record reasoning

On that segment labor=2 x+(80-x)/2=40+1.5 x, so choose x=0, y=40. The secondary criterion selects among primary-objective ties.

Sources and scope