Integer Programming An integer linear program (ILP) is defined exactly as a linear program except that values of variables in a feasible solution have.

Slides:



Advertisements
Similar presentations
Review: Search problem formulation
Advertisements

IEOR 4004 Final Review part II.
The simplex algorithm The simplex algorithm is the classical method for solving linear programs. Its running time is not polynomial in the worst case.
DMOR Branch and bound. Integer programming Modelling logical constraints and making them linear: – Conjuction – Disjunction – Implication – Logical constraints.
Types of Algorithms.
Algorithm Strategies Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
1 State of the art for TSP TSP instances of thousand of cities can be consistently solved to optimality. Instances of up to cities have been solved:
Branch and Bound Searching Strategies
Branch and Bound Similar to backtracking in generating a search tree and looking for one or more solutions Different in that the “objective” is constrained.
1 Optimization problems such as MAXSAT, MIN NODE COVER, MAX INDEPENDENT SET, MAX CLIQUE, MIN SET COVER, TSP, KNAPSACK, BINPACKING do not have a polynomial.
Computational Methods for Management and Economics Carla Gomes
1 Maximum matching Max Flow Shortest paths Min Cost Flow Linear Programming Mixed Integer Linear Programming Worst case polynomial time by Local Search.
1 Branch and Bound Searching Strategies 2 Branch-and-bound strategy 2 mechanisms: A mechanism to generate branches A mechanism to generate a bound so.
Integer Programming Difference from linear programming –Variables x i must take on integral values, not real values Lots of interesting problems can be.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy under contract.
Branch and Bound Algorithm for Solving Integer Linear Programming
1 Integrality constraints Integrality constraints are often crucial when modeling optimizayion problems as linear programs. We have seen that if our linear.
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding ILPs with Branch & Bound ILP References: ‘Integer Programming’
Decision Procedures An Algorithmic Point of View
1 Decision Procedures for Linear Arithmetic Presented By Omer Katz 01/04/14 Based on slides by Ofer Strichman.
Operations Research Assistant Professor Dr. Sana’a Wafa Al-Sayegh 2 nd Semester ITGD4207 University of Palestine.
Types of IP Models All-integer linear programs Mixed integer linear programs (MILP) Binary integer linear programs, mixed or all integer: some or all of.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
15.053Tuesday, April 9 Branch and Bound Handouts: Lecture Notes.
Gomory Cuts Updated 25 March Example ILP Example taken from “Operations Research: An Introduction” by Hamdy A. Taha (8 th Edition)“Operations Research:
OR Chapter 8. General LP Problems Converting other forms to general LP problem : min c’x  - max (-c)’x   = by adding a nonnegative slack variable.
Branch and Bound Algorithms Present by Tina Yang Qianmei Feng.
Integer Programming, Branch & Bound Method
Chapter 13 Backtracking Introduction The 3-coloring problem
Branch and Bound Searching Strategies
Approximation algorithms
Linear program Separation Oracle. Rounding We consider a single-machine scheduling problem, and see another way of rounding fractional solutions to integer.
EMGT 6412/MATH 6665 Mathematical Programming Spring 2016
Lap Chi Lau we will only use slides 4 to 19
EMIS 8373: Integer Programming
Chap 10. Sensitivity Analysis
BackTracking CS255.
Optimization problems such as
Topics in Algorithms Lap Chi Lau.
The minimum cost flow problem
6.5 Stochastic Prog. and Benders’ decomposition
Chapter 5. Optimal Matchings
Analysis and design of algorithm
Types of Algorithms.
Gomory Cuts Updated 25 March 2009.
1.3 Modeling with exponentially many constr.
James B. Orlin Presented by Tal Kaminker
Chapter 4 Linear Programming: The Simplex Method
Chap 9. General LP problems: Duality and Infeasibility
Chapter 6. Large Scale Optimization
Multi-Way Search Trees
Chap 3. The simplex method
Analysis of Algorithms
Types of Algorithms.
Integer Programming (정수계획법)
Integer Linear Programming
Chapter 8. General LP Problems
1.3 Modeling with exponentially many constr.
Integer Programming (정수계획법)
Types of Algorithms.
Chapter 8. General LP Problems
Part II General Integer Programming
6.5 Stochastic Prog. and Benders’ decomposition
Chapter 8. General LP Problems
Branch-and-Bound Algorithm for Integer Program
Integer LP: Algorithms
Chapter 6. Large Scale Optimization
REVIEW FOR EXAM 1 Chapters 3, 4, 5 & 6.
Discrete Optimization
Presentation transcript:

Integer Programming An integer linear program (ILP) is defined exactly as a linear program except that values of variables in a feasible solution have to be integral: max 𝑐 ⊤ 𝑥 s.t. 𝐴𝑥≤𝑏 𝑥≥0 𝑥∈ ℤ 𝑛 Very useful new possibility: We can now model Boolean variables. This makes ILPs much more powerful than LPs for modelling purposes! Unfortunately it also makes them a lot harder to solve computationally!

