97
Knapsack problem and variants Michele Monaci DEI, University of Bologna, Italy 16th ESICUP Meeting, ITAM, Mexico City, April 11, 2019

Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Knapsack problem and variants

Michele Monaci

DEI, University of Bologna, Italy

16th ESICUP Meeting, ITAM, Mexico City, April 11, 2019

Page 2: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Overview

1 The Knapsack Problem

2 Robust Knapsack

3 Interdiction Knapsack

4 Non-Linear Generalized Assignment

5 Conclusions

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 2

Page 3: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

In memory of Egon Balas (1922-2019)

Professor Balas was a pioneer for Operations ResearchRelevant contributions to disjunctive programmingbut also to the area of Cutting & Packing.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 3

Page 4: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

In memory of Egon Balas (1922-2019)

Professor Balas was a pioneer for Operations ResearchRelevant contributions to disjunctive programmingbut also to the area of Cutting & Packing.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 3

Page 5: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

In memory of Egon Balas (1922-2019)

Professor Balas was a pioneer for Operations ResearchRelevant contributions to disjunctive programmingbut also to the area of Cutting & Packing.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 3

Page 6: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

In memory of Egon Balas (1922-2019)

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 4

Page 7: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

The Knapsack Problem

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 5

Page 8: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

(1-dimensional) Knapsack Problem

Definition of the problem

Input data

• A set N = {1, . . . , n} of items, the j-th with a profit pj and weight wj ;

• a knapsack with capacity C .

ProblemSelect a set S ⊆ N of items such that

• the total weight of the items in S does not exceed the capacity;

• the total profit of the selected items is a maximum.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 6

Page 9: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

(1-dimensional) Knapsack Problem

Definition of the problem

Input data

• A set N = {1, . . . , n} of items, the j-th with a profit pj and weight wj ;

• a knapsack with capacity C .

ProblemSelect a set S ⊆ N of items such that

• the total weight of the items in S does not exceed the capacity;

• the total profit of the selected items is a maximum.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 6

Page 10: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Natural binary linear formulation

Variables

xj =

