Stony Brook Algorithm Repository


Linear Programming

Input
Output

Input Description: A set of linear inequalities, a linear objective function.
Problem: Find the assignment to the variables maximizing the objective function while satisfying all inequalities.

Excerpt from The Algorithm Design Manual: The standard algorithm for linear programming is called the simplex method. Each constraint in a linear programming problem acts like a knife that carves away a region from the space of possible solutions. We seek the point within the remaining region that maximizes (or minimizes) \(f(X)\). By appropriately rotating the solution space, the optimal point can always be made to be the highest point in the region. Since the region (simplex) formed by the intersection of a set of linear constraints is convex, we can find the highest point by starting from any vertex of the region and walking to a higher neighboring vertex. When there is no higher neighbor, we are at the highest point.

While the basic simplex algorithm is not too difficult to program, there is a considerable art to producing an efficient implementation capable of solving large linear programs. For example, large programs tend to be sparse (meaning that most inequalities use few variables), so sophisticated data structures must be used. There are issues of numerical stability and robustness, as well as which neighbor we should walk to next (so called pivoting rules). Finally, there exist sophisticated interior-point methods, which cut through the interior of the simplex instead of walking along the outside, that beat simplex in many applications.


Implementations

Lp_solve (rating 10)
COINOR (rating 9)
pulp (rating 8)
ceres-solver (rating 8)
gosl (rating 8)
Elemental (rating 8)
GLPK (rating 8)
NEOS (rating 8)
Netlib (rating 0)


Recommended Books

Understanding and Using Linear Programming by J. Matousek and B. Gartner Linear Programming: Methods and Applications by S. Gass Algorithms in Java, Third Edition (Parts 1-4) by Robert Sedgewick and Michael Schidlowsky
Limits to Parallel Computation: P-completeness theory by R. Greenlaw and J. Hoover and W. Ruzzo Linear Programming by V. Chvatal Linear programming and extensions by G. Dantzig

Related Problems


Knapsack Problem

Network Flow

Constrained and Unconstrained Optimization


As an Amazon affiliate, I earn from qualifying purchases if you buy from links on this website.


Go To Main Page