Cutting Planes II. The Knapsack Problem Recall the knapsack problem: n items to be packed in a knapsack (can take multiple copies of the same item). The.

Slides:



Advertisements
Similar presentations
Branch-and-Bound Technique for Solving Integer Programs
Advertisements

Solving IPs – Cutting Plane Algorithm General Idea: Begin by solving the LP relaxation of the IP problem. If the LP relaxation results in an integer solution,
IP modeling techniques I In this handout, Modeling techniques:  Using binary variables  Restrictions on number of options  Contingent decisions  Variables.
Branch-and-Bound In this handout,  Summary of branch-and-bound for integer programs Updating the lower and upper bounds for OPT(IP) Summary of fathoming.
1 Cutting Plane Technique for Solving Integer Programs.
Gomory’s cutting plane algorithm for integer programming Prepared by Shin-ichi Tanigawa.
EE 553 Integer Programming
2. Valid Inequalities for the 0-1 Knapsack Polytope Integer Programming
EMIS 8373: Integer Programming Valid Inequalities updated 4April 2011.
Introduction to Linear and Integer Programming
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:
Integer Programming 3 Brief Review of Branch and Bound
Solving Integer Programs. Natural solution ideas that don’t work well Solution idea #1: Explicit enumeration: Try all possible solutions and pick the.
Dealing with NP-Complete Problems
Mathematical Modeling and Optimization: Summary of “Big Ideas”
Dynamic Programming1. 2 Outline and Reading Matrix Chain-Product (§5.3.1) The General Technique (§5.3.2) 0-1 Knapsack Problem (§5.3.3)
© 5/7/2002 V.S. Subrahmanian1 Knapsack Problem Notes V.S. Subrahmanian University of Maryland.
1 Maximum matching Max Flow Shortest paths Min Cost Flow Linear Programming Mixed Integer Linear Programming Worst case polynomial time by Local Search.
© 5/7/2002 V.S. Subrahmanian1 Knapsack Problem Notes V.S. Subrahmanian University of Maryland.
CSC401 – Analysis of Algorithms Lecture Notes 12 Dynamic Programming
Integer Programming Integer programming is a solution method for many discrete optimization problems Programming = Planning in this context Origins go.
KNAPSACK PROBLEM A dynamic approach. Knapsack Problem  Given a sack, able to hold K kg  Given a list of objects  Each has a weight and a value  Try.
Dynamic Programming1 Modified by: Daniel Gomez-Prado, University of Massachusetts Amherst.
1 Dynamic Programming Jose Rolim University of Geneva.
Lift-and-Project cuts: an efficient solution method for mixed-integer programs Sebastian Ceria Graduate School of Business and Computational Optimization.
LP formulation of Economic Dispatch
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding ILPs with Branch & Bound ILP References: ‘Integer Programming’
1 Lecture 4 Maximal Flow Problems Set Covering Problems.
Decision Procedures An Algorithmic Point of View
Mathematical Modeling and Optimization: Summary of “Big Ideas”
1 EL736 Communications Networks II: Design and Algorithms Class5: Optimization Methods Yong Liu 10/10/2007.
Chapter 9 Integer Programming
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.
Integer Programming Key characteristic of an Integer Program (IP) or Mixed Integer Linear Program (MILP): One or more of the decision variable must be.
Notes 5IE 3121 Knapsack Model Intuitive idea: what is the most valuable collection of items that can be fit into a backpack?
MILP algorithms: branch-and-bound and branch-and-cut
WOOD 492 MODELLING FOR DECISION SUPPORT
Chap 10. Integer Prog. Formulations
15.053Tuesday, April 9 Branch and Bound Handouts: Lecture Notes.
Branch-and-Cut Valid inequality: an inequality satisfied by all feasible solutions Cut: a valid inequality that is not part of the current formulation.
Integer Programming (정수계획법)
Integer Programming Key characteristic of an Integer Program (IP) or Mixed Integer Linear Program (MILP): One or more of the decision variable must be.
Lecture.6. Table of Contents Lp –rounding Dual Fitting LP-Duality.
Dynamic Programming1. 2 Outline and Reading Matrix Chain-Product (§5.3.1) The General Technique (§5.3.2) 0-1 Knapsack Problem (§5.3.3)
Lecture 6 Knapsack Problem Quadratic Assignment Problem
Integer Programming, Branch & Bound Method
2/19/ ITCS 6114 Dynamic programming 0-1 Knapsack problem.
Introduction to Integer Programming Integer programming models Thursday, April 4 Handouts: Lecture Notes.
Approximation Algorithms Duality My T. UF.
Chapter 9 Integer Programming to accompany Operations Research: Applications and Algorithms 4th edition by Wayne L. Winston Copyright (c) 2004 Brooks/Cole,
Discrete Optimization MA2827 Fondements de l’optimisation discrète Material from P. Van Hentenryck’s course.
Using Excel to Formulate and Solve Network Optimization Models
Integer Programming An integer linear program (ILP) is defined exactly as a linear program except that values of variables in a feasible solution have.
Gomory Cuts Updated 25 March 2009.
1.3 Modeling with exponentially many constr.
Chapter 6. Large Scale Optimization
Integer Programming (정수계획법)
CS Algorithms Dynamic programming 0-1 Knapsack problem 12/5/2018.
Gomory’s cutting plane algorithm for integer programming
Dynamic Programming Dynamic Programming 1/15/ :41 PM
1.3 Modeling with exponentially many constr.
Integer Programming (정수계획법)
CSC 413/513- Intro to Algorithms
Branch-and-Bound Algorithm for Integer Program
Knapsack Problem A dynamic approach.
Integer LP: Algorithms
Chapter 6. Large Scale Optimization
Branch-and-Bound Technique for Solving Integer Programs
Discrete Optimization
Presentation transcript:

