310 likes | 771 Views
Integer Programming. ECE 665 Professor Maciej Ciesielski By DFG. Outline. Mathematical programming paradigm Linear Programming Integer Programming Integer Programming Example Unimodularity LP -> IP Theorem Conclusion Special Linear Programming with Integer Solutions
E N D
Integer Programming ECE 665 Professor Maciej Ciesielski By DFG
Outline • Mathematical programming paradigm • Linear Programming • Integer Programming • Integer Programming • Example • Unimodularity LP -> IP • Theorem • Conclusion • Special Linear Programming with Integer Solutions • Assignment Problem • Network Flow Problem • Review • Conclusions
Mathematical Programming paradigm Mathematical Programming Paradigm A mathematical program is an optimization problem of the form: • Maximize (or Minimize) f(x) subject to: • g(x) = 0 • h(x) ≥ 0 where x = [x1,...xn] is a subset of Rn, the functions g and h are called constraints, and f is called the objective function.
Linear Programming (LP) • The goal of Linear programming is to: (Max)Minimize: CTx Subject to: Ax ≥ b x ≥ 0 Where CT is a coefficient vector for f, A is a constraint matrix, and b es a constraint vector. • The constraint set: {x | Ax ≥ b} is a convex polyhedron, and f is linear so it is convex. Therefore, LP has convexity, and the local min/max is the global min/max
Integer Programming (IP) • The goal of Integer programming is to: (Max)Minimize: CTx Subject to: Ax b xiinteger • Typically, xi = 0,1 • (0,1 Integer Programming)
2 e1 e2 1 3 e3 IP Example (Matching Problem) Given a graph G , find maximal set of edges in G, such that no two edges are adjacent to the same vertex. • Maximum matching: matching of maximum cardinality. • Weighted matching: matching with
2 e1 e2 1 3 e3 IP Example (Matching Problem)
IP Example (Matching Problem) In matrix form: Where b = [ 1,…1]T , A = incidence matrix of G 1 2 3
IP Example (Matching Problem) max 1x1 + 1x2 + 1x3 x1 , x2 , x3 = 0, 1 One solution to this IP problem: x1= 1 , x2= 0 , x3= 0 Other possible solutions: x1= 0 , x2= 1 , x3= 0, or x1= 0 , x2= 0 , x3= 1
Question… Can the solution to this IP problem be obtained by dropping the integrality constraint: xi = 0, 1 And solving the LP problem instead? In our example, solution to the IP is not obtainable from LP. Reason: matrix A does not have certain property (total unimodularity) needed to guarantee integer solutions.
Question… If xi = 0, 1 is relaxed, such that xi 0 , then the solution to the associated LP problem is non – integer: Reason: the A matrix Is not totally unimodular: |A| = - 2
Unimodularity: LP -> IP Given a constraint set in standard form where A, b are integer Partition A = [B/N ]; x = [xB, xN ] B is nonsingular m x m basis, N is non-basic
Unimodularity: LP -> IP Basic solution is In particular, when B = I and B -1 = I then XB= b a solution can be obtained by inspection (as in the initial step of Simplex method).
Unimodularity: LP -> IP Since xB = B –1 b with xN = 0, b integer A sufficient condition for a basic solution xBto be integer is that B –1 be an integer matrix
Unimodularity A square matrix B is called unimodular if D = |det B| = 1 An integer matrix A is totally unimodular if every square, nonsingular submatrix of A is unimodular. Equivalently: A is totally unimodular if every subdeterminant of A is 0, +1, or –1.
Unimodularity Recall that for B nonsingular: Where B + , adjoint matrix = [ i j cofactor of element a i jin det A ]T B +and det B are integer if B –1 is integer
Unimodularity Cofactor of ai j : Determinant obtained by omitting the ith row and the jth column of A and then multiplying by (-1) i + j .
Unimodularity For B unimodular, B –1integer: If A is totally unimodular, every basis matrix B is unimodular and every basic solution ( xB , yN) = ( B –1 b, 0 ) Is integer. In particular, the optimal solution is integer
Theorem 1: If A is totally unimodular then every basic solution of Ax = b is integer. For LP’s with equality constraints total unimodularity is sufficient but not necessary. For LP with inequality constraints, Ax b, total unimodularity of A is both necessary and sufficient for all extreme points of s = {x : Ax b , x 0 } to be integer for every integer vector b.
Conclusion: Any IP with totally unimodular constraint matrix can be solved as an LP. Totally unimodular matrix : a i j = 0 , +1, -1 Also, every determinant of A must be 0, +1 or -1
Special Linear Programs with Integer Solutions Network flow problems: • max flow • min – cost flow • assignment problem • shortest path • transportation problem are LP with the property that they possess optimal solutions in integers.
Some Totally Unimodular Linear Programs Assignment problem (special case of min – cost capacitated flow problems) [ m jobs x m men ] c i j =cost of assigning man i to job j
Some Totally Unimodular Linear Programs X11 X12 X13 X21 X22 X23 X31 X32 X33
Some Totally Unimodular Linear Programs In matrix notation: Ax = 1 where m2 m 2m ... Exactly m 1’s in each row Exactly 2 1’s in each column
Network Flow Problems Given: • a set of originsV1 ; each origin i V1 ; supplies a1 of commodity. • a set of destinationsV2 ; each destination j V2 ; has a demand biof commodity. • costper unit commodity; cijassociated with sending commodity through (i, j ).
Network Flow Problems Constraint Set: (Totally unimodular)
Network Flow Problems Special case: for single source, single destination, max flow problem in any case: Ax b
Review No matter which problem it is: the general format is A’x b It can be shown that • If A is totally unimodular then [A/I ] is also totally unimodular • The transpose of totally unimodular matrix is also totally unimodular • . where A = incidence matrix of the corresponding digraph, totally unimodular. I = identity matrix, A’ is totally unimodular.
Review No efficient algorithms exist for general Integer Programming problems • Exploit a special structure of the problem (total unimodularity, etc.) to obtain integer solutions by solving simpler problems. • Transform the problem to another problem for which an approximate solution is easier to find. • Once the structure of the problem is well understood, use heuristic, but… stay away from brute force approach.
Conclusions A large number of CAD problems can be cast in analytical form: • Graph Theory • Mathematical Optimization For some problems – efficient algorithms exist. For others – need to resort to heuristic, suboptimal solutions. Some known successful heuristic approaches • Simulated annealing • LP rounding