Integer Linear Program in standard form P: max 𝑐 ⊤ 𝑥 s.t. 𝐴𝑥≤𝑏 𝑥≥0 𝑥∈ ℤ 𝑛 where 𝐴∈ ℝ 𝑚×𝑛 , 𝑏∈ ℝ 𝑚 ,c∈ ℝ 𝑛 .

Bounded Integer Linear Program P: max 𝑐 ⊤ 𝑥 s.t. 𝐴𝑥≤𝑏 𝑙 𝑖 ≤𝑥 𝑖 ≤ 𝑢 𝑖 𝑥∈ ℤ 𝑛 Where 𝐴∈ ℝ 𝑚×𝑛 , 𝑏∈ ℝ 𝑚 ,c∈ ℝ 𝑛 and 𝑙 𝑖 < 𝑢 𝑖 , 𝑙 𝑖 , 𝑢 𝑖 ∈ℤ.

Branch and Bound Solve P* (using e.g. Simplex algorithm) If P* is infeasible, then P is infeasible (return (𝐧𝐮𝐥𝐥,−∞)). Otherwise let ( 𝑥 ∗ , 𝜆 ∗ ) be optimal solution to P*. If 𝑥 ∗ is integer, return ( 𝑥 ∗ , 𝜆 ∗ ) . If 𝜆 ∗ ≤currentbest (bound), then return from branch with no solution (return (𝐧𝐮𝐥𝐥,−∞)). Otherwise, pick 𝑖 such that 𝑥 𝑖 ∗ ∉ℤ. Recursively solve (branch) (P*[ 𝑢 𝑖 ≔ 𝑥 𝑖 ∗ ], currentbest) to get ( 𝑥 𝑙 , 𝜆 𝑙 ). If 𝜆 𝑙 >currentbest, update currentbest≔ 𝜆 𝑟 Recursively solve (branch) (P*[ 𝑙 𝑖 ≔ 𝑥 𝑖 ∗ ], currentbest) to get ( 𝑥 𝑟 , 𝜆 𝑟 ). If 𝜆 𝑙 > 𝜆 𝑟 , return ( 𝑥 𝑙 , 𝜆 𝑙 ), otherwise return ( 𝑥 𝑟 , 𝜆 𝑟 ).

Termination If 𝑢 𝑖 = 𝑙 𝑖 for all 𝑖 we terminate immediately. If we do not terminate, then in each recursive call, either one 𝑙 𝑖 increased or one 𝑢 𝑖 has decreased. Since 𝑙 𝑖 and 𝑢 𝑖 are integers, we terminate.

Complexity Unit of time = number of leaves in the recursion tree. We can show by induction: 𝑇≤ 𝑖 𝑛 𝑢 𝑖 − 𝑙 𝑖 +1 . In practice, it can be hoped that many subcalls finish early. However, all known algorithms for solving integer linear programs are worst case exponential time. In contrast to the case of the Simplex algorithm, the worst case is no longer exceptional!

Non-depth first Branch and Bound Instead of letting the recursion stack represent the branch and bound tree, we can make it an explicit data structure This allows us to do best first search: Choose to expand the subproblem with the lowest relaxed solution value. Hope: This also contains very good valid solutions which will allow the currentbest value to decrease significantly.

Branch and Bound activeset := root currentbest := ∞; ​while activeset is not empty do choose a branching node, node 𝑘∈ activeset remove node 𝑘 from activeset; generate the subproblems of node 𝑘, 𝑖=1,…, 𝑛 𝑘 and the corresponding relaxed optimal values 𝜆 1 ,…, 𝜆 𝑛 𝑘 . ​for 𝑖=1,…, 𝑛 𝑘 do ​if 𝑧 𝑖 ≥ currentbest then kill child 𝑖 ​else if optimal relaxed solution of child 𝑖 is integral then currentbest := 𝜆 𝑖 ​else add child 𝑖 to activeset

Branch and Bound in a general context Ingredients needed: Relaxation method. Expands space of feasible solution. Relaxed instance must be efficiently solvable. Search space division. The optimal solution of the relaxed problem can not be feasible in any of the relaxed subproblems (it should be “killed”) Any non-relaxed feasible solution should be feasible in one of the subproblems.

Traveling Salesman Problem (Section 23.2) Input: Cost (distance) matrix 𝐶=( 𝑐 𝑖𝑗 ), 𝑖,𝑗=1,…,𝑛 Output: Permutation 𝜋 on {0,1,…,𝑛−1} minimizing 𝑖=1 𝑛 𝑐 𝜋(𝑖),(𝜋 𝑖+1 mod 𝑛) .

