The Simplex Idea: Walking Vertex to Vertex

The simplex method solves a linear program by walking along the edges of the feasible region, hopping from one vertex to an adjacent vertex and always picking a neighbor with a better objective value, until no neighbor improves. This lesson develops that idea geometrically and algebraically: how adjacent vertices correspond to single-pivot BFS changes, how to choose the next vertex, and how to recognize when the current vertex is optimal.

Step 1 of 157%

Tutorial

Why Walk?

The simplex method is the workhorse algorithm for solving linear programs. Its central idea exploits a geometric fact: when an LP has an optimal solution, at least one optimum lies at a vertex of the feasible region.

Rather than enumerating every vertex -- a hopeless task when the feasible region has thousands of vertices -- the simplex method walks along the edges of the feasible region, hopping from one vertex to an adjacent vertex, and at each step moving to a neighbor whose objective value is better. The walk halts the instant no neighbor offers improvement.

To illustrate, consider the LP

max z=3x1+5x2\max\ z = 3x_1 + 5x_2

subject to x14,  2x212,  3x1+2x218,  x1,x20.x_1 \le 4,\ \ 2x_2 \le 12,\ \ 3x_1 + 2x_2 \le 18,\ \ x_1, x_2 \ge 0.

The feasible region is a pentagon whose vertices and objective values are

vertexz(0,0)0(4,0)12(4,3)27(2,6)36(0,6)30\begin{array}{c|c} \text{vertex} & z \\ \hline (0,0) & 0 \\ (4,0) & 12 \\ (4,3) & 27 \\ (2,6) & 36 \\ (0,6) & 30 \end{array}

Starting from (0,0),(0,0), simplex might walk

(0,0)  (0,6)  (2,6),(0,0)\ \longrightarrow\ (0,6)\ \longrightarrow\ (2,6),

with objective values 03036.0 \to 30 \to 36. From (2,6),(2,6), the adjacent vertices are (0,6)(0,6) (where z=30z=30) and (4,3)(4,3) (where z=27z=27); neither beats 36,36, so the walk stops. The optimum is z=36z^* = 36 at (x1,x2)=(2,6).(x_1,x_2)=(2,6).

navigate · Enter open · Esc close · ⌘K/Ctrl K toggle