In the original knapsack problem, the value of the contents of the knapsack is maximized subject to a single capacity constraint, for example weight.

Similar documents
2001 Dennis L. Bricker Dept. of Industrial Engineering The University of Iowa. Reducing dimensionality of DP page 1

Introduction to Mathematical Programming IE406. Lecture 10. Dr. Ted Ralphs

Sensitivity Analysis and Duality in LP

Part 1. The Review of Linear Programming

Convex Optimization and Support Vector Machine

Chapter 1 Linear Programming. Paragraph 5 Duality

Farkas Lemma, Dual Simplex and Sensitivity Analysis

Optimization for Communications and Networks. Poompat Saengudomlert. Session 4 Duality and Lagrange Multipliers

4.6 Linear Programming duality

Lecture 10: Linear programming. duality. and. The dual of the LP in standard form. maximize w = b T y (D) subject to A T y c, minimize z = c T x (P)

Lagrangian Duality. Richard Lusby. Department of Management Engineering Technical University of Denmark

Operations Research Lecture 6: Integer Programming

Advanced Linear Programming: The Exercises

Chap6 Duality Theory and Sensitivity Analysis

EE364a Review Session 5

Dynamic Programming Model Integer Programming Model

Lagrange Relaxation and Duality

CE 191: Civil & Environmental Engineering Systems Analysis. LEC 17 : Final Review

Introduction to Optimization Techniques. Nonlinear Programming

- Well-characterized problems, min-max relations, approximate certificates. - LP problems in the standard form, primal and dual linear programs

IE 5531: Engineering Optimization I

Lectures 6, 7 and part of 8

The Dual Simplex Algorithm

Review Solutions, Exam 2, Operations Research

Lagrangean relaxation

Chapter 3, Operations Research (OR)

Discrete (and Continuous) Optimization WI4 131

The Strong Duality Theorem 1

4. Duality and Sensitivity

3.10 Lagrangian relaxation

Lagrangian Duality. Evelien van der Hurk. DTU Management Engineering

Part IB Optimisation

II. Analysis of Linear Programming Solutions

Linear and Combinatorial Optimization

3.4 Relaxations and bounds

A Review of Linear Programming

Sensitivity Analysis and Duality

Lecture 8: Column Generation

The Primal-Dual Algorithm P&S Chapter 5 Last Revised October 30, 2006

1 Review Session. 1.1 Lecture 2

Linear Programming: Chapter 5 Duality

Integer programming: an introduction. Alessandro Astolfi

Midterm Review. Yinyu Ye Department of Management Science and Engineering Stanford University Stanford, CA 94305, U.S.A.

Section Notes 9. IP: Cutting Planes. Applied Math 121. Week of April 12, 2010

"SYMMETRIC" PRIMAL-DUAL PAIR

Linear Programming in Matrix Form

How to Characterize Solutions to Constrained Optimization Problems

Lecture 10: Linear programming duality and sensitivity 0-0

Planning and Optimization

1 Column Generation and the Cutting Stock Problem

Integer Linear Programming Modeling

Lecture 3: Lagrangian duality and algorithms for the Lagrangian dual problem

MVE165/MMG631 Linear and integer optimization with applications Lecture 5 Linear programming duality and sensitivity analysis

SEN301 OPERATIONS RESEARCH I LECTURE NOTES

Linear Programming Inverse Projection Theory Chapter 3

21. Solve the LP given in Exercise 19 using the big-m method discussed in Exercise 20.

Operations Research Methods in Constraint Programming

Note 3: LP Duality. If the primal problem (P) in the canonical form is min Z = n (1) then the dual problem (D) in the canonical form is max W = m (2)

56:171 Operations Research Midterm Exam--15 October 2002

1. Algebraic and geometric treatments Consider an LP problem in the standard form. x 0. Solutions to the system of linear equations

Minimum cost transportation problem

The Simplex Algorithm

Part 1. The Review of Linear Programming

14. Duality. ˆ Upper and lower bounds. ˆ General duality. ˆ Constraint qualifications. ˆ Counterexample. ˆ Complementary slackness.

