18.04.2013 Views

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Linear Programming<br />

variable assignment that best fits the equations, we can replace each variable by and<br />

solve the new system as a linear program, minimizing the sum of the error terms.<br />

● Graph algorithms - Many of the standard graph problems described in this book, such as shortest<br />

paths, bipartite matching, and network flow, can all be solved as special cases of linear<br />

programming. Most of the rest, including traveling salesman, set cover, and knapsack, can be<br />

solved using integer linear programming.<br />

<strong>The</strong> standard algorithm for linear programming is called the simplex method. Each constraint in a linear<br />

programming problem acts like a knife that carves away a region from the space of possible solutions.<br />

We seek the point within the remaining region that maximizes (or minimizes) f(X). By appropriately<br />

rotating the solution space, the optimal point can always be made to be the highest point in the region.<br />

Since the region (simplex) formed by the intersection of a set of linear constraints is convex, we can find<br />

the highest point by starting from any vertex of the region and walking to a higher neighboring vertex.<br />

When there is no higher neighbor, we are at the highest point.<br />

While the basic simplex algorithm is not too difficult to program, there is a considerable art to producing<br />

an efficient implementation capable of solving large linear programs. For example, large programs tend<br />

to be sparse (meaning that most inequalities use few variables), so sophisticated data structures must be<br />

used. <strong>The</strong>re are issues of numerical stability and robustness, as well as which neighbor we should walk<br />

to next (so called pivoting rules). Finally, there exist sophisticated interior-point methods, which cut<br />

through the interior of the simplex instead of walking along the outside, that beat simplex in many<br />

applications.<br />

<strong>The</strong> bottom line on linear programming is this: you are much better off using an existing LP code than<br />

writing your own. Further, you are much better off paying money than surfing the net. Linear<br />

programming is one algorithmic problem of such economic importance that commercial implementations<br />

are far superior to free versions.<br />

Issues that arise in linear programming include:<br />

● Do any variables have integrality constraints? - It is impossible to send 6.54 airplanes from New<br />

York to Washington each business day, even if that value maximizes profit according to your<br />

model. Such variables often have natural integrality constraints. A linear program is called an<br />

integer program when all its variables have integrality constraints, or a mixed integer progam if<br />

some of them do.<br />

Unfortunately, it is NP-complete to solve integer or mixed programs to optimality. However,<br />

there are techniques for integer programming that work reasonably well in practice. Cutting<br />

plane techniques solves the problem first as a linear program, and then adds extra constraints to<br />

enforce integrality around the optimal solution point before solving it again. After a sufficient<br />

number of iterations, the optimum point of the resulting linear program matches that of the<br />

original integer program. As with most exponential-time algorithms, run times for integer<br />

file:///E|/BOOK/BOOK3/NODE141.HTM (2 of 5) [19/1/2003 1:30:23]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!