{1 if item j is selected0 otherwise

(j ∈ N)

Model

(KP) max∑j∈N

pjxj (1)

∑j∈N

wjxj ≤ C (2)

xj ∈ {0, 1} j ∈ N (3)

• efficiently solvable in practice;

• KP is (weakly) NP-hard;

• alternative Linear Programming formulations with pseudo-polynomial size.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 7

Page 11: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Literature

• 2 seminal books:Martello and Toth (1990) Kellerer, Pferschy and Pisinger (2004)

• Google scholar reports around 85,000 results when searching “knapsackproblem”;

• +16,000 results after 2015;

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 8

Page 12: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Literature

• 2 seminal books:Martello and Toth (1990) Kellerer, Pferschy and Pisinger (2004)

• Google scholar reports around 85,000 results when searching “knapsackproblem”;

• +16,000 results after 2015;

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 8

Page 13: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Literature

• 2 seminal books:Martello and Toth (1990) Kellerer, Pferschy and Pisinger (2004)

• Google scholar reports around 85,000 results when searching “knapsackproblem”;

• +16,000 results after 2015;

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 8

Page 14: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Why is KP so relevant?

• Easy problem to teach to students

• simplest combinatorial optimization problem

• resource allocation: portfolio selection, cut raw material, spectrum allocationin cognitive radio networks, . . .

• cryptography: Merkle-Hellman key cryptosystem

• subproblem in many more complex combinatorial optimization problems

Good(?) news

We already have

• efficient algorithms for its exact solution;

• a clear picture of the LP relaxation;

• (Fully) Polynomial Time Approximation Schemes;

• . . .

Does it still make sense to study knapsack problems?

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 9

Page 15: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Why is KP so relevant?

• Easy problem to teach to students

• simplest combinatorial optimization problem

• resource allocation: portfolio selection, cut raw material, spectrum allocationin cognitive radio networks, . . .

• cryptography: Merkle-Hellman key cryptosystem

• subproblem in many more complex combinatorial optimization problems

Good(?) news

We already have

• efficient algorithms for its exact solution;

• a clear picture of the LP relaxation;

• (Fully) Polynomial Time Approximation Schemes;

• . . .

Does it still make sense to study knapsack problems?

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 9

Page 16: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Why is KP so relevant?

• Easy problem to teach to students

• simplest combinatorial optimization problem

• resource allocation: portfolio selection, cut raw material, spectrum allocationin cognitive radio networks, . . .

• cryptography: Merkle-Hellman key cryptosystem

• subproblem in many more complex combinatorial optimization problems

Good(?) news

We already have

• efficient algorithms for its exact solution;

• a clear picture of the LP relaxation;

• (Fully) Polynomial Time Approximation Schemes;

• . . .

Does it still make sense to study knapsack problems?

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 9

Page 17: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 10

Page 18: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem

Uncertainty of Input Values

For real-world problems input data is often not precise.How to deal with this uncertainty?

1 stochastic optimization

2 robust optimization

Robust Optimization

(some of the) input parameters may attain arbitrary valuesin a given interval.Find a solution which remains feasible for any such input data.cf. Soyster ’73, Ben-Tal, Nemirovski ’98

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 11

Page 19: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem

Uncertainty of Input Values

For real-world problems input data is often not precise.How to deal with this uncertainty?

1 stochastic optimization

2 robust optimization

Robust Optimization

(some of the) input parameters may attain arbitrary valuesin a given interval.Find a solution which remains feasible for any such input data.cf. Soyster ’73, Ben-Tal, Nemirovski ’98

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 11

Page 20: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem

Uncertainty of Input Values

For real-world problems input data is often not precise.How to deal with this uncertainty?

1 stochastic optimization

2 robust optimization

Robust Optimization

(some of the) input parameters may attain arbitrary valuesin a given interval.Find a solution which remains feasible for any such input data.cf. Soyster ’73, Ben-Tal, Nemirovski ’98

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 11

Page 21: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem

Uncertainty of Input Values

For real-world problems input data is often not precise.How to deal with this uncertainty?

1 stochastic optimization

2 robust optimization

Robust Optimization

(some of the) input parameters may attain arbitrary valuesin a given interval.Find a solution which remains feasible for any such input data.cf. Soyster ’73, Ben-Tal, Nemirovski ’98

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 11

Page 22: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem

Model of Bertsimas and Sim ’04• profits pj are fixed

• weights belong to an interval [wj − w j ,wj + w j ]

• at most Γ weights can attain an arbitrary value in their interval, theremaining weights remain at wj .

Γ denotes a “level of guarantee” for data uncertainty.

Assumptions:

• C = 1 normalization

• wj + w j ≤ 1 ∀ j ∈ N trivial

• uncertainty is at most a constant fraction δj of the nominal weight, i.e.,w j = δj wj ∀ j ∈ N

=⇒ wj ≤ 11+δj

∀ j ∈ N

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12

Page 23: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem

Model of Bertsimas and Sim ’04• profits pj are fixed

• weights belong to an interval [wj − w j ,wj + w j ]

• at most Γ weights can attain an arbitrary value in their interval, theremaining weights remain at wj .

Γ denotes a “level of guarantee” for data uncertainty.

Assumptions:

• C = 1 normalization

• wj + w j ≤ 1 ∀ j ∈ N trivial

• uncertainty is at most a constant fraction δj of the nominal weight, i.e.,w j = δj wj ∀ j ∈ N

=⇒ wj ≤ 11+δj

∀ j ∈ N

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12

Page 24: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem

Model of Bertsimas and Sim ’04• profits pj are fixed

• weights belong to an interval [wj − w j ,wj + w j ]

• at most Γ weights can attain an arbitrary value in their interval, theremaining weights remain at wj .

Γ denotes a “level of guarantee” for data uncertainty.

Assumptions:

• C = 1 normalization

• wj + w j ≤ 1 ∀ j ∈ N trivial

• uncertainty is at most a constant fraction δj of the nominal weight, i.e.,w j = δj wj ∀ j ∈ N

=⇒ wj ≤ 11+δj

∀ j ∈ N

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12

Page 25: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem

Model of Bertsimas and Sim ’04• profits pj are fixed

• weights belong to an interval [wj − w j ,wj + w j ]

• at most Γ weights can attain an arbitrary value in their interval, theremaining weights remain at wj .

Γ denotes a “level of guarantee” for data uncertainty.

Assumptions:

• C = 1 normalization

• wj + w j ≤ 1 ∀ j ∈ N trivial

• uncertainty is at most a constant fraction δj of the nominal weight, i.e.,w j = δj wj ∀ j ∈ N

=⇒ wj ≤ 11+δj

∀ j ∈ N

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12

Page 26: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem

Model of Bertsimas and Sim ’04• profits pj are fixed

• weights belong to an interval [wj − w j ,wj + w j ]

• at most Γ weights can attain an arbitrary value in their interval, theremaining weights remain at wj .

Γ denotes a “level of guarantee” for data uncertainty.

Assumptions:

• C = 1 normalization

• wj + w j ≤ 1 ∀ j ∈ N trivial

• uncertainty is at most a constant fraction δj of the nominal weight, i.e.,w j = δj wj ∀ j ∈ N

=⇒ wj ≤ 11+δj

∀ j ∈ N

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12

Page 27: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem

Model of Bertsimas and Sim ’04• profits pj are fixed

• weights belong to an interval [wj − w j ,wj + w j ]

• at most Γ weights can attain an arbitrary value in their interval, theremaining weights remain at wj .

Γ denotes a “level of guarantee” for data uncertainty.

Assumptions:

• C = 1 normalization

• wj + w j ≤ 1 ∀ j ∈ N trivial

• uncertainty is at most a constant fraction δj of the nominal weight, i.e.,w j = δj wj ∀ j ∈ N

=⇒ wj ≤ 11+δj

∀ j ∈ N

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12

Page 28: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem, Model of Bertsimas and Sim ’04

Example

Given: 7 items, capacity c = 12

j 1 2 3, . . . ,7pj 11 7 3wj 6 4 2

Nominal (non-robust) solution:pack items 1,2,3 =⇒ weight=12, profit = 21

Robust solution for Γ = 1 and δj = 12 ∀j:

items 1, 3 =⇒ robust weight=11, profit = 14items 2, 3,4,5 =⇒ robust weight=12, profit = 16items 3,. . . ,7 =⇒ robust weight=11, profit = 15

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 13

Page 29: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem, Model of Bertsimas and Sim ’04

Example

Given: 7 items, capacity c = 12

j 1 2 3, . . . ,7pj 11 7 3wj 6 4 2

Nominal (non-robust) solution:pack items 1,2,3 =⇒ weight=12, profit = 21

Robust solution for Γ = 1 and δj = 12 ∀j:

items 1, 3 =⇒ robust weight=11, profit = 14items 2, 3,4,5 =⇒ robust weight=12, profit = 16items 3,. . . ,7 =⇒ robust weight=11, profit = 15

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 13

Page 30: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem, Model of Bertsimas and Sim ’04

Example

Given: 7 items, capacity c = 12

j 1 2 3, . . . ,7pj 11 7 3wj 6 4 2

Nominal (non-robust) solution:pack items 1,2,3 =⇒ weight=12, profit = 21

Robust solution for Γ = 1 and δj = 12 ∀j:

items 1, 3 =⇒ robust weight=11, profit = 14items 2, 3,4,5 =⇒ robust weight=12, profit = 16items 3,. . . ,7 =⇒ robust weight=11, profit = 15

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 13

Page 31: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem, Model of Bertsimas and Sim ’04

Example

Given: 7 items, capacity c = 12

j 1 2 3, . . . ,7pj 11 7 3wj 6 4 2

Nominal (non-robust) solution:pack items 1,2,3 =⇒ weight=12, profit = 21

Robust solution for Γ = 1 and δj = 12 ∀j:

items 1, 3 =⇒ robust weight=11, profit = 14items 2, 3,4,5 =⇒ robust weight=12, profit = 16items 3,. . . ,7 =⇒ robust weight=11, profit = 15

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 13

Page 32: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem, Model of Bertsimas and Sim ’04

Example

Given: 7 items, capacity c = 12

j 1 2 3, . . . ,7pj 11 7 3wj 6 4 2

Nominal (non-robust) solution:pack items 1,2,3 =⇒ weight=12, profit = 21

Robust solution for Γ = 1 and δj = 12 ∀j:

items 1, 3 =⇒ robust weight=11, profit = 14items 2, 3,4,5 =⇒ robust weight=12, profit = 16items 3,. . . ,7 =⇒ robust weight=11, profit = 15

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 13

Page 33: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem, Model of Bertsimas and Sim ’04

Example

Given: 7 items, capacity c = 12

j 1 2 3, . . . ,7pj 11 7 3wj 6 4 2

Nominal (non-robust) solution:pack items 1,2,3 =⇒ weight=12, profit = 21

Robust solution for Γ = 1 and δj = 12 ∀j:

items 1, 3 =⇒ robust weight=11, profit = 14items 2, 3,4,5 =⇒ robust weight=12, profit = 16items 3,. . . ,7 =⇒ robust weight=11, profit = 15

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 14

Page 34: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem, Model of Bertsimas and Sim ’04

Example cnt.

Given: 7 items, capacity c = 12

j 1 2 3, . . . ,7pj 11 7 3wj 6 4 2

Robust solution for Γ = 2 and δj = 1 ∀j:item 1 =⇒ robust weight=12, profit = 11items 2,3 =⇒ robust weight=12, profit = 10items 3,. . . ,6 =⇒ robust weight=12, profit = 12

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 15

Page 35: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem, Model of Bertsimas and Sim ’04

Example cnt.

Given: 7 items, capacity c = 12

j 1 2 3, . . . ,7pj 11 7 3wj 6 4 2

Robust solution for Γ = 2 and δj = 1 ∀j:item 1 =⇒ robust weight=12, profit = 11items 2,3 =⇒ robust weight=12, profit = 10items 3,. . . ,6 =⇒ robust weight=12, profit = 12

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 15

Page 36: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem, Model of Bertsimas and Sim ’04

Example cnt.

Given: 7 items, capacity c = 12

j 1 2 3, . . . ,7pj 11 7 3wj 6 4 2

Robust solution for Γ = 2 and δj = 1 ∀j:item 1 =⇒ robust weight=12, profit = 11items 2,3 =⇒ robust weight=12, profit = 10items 3,. . . ,6 =⇒ robust weight=12, profit = 12

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 15

Page 37: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem, Model of Bertsimas and Sim ’04

Example cnt.

Given: 7 items, capacity c = 12

j 1 2 3, . . . ,7pj 11 7 3wj 6 4 2

Robust solution for Γ = 2 and δj = 1 ∀j:item 1 =⇒ robust weight=12, profit = 11items 2,3 =⇒ robust weight=12, profit = 10items 3,. . . ,6 =⇒ robust weight=12, profit = 12

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 15

Page 38: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem, Model of Bertsimas and Sim ’04

Example cnt.

Given: 7 items, capacity c = 12

j 1 2 3, . . . ,7pj 11 7 3wj 6 4 2

Robust solution for Γ = 2 and δj = 1 ∀j:item 1 =⇒ robust weight=12, profit = 11items 2,3 =⇒ robust weight=12, profit = 10items 3,. . . ,6 =⇒ robust weight=12, profit = 12

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 16

Page 39: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem, Model of Bertsimas and Sim ’04

Solution of the problem

• Mixed Integer Programming model (Bertsimas, Sim):The robust version of an optimization problem belongs to the samecomplexity class as the “nominal problem” with fixed input.MIP model for the robust knapsack problem based on duality.

• Iterate KP solution (Lee, Lee, Park, and Park):Guess the item k (say) with largest weight deviation that is included in thesolution, and solve a KP with a modified capacity and items’ weight.Iterate for k = 1, 2, . . . , n and return the best solution found.

• Dynamic programming (M., Pferschy & Serafini):a state z(d , s, j) denotes the highest profit for a feasible solution with totalweight d in which only items in {1, . . . , s} are considered and exactly s ofthem are taken with their upper weight bound wj + w j .Time complexity O(ΓnC ), space complexity O(n + ΓC ).

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 17

Page 40: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem, Model of Bertsimas and Sim ’04

Solution of the problem

• Mixed Integer Programming model (Bertsimas, Sim):The robust version of an optimization problem belongs to the samecomplexity class as the “nominal problem” with fixed input.MIP model for the robust knapsack problem based on duality.

• Iterate KP solution (Lee, Lee, Park, and Park):Guess the item k (say) with largest weight deviation that is included in thesolution, and solve a KP with a modified capacity and items’ weight.Iterate for k = 1, 2, . . . , n and return the best solution found.

• Dynamic programming (M., Pferschy & Serafini):a state z(d , s, j) denotes the highest profit for a feasible solution with totalweight d in which only items in {1, . . . , s} are considered and exactly s ofthem are taken with their upper weight bound wj + w j .Time complexity O(ΓnC ), space complexity O(n + ΓC ).

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 17

Page 41: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem, Model of Bertsimas and Sim ’04

Solution of the problem

• Mixed Integer Programming model (Bertsimas, Sim):The robust version of an optimization problem belongs to the samecomplexity class as the “nominal problem” with fixed input.MIP model for the robust knapsack problem based on duality.

• Iterate KP solution (Lee, Lee, Park, and Park):Guess the item k (say) with largest weight deviation that is included in thesolution, and solve a KP with a modified capacity and items’ weight.Iterate for k = 1, 2, . . . , n and return the best solution found.

• Dynamic programming (M., Pferschy & Serafini):a state z(d , s, j) denotes the highest profit for a feasible solution with totalweight d in which only items in {1, . . . , s} are considered and exactly s ofthem are taken with their upper weight bound wj + w j .Time complexity O(ΓnC ), space complexity O(n + ΓC ).

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 17

Page 42: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem, Model of Bertsimas and Sim ’04

Computational experiments

• random (hard) KP instances with n ≤ 5000;

• coefficients δj ∈ [1, 11+wj

], different values of Γ;

• CPU seconds on an Intel i5-750 running at 2.67 GHz.

Γ MILP IT KP DP

1 9.325 0.081 0.00710 2.336 0.021 0.01650 0.271 0.008 0.050

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 18

Page 43: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem, Model of Bertsimas and Sim ’04

Computational experiments

• random (hard) KP instances with n ≤ 5000;

• coefficients δj ∈ [1, 11+wj

], different values of Γ;

• CPU seconds on an Intel i5-750 running at 2.67 GHz.

Γ MILP IT KP DP

1 9.325 0.081 0.00710 2.336 0.021 0.01650 0.271 0.008 0.050

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 18

Page 44: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Price of Robustness

Motivation• Computational experiments show that the Robust Knapsack problem can be

solved efficiently;

• What about the solution worsening caused by uncertainty?

• The solution worsening depends only on Γ and δ := maxj∈N

δj

For any instance I we denote:z(I ) optimal solution value of nominal problemzRδ,Γ(I ) optimal solution value of robust problem

Worst-Case Ratio

price of robustness Rδ,Γ = infI

zRδ,Γ(I )

z(I )

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 19

Page 45: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Price of Robustness

Motivation• Computational experiments show that the Robust Knapsack problem can be

solved efficiently;

• What about the solution worsening caused by uncertainty?

• The solution worsening depends only on Γ and δ := maxj∈N

δj

For any instance I we denote:z(I ) optimal solution value of nominal problemzRδ,Γ(I ) optimal solution value of robust problem

Worst-Case Ratio

price of robustness Rδ,Γ = infI

zRδ,Γ(I )

z(I )

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 19

Page 46: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Price of Robustness

Motivation• Computational experiments show that the Robust Knapsack problem can be

solved efficiently;

• What about the solution worsening caused by uncertainty?

• The solution worsening depends only on Γ and δ := maxj∈N

δj

For any instance I we denote:z(I ) optimal solution value of nominal problemzRδ,Γ(I ) optimal solution value of robust problem

Worst-Case Ratio

price of robustness Rδ,Γ = infI

zRδ,Γ(I )

z(I )

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 19

Page 47: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Price of Robustness: The Integer Case

Worst-Case RatioTheorem: For Γ = 1 we have:

Rδ,1 =1

1 + dδefor all δ > 0.

Proof, upper bound:Consider an instance with n = 1 + dδe identical items

pj = 1, wj =1

1 + dδe

• nominal solution: pack all items =⇒ z = 1 + dδe• robust solution:

robust weight of two items: 11+dδe + 1

1+dδe (1 + δ) = 2+δ1+dδe > 1

→ pack only one item =⇒ zR = 1

→ zR

z = 11+dδe

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 20

Page 48: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Price of Robustness: The Integer Case

Worst-Case RatioTheorem: For Γ = 1 we have:

Rδ,1 =1

1 + dδefor all δ > 0.

Proof, lower bound:Consider the item set M in an optimal solution of the nominal problem.Partition M into ` “robust” groups, sorted by nondecreasing weight:

• initially, each group corresponds to a single item;

• iteratively merge the first two groups, if this produces a robust feasible group;

• stop when no merge is possible.

It can be proved that ` ≤ dδe+ 1.Hence taking the group with maximum profit gives a robust solution with value

zR ≥ 1

dδe+ 1z

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 21

Page 49: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Price of Robustness: The Integer Case

Worst-Case RatioTheorem: For Γ = 1 we have:

Rδ,1 =1

1 + dδefor all δ > 0.

Proof, lower bound:Consider the item set M in an optimal solution of the nominal problem.Partition M into ` “robust” groups, sorted by nondecreasing weight:

• initially, each group corresponds to a single item;

• iteratively merge the first two groups, if this produces a robust feasible group;

• stop when no merge is possible.

It can be proved that ` ≤ dδe+ 1.Hence taking the group with maximum profit gives a robust solution with value

zR ≥ 1

dδe+ 1z

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 21

Page 50: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Price of Robustness: The Integer Case

Worst-Case RatioTheorem: For Γ ≥ 2 we have:

Rδ,Γ =1

1 + d2δefor all δ > 0.

Proof, upper bound:Consider an instance with n = 1 + d2δe identical itemspj = 1, wj = 1

1+d2δe

• nominal solution: pack all items =⇒ z = 1 + d2δe• robust solution:

robust weight of two items: 2(1 + δ) 11+d2δe > 1

→ pack only one item =⇒ zR = 1

→ zR

z = 11+d2δe

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 22

Page 51: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Price of Robustness: The LP Relaxation

Worst-Case Ratio

price of robustness of the LP relaxation Rδ,Γ = infI

zRδ,Γ(I )

z(I )

wherez(I) optimal LP-relaxation of nominal problemzRδ,Γ(I ) optimal LP-relaxation of robust problem

Worst-Case RatioTheorem:

Rδ,Γ =1

1 + δfor all δ > 0, Γ ≥ 1.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 23

Page 52: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem: LP Relaxation

Computational complexity

Theorem: The LP Relaxation of the Robust Knapsack problem can be computedin O(n log n) for any Γ.

Optimality gap

Theorem:

limδ→∞

infI ,|I |=n

{zRδ,Γ(I )

zRδ,Γ(I )

}=

1

nfor Γ ∈ {1, 2}.

1

n≤ limδ→∞

infI ,|I |=n

{zRδ,Γ(I )

zRδ,Γ(I )

}≤ Γ

2nfor all Γ ≥ 3.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 24

Page 53: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem: LP Relaxation

Computational complexity

Theorem: The LP Relaxation of the Robust Knapsack problem can be computedin O(n log n) for any Γ.

Optimality gap

Theorem:

limδ→∞

infI ,|I |=n

{zRδ,Γ(I )

zRδ,Γ(I )

}=

1

nfor Γ ∈ {1, 2}.

1

n≤ limδ→∞

infI ,|I |=n

{zRδ,Γ(I )

zRδ,Γ(I )

}≤ Γ

2nfor all Γ ≥ 3.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 24

Page 54: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem: Greedy heuristic

Robust Greedy (RG)

consider items in decreasing order of efficiency

insert current item into the solution set,if the solution remains robust feasibleotherwise discard the item

iterate

also consider item with highest profit as singleton solution

Same as standard greedy with an extended feasibility check=⇒ O(n log Γ) running time (if items are sorted by efficiency).

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 25

Page 55: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem: Greedy heuristic

Robust Greedy (RG)

consider items in decreasing order of efficiency

insert current item into the solution set,if the solution remains robust feasibleotherwise discard the item

iterate

also consider item with highest profit as singleton solution

Same as standard greedy with an extended feasibility check=⇒ O(n log Γ) running time (if items are sorted by efficiency).

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 25

Page 56: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Robust Knapsack problem: Greedy heuristic

Robust Greedy (RG)

consider items in decreasing order of efficiency

insert current item into the solution set,if the solution remains robust feasibleotherwise discard the item

iterate

also consider item with highest profit as singleton solution

Same as standard greedy with an extended feasibility check=⇒ O(n log Γ) running time (if items are sorted by efficiency).

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 25

Page 57: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Greedy Algorithm for RKPAnalyze the performance of this approximation algorithm:

DefinitionWorst-Case Performance Ratio of Greedy:

WRRGδ,Γ = inf

I

{zRGδ,Γ (I )

zRδ,Γ(I )

}

Worst-Case Performance Ratio, Special Case Γ = 1

Theorem:

WRRGδ,1 =

1

2for all δ < 1.

WRRGδ,1 =

1

1 + δfor all δ ≥ 1.

Worst-Case Performance Ratio, General Case Γ ≥ 2Theorem:

1

2 + δ≤WRRG

δ,Γ ≤1

1 + δfor all δ > 0, Γ ≥ 2.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 26

Page 58: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Greedy Algorithm for RKPAnalyze the performance of this approximation algorithm:

DefinitionWorst-Case Performance Ratio of Greedy:

WRRGδ,Γ = inf

I

{zRGδ,Γ (I )

zRδ,Γ(I )

}

Worst-Case Performance Ratio, Special Case Γ = 1

Theorem:

WRRGδ,1 =

1

2for all δ < 1.

WRRGδ,1 =

1

1 + δfor all δ ≥ 1.

Worst-Case Performance Ratio, General Case Γ ≥ 2Theorem:

1

2 + δ≤WRRG

δ,Γ ≤1

1 + δfor all δ > 0, Γ ≥ 2.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 26

Page 59: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Greedy Algorithm for RKPAnalyze the performance of this approximation algorithm:

DefinitionWorst-Case Performance Ratio of Greedy:

WRRGδ,Γ = inf

I

{zRGδ,Γ (I )

zRδ,Γ(I )

}

Worst-Case Performance Ratio, Special Case Γ = 1

Theorem:

WRRGδ,1 =

1

2for all δ < 1.

WRRGδ,1 =

1

1 + δfor all δ ≥ 1.

Worst-Case Performance Ratio, General Case Γ ≥ 2Theorem:

1

2 + δ≤WRRG

δ,Γ ≤1

1 + δfor all δ > 0, Γ ≥ 2.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 26

Page 60: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Greedy Algorithm for RKPAnalyze the performance of this approximation algorithm:

DefinitionWorst-Case Performance Ratio of Greedy:

WRRGδ,Γ = inf

I

{zRGδ,Γ (I )

zRδ,Γ(I )

}

Worst-Case Performance Ratio, Special Case Γ = 1

Theorem:

WRRGδ,1 =

1

2for all δ < 1.

WRRGδ,1 =

1

1 + δfor all δ ≥ 1.

Worst-Case Performance Ratio, General Case Γ ≥ 2Theorem:

1

2 + δ≤WRRG

δ,Γ ≤1

1 + δfor all δ > 0, Γ ≥ 2.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 26

Page 61: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Interdiction Knapsack problem

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 27

Page 62: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Bilevel Games

In many real-world scenarios, a decision maker is not deciding alone . . .her decisions must take decisions of other parties into account.

The resulting decision process can be modelled as a two-player Stackelberg game,in which two non-cooperative players (leader and follower) take their decisions in asequential way:

• in the first round, the leader takes an action,

• in the second round, the follower reacts to it.

Follower decisions are influenced by the leader who possesses a completeknowledge of the follower optimization setting.

Bilevel Optimization

• challenging problems both in theory and in practice

• NP-hard problems even in case both the leader and the follower are linearprograms

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 28

Page 63: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Bilevel Games

In many real-world scenarios, a decision maker is not deciding alone . . .her decisions must take decisions of other parties into account.

The resulting decision process can be modelled as a two-player Stackelberg game,in which two non-cooperative players (leader and follower) take their decisions in asequential way:

• in the first round, the leader takes an action,

• in the second round, the follower reacts to it.

Follower decisions are influenced by the leader who possesses a completeknowledge of the follower optimization setting.

Bilevel Optimization

• challenging problems both in theory and in practice

• NP-hard problems even in case both the leader and the follower are linearprograms

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 28

Page 64: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Bilevel Games

In many real-world scenarios, a decision maker is not deciding alone . . .her decisions must take decisions of other parties into account.

The resulting decision process can be modelled as a two-player Stackelberg game,in which two non-cooperative players (leader and follower) take their decisions in asequential way:

• in the first round, the leader takes an action,

• in the second round, the follower reacts to it.

Follower decisions are influenced by the leader who possesses a completeknowledge of the follower optimization setting.

Bilevel Optimization

• challenging problems both in theory and in practice

• NP-hard problems even in case both the leader and the follower are linearprograms

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 28

Page 65: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Interdiction Games (IGs)

• special case of bilevel optimization problems

• leader and follower have opposite objective functions

• two-person, zero-sum sequential game

• studied mostly for network-based problems in the follower

• leader interdicts items of followerI type of interdiction: linear or discrete, cost increase or destructionI interdiction budget

(a) Linear, cost increase (b) Discrete, destruction

Figure: Early Applications of Interdiction, following [Livy, 218BC]

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 29

Page 66: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Interdiction Games (IGs)

• special case of bilevel optimization problems

• leader and follower have opposite objective functions

• two-person, zero-sum sequential game

• studied mostly for network-based problems in the follower

• leader interdicts items of followerI type of interdiction: linear or discrete, cost increase or destructionI interdiction budget

(a) Linear, cost increase (b) Discrete, destruction

Figure: Early Applications of Interdiction, following [Livy, 218BC]

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 29

Page 67: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Interdiction Knapsack problem

Corporate Strategy Problem:

• Companies A and B. A dominates the market. B wants to enter the market

• Whenever A and B target the same region, campaign of B is not effective

• Items are, e.g., demographic/geographic regions

• Cost and benefit for each target region

• A wants to prevent B in maximizing its gain (subject to available budget)

Mathematical Model

minx

maxy

pT y (4)

vT x ≤ C` (5)

wT y ≤ Cf (6)

xj + yj ≤ 1, ∀j ∈ N (7)

x , y ∈ {0, 1}n (8)

Bilevel Knapsack is Σ2p-complete (Caprara, Carvalho, Lodi, Woeginger)

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 30

Page 68: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Interdiction Knapsack problem: reformulation

Single-level reformulation

The problem can be reformulated in the n + 1 dimensional space as

minx,θ

θ (9)

θ ≥ Φ(x) (10)

vT x ≤ C` (11)

x ∈ {0, 1} (12)

whereΦ(x) = max

y

{pT y : wT y ≤ Cf , y ≤ 1− x , y ∈ {0, 1}

}is the response of the follower to a decision x of the leader.

Unfortunately

• constraints (10) are non-linear;

• function Φ(x) is neither convex nor concave.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 31

Page 69: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Interdiction Knapsack problem: reformulation

Single-level reformulation

The problem can be reformulated in the n + 1 dimensional space as

minx,θ

θ (9)

θ ≥ Φ(x) (10)

vT x ≤ C` (11)

x ∈ {0, 1} (12)

whereΦ(x) = max

y

{pT y : wT y ≤ Cf , y ≤ 1− x , y ∈ {0, 1}

}is the response of the follower to a decision x of the leader.

Unfortunately

• constraints (10) are non-linear;

• function Φ(x) is neither convex nor concave.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 31

Page 70: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Interdiction Knapsack problem: computational experiments

Solution approaches

• CP: cutting planes approach (De Negre)

• CCLW: Specialized approach based on dualization of the follower’s objectiveand on computing upper bounds on the problem (Caprara et al.)

Computational experiments

50 uncorrelated instances proposed by Caprara et al.average CPU times over 10 instances (Xeon running at 2.66 GHz)

n CP CCLW

35 437.05 4.6240 816.63 17.2245 1423.81 40.0650 1598.37 163.5355 3600.00 766.27

“...for n = 100, computational times of one hour CPU Time . . . seem currentlyout of reach”

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 32

Page 71: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Interdiction Knapsack problem: reformulation

Wood’s reformulation:Find (sufficiently large) Mj ’s and reformulate the follower

Φ(x) = max{pT y −∑j∈N

Mjxjyj : y ∈ Y }

where Y = {y ∈ {0, 1}n : wT y ≤ Cf } (independent of x).

Let Y be extreme points of convY .

Benders-Like Reformulation

minx,θ

θ (13)

θ ≥ pT y −∑j∈N

Mjxj yj ∀y ∈ Y (14)

vT x ≤ C` (15)

x ∈ {0, 1} (16)

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 33

Page 72: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Interdiction Knapsack problem: reformulation

Wood’s reformulation:Find (sufficiently large) Mj ’s and reformulate the follower

Φ(x) = max{pT y −∑j∈N

Mjxjyj : y ∈ Y }

where Y = {y ∈ {0, 1}n : wT y ≤ Cf } (independent of x).

Let Y be extreme points of convY .

Benders-Like Reformulation

minx,θ

θ (13)

θ ≥ pT y −∑j∈N

Mjxj yj ∀y ∈ Y (14)

vT x ≤ C` (15)

x ∈ {0, 1} (16)

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 33

Page 73: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Benders-Like Reformulation

The Choice of Mj ’s is crucial

Large Mj ’s typically produce weak LP-relaxations

TheoremFor Interdiction Knapsack problem we can use Mj = pj .

Approach

• Interdiction cuts θ ≥∑j∈N

pj(1− xj)yj ∀y ∈ Y

• exponentially many constraints → Branch-and-Cut approach

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 34

Page 74: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Benders-Like Reformulation

The Choice of Mj ’s is crucial

Large Mj ’s typically produce weak LP-relaxations

TheoremFor Interdiction Knapsack problem we can use Mj = pj .

Approach

• Interdiction cuts θ ≥∑j∈N

pj(1− xj)yj ∀y ∈ Y

• exponentially many constraints → Branch-and-Cut approach

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 34

Page 75: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Branch-and-Cut

Preprocessing

xa ≥ xb a, b ∈ N : wa ≤ wb, va ≤ vb, pa ≥ pb

Valid inequalities

Take any y ∈ Y . Then, the following inequalities are valid and there is nodominance among them.

θ ≥∑j∈N

pj yj(1− xj) + (pb − pa)(1− xb) a, b ∈ N : ya = 1, yb = 0, pa < pb

θ ≥∑j∈N

pj yj(1− xj) + pb(xa − xb) a, b ∈ N : ya = 1, yb = 0,wa ≥ wb

Can be extended to subset of items

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 35

Page 76: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Interdiction Knapsack problem: computational experiments

Computational experiments

50 uncorrelated instances proposed by Caprara et al.average CPU times over 10 instances (comparable hardware)

n CP CCLW B&C

35 437.05 4.62 0.3240 816.63 17.22 0.3445 1423.81 40.06 0.9150 1598.37 163.53 1.1755 3600.00 766.27 10.56

General purpose approach: similar results on different interdiction problems

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 36

Page 77: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Iterative MIP solution

Della Croce and Scatamacchia: new specific approach for interdiction knapsack

• a tight lower bound is obtained by guessing the critical item in the followerand solving a binary linear programming model;

• the algorithm exploits some expected features of an optimal solution of theclassical knapsack problem (e.g., size of the core problem).

n CP CCLW B&C SD

35 437.05 4.62 0.32 0.1440 816.63 17.22 0.34 0.1645 1423.81 40.06 0.91 0.1950 1598.37 163.53 1.17 0.1855 3600.00 766.27 10.56 0.27

Tailored approach: similar results on larger instances

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 37

Page 78: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Non-Linear GeneralizedAssignment problem

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 38

Page 79: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Non-Linear Knapsack

Variant of the knapsack problem in which

• (some of) the variables are continuous

• the profit and weight associated with each item are described by non-linearfunctions of the variables

NLP Modelxj = fraction of item j that is packed into the knapsack

max∑j∈N

pj(xj)∑j∈N

wj(xj) ≤ C

0 ≤ xj ≤ 1 j ∈ N

xj integer j ∈ I ⊂ N

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 39

Page 80: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Non-Linear Knapsack

Variant of the knapsack problem in which

• (some of) the variables are continuous

• the profit and weight associated with each item are described by non-linearfunctions of the variables

NLP Modelxj = fraction of item j that is packed into the knapsack

max∑j∈N

pj(xj)∑j∈N

wj(xj) ≤ C

0 ≤ xj ≤ 1 j ∈ N

xj integer j ∈ I ⊂ N

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 39

Page 81: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Non-Linear Knapsack

profit function weight function

Applications and literature

• financial models (Mathur, Salkin & Morito);

• production and inventory management (Ziegler);

• optimal design of queueing network models (Bitran & Tirupati);

• Different versions of the problem addressed in the literature (purelycontinuous, convex functions, quadratic functions, . . . )

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 40

Page 82: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Non-Linear Generalized Assignment problem

Definition of the problem

Input data

• A set M = {1, . . . ,m} of knapsacks, the i-th with a capacity ci > 0.

• A set N = {1, . . . , n} of items, the j-th with a maximum availability aj .

• For each knapsack i ∈ M and item j ∈ N there is a profit function pij(·) anda weight function wij(·).

ProblemPack (fraction of) items into the knapsacks so that

• the total weight of the items inserted in each knapsack does not exceed itscapacity;

• the total amount of each item that is packed does not excedd its availability;

• the total profit of the packed items is a maximum;

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 41

Page 83: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Non-Linear Generalized Assignment problem

Definition of the problem

Input data

• A set M = {1, . . . ,m} of knapsacks, the i-th with a capacity ci > 0.

• A set N = {1, . . . , n} of items, the j-th with a maximum availability aj .

• For each knapsack i ∈ M and item j ∈ N there is a profit function pij(·) anda weight function wij(·).

ProblemPack (fraction of) items into the knapsacks so that

• the total weight of the items inserted in each knapsack does not exceed itscapacity;

• the total amount of each item that is packed does not excedd its availability;

• the total profit of the packed items is a maximum;

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 41

Page 84: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

NLGAP: NLP formulation

Variables• xij fraction of item j that is packed into knapsack i ;

Model

(NLGAP) max∑i∈M

∑j∈N

pij(xij) (17)

∑j∈N

wij(xij) ≤ ci i ∈ M (18)

∑i∈M

xij ≤ aj j ∈ N (19)

0 ≤ xij ≤ uij i ∈ M; j ∈ N (20)

where, for each i ∈ M and j ∈ N:

uij := max{x : wij(x) ≤ ci}

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 42

Page 85: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

NLGAP: NLP formulation

Variables• xij fraction of j that is packed into knapsack i ;

Model

max∑i∈M

∑j∈N

pij(xij) (21)

∑j∈N

wij(xij) ≤ ci i ∈ M (22)

∑i∈M

xij ≤ aj j ∈ N (23)

0 ≤ xij ≤ uij i ∈ M; j ∈ N (24)

• The model is extremely hard in practice;

• NLP solvers typically fail in producing an optimal solution.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 43

Page 86: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

NLGAP: MILP approaches

Sampling

• Given an integer parameter s

• define s + 1 distinct values (samples) for each pair (i , j)

0 = α0ij < α1

ij < . . . < αsij = uij .

Define and solve (Binary) Linear Programming models that

• depend on the samples, and

• produce either heuristic solutions or upper bounds.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 44

Page 87: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

NLGAP: MILP approaches

Sampling

• Given an integer parameter s

• define s + 1 distinct values (samples) for each pair (i , j)

0 = α0ij < α1

ij < . . . < αsij = uij .

Define and solve (Binary) Linear Programming models that

• depend on the samples, and

• produce either heuristic solutions or upper bounds.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 44

Page 88: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

NLGAP: Relaxation by Linear Programming

The relaxation is obtained by

• overestimating the values of the profit functions at each sample;

• underestimating the values of the weight functions at each sample.

• For each pair (k , j), variable xij is expressed as a convex combination ofcontinuous variables ϑkij (one for each sample k).

LP model → efficient solution even with a large number of samplesMichele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 45

Page 89: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

NLGAP: Relaxation by Binary Linear Programming

The relaxation is obtained by

• splitting the domain of each variable xij into intervals;

• each interval has the profit of its right extreme and the weight of its leftextreme.

Computing the upper bound is an NP-hard problem.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 46

Page 90: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

NLGAP: Heuristic by Binary Linear Programming

0-1 LP model in which

• each variable xij must attain a value that is exactly one of the samples;

• each sample has the correct (=sampled) profit and weight values.

• Classical (multiple) knapsack constraints.

Enhancements• Integration with greedy heuristics;

• Local search post-optimization.

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 47

Page 91: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

NLGAP: Computational experiments

Instances• profit and weight functions taken from the literature:

profit pij(xij) =cij

1 + bije−aij (xij+dij )− cij

1 + bije−aijdij

Linear weight wij(xij) = wijxij

Nonlinear weight wij(xij) =√

pijxij + qij −√qij

• Experiments on an Intel Xeon E5649 at 2.53 GHz using IBM ILOG CPLEX12.6.0.0 as LP/ILP solver

Upper bounds

LP ILP

# samples Time U/U∗ Time U/U∗

5 0.22 1.836 87.35 1.29210 0.39 1.294 106.13 1.10450 2.22 1.069 173.75 1.022

100 12.66 1.051 196.69 1.014

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 48

Page 92: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

NLGAP: Computational experiments

Lower boundsNonlinear solvers

• commercial solver Baron 18.11.12

• freeware solver Couenne 0.5

Couenne (600) Baron (600) ILP (30) Hybrid (30)

Nonlinear 48.667 34.465 2.673 2.380Linear 60.420 41.007 2.855 2.324

• nonlinear solvers are dominated by the (KP-based) ILP heurstic

• hybrid algorithm computes (slightly) better solutions

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 49

Page 93: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Conclusions

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 50

Page 94: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Conclusions

Extensions• Different definitions of robustness (e.g., Ben-Tal & Nemirowski)

• Two-dimensional Robust Knapsack problem

• Two-dimensional Interdiction Knapsack problem

• Two-dimensional Knapsack with non-linear constraints

Conclusions• Many interesting and relevant variants and extensions of the Knapsack

Problem

• Open problems both from a theoretical point of view and from acomputational perspective

Does it still make sense to study knapsack problems?

Definitely YES

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 51

Page 95: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Conclusions

Extensions• Different definitions of robustness (e.g., Ben-Tal & Nemirowski)

• Two-dimensional Robust Knapsack problem

• Two-dimensional Interdiction Knapsack problem

• Two-dimensional Knapsack with non-linear constraints

Conclusions• Many interesting and relevant variants and extensions of the Knapsack

Problem

• Open problems both from a theoretical point of view and from acomputational perspective

Does it still make sense to study knapsack problems?

Definitely YES

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 51

Page 96: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Literature (1/2)• A. Ben-Tal, A. Nemirovski, “Robust convex optimization”, Mathematics of

Operations Research (1998).• D. Bertsimas, M. Sim, “The price of robustness”, Operations Research

(2004).• G.R. Bitran, D. Tirupati, “Tradeoff curves, targeting and balancing in

manufacturing queueing networks”, Operations Research (1989).• A. Caprara, M. Carvalho, A. Lodi, G.J. Woeginger, “A study on the

computational complexity of the bilevel knapsack problem”, SIAM Journal onOptimization (2014).

• A. Caprara, M. Carvalho, A. Lodi, G.J. Woeginger, “Bilevel knapsack withinterdiction constraints”, INFORMS Journal on Computing (2016).

• C. D’Ambrosio, S. Martello, M. Monaci, “Lower and upper bounds for thenon-linear generalized assignment problem”, Technical Report (2019).

• F. Della Croce, R. Scatamacchia, “A new exact approach for the BilevelKnapsack with Interdiction Constraints”, Technical Report (2019).

• S. De Negre, “Interdiction and discrete bilevel linear programming”, PhDThesis, Lehigh University (2011).

• M. Fischetti, I. Ljubic, M. Monaci, M. Sinnl, “Interdiction Games andMonotonicity with Application to Knapsack Problems”, INFORMS Journalon Computing (2019).

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 52

Page 97: Knapsack problem and variants · 2019. 5. 4. · Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 12. Robust Knapsack problem Model of Bertsimas and Sim

Literature (2/2)

• C. Lee, K. Lee, K. Park, S. Park, “Technical Note –Branch-and-Price-and-Cut Approach to the Robust Network Design ProblemWithout Flow Bifurcations”, Operations Research (2012).

• H. Kellerer, U. Pferschy, D. Pisinger, “Knapsack Problems”, Springer (2004).

• S. Martello, P. Toth, “Knapsack Problems”, John Wiley & Sons (1990).

• K. Mathur, H.M. Salkin, S. Morito, “A branch and search algorithm for aclass of nonlinear knapsack problems”, Operations Research Letters (1983).

• M. Monaci, U. Pferschy, “On the Robust Knapsack Problem”, SIAM Journalon Optimization (2013).

• M. Monaci, U. Pferschy, P. Serafini, “Exact solution of the robust knapsackproblem”, Computers & Operations Research (2013).

• A.L. Soyster, “Convex Programming with Set-Inclusive Constraints andApplications to Inexact Linear Programming”, Operations Research (1973).

• H. Ziegler, “Solving certain singly constrained convex optimization problemsin production planning”, Operations Research Letters (1982).

Michele Monaci (University of Bologna) Knapsack problems 16th ESICUP Meeting 53