MVE165/MMG631 Linear and integer optimization with applications Lecture 8 Discrete optimization: theory and algorithms

March 13, Duality 3

Convex Optimization & Lagrange Duality

END3033 Operations Research I Sensitivity Analysis & Duality. to accompany Operations Research: Applications and Algorithms Fatih Cavdur

Extreme Abridgment of Boyd and Vandenberghe s Convex Optimization

Mat 3770 Bin Packing or

Slack Variable. Max Z= 3x 1 + 4x 2 + 5X 3. Subject to: X 1 + X 2 + X x 1 + 4x 2 + X X 1 + X 2 + 4X 3 10 X 1 0, X 2 0, X 3 0

Motivation. Lecture 2 Topics from Optimization and Duality. network utility maximization (NUM) problem:

Discrete Optimization

56:270 Final Exam - May

3. Duality: What is duality? Why does it matter? Sensitivity through duality.

Fundamentals of Operations Research. Prof. G. Srinivasan. Indian Institute of Technology Madras. Lecture No. # 15

F 1 F 2 Daily Requirement Cost N N N

Dr. S. Bourazza Math-473 Jazan University Department of Mathematics

The dual simplex method with bounds

BBM402-Lecture 20: LP Duality

Linear Programming Duality P&S Chapter 3 Last Revised Nov 1, 2004

Computational Integer Programming. Lecture 2: Modeling and Formulation. Dr. Ted Ralphs

Lecture #21. c T x Ax b. maximize subject to

MATH 409 LECTURES THE KNAPSACK PROBLEM

Summary of the simplex method

Solving Dual Problems

OPERATIONS RESEARCH. Michał Kulej. Business Information Systems

Advanced Algorithms 南京大学 尹一通

Example Problem. Linear Program (standard form) CSCI5654 (Linear Programming, Fall 2013) Lecture-7. Duality

Duality of LPs and Applications

Lecture 5. x 1,x 2,x 3 0 (1)

Gestion de la production. Book: Linear Programming, Vasek Chvatal, McGill University, W.H. Freeman and Company, New York, USA

CS-E4830 Kernel Methods in Machine Learning

Lesson 27 Linear Programming; The Simplex Method

Convex Optimization and SVM

56:171 Operations Research Final Examination December 15, 1998

Integer Programming ISE 418. Lecture 8. Dr. Ted Ralphs

to work with) can be solved by solving their LP relaxations with the Simplex method I Cutting plane algorithms, e.g., Gomory s fractional cutting

CO759: Algorithmic Game Theory Spring 2015

CS 6820 Fall 2014 Lectures, October 3-20, 2014

Transcription:

In the original knapsack problem, the value of the contents of the knapsack is maximized subject to a single capacity constraint, for example weight. In the multi-dimensional knapsack problem, additional capacity constraints, such as volume, must be enforced. Multidimensional Knapsack page 1 D.Bricker, U. of Iowa, 2001

Mathematical statement of 2-dimensional problem: Maximize n j= 1 v x j j subject to n j= 1 a x b 1j j 1 n j= 1 2 j j 2 x X, j = 1, n j a x j b The coefficients vj and a ij are nonnegative real numbers, and the set X j may be the binary set { 0,1} or the set of all nonnegative integers. b i = capacity of knapsack with respect to measure i (e.g., i=1: weight, i=2: volume) a ij = measure i of item j, e.g., weight and volume Multidimensional Knapsack page 2 D.Bricker, U. of Iowa, 2001

Let's assume that the coefficients a ij are nonnegative integers, and the capacity limits b i are positive integers. In the DP model for the 1-dimensional knapsack problem, a stage is defined for each of the n items, and the state of the system at stage j is the unused capacity after items have been added in the previous stages. Multidimensional Knapsack page 3 D.Bricker, U. of Iowa, 2001

In the multi-dimensional knapsack problem, the state of the system is a vector of dimension m, one element per capacity constraint, for example ( available weight, available volume) Multidimensional Knapsack page 4 D.Bricker, U. of Iowa, 2001

