1.2.6 Linear Programming

Problem Input | Problem Output

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: Linear Programming Code (C) (rating 9)
  • CAP -- Contig Assembly Program (C++) (rating 7)
  • NEOS - Network Enabled Optimization System (FORTRAN) (rating 7)
  • cGOP - A Package for Global Optimization (C) (rating 5)
  • Netlib / TOMS -- Collected Algorithms of the ACM (FORTRAN) (rating 4)
  • Linprog -- low dimensional linear programming (C) (rating 4)
  • Dmitriy's Implementation of Integer and Linear Programming and FFT (Pascal) (rating 4)
  • Discrete Optimization Methods (Pascal) (rating 3)
  • Algorithms in C++ -- Sedgewick (C++) (rating 2)

    Related Problems

  • Knapsack Problem
  • Network Flow
  • Constrained and Unconstrained Optimization


    Previous Problem Next Problem

    View the graph for this file

    Bulletin Board
    About ``The Algorithm Design Manual''.
    Send us Mail
    The Stony Brook Algorithm Repository -- go to front page

    This page last modified on Wed Mar 07, 2001 .