State of the art for TSP TSP instances of thousand of cities can be consistently solved to optimality. Instances of up to 25000 cities have been solved: All cities in Sweden! Technique: Branch-and-Bound combined with cutting plane algorithms: Branch-and-cut.

Valid inequality for an ILP Given integer linear program, a new inequality is called valid if it does not change the set of integer solutions to the program. It is a cutting plane if it removes the (non-integer) optimum solution to the relaxed linear program.

Cutting plane algorithm for ILP input ILP instance P P’ := LP-relaxation of P while(optimal solution to P’ is not integer) { add valid cutting plane to P P’ := LP-relaxation of P } return optimal solution to P’ How to find valid cutting plane?

Gomory Cutting Plane Algorithm Assume that all initial coefficients in (standard form) ILP instance are integer. Solve LP-instance using simplex method. Suppose the simplex method terminates with a non-integer optimal solution.

Suppose some line in final dictionary reads 𝑥 𝑖 = 𝑏 𝑖 + 𝑗 𝑎 𝑗 𝑥 𝑗 where 𝑏 𝑖 is not integer. Let 𝑏 𝑖 ′ = 𝑏 𝑖 − 𝑏 𝑖 and 𝑎 𝑗 ′ = 𝑎 𝑗 − 𝑎 𝑗 . Then 𝑥 𝑖 − 𝑏 𝑖 − 𝑗 𝑎 𝑗 𝑥 𝑗 = 𝑏 𝑖 ′ + 𝑗 𝑎 𝑗 ′ 𝑥 𝑗 For every feasible integer solution: Left hand side is integer. Right hand side is strictly bigger than zero. Thus 𝑥 𝑖 − 𝑏 𝑖 − 𝑗 𝑎 𝑗 𝑥 𝑗 ≥1 is a valid cutting plane.

Gomory Cutting Plane Algorithm Partial correctness is obvious. Termination is not guaranteed. Can be guaranteed if simplex algorithm uses special pivot rule and line of final dictionary is chosen carefully (non-trivial!) Not very practical by itself, but is component of state-of-the-art solvers.

Cutting planes for TSP (and other problems) Use ILP formulation of TSP. Use specially tailored cutting planes.

Traveling Salesman Problem - ILP formulation Decision variables: 𝑥 𝑖𝑗 ∈ 0,1 , 𝑖,𝑗=1,…,𝑛 𝑡 𝑗 ∈{0,1,…,𝑛−1}, j=0,…,𝑛 Interpretation: 𝑥 𝑖𝑗 =1 if and only if for some 𝑘 it holds 𝜋 𝑘 =𝑖 and 𝜋( 𝑘+1 mod 𝑛)=j 𝑡 𝑗 =𝑖 if and only if 𝜋(𝑖)=𝑗

Traveling Salesman Problem - ILP formulation min 𝑖,𝑗=1 𝑛 𝑐 𝑖𝑗 𝑥 𝑖𝑗 s.t. 𝑗=1 𝑛 𝑥 𝑖𝑗 =1 , for 𝑖=1,…,𝑚 𝑖=1 𝑛 𝑥 𝑖𝑗 =1 , for 𝑗=1,…,𝑚 𝑡 𝑗 ≥ 𝑡 𝑖 +1−𝑛 1− 𝑥 𝑖𝑗 , for 𝑖≥0, 𝑗≥1,𝑖≠𝑗

Symmetric TSP Distance from i to j is equal to distance from j to i. Let 𝑦 𝑖𝑗 = 𝑥 𝑖𝑗 + 𝑥 𝑗𝑖 Consider a cut (𝑆,𝑇), 𝑆∩𝑇=∅, 𝑆∪𝑇={1,…,𝑛} The TSP tour has to cross the cut 𝑆,𝑇 at least twice! 𝑖∈𝑆 𝑗∈𝑇 𝑦 𝑖𝑗 ≥2 is a valid inequality.

Cutting plane algorithm for TSP Find optimal solution 𝑥 ∗ of relaxaton 𝑃 ∗ . Let 𝑦 𝑖𝑗 = 𝑥 𝑖𝑗 + 𝑥 𝑗𝑖 Check if some 𝑆,𝑇 has 𝑖∈𝑆, 𝑗∈𝑇 𝑦 𝑖𝑗 <2 . (this can be efficiently checked by Max Flow algorithm using the max-flow min-cut theorem). Add inequality 𝑖∈𝑆, 𝑗∈𝑇 𝑦 𝑖𝑗 ≥2 .

Cutting plane algorithm for TSP At some point we will fail to find new cuts. Still may not have integer solution. If not, add other kinds of specially tailored inequalities (big literature) or BRANCH.

Branch-and-cut for TSP Branch-and-bound with relaxation being LP- relaxation + some set of valid inequalities. When to stop adding inequalities and start branching is a matter of heuristics and experiments. Yields state-of-the art solver. Many non-trivial implementation issues.