Consider the two-dimensional knapsack problem with data: n = # items = 6 Item j 1 2 3 4 5 6 Value vj 2 3 3 4 4 5 Weight a1j 1 2 1 3 2 3 Volume a2j 2 1 3 2 2 3 Maximum weight is 6 and maximum volume is 4. Multidimensional Knapsack page 5 D.Bricker, U. of Iowa, 2001

Define stages j =1, 2,...6 where decision x j = 1 if item j is to be included in the knapsack, else 0 state (s 1, s 2 ) where s1 { 0,1, 6} is the slack in the weight constraint, and s2 { 0,1, 4} is the slack in the volume constraint. Thus the state space contains 7 5=35 elements. Multidimensional Knapsack page 6 D.Bricker, U. of Iowa, 2001

Optimal value function Using a backward recursion and imagining that we begin by deciding whether to include item #6 and end by deciding whether to include item #1, (, ) f s s = maximum total value of items j, j 1, 1 which j 1 2 can be included if the knapsack if the weight and volume are restricted to s 1 and s 2, respectively. We aim, of course, is to determine the value of f 6 ( 6,4). Multidimensional Knapsack page 7 D.Bricker, U. of Iowa, 2001

Recursion: ( ) ( ) { } f s, s = max v x + f s a x, s a x, j = 6,5, 1 j 1 2 j j j 1 1 1j j 2 2 j j x j ( ) { 0,1} f s, s = 0 for all nonnegative integers s and s 0 1 2 1 2 Multidimensional Knapsack page 8 D.Bricker, U. of Iowa, 2001

APL definition of optimal value function f n Definition of state & decision vectors: Definition of constants Multidimensional Knapsack page 9 D.Bricker, U. of Iowa, 2001

---Stage 1--- 0 0 0.00 99999.99 0.00 0 1 0.00 99999.99 0.00 0 2 0.00 99999.99 0.00 0 3 0.00 99999.99 0.00 0 4 0.00 99999.99 0.00 1 0 0.00 99999.99 0.00 1 1 0.00 99999.99 0.00 1 2 0.00 2.00 2.00 1 3 0.00 2.00 2.00 1 4 0.00 2.00 2.00 2 0 0.00 99999.99 0.00 2 1 0.00 99999.99 0.00 2 2 0.00 2.00 2.00 2 3 0.00 2.00 2.00 2 4 0.00 2.00 2.00 3 0 0.00 99999.99 0.00 3 1 0.00 99999.99 0.00 3 2 0.00 2.00 2.00 3 3 0.00 2.00 2.00 3 4 0.00 2.00 2.00 4 0 0.00 99999.99 0.00 4 1 0.00 99999.99 0.00 4 2 0.00 2.00 2.00 4 3 0.00 2.00 2.00 4 4 0.00 2.00 2.00 5 0 0.00 99999.99 0.00 5 1 0.00 99999.99 0.00 5 2 0.00 2.00 2.00 5 3 0.00 2.00 2.00 5 4 0.00 2.00 2.00 s \ x: 0 1 Maximum 6 0 0.00 99999.99 0.00 6 1 0.00 99999.99 0.00 6 2 0.00 2.00 2.00 6 3 0.00 2.00 2.00 6 4 0.00 2.00 2.00 We begin with the computation of f1 () i at stage 1, i.e., we consider that only item #1 remains to be added. Recall that Item j 1 Value vj 2 Weight a1j 1 Volume a2j 2 Multidimensional Knapsack page 10 D.Bricker, U. of Iowa, 2001

