Linear Program
A Linear Program (LP) is a convex optimization problem where the objective function and constraints are all affine. Its matrix form is given as
where , and for someEach equality constraint defines a hyperplane, while each inequality constraint defines a half-space. The feasible set of an LP is therefore the intersection of finitely many hyperplanes and half-spaces:
This set is called a polyhedron. If it is bounded, it is called a polytope. In two dimensions, a polyhedron is simply a (possibly unbounded) convex polygon.A key structural property of LPs is that if an LP has an optimal solution, then at least one optimal solution occurs at a vertex (extreme point) of the feasible set. Vertices correspond to points where enough constraints are active (tight) to uniquely determine a solution. In , this typically means selecting linearly independent active constraints and solving the resulting linear system. Algebraically, this is known as a basic feasible solution.
Two vertices of a non-degenerate LP are adjacent if they differ in exactly one active constraint. Equivalently, they share all but one of their zero components in the standard form representation. This adjacency structure forms the edges of the polyhedron.
The simplex algorithm exploits this geometry to solve LPs as follows:
- Start at any feasible vertex .
- Check all adjacent vertices to .
- If an adjacent vertex exists, such that , update the parameter to be and repeat the process starting from 2.
- Otherwise, if no adjacent vertices exist or meet the condition, is the optimal solution to the LP.
To convert a general optimization problem to an LP, one can employ slack variables through the epigraph technique. The problem
can be rewritten using the epigraph technique as
For LPs, since is affine, the constraint is also affine, preserving linearity. Minimizing geometrically pushes the upper bound down until it touches the graph of .
Intuition
Intuitively, in linear programming:
- You have a collection of variables .
- You form a linear expression (the “objective”) that you want to make as large (maximize) or as small (minimize) as possible.
At the same time, each variable combination must satisfy a series of linear constraints, such as:
and possibly some equalities, like
Each constraint chops off a portion of the space of all possible . Because the constraints are linear, the feasible region (the set of all allowable solutions) is a convex polytope (think of a polygon in 2D, a polyhedron in 3D, etc.).
Properties
Examples
Finding Vertices of an LP
Formulating LPs I
Formulate the problem
for the following functions using the epigraph technique or explain why you cannot.We can initialize two slack variables, and that bound the two functions, such that
& x_{i} \le t_{1} \\ & x_{i} \ge t_{2} \qquad \text{for } i = 1, \ldots, n, & t_1 \ge 0, & t_2 \ge 0. \end{aligned}$$ Then, the objective becomes $t_{1}-t_{2}$. Note that the non-negativity of slack variables is not implied by the maximum and minimum here, and the two additional constraints should be explicitly added.We initialize a vector , such that and (which is implied by the constraint). The objective is simply .
Since is a single variable we only need the slack variable . We add the constraint However, because the L1 norm uses all vector elements, we must define a slack variable for each . As such, we add the constraint Then, the objective function becomes and we minimize over . Non-negativity of slack variables is implied by the rest of the constraints.
Formulating LPs II
Given constants , consider the optimization problem
Formulate this problem as an LP. is non-decreasing in , we can reduce the objective function to simply . As done before, for the constraint we introduce two slack variables: and . For , we add the constraint whereas for , we introduce the constraint Our original constraint becomes
Since