CIS 3223. Data Structures and Algorithms

Linear programming and reductions

 

1. Linear programming problem

Optimization: find a solution with the largest or smallest value by some criterion under certain constraints.

Linear programming: Optimization with linear constraints and criterion.

The problem domain is described by a set of variables. Intuitively, it corresponds to a multi-dimensional space, and each assignment to the variables corresponds to a point in the space.

A constraint is expressed as a (linear) equation or inequality. Intuitively, each of them correspond to a region in the space, consisting of the points satisfying the constraint.

The points in the common sub-region of all the constraints are feasible solutions of the LP problem.

The optimal solution is the one that maximizes or minimizes a given linear objective function, which is achieved at a vertex of the feasible region.

Example: profit maximization, Figure 7.1.

In the following situations there is no optimal solution:

 

2. Reduction and LP

Reduction: to transform a problem into another problem.

Reduction in LP, with Example

Matrix-vector notation

 

3. The Simplex algorithm

The Simplex algorithm solves a LP problem by repeatedly moving to a better vertex.

A 2-D LP problem and its solution.

A 3-D LP problem, Figure 7.2.

Demo applet

 

4. Network flows

A directed and weighted graph can be seen as a network with edge capability specified. A flow in the network, from a source s to a sink t, satisfies two constraints: on each edge and each vertex.

Maximum flow problem is reduced to LP problem.

The simplex algorithm applied to the maximum-flow problem: start with zero flow, then repeatedly look for an appropriate path from s to t, and increase the flow along the path as much as possible.

This solution does not always work --- see example.

Revision: allow a path to cancel an existing flow.

Complete example 1, 2, 3

The algorithm ends with a (s,t)-cut, which indicates the optimality of the solution.

Max-flow min-cut theorem: The size of the maximum flow in a network equals the capability of the smallest (s,t)-cut.

The complexity of the algorithm is O(|V|*|E|2) — it takes O(|E|) time to find a path, and there may be O(|V|*|E|) iterations.

The matchmaking problem can be reduced to the maximum-flow problem.