---Stage 2--- 0 0 0.00 99999.99 0.00 0 1 0.00 99999.99 0.00 0 2 0.00 99999.99 0.00 0 3 0.00 99999.99 0.00 0 4 0.00 99999.99 0.00 1 0 0.00 99999.99 0.00 1 1 0.00 99999.99 0.00 1 2 2.00 99999.99 2.00 1 3 2.00 99999.99 2.00 1 4 2.00 99999.99 2.00 2 0 0.00 99999.99 0.00 2 1 0.00 3.00 3.00 2 2 2.00 3.00 3.00 2 3 2.00 3.00 3.00 2 4 2.00 3.00 3.00 3 0 0.00 99999.99 0.00 3 1 0.00 3.00 3.00 3 2 2.00 3.00 3.00 3 3 2.00 5.00 5.00 3 4 2.00 5.00 5.00 4 0 0.00 99999.99 0.00 4 1 0.00 3.00 3.00 4 2 2.00 3.00 3.00 4 3 2.00 5.00 5.00 4 4 2.00 5.00 5.00 5 0 0.00 99999.99 0.00 5 1 0.00 3.00 3.00 5 2 2.00 3.00 3.00 5 3 2.00 5.00 5.00 5 4 2.00 5.00 5.00 6 0 0.00 99999.99 0.00 6 1 0.00 3.00 3.00 6 2 2.00 3.00 3.00 6 3 2.00 5.00 5.00 6 4 2.00 5.00 5.00 Next we imagine that only items #1 & 2 remain to be added to the knapsack, and compute their optimal value, f2 () i where Item j 2 Value vj 3 Weight a1j 2 Volume a2j 1 Multidimensional Knapsack page 11 D.Bricker, U. of Iowa, 2001

---Stage 3--- 0 0 0.00 99999.99 0.00 0 1 0.00 99999.99 0.00 0 2 0.00 99999.99 0.00 0 3 0.00 99999.99 0.00 0 4 0.00 99999.99 0.00 1 0 0.00 99999.99 0.00 1 1 0.00 99999.99 0.00 1 2 2.00 99999.99 2.00 1 3 2.00 3.00 3.00 1 4 2.00 3.00 3.00 2 0 0.00 99999.99 0.00 2 1 3.00 99999.99 3.00 2 2 3.00 99999.99 3.00 2 3 3.00 3.00 3.00 2 4 3.00 3.00 3.00 3 0 0.00 99999.99 0.00 3 1 3.00 99999.99 3.00 3 2 3.00 99999.99 3.00 3 3 5.00 3.00 5.00 3 4 5.00 6.00 6.00 4 0 0.00 99999.99 0.00 4 1 3.00 99999.99 3.00 4 2 3.00 99999.99 3.00 4 3 5.00 3.00 5.00 4 4 5.00 6.00 6.00 5 0 0.00 99999.99 0.00 5 1 3.00 99999.99 3.00 5 2 3.00 99999.99 3.00 5 3 5.00 3.00 5.00 5 4 5.00 6.00 6.00 s \ x: 0 1 Maximum 6 0 0.00 99999.99 0.00 6 1 3.00 99999.99 3.00 6 2 3.00 99999.99 3.00 6 3 5.00 3.00 5.00 6 4 5.00 6.00 6.00 Item j 3 Value vj 3 Weight a1j 1 Volume a2j 3 Multidimensional Knapsack page 12 D.Bricker, U. of Iowa, 2001

---Stage 4--- 0 0 0.00 99999.99 0.00 0 1 0.00 99999.99 0.00 0 2 0.00 99999.99 0.00 0 3 0.00 99999.99 0.00 0 4 0.00 99999.99 0.00 1 0 0.00 99999.99 0.00 1 1 0.00 99999.99 0.00 1 2 2.00 99999.99 2.00 1 3 3.00 99999.99 3.00 1 4 3.00 99999.99 3.00 2 0 0.00 99999.99 0.00 2 1 3.00 99999.99 3.00 2 2 3.00 99999.99 3.00 2 3 3.00 99999.99 3.00 2 4 3.00 99999.99 3.00 3 0 0.00 99999.99 0.00 3 1 3.00 99999.99 3.00 3 2 3.00 4.00 4.00 3 3 5.00 4.00 5.00 3 4 6.00 4.00 6.00 4 0 0.00 99999.99 0.00 4 1 3.00 99999.99 3.00 4 2 3.00 4.00 4.00 4 3 5.00 4.00 5.00 4 4 6.00 6.00 6.00 5 0 0.00 99999.99 0.00 5 1 3.00 99999.99 3.00 5 2 3.00 4.00 4.00 5 3 5.00 7.00 7.00 5 4 6.00 7.00 7.00 6 0 0.00 99999.99 0.00 6 1 3.00 99999.99 3.00 6 2 3.00 4.00 4.00 6 3 5.00 7.00 7.00 6 4 6.00 7.00 7.00 Item j 4 Value vj 4 Weight a1j 3 Volume a2j 2 Multidimensional Knapsack page 13 D.Bricker, U. of Iowa, 2001