Cutting Planes II

The Knapsack Problem Recall the knapsack problem: n items to be packed in a knapsack (can take multiple copies of the same item). The knapsack can hold up to W lb of items. Each item has weight w i lb and benefit b i. Goal: Pack the knapsack such that the total benefit is maximized.

IP model for Knapsack problem Define decision variables (i = 1, …, n): x i = number of copies of item i to take Then the total benefit: the total weight:  Summarizing, the IP model is: max s.t. x i ≥ 0 integer (i = 1, …, n)

Cutting Planes for Knapsack Problem Example: Knapsack size is W=50. Size constraint for this example: 21x 1 +11x 2 +51x 3 +26x 4 +30x 5  50. IP optimum: (1, 0, 0, 1, 0) with value 87. LP-relax. optimum: (0, 0, 50/51, 0, 0) with value LP solution is too far from IP solution. How to cut the fractional optimal solution? Add the following constraint (cutting plane): x 3 = 0. Cuts off the old LP optimum: (0, 0, 50/51, 0, 0) with value The new LP-relax. optimum: (0, 0, 0, 50/26, 0) with value item12345 size benefit

Cutting Planes for Knapsack Problem More cutting planes? Add constraint x 4  1. Cuts off the old LP optimum: (0, 0, 0, 50/26, 0) with value The new LP-relax. optimum: (24/21, 0, 0, 1, 0) with value Generally, for item i we can add the following cutting plane: x i   W / w i . E.g., x 1  2. Note, however, that this constraint doesn’t cut the LP-optimum: (24/21, 0, 0, 1, 0). Can we add better (tighter) cutting planes? Cutting planes can include more than one variable. E.g., the following constraint is a valid cutting plane: x 1 + x 4  2. (Note that this constraint is tighter than x 1  2 ). Cuts off the old LP optimum: (24/21, 0, 0, 1, 0) with value The new LP-relax. optimum: (1, 0, 0, 1, 1/10) with value 91.1.

Cutting Planes for Knapsack Problem General form of cutting planes with more than one variable. Let k ≥1 and S={ i | w i > W / k }. Then we have the following cutting plane: Take k=3 in our example. Then S= { i | w i > W / 3 } = {1, 3, 4, 5}. Thus, we have the following cutting plane: x 1 + x 3 + x 4 + x 5  2. (Note that this constraint is tighter than x 1 + x 4  2 ). Cuts off the old LP optimum: (1, 0, 0, 1, 1/10) with value The new LP-relax. optimum: (1, 3/11, 0, 1, 0) with value 90.3.

Pairing Problem 2n students n projects; each project needs two students Value of pairing students i and j is value[i, j] Goal: Pair up the students to work on the projects so that the total value is maximized. Example: 4 students, 2 projects, value matrix: Possible solutions: (A, B), (C, D) with value 9 (A, C), (B, D) with value 17 (A, D), (B, C) with value 2 Optimal solution: (A, C), (B, D) ABCD A-5101 B5-17 C 1-4 D174-

IP Formulation for the Pairing Problem Define the following variables. For any i  1,…,2n and j  1,…,2n (i  j), The goal is to maximize the total value: Maximize 0.5 * sum{i  1,…,2n, j  1,…,2n : i  j}value[i,j]*x[i,j] Need the following constraints. Symmetry constraints: x[i,j]= x[j,i] for each i  1,…,2n, j  1,…,2n (i  j) Each student works with exactly one other student: sum{j  1,…,2n : i  j}x[i,j] = 1 for each i  1,…,2n Q: How good (tight) is this formulation?

Solving the LP-relaxation Consider the following example: There are multiple optimal IP solutions with value 21 The optimal solution to the LP-relaxation: x[A,B] = x[B,A] = x[A,C] = x[C,A] = x[B,C] = x[C,B] =.5 ; x[D,E] = x[E,D] = x[D,F] = x[F,D] = x[E,F] = x[F,E] =.5 ; all other variables have value 0. Optimal LP value: 6*0.5*10 = 30 ABCDEF A B C -111 D111- E111 - F111 - A B C D E F.5

Cutting Planes for the Pairing Problem Add the following cutting plane: sum{ i  S, j  S } x[i, j] ≥ 1 for S = {A, B, C} Cuts off the old LP optimum with value 30. The new LP-relaxation has multiple optimal solutions with value 21. General form: For any set S  {1,…,2n} that has an odd number of elements sum{ i  S, j  S } x[i, j] ≥ 1 is a cutting plane. Note that the number of this kind of cutting planes is exponential (order of 2 n ); so can’t add all of them in the IP formulation. Thus, this kind of cutting planes should be added only if necessary (to cut off a fractional solution of the current LP relaxation).

Branch-and-cut algorithms Integer programs are rarely solved based solely on cutting plane method. More often cutting planes and branch-and-bound are combined to provide a powerful algorithmic approach for solving integer programs. Cutting planes are added to the subproblems created in branch-and-bound to achieve tighter bounds and thus to accelerate the solution process. This kind of methods are known as branch-and-cut algorithms.