---Stage 5--- 0 0 0.00 99999.99 0.00 0 1 0.00 99999.99 0.00 0 2 0.00 99999.99 0.00 0 3 0.00 99999.99 0.00 0 4 0.00 99999.99 0.00 1 0 0.00 99999.99 0.00 1 1 0.00 99999.99 0.00 1 2 2.00 99999.99 2.00 1 3 3.00 99999.99 3.00 1 4 3.00 99999.99 3.00 2 0 0.00 99999.99 0.00 2 1 3.00 99999.99 3.00 2 2 3.00 4.00 4.00 2 3 3.00 4.00 4.00 2 4 3.00 4.00 4.00 3 0 0.00 99999.99 0.00 3 1 3.00 99999.99 3.00 3 2 4.00 4.00 4.00 3 3 5.00 4.00 5.00 3 4 6.00 6.00 6.00 4 0 0.00 99999.99 0.00 4 1 3.00 99999.99 3.00 4 2 4.00 4.00 4.00 4 3 5.00 7.00 7.00 4 4 6.00 7.00 7.00 5 0 0.00 99999.99 0.00 5 1 3.00 99999.99 3.00 5 2 4.00 4.00 4.00 5 3 7.00 7.00 7.00 5 4 7.00 8.00 8.00 6 0 0.00 99999.99 0.00 6 1 3.00 99999.99 3.00 6 2 4.00 4.00 4.00 6 3 7.00 7.00 7.00 6 4 7.00 8.00 8.00 Item j 5 Value vj 4 Weight a1j 2 Volume a2j 2 Multidimensional Knapsack page 14 D.Bricker, U. of Iowa, 2001

---Stage 6--- 0 0 0.00 99999.99 0.00 0 1 0.00 99999.99 0.00 0 2 0.00 99999.99 0.00 0 3 0.00 99999.99 0.00 0 4 0.00 99999.99 0.00 1 0 0.00 99999.99 0.00 1 1 0.00 99999.99 0.00 1 2 2.00 99999.99 2.00 1 3 3.00 99999.99 3.00 1 4 3.00 99999.99 3.00 2 0 0.00 99999.99 0.00 2 1 3.00 99999.99 3.00 2 2 4.00 99999.99 4.00 2 3 4.00 99999.99 4.00 2 4 4.00 99999.99 4.00 3 0 0.00 99999.99 0.00 3 1 3.00 99999.99 3.00 3 2 4.00 99999.99 4.00 3 3 5.00 5.00 5.00 3 4 6.00 5.00 6.00 4 0 0.00 99999.99 0.00 4 1 3.00 99999.99 3.00 4 2 4.00 99999.99 4.00 4 3 7.00 5.00 7.00 4 4 7.00 5.00 7.00 5 0 0.00 99999.99 0.00 5 1 3.00 99999.99 3.00 5 2 4.00 99999.99 4.00 5 3 7.00 5.00 7.00 5 4 8.00 8.00 8.00 6 0 0.00 99999.99 0.00 6 1 3.00 99999.99 3.00 6 2 4.00 99999.99 4.00 6 3 7.00 5.00 7.00 6 4 8.00 8.00 8.00 Since we want only the value of f 6 ( 6, 4), only the last row of this table is necessary! Item j 6 Value vj 5 Weight a1j 3 Volume a2j 3 Multidimensional Knapsack page 15 D.Bricker, U. of Iowa, 2001

Optimal value is 8.00 There are 2 optimal solutions Optimal Solution No. 1 stage state decision 6 6 4 Omit 5 6 4 Include 4 4 2 Include 3 1 0 Omit 2 1 0 Omit 1 1 0 Omit 0 1 0 Weight= 5, Volume = 4 Optimal Solution No. 2 stage state decision 6 6 4 Include 5 3 1 Omit 4 3 1 Omit 3 3 1 Omit 2 3 1 Include 1 1 0 Omit 0 1 0 Weight= 5, volume= 4 Multidimensional Knapsack page 16 D.Bricker, U. of Iowa, 2001

Note that there are ( 1 b ) ( 1 b ) or in general, ( 1+ b ) m i= 1 i + + elements in the state space, 1 2 elements, which for even modest values of the so-called "curse of dimensionality" bi can be quite large -- and make dynamic programming computations prohibitive. Multidimensional Knapsack page 17 D.Bricker, U. of Iowa, 2001

The dimension of the state space can be reduced to 1 by solving a one-dimensional knapsack problem which is a relaxation of the original two-dimensional knapsack problem, that is, the feasible region of the two-dimensional knapsack problem is contained within the feasible region of the relaxation. Multidimensional Knapsack page 18 D.Bricker, U. of Iowa, 2001

Two approaches for relaxing constraints are Lagrangian Relaxation, in which only one constraint is kept (unchanged) and the objective includes a penalty term for violation of the other. Surrogate Relaxation, in which a nonnegative combination of the original constraints are used, but the objective function is unchanged. Multidimensional Knapsack page 19 D.Bricker, U. of Iowa, 2001

Reducing Dimensionality by Lagrangian Relaxation We relax, i.e., no longer enforce, one of the capacity restrictions, and introduce a Lagrangian multiplier λ which we will interpret as the value ("shadow price") of one unit of the relaxed capacity. For example, in our two-dimensional knapsack problem, we will no longer impose the volume restriction-- instead, we place a value λ on a unit of volume so that the value of including item j will be reduced from v j to ( vj λa2 j). Multidimensional Knapsack page 20 D.Bricker, U. of Iowa, 2001

It can easily be shown that the optimal value of the resulting one-dimensional knapsack, i.e., n n n Maximize v x + λ b a x = ( v λa ) x + λb subject to j j 2 2 j j j 2 j j 2 j= 1 j= 1 j= 1 n j= 1 a x 1j j 1 x X, j = 1, n j b j is an upper bound on, i.e., at least as large as, the optimal value of the original two-dimensional problem. The Lagrangian Dual problem is to select a value of λ so that this upper bound is as small as possible. Multidimensional Knapsack page 21 D.Bricker, U. of Iowa, 2001

A crude search algorithm for Lagrangian dual: Step 0. Initialize λ = 0. Step 1. Solve the one-dimensional Lagrangian relaxation to find all optimal solutions x* ( λ ) and the associated volumes n j= 1 2 j * j ( ) a x λ. Let m & M be the minimum and maximum volumes, respectively. * Step 2. If m b2 M, STOP. If the volume a x ( λ ) n j= 1 2 j j of a solution is exactly that available, b2, then that solution x*(λ) is optimal for the original problem. Otherwise a duality gap exists and none of the solutions x* ( λ ) are optimal in the original problem Multidimensional Knapsack page 22 D.Bricker, U. of Iowa, 2001

Step 3. If b2<m, i.e., the volume restriction is violated by all optima, increase the "shadow price" λ placed on a unit of volume, while if b2>m, i.e., the volume restriction is "slack", decrease λ. Return to Step 1. Example: Relax the volume restriction of the 2-dimensional knapsack problem above, with Lagrange multiplier initial value λ = 0. The results are shown below. Multidimensional Knapsack page 23 D.Bricker, U. of Iowa, 2001

---Stage 1--- 0 0.00 99.99 0.00 1 0.00 2.00 2.00 2 0.00 2.00 2.00 3 0.00 2.00 2.00 4 0.00 2.00 2.00 5 0.00 2.00 2.00 6 0.00 2.00 2.00 ---Stage 2--- 0 0.00 99.99 0.00 1 2.00 99.99 2.00 2 2.00 3.00 3.00 3 2.00 5.00 5.00 4 2.00 5.00 5.00 5 2.00 5.00 5.00 6 2.00 5.00 5.00 ---Stage 3--- 0 0.00 99.99 0.00 1 2.00 3.00 3.00 2 3.00 5.00 5.00 3 5.00 6.00 6.00 4 5.00 8.00 8.00 5 5.00 8.00 8.00 6 5.00 8.00 8.00 ---Stage 4--- 0 0.00 99.99 0.00 1 3.00 99.99 3.00 2 5.00 99.99 5.00 3 6.00 4.00 6.00 4 8.00 7.00 8.00 5 8.00 9.00 9.00 6 8.00 10.00 10.00 ---Stage 5--- 0 0.00 99.99 0.00 1 3.00 99.99 3.00 2 5.00 4.00 5.00 3 6.00 7.00 7.00 4 8.00 9.00 9.00 5 9.00 10.00 10.00 6 10.00 12.00 12.00 ---Stage 6--- 6 12.00 12.00 12.00 Multidimensional Knapsack page 24 D.Bricker, U. of Iowa, 2001

*** Optimal value is 12.00 *** There are 2 optimal solutions Optimal Solution No. 1 stage state decision 6 6 Omit 5 6 Include 4 5 Include 3 4 Include 2 3 Include 1 2 Include 0 1 Volume used by this solution: 10 Optimal Solution No. 2 stage state decision 6 6 Include 5 5 Include 4 4 Omit 3 4 Include 2 3 Include 1 2 Include 0 1 Volume used by this solution: 11 Multidimensional Knapsack page 25 D.Bricker, U. of Iowa, 2001

Because both solutions exceed the volume capacity (which is only 4 units), the Lagrange multiplier λ must be increased. Suppose we increase the multiplier to the value 1.00, i.e., each unit of volume has a "shadow price" of $1.00. Item j 1 2 3 4 5 6 Value vj 2 3 3 4 4 5 v j λa 0 2 0 2 2 2 2 j Weight a1j 1 2 1 3 2 3 Volume a2j 2 1 3 2 2 3 Multidimensional Knapsack page 26 D.Bricker, U. of Iowa, 2001

---Stage 1--- 0 0.00 99.99 0.00 1 0.00 0.00 0.00 2 0.00 0.00 0.00 3 0.00 0.00 0.00 4 0.00 0.00 0.00 5 0.00 0.00 0.00 6 0.00 0.00 0.00 ---Stage 2--- 0 0.00 99.99 0.00 1 0.00 99.99 0.00 2 0.00 2.00 2.00 3 0.00 2.00 2.00 4 0.00 2.00 2.00 5 0.00 2.00 2.00 6 0.00 2.00 2.00 ---Stage 3--- 0 0.00 99.99 0.00 1 0.00 0.00 0.00 2 2.00 0.00 2.00 3 2.00 2.00 2.00 4 2.00 2.00 2.00 5 2.00 2.00 2.00 6 2.00 2.00 2.00 ---Stage 4--- 0 0.00 99.99 0.00 1 0.00 99.99 0.00 2 2.00 99.99 2.00 3 2.00 2.00 2.00 4 2.00 2.00 2.00 5 2.00 4.00 4.00 6 2.00 4.00 4.00 ---Stage 5--- 0 0.00 99.99 0.00 1 0.00 99.99 0.00 2 2.00 2.00 2.00 3 2.00 2.00 2.00 4 2.00 4.00 4.00 5 4.00 4.00 4.00 6 4.00 4.00 4.00 ---Stage 6--- s \ x:0 1 Maximum 6 4.00 4.00 4.00 Multidimensional Knapsack page 27 D.Bricker, U. of Iowa, 2001

The result: seventeen optimal solutions! Item 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 0 1 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 2 1 1 1 1 1 1 1 0 0 0 1 1 1 0 0 0 0 3 0 0 1 0 0 1 1 0 0 1 0 0 1 0 0 0 1 4 1 1 1 0 0 0 0 1 1 1 0 0 0 1 0 0 0 5 0 0 0 1 1 1 1 1 1 1 0 0 0 0 1 1 1 6 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 Vol. 3 5 6 3 5 6 8 4 6 7 4 6 7 5 5 7 8 The optimal value in each case is $8, i.e., value of knapsack ($4) + value of 4 units of volume ($4). Multidimensional Knapsack page 28 D.Bricker, U. of Iowa, 2001

Notice that, of the 17 solutions of the relaxed problem, 2 solutions (#8 & 11) use exactly 4 units of volume satisfying a complementary slackness condition λ b n a x = i ij j j= 1 2 solutions (#1 & 4) use less (and are therefore feasible), while the remaining 13 solutions exceed the 4 unit volume restriction and are infeasible. 0 The 2 solutions satisfying the complementary slackness condition are optimal in the original problem. The other two feasible solutions (#1 & 4) have value $7 and are not optimal! Multidimensional Knapsack page 29 D.Bricker, U. of Iowa, 2001

Suppose that we relax the weight restriction (with "shadow price" λ = 0) and impose the volume restriction: ---Stage 1--- s \ x:0 1 Maximum 0 0 9999 0 1 0 9999 0 2 0 2 2 3 0 2 2 4 0 2 2 ---Stage 2--- s \ x:0 1 Maximum 0 0 9999 0 1 0 3 3 2 2 3 3 3 2 5 5 4 2 5 5 ---Stage 3--- s \ x:0 1 Maximum 0 0 9999 0 1 3 9999 3 2 3 9999 3 3 5 3 5 4 5 6 6 ---Stage 4--- s \ x:0 1 Maximum 0 0 9999 0 1 3 9999 3 2 3 4 4 3 5 7 7 4 6 7 7 ---Stage 5--- s \ x:0 1 Maximum 0 0 9999 0 1 3 9999 3 2 4 4 4 3 7 7 7 4 7 8 8 ---Stage 6--- s \ x:0 1 Maximum 0 0 9999 0 1 3 9999 3 2 4 9999 4 3 7 5 7 4 8 8 8 Multidimensional Knapsack page 30 D.Bricker, U. of Iowa, 2001

*** Optimal value is 8 *** *** There are 2 optimal solutions *** Optimal Solution No. 1 stage state decision 6 4 Omit 5 4 Include 4 2 Include 3 0 Omit 2 0 Omit 1 0 Omit 0 0 Optimal Solution No. 2 stage state decision 6 4 Include 5 2 Omit 4 2 Omit 3 0 Omit 2 0 Include 1 0 Omit 0 0 Both of these solutions use exactly 4 units of volume, and are therefore feasible. In this case, the complementary slackness condition is again satisfied (0 0=0) and it therefore follows that both must be optimal in the original problem! Multidimensional Knapsack page 31 D.Bricker, U. of Iowa, 2001

Important! In the example shown, at most one adjustment was required for the Lagrangian multiplier, and no duality gap was encountered, whereas in general many such adjustments are required, and the optimal solution of the 2-dimensional problem might never be found! Multidimensional Knapsack page 32 D.Bricker, U. of Iowa, 2001

Reducing Dimensionality by Surrogate Relaxation Choose nonnegative multipliers µ 1 and µ 2, so that n n a x b µ a x µ b + + n a x b µ a x µ b n 1j j 1 1 1j j 1 1 j= 1 j= 1 2 j j 2 2 2 j j 2 2 j= 1 j= 1 ( µ 1a1j µ 2a2 j) xj ( µ 1b1 µ 2b2) Multidimensional Knapsack page 33 D.Bricker, U. of Iowa, 2001

In general, for an m-dimensional knapsack problem, the surrogate relaxation is ( µ ) S = Maximum v x j= 1 m n m subject to µ ax µ b, n i ij j i i i= 1 j= 1 i= 1 x X, j = 1, n j j j j Multidimensional Knapsack page 34 D.Bricker, U. of Iowa, 2001

As was the case with Lagrangian relaxation, for any m 0 the optimal solution of the relaxation (a one-dimensional knapsack problem) may not be feasible in the two-dimensional problem, but the optimal value is an upper bound on the optimum of the two-dimensional problem. The Surrogate Dual problem is the problem of finding the surrogate multipliers µ which will yield the least upper bound. Theory is available that guarantees that the surrogate duality gap is no larger than, and is often smaller than, the Lagrangian duality gap. Multidimensional Knapsack page 35 D.Bricker, U. of Iowa, 2001