• No results found

Knapsack Problems with Setups

N/A
N/A
Protected

Academic year: 2021

Share "Knapsack Problems with Setups"

Copied!
32
0
0

Loading.... (view fulltext now)

Full text

(1)

HAL Id: inria-00232782

https://hal.inria.fr/inria-00232782v2

Submitted on 27 Nov 2008

HAL is a multi-disciplinary open access

archive for the deposit and dissemination of

sci-entific research documents, whether they are

pub-lished or not. The documents may come from

teaching and research institutions in France or

abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, est

destinée au dépôt et à la diffusion de documents

scientifiques de niveau recherche, publiés ou non,

émanant des établissements d’enseignement et de

recherche français ou étrangers, des laboratoires

publics ou privés.

Knapsack Problems with Setups

Sophie Michel, Nancy Perrot, François Vanderbeck

To cite this version:

Sophie Michel, Nancy Perrot, François Vanderbeck. Knapsack Problems with Setups. European

Journal of Operational Research, Elsevier, 2009, 196, pp.909-918. �inria-00232782v2�

(2)

S. Mi hel (1), N. Perrot (2) and F. Vanderbe k (3)

(1) ISEL-LMAH,UniversitéduHavre,mi helsuniv-lehavre.fr

(2)Fran e-Télé om,divisionR&D, nan y.perrotorange-ftgroup. om

(1)InstitutdeMathématiquesdeBordeaux,UniversitéBordeaux1,fvmath.u-bordeaux1.fr

November 27, 2008

Abstra t

Knapsa k problems with setups nd their appli ation in many on rete indus-trialandnan ialproblems. Moreover,they alsoariseassubproblemsina Dantzig-Wolfe de omposition approa h to more omplex ombinatorial optimization prob-lems,wheretheyneedtobesolvedrepeatedlyandthereforee iently. Here,we on-siderthemultiple- lassintegerknapsa kproblemwithsetups. Itemsarepartitioned into lasses whose use implies a setup ost and asso iated apa ity onsumption. Item weights are assumed to be a multiple of their lass weight. The total weight of sele ted items and setups is bounded. The obje tive is to maximize the dier-en ebetween theprotsofsele teditemsandthexed ostsin urredforsetting-up lasses. Aspe ial aseis thebounded integer knapsa kproblemwith setups where ea h lassholdsasingleitemandits ontinuousversionwherea fra tionofan item an be sele ted while in urring a full setup. The paper shows theextent to whi h lassi al resultsfor the knapsa k problem an be generalized to these variants with setups. Inparti ular, an extension of thebran h-and-bound algorithm of Horowitz andSahniis developed for problemswithpositivesetup osts. Ourdire t approa h is ompared experimentallywiththe approa h proposedintheliterature onsisting in onverting the problem into a multiple hoi e knapsa k withpseudo-polynomial size.

Keywords: Knapsa k problem, xed ost, setup, variable upper bound, bran h-and-bound.

The Multiple- lass Integer Knapsa k problem with Setups (MIKS) is dened as fol-lows. The knapsa k has apa ity

W

. There are

n

item lasses, indexed by

i

= 1, . . . , n

, with asso iated setup ost,

f

i

∈ IR

, and setup apa ity onsumption,

s

i

∈ IR

+

. Ea h lass is made of itsown items

(i, j)

for

j

= 1, . . . , n

i

∈ IN

with asso iated prot

p

ij

∈ IR

(3)

and upper bound

u

ij

∈ IN

. The apa ity onsumption of item

(i, j)

is assumed to be a multiple of a lass weight,

w

i

∈ IR

+

, i.e.

w

ij

= m

ij

w

i

for some multipli ity

m

ij

∈ IN

(assuming

w

ij

≤ W

). Moreover, there are lower and upper bounds,

a

i

≤ b

i

∈ IN

, on the total multipli ity of items that may be sele ted within ea h lass. The obje tive is to maximize the sum of the prots asso iated with sele ted items minus the xed osts in urred for setting-up lasses.

Thus, model MIKStakesthe form:

max

n

X

i=1

n

i

X

j=1

p

i j

x

i j

n

X

i=1

f

i

y

i

(1)

[

MIKS

]

s.t.

n

X

i=1

((

n

i

X

j=1

m

i j

w

i

x

i j

) + s

i

y

i

) ≤ W

(2)

a

i

y

i

n

i

X

j=1

m

i j

x

i j

≤ b

i

y

i

for

i

= 1, . . . n

(3)

x

i j

≤ u

i j

y

i

for

i

= 1, . . . n

and

j

= 1, . . . , n

i

(4)

x

i j

∈ IN

for

i

= 1, . . . , n

and

j

= 1, . . . , n

i

(5)

y

i

∈ {0, 1}

for

i

= 1, . . . , n ,

(6)

where

x

ij

denotes the number of opies of item

j

that are hosen within lass

i

and

y

i

= 1

i lass

i

issetup. Themain developmentsofthe paperare madeunderrestri tive assumptions that simplify the hara terization of extreme solutions of the ontinuous relaxation. In our bran h-and-bound algorithms, we shall assume that xed osts are non-negative:

Assumption 1 (restri tive)

f

i

≥ 0

for all

i

, and that there are no lass lower bounds:

Assumption 2 (restri tive)

a

i

= 0

for all

i

.

ModelMIKS hasseveral interesting spe ial ases. In abinarymodel, denoted MBKS,

x

i j

∈ {0, 1} ∀ij

. When ea h lass holds a single item, i.e.

n

i

= 1 ∀i

, MIKS gives rise to

the integer knapsa k problemwith setups (IKS):

max

n

X

i=1

p

i

x

i

n

X

i=1

f

i

y

i

(7)

[

IKS

]

s.t.

n

X

i=1

(w

i

x

i

+ s

i

y

i

) ≤ W

(8)

a

i

y

i

≤ x

i

≤ b

i

y

i

for

i

= 1, . . . n

(9)

x

i

∈ IN

for

i

= 1, . . . , n

(10)

y

i

∈ {0, 1}

for

i

= 1, . . . , n .

(11)

(4)

Further relaxing the integrality onstraint on

x

i

gives rise to the ontinuous knapsa k problemwithsetups denoted CKS.Observethat, when

a

i

= w

i

= 0

and

b

i

= 1 ∀i

, allthe above models boil down toa standard binary knapsa k problem (f.i.,for IKS, as

w

i

= 0

, it is optimal to set

x

i

= b

i

if

p

i

≥ 0

). Hen e, these models are at least as hard as the standard binary knapsa k problem.

ModelCKSarises as asub-problemin apa itated multi-item lot sizing problemwhen settingupthema hinefortheprodu tionofanitemrequiressetuptimeand ost: on ethe demand overing onstraints are dualized the problem de omposes into a CKS problem for ea h period. Then,

w

i

,

f

i

and

s

i

are respe tively the pro essing time, the setup ost andthe setuptimeforitem

i

,

p

i

isthedieren ebetween thedual valuefor overingitem

i

demand and itsprodu tion ost,

W

is the ma hine apa ity of that period, and

[a

i

, b

i

]

denes aninterval of validprodu tionlevels for item

i

. A lower bound

a

i

on produ tion may arise due to a business rule to amortize setup or due to te hni al onstraints that translateinto aminimum bat hsize. Note that,for this appli ation, xed ost naturally satisfyAssumption 1. Goemans [4℄studiedthestru ture ofthe CKS polyhedron, derived fa etdening inequalitiesand proposed a heuristi separation pro edure.

Model IKS is en ountered as a sub-problem in solving the utting sto k problem by bran h-and-pri e [10℄. When using bran hing onstraints that enfor e integrality of the numberof uttingpatterns thatinvolveagiven item

i

,the knapsa ksubproblem mustbe modied to in lude a xed ost. Nonzero lower bounds,

a

i

, may arise in the ourse of a rounding heuristi when, in order to a hieve a feasible solution to the residual problem, one must impose a minimum produ tion level in remaining utting patterns. A spe ial ase of model IKS was studied by Sural et al. [13℄: they assume

f

i

= 0

and

w

i

= 1

for all

i

. Then, they show how to generalize the Dantzig's upper bound and they propose a primal heuristi . Both are used for setting up a depth-rst sear h bran h-and-bound algorithm. Their motivations for studying this model were appli ations in nan e and in ma hine s heduling. The assumption

w

i

= 1

is not restri tive for IKS but assuming

f

i

= 0

is restri tive. However, the Dantzig's upper bound an be generalized tothe ase

f

i

6= 0

as shown inthis paper.

Model MBKSalsoarisesasa sub-probleminabran h-and-pri eapproa htothe ut-ting sto k problem. Most fra tionalsolutions an be ut-o by boundingthe number of utting patterns that involves a spe i binary variable of the knapsa k subproblem in its 0-1 form [14℄

1

. When a bran hing onstraint is added that restri ts the number of

1

Thepri ing problem is normally aninteger knapsa k problem:

max{

P

i

p

i

x

i

:

P

i

w

i

x

i

≤ W, x

i

b

i

, x

i

∈ IN ∀i}

. Astandard0-1transformation onsistsinintrodu ing

n

i

= ⌊log

2

b

i

⌋+1

binaryitems

(i, j)

forea hintegeritem

i

with multipli ity

m

i j

= 2

j−1

for

j

= 1, . . . , n

i

− 1

and

m

i n

i

= b

i

P

n

i

−1

(5)

olumnsinvolvinga spe i binary item

(i, j)

,the itemdual pri eismodied inthe pri -ingproblem,leadingtoobje tive oe ients

p

i j

6= m

ij

p

i

. Ifone ombinessu hbran hing with that on the number of utting pattern involving a spe i item

i

, then xed osts are also nonzero, giving rise to modelMBKS. Observe that if the binary de omposition of the pri ingproblem is not done apriori but dynami ally asbran hing onstraints are introdu edonspe i binaryitems(see [16℄ fordetails),thenmodelMIKSmust beused.

The spe ial ase of model MBKS with no setups is treated in [15℄. Under the as-sumption

f

i

= s

i

= 0 ∀i

, it is shown that the LP-relaxation an be solved by a greedy algorithmin linear time, a result that extends those of Dantzig [3℄ and Balas and Zemel [1℄ for the 0-1 knapsa k problem(this result relies on the assumption that item weights are a multiple of their lass weight); exa t algorithms are derived (bran h-and-bound or dynami programs) by adapting existing algorithmsfor the 0-1knapsa k problem.

Variantsof modelMBKS are onsidered in the literature. Chajakis and Guignard[2℄ onsider a model where

m

ij

= 1 ∀ij

, lass bound onstraints are repla ed by

P

n

i

j=1

x

i j

y

i

∀i

, and the item weights are not restri ted to be a multiple of a lass weight (hen e, the result of [15℄ on erning a polynomialgreedy solution of the LP relaxation does not extend to the modelof [2℄). The appli ation that motivated their study is the s hedul-ing of parallel unrelated ma hines with setups where this knapsa k problem arises as a subproblem. They propose and test two approa hes: either a dynami programming solver or a two-stage approa h. In the latter, the problem is transformed into a stan-dard multiple hoi e 0-1 knapsa k problem and solved either by dynami programming or bran h-and-bound. The transformation onsists in dening a pseudo-item for ea h dominant feasible solutionswithin a lass. These dominant solutions are the states of a dynami programforsolvingthebinaryknapsa kproblemdenedonasingle lass. There is a pseudo-polynomial numberof them. They found that, for orrelated instan es with small knapsa k apa ity (they assume integer data and onsider

W

≤ 500

), the dire t dynami programming approa h is the most e ient. When the number of families or the knapsa k apa ity in reases, the two-stageapproa h using bran h-and-bound for the se ond stage isthe most e ient.

The variant of model MBKS that is onsidered by Jans and Degraeve [5℄ is simpler. They also assume

m

ij

= 1 ∀ij

and

w

ij

6= m

ij

w

i

, but their model has

b

i

= 1 ∀i

. This However, this transformation introdu es multiple 0-1 representation of a given integer solution. The alternative0-1de ompositionproposedin[15℄istoset

m

i n

i

= 2

n

i

. Then,oneneedstointrodu eexpli it lassupperbounds:

P

n

i

j

=1

m

i j

x

i j

≤ b

i

∀i

. Itguaranteesauniquerepresentationofea hintegersolution. Thisisessentialtoavoidtheenumerationofsymmetri solutions. Anumeri al omparisonof bran h-and-boundapproa hesbasedonthestandard0-1transformationversusthemultiple lassmodelispresented in[15℄;itshowsthein reasebran h-and-boundtreesize thatmayresultfromignoring thissymmetry.

(6)

It takes the form

max{

X

i

(

X

j

p

ij

x

ij

− f

i

y

i

) :

X

i

(

X

j

w

ij

x

ij

+ s

i

y

i

) ≤ W,

X

j

x

ij

≤ y

i

∀i, x

ij

, y

i

∈ {0, 1}}

where setting

x

ij

= 1

amounts to produ ing item

i

so as to over demands from the urrent period

t

up to

t

+ j − 1

. Moreover, their appli ation assumes positive xed ost

f

i

≥ 0

. In this spe ial ase, feasible solutions verify

x

ij

= x

ij

y

i

. Therefore, their model

redu es to a standard multiple hoi e knapsa k problem

max{

X

ij

˜

p

ij

z

ij

:

X

ij

˜

w

ij

z

ij

≤ W,

X

j

z

ij

≤ 1 ∀i, z

ij

∈ {0, 1}} ;

where

z

ij

= x

ij

y

i

,

p

˜

ij

= p

ij

− f

i

, and

w

˜

ij

= w

ij

+ s

i

. Jans and Degraeve [5℄ developed their own bran h-and-bound algorithmfor it.

The present paper proposes ananalysis of models CKS and MBKS. Their extensions tomodelsIKSandMIKSare alsodis ussed. The aimistoshowthe extenttowhi h las-si alapproa hfortheknapsa kproblem,su hasthedepth-rst-sear hbran h-and-bound algorithm of Horowitz and Sahni or dynami programs (see [8℄ pages 30-31 or [9℄ pages 455-456) an be generalized to variants with setups. In parti ular, we show that under assumptions slightly less restri tive than Assumptions 1 and 2, the LP solutionto these problems an beobtainedinpolynomialtime byagreedypro edure. Thekeytothese re-sults are reformulationas ontinuous knapsa k problems with multiple hoi e onstraints [6℄or lassbounds[15℄. Theformulationare polynomialinsizewhilepreviouslyproposed reformulations su h as that of [2℄ are pseudo-polynomial. However, our reformulations are onlyvalid for the LP-relaxation: their integer ounterparts are not equivalent to our models. Therefore, the greedy LP solverdoesnot immediatelygive rise to extensions of standard bran h-and-bound pro edures. The other main ontribution of the paper is a spe i enumeration s heme for bran h-and-bound for CKS and MBKS that exploit the property of optimal solutions and the greedy ordering of the LP bound. The resulting bran h-and-bound algorithmsare tested and ompared to existing approa hes.

Dynami programming re ursion an also be derived for these knapsa k models with setups. They are straightforward extensionof resultsforthe standard knapsa k problem. We present them for the sake of establishing the omplexity of the various models. Of ourse,theimprovementsofthe basi te hniquesforknapsa kproblems: lineartime om-putation of upper bound [1℄, improved variants of Dantzig's bounds, improved dynami re ursion (f.i. using bounds to eliminate intermediate states, exploiting the ore, or so- alled balan ed enumeration), more sophisti ated bran h-and-bound (f.i. making use of dominan erules)andhybridmethods[12℄ ouldalsobereviewed forthe ase ofproblems

(7)

te hniques toget apoint a ross: todemonstrate thatknapsa k problems withsetups are not mu h harder than standard knapsa k problems.

1 The ontinuous knapsa k problem with setups

In modelCKS, the item sele tionvariables,

x

, are allowed to take ontinuous values. Hen e, the formulationis:

max {

n

X

i=1

(p

i

x

i

n

X

i=1

f

i

y

i

) :

n

X

i=1

(w

i

x

i

+ s

i

y

i

) ≤ W ,

a

i

y

i

≤ x

i

≤ b

i

y

i

∀i ,

x

i

≥ 0 ∀i ,

y

i

∈ {0, 1} ∀i .}

(12)

Here, bounds

a

i

and

b

i

are not ne essarily integer, i.e.

a

i

and

b

i

∈ IR

+

,

∀i

. Assumption 2 an be made withoutlossof generality. Indeed, if

a

i

>

0

forsome

i

, one an transform the problem asfollows: let

a

i

= 0

,

b

i

= b

i

− a

i

,

s

i

= s

i

+ w

i

a

i

,

f

i

= f

i

− a

i

p

i

; its solution

(x

i

, y

i

)

translates intoa solutionfor the originalproblemas follows:

x

i

= (a

i

+ x

i

) y

i

and

y

i

= y

i

. Moreover, we an assume

Assumption 3 (without loss of generality)

p

i

≥ 0

for all

i

.

Indeed, if

p

i

<

0

for some

i

,

x

i

= 0

inany optimalsolution. Also, we have Assumption 4 (without loss of generality)

f

i

≤ 0

for all

i

.

Indeed, if

f

i

≥ p

i

b

i

for some

i

, it is optimal toset

x

i

= y

i

= 0

and onsider the problem that remains on the other variables. While, if

0 < f

i

< p

i

b

i

for some

i

, then, in any optimal solution, either

x

i

= y

i

= 0

or

x

i

f

i

p

i

, be ause a solution where

0 < x

i

<

f

i

p

i

an be improved by setting

x

i

= y

i

= 0

. Thus,

f

i

p

i

an be interpreted as a lower bound,

a

i

, whi h an be eliminated asexplained above by re-setting

b

i

= b

i

f

p

i

i

,

s

i

= s

i

+ w

i

f

p

i

i

,

f

i

= f

i

f

p

i

i

p

i

= 0

. Finally,one an also assume

Assumption 5 (without loss of generality)

w

i

= 1

for all

i

. Otherwise, one an make a hange of variables

x

i

= w

i

x

i

and redene the asso iated oe ients:

p

i

=

p

i

w

i

,

b

i

= w

i

b

i

.

UnderAssumption 5,problemCKS anbereformulatedasamultiple hoi eknapsa k problem. When data are integer, i.e., when

a

i

, b

i

, s

i

∈ IN ∀i

and

W

∈ IN

, observe that the ontinuousvariables

x

takeintegervalue inany feasibleextremesolutions. Therefore, within ea h lass, one an optimize the use level

x

by enumeration. Hen e, the problem an be reformulatedas a multiple hoi e knapsa k problem:

max{

X

i

b

i

X

x=a

i

(p

i

x

− f

i

) λ

i

x

:

X

i

b

i

X

x=a

i

(w

i

x

+ s

i

) λ

i

x

≤ W,

b

i

X

x=a

i

λ

i

x

≤ 1 ∀i, λ

i

x

∈ {0, 1} ∀i, x} ,

(13)

(8)

where

λ

i

x

= 1

i

x

i

= x

. This formulation has pseudo-polynomial size but it leads to a possiblesolutionapproa husingasolverforthemultiple hoi e knapsa kproblem,whi h we shall use in numeri al omparison toour algorithm.

In the rest ofthis se tion,we makeAssumptions 2to4withoutlossof generality,but we arry

w

i

in the notation for the sake of extending the results to modelMBKS where Assumption 5 is not made. Similarly,when Assumption 1 is made,

f

i

= 0 ∀i

(as implied by Assumption 4) but we keep

f

i

in the formulation. Thus, our model is given by (12) where

a

i

= 0

,

p

i

≥ 0

and

f

i

≤ 0

.

1.1 Chara terizations of optimal solutions

Some properties of optimal solutions are used to develop bounding pro edure or dy-nami programs. Toanalysethe stru tureof extremesolutions,notethatif onexes

y

to

˜

y

∈ {0, 1}

n

,the problem redu es toa ontinuous knapsa k problemthatadmits agreedy solution.

Observation 1 (Dantzig, [3℄) Let

I

= {i : ˜

y

i

= 1}

and

W

˜

= W −

P

i∈I

s

i

. The resulting problem in the

x

variables is:

[

CKP(

y

˜

)

] ≡ max{

X

i∈I

p

i

x

i

:

X

i∈I

w

i

x

i

≤ ˜

W ,

0 ≤ x

i

≤ b

i

∀i ∈ I}

(14)

An optimal solution is obtained as follows. Assume an indexing of the items in

I

su h that

p

1

w

1

p

2

w

2

≥ . . . ≥

p

|I|

w

|I|

.

Let

c

be the index for whi h

P

i<c

b

i

w

i

< ˜

W

but

P

i≤c

b

i

w

i

≥ ˜

W

. Then, set

x

i

= b

i

for

i < c,

(15)

x

c

=

˜

W

P

i<c

w

i

b

i

w

c

,

(16)

x

i

= 0

otherwise. (17)

This standard observation yieldstothe on lusion that

x

i

∈ {0, b

i

}

for all

i

but one. The same observation was made in [13℄ for the ase

f

i

= 0 ∀i

. Moreover, in that ase, [13℄ adds that the item with

0 < x

i

< b

i

, if any, has the smallest ratio

p

i

w

i

of non zero items. Thispropertygeneralizestriviallytoour ase. Letusexpli itlystatethis hara terization of extreme solutionsto CKS foreasy referen e.

(9)

Observation 2 An optimal solution exists toproblem CKS where, forea h

i

, one of the following ase arises

(i)

y

i

= 1

and

x

i

= b

i

(ii)

y

i

= 1

and

0 < x

i

< b

i

(iii)

y

i

= x

i

= 0

(iv)

y

i

= 1

and

x

i

= 0

Furthermore, ase

(ii)

anonly be assumed byone of the itemswhi h is alled the riti al item. Case

(iv)

anonly arise if

f

i

<

0

. Moreover,the level of the riti al item,

c

, if any, is set so as to ll the remaining apa ity of the knapsa k. It is omputed as

x

c

=

(W −W )

w

c

where

W

=

X

k∈I

(w

k

b

k

+ s

k

) + s

c

+

X

k∈J

s

k

for some sets

I

⊆ {k :

p

k

w

k

p

c

w

c

}

and

J

⊆ {k : f

k

<

0

and

p

c

w

c

p

k

w

k

}

.

Indeed, if

y

i

= 1

and

x

i

= 0

but

f

i

= 0

,

y

i

an feasibly be set tozero withoutde reasing the prot. The rest of the observation results fromthe followingpro edure. Let

(x

, y

)

be an optimal solution to problem CKS. Let us x the

y

variables to their optimal

0

-

1

values

y

. From observation 1, we derive an asso iated solution

x

dened by (15-17). Solution

(x

, y

)

is optimum and has the above form.

The ontinuousrelaxationofmodelCKSisgivenby(12) where

y

i

∈ {0, 1}

isrepla ed by

y

i

∈ [0, 1] ∀i

. Then,the valueofthe lass

i

solutionintheLPsolution anbeanything in the onvex hull of extreme solutions

(i)

,

(iii)

and

(iv)

of Observation 2 (note that ase

(ii)

is inthis onvex hull). For instan e, one an generate any prot between

0

and

p

i

b

i

− f

i

bysetting

y

i

=

x

i

b

i

and letting

x

i

varybetween

0

and

b

i

. The asso iated apa ity onsumptionis

(w

i

+

s

i

b

i

) x

i

. Similarly,if

f

i

<

0

, any pair of

(p, w) = (−y

i

f

i

, y

i

s

i

)

an be a hieved by setting

x

i

= 0

and varying

y

i

∈ [0, 1]

. Therefore, the ontinuousrelaxationof CKS an be reformulatedas follows:

max

n

X

i=1

((p

i

b

i

− f

i

)z

i

b

− f

i

z

i

f

)

(18)

n

X

i=1

((w

i

b

i

+ s

i

) z

i

b

+ s

i

z

f

i

) ≤ W

(19)

z

b

i

+ z

i

f

≤ 1

for

i

= 1, . . . , n

(20)

z

i

b

∈ [0, 1]

for

i

= 1, . . . , n

(21)

z

i

f

∈ [0, 1]

for

i

= 1, . . . , n

(22) When

z

f

i

= 0

, letting

z

b

i

varyfrom0 to1allows toa hieveany ontinuous solutioninthe

onvex hull of extreme solutions

(i)

and

(iii)

of Observation 2. Inversely, setting

z

b

i

= 0

and letting

z

f

i

vary from 0 to 1 allows to a hieve any ontinuous solution in the onvex

hull of extremesolutions

(iii)

and

(iv)

. While, setting

z

f

(10)

ontinuoussolutionsof type

(ii)

inthe onvexhullof extremesolutions

(i)

and

(iv)

. Any other solution for lass

i

has a prot to apa ity onsumption ratio that is worse than those that we onsidered. The mapping from a solution

z

of (18-22) to a solution

(x, y)

for the LP relaxationof CKS is given by

x

i

= b

i

z

b

i

and

y

i

= z

b

i

+ z

f

i

.

Thus, we have shown that

Proposition 1 The LP relaxation of CKS is equivalent to the ontinuous relaxation of binary knapsa k problem with multiple hoi e onstraints (18-22).

Thelatterisknowntoadmitagreedysolution[6℄. Hen e,thisresultextendstoourmodel with setups. Moreover, one an hara terized the onditions under-whi h ontinuous solutionswith

z

f

i

>

0

are dominated: Observation 3 If

p

i

b

i

−f

i

w

i

b

i

+s

i

−f

i

s

i

,thereexistsanoptimalsolutionto(18-22)where

z

f

i

= 0

.

Note that Assumption 1 implies

p

i

b

i

−f

i

w

i

b

i

+s

i

−f

i

s

i

∀i

. Let us write the greedy LP solution. Under the assumption of Observation 3, the spe ial ordered set (SOS) onstraints (20) are redundant and (18-22)redu es toa standard binary knapsa k LP relaxation:

Observation 4 If

p

i

b

i

−f

i

w

i

b

i

+s

i

−f

i

s

i

∀i

, an optimal solution to the LP relaxation of problem CKS is given by indexingthe items in order that

(p

1

b

1

− f

1

)

(w

1

b

1

+ s

1

)

(p

2

b

2

− f

2

)

(w

2

b

2

+ s

2

)

≥ . . . ≥

(p

n

b

n

− f

n

)

(w

n

b

n

+ s

n

)

.

(23) and setting

x

i

= b

i

and

y

i

= 1

for

i < c,

x

c

=

W

P

i<c

(w

i

b

i

+ s

i

)

(w

c

+

s

b

c

c

)

and

y

c

=

x

c

b

c

,

x

i

= 0

and

y

i

= 0

for

i > c ,

where

c

is the index in the sorted item order su h that

X

i<c

(w

i

b

i

+ s

i

) < W

but

X

i≤c

(w

i

b

i

+ s

i

) ≥ W .

ThisobservationmerelytranslatesthegreedyLPsolutionof(18-22)inthe

(x, y)

variables (when

z

f

i

= 0 ∀i

).

Now onsider the integer version of formulation(18-22) where

z

b

i

, z

f

i

∈ {0, 1} ∀i

. It is importanttonote that, althoughmodelCKS and formulation(18-22) have the same LP solution,theinteger version of(18-22)isnotequivalenttomodelCKS.Indeed, asolution where ase

(ii)

of Observation 2 is optimal for some item

i

annot be represented as an integer solutionin the

z

-formulation.

(11)

The standard Bran h-and-Bound algorithm of Horowitz and Sahni for the 0-1 knap-sa k problem[9℄isa spe ializeddepth-rst-sear h bran h-and-bound wherevariablesare xed in an order that is greedy for both primal and dual bounding pro edure. Hen e, the rst leaf node to be explored when plunging depth into the tree orresponds to a greedy primal solution while ba ktra king leads to exploring progressively more distant neighborsof thisgreedy solution. Thedual boundsneednot bere omputedafterxing a variable toone: theirvalue dierfrom thatof the parent node onlyfor the bran hwhere we part fromthe greedy ordering, i.e., when avariableis xed to zero.

The extension to model CKS is not trivial. Indeed, the pro edure requires that the same greedy approa h solves both LP and IP problems. We have su h greedy approa h for the

z

-formulation but not for the

(x, y)

-formulation. As mentioned above, both for-mulation are not equivalent in IP term. This di ulty an be over ome by impli itly dealing with both the

z

-formulation (for dual de isions) and the

(x, y)

-formulation (for primalde isions). Toillustratehow, weexpli itlyprovideabran h-and-bound pro edure under Assumption 1 whi h simpliesthe problem.

We use the greedy ordering (23) that was dened for the

z

variables. But, the xing of

z

variables has a dierent interpretation for dual and primal bounds. The primal so-lution

(x, y)

asso iated with a dual solution

z

is obtained by rounding-up the fra tional setup in luded in

z

(whi h yields a setup solution

y

˜

) and by setting

x

to the value of the optimal solutionof CKP(

y

˜

)dened in Observation 1. This ensures that the solution we build obeys the hara terization of Observation 2. The so alled forward moves are sequen es of bran hes where a

z

i

variable is xed to 1. Forward moves are interspersed withxing-to-zerobran heswherea

z

i

variableissettozerowhi hweinterpretasxing the asso iated

x

i

to zero for the primal bound. Primal and dual bounds are evaluated afterea h xing-to-zero bran hing.

The bran h-and-bound sear h is organized as follows: Items are onsidered in the order (23). For ea hitem

i

, three ases are onsidered:

(a) z

i

= 1

(whi h,for the primal bound, orresponds to setting

x

i

= b

i

and

y

i

= 1

),

(b) y

i

= 1

, and

x

is free,

(c) z

i

= 0

. However, Observation 2tells usthat ase

(b)

needs only be onsideredif the knapsa k is lled atfull apa ity. Hen e, we an managewitha binary tree whereonly twobran hes are dened forea h item: the rst bran h tobeexplored orresponds toaggregated ase

(a)

or

(b)

, while the se ond bran h orresponds to ase

(c)

. When ase

(a)

is feasible

given the residual apa ity, the rst bran h is interpreted as ase

(a)

as it dominates ase

(b)

. But when bran hing on ase

(a)

is infeasible due to la k of apa ity, all the previousleftbran hes areinterpretedas ase

(b)

. Inthe lattersituation,wehaverea hed

(12)

CKP

(y)

issolveda ordingtoObservation1. Anothertypeofleafnode( alledBtype)

arises when there are nomore items to onsider. In the latter ase,as the bran h

z

n

= 1

has been explored, the bran h

z

n

= 0

does not need to be explored as it is dominated. This algorithmispresented inTable 1(inapseudo-language wherewe makeuse of some C++ notations). In our notations,

IN C

is the value of the in umbent solution,

Z

is the value of the urrent partial solution,

U

is the urrent dual bound,

C

is the urrent residual apa ity and

v

is the return value of the routine solving

CKP

(y)

. The greedy heuristi for the primal problem used in this bran h-and-bound pro edure an be used independently. It is given in Table 2.

Table 1: Bran h-and-Bound algorithmfor CKS under Assumption 1

Initialization: Sort items a ording to (23).

Let

IN C

= Z = 0

;

C

= W

;

x

= y = 0

;

i

= 1

. Compute UB: Let

U

= Z

;

K

= C

;

l

= i

;

while

(l ≤ n)

and

(K ≥ w

l

b

l

+ s

l

)

, do{

U

+= (p

l

b

l

− f

l

)

;

K−= (w

l

b

l

+ s

l

)

;

l

= l + 1

. } If

(l ≤ n)

,

U

+= (p

l

b

l

− f

l

)

K

(w

l

b

l

+s

l

)

.

Test Pruning: if

(U ≤ INC)

,goto Ba ktra king. Forward Move: While

(i ≤ n)

and

(w

i

b

i

+ s

i

≤ C)

, do{

Z

+= (p

i

b

i

− f

i

)

;

C−= (w

i

b

i

+ s

i

)

;

x

i

= b

i

;

y

i

= 1

;

i

= i + 1

.}

Type A Leaf Node: If

(i ≤ n)

/*and

(w

i

b

i

+ s

i

> C

)

*/,do { If

(s

i

< C)

, {let

y

i

= 1; v = CKP (y)

;

˜

x

=

argmax

{CKP (y)}

;if

(v > INC)

,

IN C

= v

, re ord

x, y)

;}

Let

x

i

= y

i

= 0

;

i

= i + 1

; /*Zero Setting */and go toCompute UB. } Type B LeafNode: Else/*

(i = n + 1)

*/,do {

If

(Z > INC)

, {

IN C

= Z

;re ord

(x, y)

;} Let

i

= i − 1

;

If

(y

i

== 1)

, {

Z

−= (p

i

b

i

− f

i

)

;

C+= (w

i

b

i

+ s

i

)

;

x

i

= y

i

= 0

.}} Ba ktra king: Do

(i = i − 1)

while

(y

i

== 0)

and

(i ≥ 1)

.

If

(i == 0)

, STOP.

Z

−= (p

i

b

i

− f

i

)

;

C+= (w

i

b

i

+ s

i

)

;

x

i

= y

i

= 0

;

i

= i + 1

/* Zero Setting*/.

(13)

Step A: Sort items a ording to(23). Let

C

= W

;

x

= y = 0

; in umbent = 0;

i

= 1

. Step B: While

(C > w

i

b

i

+ s

i

)

and

(i ≤ n)

, do {

x

i

= b

i

;

y

i

= 1

;

C−= (w

i

b

i

+ s

i

)

;

i

++

.} Step C: If

(i > n)

, { re ordsolution

(x, y)

; update the in umbent;and STOP.}

Step D: Let

y

i

= 1

; solve

CKP

(y)

a ording toObservation 1 and update the in umbent. Step E: Let

y

i

= 0

;

i

= i + 1

; and goto Step B.

1.3 Dynami programming re ursion for the CKS problem

Here, we assume integer data:

s

i

,

w

i

, and

W

∈ IN

. To solve problem CKS, one an implementadynami programmingre ursionthat omputesthebest solutionofthe form des ribed inObservation 2. Letthe item indexing be su h that

p

1

w

1

p

2

w

2

≥ . . . ≥

p

n

w

n

.

Let

V

k

(C)

be the best value that an be a umulated using items

1

up to

k

at level

x

k

∈ {0, b

k

}

and using a apa ity

C

. Setting

V

0

(C) = 0

for all

0 ≤ C ≤ W

, the values

V

k

(C)

an be omputed re ursively:

V

k

(C) = max{V

k−1

(C)

|

{z

}

x

k

=y

k

=0

, V

k−1

(C − w

k

b

k

− s

k

) + p

k

b

k

− f

k

|

{z

}

x

k

=b

k

, y

k

=1

}

for all

0 ≤ C ≤ W

and

k

= 1, . . . , n

. This requires

O(nW )

operations. Let

U

k

(C)

be the best valuethat an be a umulatedusing items

n

down to

k

atlevel

x

k

= 0

but with

y

k

∈ {0, 1}

and using a apa ity

C

. Setting

U

n+1

(C) = 0

for all

0 ≤ C ≤ W

, the values

U

k

(C)

an be omputed re ursively:

U

k

(C) = max{U

k+1

(C)

|

{z

}

y

k

=0

, U

k+1

(C − s

k

) − f

k

|

{z

}

x

k

=0, y

k

=1

}

forall

0 ≤ C ≤ W

and

k

= n, . . . , 1

. Thisrequires another

O(nW )

operations. Then,the optimalsolution value for CKS an be obtained as

max{V

n

(W ), U

1

(W ),

max

1≤k≤n

{

C

1

,C

2

:W −b

k

w

max

k

<C

1

+C

2

+s

k

<W

{ V

k−1

(C

1

)+(W −C

1

−C

2

−s

k

)

p

k

w

k

−f

k

+U

k+1

(C

2

)}} } .

These latter omputations requireanother

O(nW

2

)

operations. The asso iated

(x, y)

so-lution iseasy to obtain.

Under Assumption 1,

U

k

(C) = 0

for all

k, C

and theabove maximizationin

C

2

isnot needed. Then, the omplexity is

O(n W )

. When the upper bounds

b

i

are not tight, i.e.

(14)

b

i

W

w

−s

i

i

forall

i

, noitems

k

an betaken atlevel

x

k

= b

k

, hen e

V

k

(C) = 0

for all

k, C

and the above maximization in

C

1

is not needed. Then, the omplexity is also

O

(n W )

. When Assumption 1 holds and items are unbounded, solving the problem requires

O(n)

(without sorting the items, one just needs to enumerate on whi h should be the riti al item).

For the general ase where some

f

i

may be negative, another dynami programming re ursion an be dened whose omplexity is

O(n

2

W

)

and doesnot require tosort items beforehand: Let

T

k,i

(C)

be the best value that an be a umulated with items

1

up to

k

, with

x

k

∈ {0, b

k

}

when

y

k

= 1

, while not using

i

(

y

i

= 0

) and using a apa ity

C

∈ {0, . . . , W }

:

T

k,i

(C) = max{T

k−1,i

(C)

|

{z

}

x

k

=y

k

=0

, T

k−1,i

(C − s

k

) − f

k

|

{z

}

x

k

=0,y

k

=1

, T

k−1,i

(C − w

k

b

k

− s

k

) + p

k

b

k

− f

k

|

{z

}

x

k

=b

k

, y

k

=1

}

(24) if

k

6= i

,or

T

k,i

(C) = T

k−1,i

(C)

if

k

= i

. Then,theoptimalsolutionvalue anbeobtained as

max

1≤i≤n

max

C

{T

n,i

(C)

|

{z

}

x

i

=y

i

=0

, T

n,i

(C) + min{

(W − C − s

i

)

+

w

i

, b

i

}p

i

− f

i

δ(W − C − s

i

>

0)

|

{z

}

0≤x

i

≤b

i

, y

i

=δ(W −C−s

i

>0)

,

(25)

T

n,i

(C) − f

i

δ(W − C − s

i

≥ 0)

|

{z

}

x

i

=0,y

i

=δ(W −C−s

i

≥0)

} .

(26)

where

δ(∗) = 1

if

(∗) = true

and

(∗)

+

= max{0, ∗}

. Some omputations an besaved by observing that

T

k,i

(C) = T

k,i+1

(C)

for

k < i

, but this remark does not hange the worst ase omplexity.

2 The multiple- lass binary knapsa k with setups

Model MBKS is dened by setting item bounds

u

ij

to 1 and restri ting

x

i j

to be binary,i.e., the modeltakes the form:

max{

n

X

i=1

(

n

i

X

j=1

p

i j

x

i j

n

X

i=1

f

i

y

i

) :

n

X

i=1

((

n

i

X

j=1

m

i j

w

i

x

i j

)+s

i

y

i

) ≤ W, a

i

y

i

n

i

X

j=1

m

i j

x

i j

≤ b

i

y

i

∀i,

x

ij

≤ y

i

∀i, j , x

ij

∈ {0, 1} ∀i, j , y

i

∈ {0, 1} ∀i .}

(27)

Here, Assumption 2isrestri tive: indeed,if

a

i

>

0

there isaknapsa k sub-problemtobe solved to de ide whi h items

(i, j)

within lass

i

should be sele ted to satisfy this lower bound. Alsonote that we annotassumepositiveprot

p

i j

. An item

(i, j)

with negative prot

p

ij

<

0

might be worth sele tingto satisfy the lowerbound

a

i

. However, if

a

i

= 0

, one an makenon restri tiveassumptions:

(15)

Assumption 6 (without loss of generality) Under Assumption 2,

p

ij

≥ 0

for all

j

. Otherwise,

x

ij

= 0

inany optimalsolution. Similarly,Assumption 4takesaweakerform: Assumption 7 (withoutlossofgenerality)UnderAssumption2,

f

i

<

max{

P

j

p

ij

x

ij

:

P

j

m

ij

x

ij

≤ b

i

, x

ij

∈ {0, 1} ∀j}

.

Otherwise, if the set-up ost is larger than the maximum prot that an be generated with the lass

i

items, it is optimal to set

x

ij

= 0 ∀j

and

y

i

= 0

. Finally, eliminating rational lassweights

w

i

asinAssumption5isfeasible(by setting

m

ij

= m

ij

w

i

,

a

i

= a

i

w

i

,

b

i

= b

i

w

i

and multiplying by a onstant su iently large to take this number integer);

but it isnot re ommended asit introdu es large numbers in knapsa k onstraints(3).

MBKS an be reformulated as a multiple hoi e knapsa k, in the line of the work of Chajakis and Guignard [2℄. Sin e we assumed that all items have a weight that is a multiple of the lass weight, the apa ity onsumption of a lass

i

, i.e.,

w

i

(

P

j

m

ij

x

ij

)

, is the same for all solutions

(x

ij

)

j=1,···,n

i

that yield the same total multipli ity

M

i

:=

P

j

m

ij

x

ij

. As a result, the optimization within ea h lass an be done independently of the global optimization of the use of the knapsa k apa ity

W

. Thus, for ea h lass, one an theoreti ally enumerate all pairs

(M

i

:=

P

j

m

ij

x

ij

, P

i

:=

P

j

p

ij

x

ij

)

that an be a hieved by

0

-

1

solutions

x

ij

. Note that one only needs to onsider undominated pairs

(M

i

, P

i

)

: a pair

(M

i

, P

i

)

is dominated if another lass

i

solutiona hieves aprot at least as large with a smallermultipli ity ora greaterprot for the same multipli ity. To ompute all undominatedpairs, one needs to solve an all- apa ities knapsa k problem for ea h lass

i

(a dynami programis well suited for this), i.e. for ea h

M

= a

i

, . . . , b

i

, we ompute:

P

i

(M) = max{

X

j

p

ij

x

ij

:

X

j

m

ij

x

ij

= M, x

ij

∈ {0, 1} ∀j}

(28)

Then, the multiple hoi e knapsa k reformulation of MBKS isgiven by:

max{

X

i

b

i

X

M

=a

i

(P

i

(M) − f

i

i

M

:

X

i

b

i

X

M=a

i

(M w

i

+ s

i

) λ

i

M

≤ W,

b

i

X

M

=a

i

λ

i

M

≤ 1 ∀i, λ

i

M

∈ {0, 1}∀i, M}

(29)

Thisreformulationinvolvesapseudo-polynomialnumberofvariables. AsforCKS,weuse this multi- hoi e knapsa k reformulation approa hto ben hmark our numeri alresults.

2.1 Chara terizations of optimal solutions

Inanalyzingthe stru tureofoptimalsolutions,rstnotethatanoptimalsolutionmay have

y

i

= 1

while the

x

ij

's are set to the minimum value that allows to satisfy the lass lower bound

a

i

. However, this isnot the ase when

a

i

= 0

and

f

i

≥ 0

.

(16)

Observation 5 Under Assumptions1 and 2, there existsan optimalsolution where

y

i

=

0

when

P

j

x

ij

= 0

.

The hara terisation of LPsolution toMBKSalsorelies onade omposition peritem lass:

Observation 6 Consider solutions to the LP relaxation of MBKS. Their proje tion in the subspa e

(x

i

=

P

j

m

ij

x

ij

, y

i

)

asso iated with lass

i

are onvex ombinations of the followingextreme points:

(i)

x

i

= 0 (

i.e.

x

ij

= 0 ∀j)

and

y

i

= 0 ,

(ii)

x

i

=

P

j

m

ij

x

ij

= a

i

and

y

i

= 1 ,

(iii) x

i

=

P

j

m

ij

x

ij

= b

i

and

y

i

= 1 .

If theprotper unit of knapsa k apa ityof extremesolution

(ii)

is lessthanthatof

(iii)

, i.e., if

P

i

LP

(a

i

) − f

i

w

i

a

i

+ s

i

P

LP

i

(b

i

) − f

i

w

i

b

i

+ s

i

(30) where

P

LP

i

(M)

is the solution to the LP relaxation of (28), then one only needs to on-sider solutions that are onvex ombination of ases

(i)

and

(iii)

. The reverse ase, i.e.

P

LP

i

(a

i

)−f

i

w

i

a

i

+s

i

>

P

LP

i

(b

i

)−f

i

w

i

b

i

+s

i

, an only arise if

a

i

>

0

or

f

i

<

0

.

This observation results fromthe analysis of extreme solutions for the single lass knap-sa kproblemsdeneby onstraints(3). Figure1illustratesboththe asewherethe slope

P

i

LP

(a

i

)−f

i

w

i

a

i

+s

i

>

P

i

LP

(b

i

)−f

i

w

i

b

i

+s

i

and vi eversa.

PSfrag repla ements

P

LP

i

(a

i

)−f

i

w

i

a

i

+s

i

P

LP

i

(b

i

)−f

i

w

i

b

i

+s

i

a

i

b

i

x

i

0

PSfrag repla ements

P

LP

i

(a

i

)−f

i

w

i

a

i

+s

i

P

LP

i

(b

i

)−f

i

w

i

b

i

+s

i

a

i

b

i

x

i

0

(a)

(b)

Figure1: Ratio of lass

i

prot perunit of knapsa k apa ity onsumption

Similarly to what we did for model CKS, we an derive from Observation 6 a

z

-re-formulation of the LP relaxation of MBKS. In the ontinuous relaxationof MBKS, item

(i, j)

an yielda prot perunit equal to

either

p

ij

m

a

ij

i

− f

i

w

i

a

i

+ s

i

or

p

ij

m

b

i

ij

− f

i

w

i

b

i

+ s

i

(17)

eort of targeting extreme solution

(ii)

or

(iii)

of Observation 6 or their ombination. Case

(ii)

an be split in two sub- ases, either

a

i

>

0

or

f

i

<

0

. Let

I

a

= {i : a

i

>

0}

and

I

f

= {i : a

i

= 0

and

f

i

<

0}

. Thus,

I

a

∩ I

f

= ∅

. For

i

∈ I

f

, the extreme solution

(ii)

takes the form

(x

i

= 0, y

i

= 1)

. Hen e, we introdu e variable

z

f

i

∈ [0, 1]

su h that

z

i

f

= 1

represents solution

(x

i

= 0, y

i

= 1)

. Similarly, for

i

∈ I

a

, we dene a variable

z

a

ij

for ea h item

(i, j)

of lass

i

, su h as

z

a

ij

= 1

if item

(i, j)

ontributes infull to targeting extreme solution

(ii)

. Symmetri ally,variables

z

b

ij

are dened for

i

∈ I = {1, . . . , n}

and asso iatedwithextremesolutions

(iii)

. Withthesenotations,theLPrelaxationofMBKS an be reformulatedas

max

X

i∈I

a

n

i

X

j=1

(p

ij

f

i

a

i

m

ij

) z

i j

a

+

X

i∈I

n

i

X

j=1

(p

ij

f

i

b

i

m

ij

) z

i j

b

X

i∈I

f

f

i

z

f

i

(31) s.t.

X

i∈I

a

n

i

X

j=1

(w

i

+

s

i

a

i

) m

i j

z

a

i j

+

X

i∈I

n

i

X

j=1

(w

i

+

s

i

b

i

) m

i j

z

i j

b

+

X

i∈I

f

s

i

z

f

i

≤ W

(32)

n

i

X

j=1

[

m

i j

a

i

z

i j

a

+

m

i j

b

i

z

b

i j

] ≤ 1

∀i ∈ I

a

(33)

n

i

X

j=1

m

i j

b

i

z

i j

b

+ z

f

i

≤ 1

∀i ∈ I

f

(34)

z

i j

a

+ z

b

i j

≤ 1

∀i ∈ I

a

, j

z

a

i j

∈ [0, 1] ∀i ∈ I

a

, j

z

b

i j

∈ [0, 1] ∀i ∈ I, j

z

f

i

∈ [0, 1] ∀i ∈ I

f

(35)

A solution

z

translates intoa solutionfor the LP relaxationof MBKS as follows:

x

ij

= z

ij

a

+ z

b

ij

and

y

i

=

X

j

(

m

i j

a

i

z

i j

a

+

m

i j

b

i

z

i j

b

) + z

f

i

(36)

Constraints (33-34) are required to enfor e

y

i

∈ [0, 1]

. Observe that onstraints (3) are built in the denition of the hange of variables. Indeed, if we repla e

x

and

y

by their expression in

z

in(3), inthe ase

a

i

>

0

, we obtain:

a

i

X

j

(z

a

ij

m

ij

a

i

+ z

b

ij

m

ij

b

i

) ≤

X

j

m

ij

(z

a

ij

+ z

b

ij

) ≤ b

i

X

j

(z

a

ij

m

ij

a

i

+ z

b

ij

m

ij

b

i

)

whi h is always satised be ause

a

i

b

i

≤ 1

in the left-hand-side and

b

i

a

i

≥ 1

in the right-hand-side. In the ase

a

i

= 0

, (3) is triviallyveried. Hen e, we have shown that

Proposition 2 TheLP relaxationof MBKS is equivalent tothe ontinuousrelaxationof binary knapsa k problem with lass bounds and SOS onstraints (31-35).

On one hand, it is known that the LP relaxation of binary knapsa k problem with SOS onstraints admits a greedy solution [6℄. On the other hand, [15℄ shows that the LP

(18)

edure. But, solving problem (31-35) requires dealing with both SOS onstraints and lass bounds. We have not found a greedy pro edure to solve this ase involving both omplexities. Instead, we develop a greedy LP solution for the spe ial ase where SOS onstraints are redundant, a result that extends that of referen e [15℄ to the ase with setups.

We make the simplifying assumption that all lass

i

items target a lling up to

b

i

be ause this orresponds to abetter ratio:

Assumption 8 (restri tive)

p

ij

m

a

ij

i

− f

i

w

i

a

i

+ s

i

p

ij

b

i

m

ij

− f

i

w

i

b

i

+ s

i

∀(i, j) .

This assumption orresponds to the ase illustrated by part (b) of Figure 1. Note that Assumption 1 implies the above sin e, when

f

i

≥ 0

, either

a

i

>

0

and

(p

ij

f

i

a

i

m

ij

) ≤

(p

ij

f

b

i

i

m

ij

)

while

(w

i

+

s

i

a

i

) ≥ (w

i

+

s

i

b

i

)

, or

a

i

= 0

and

p

ij

≥ 0

as stated in Assumption 6. Hen e, Assumption 8 an be understoodas alittleless restri tive than Assumption 1.

Observation 7 Under Assumption 8, problem (31-35) admits a solution where all vari-ables

z

a

ij

and

z

f

i

have value zero.

Indeed,if Assumption8holdsand

z

a

ij

>

0

, one anmodifythesolutionby setting

z

a

ij

= 0

and

z

b

ij

= z

b

ij

+

(w

i

+

ai

si

) m

ij

(w

i

+

si

bi

) m

ij

z

a

ij

. This solution modi ation is feasible with regardto

knap-sa k onstraint (32) by onstru tion but alsowith regard to onstraint (33) as it an be easily he ked. Moreover, the prot value of the modied solution is not less than the original. Similarly, if

z

f

i

>

0

, de reasing its value allows to in rease some

z

b

ij

value of

better prot ratio.

Then, we an give a greedy LP solutionto MBKS:

Proposition 3 IfAssumption8holds,anoptimalsolutiontotheLPrelaxationofMBKS is given by the following pro edure. Sort the items

(i, j)

in non-in reasing order of their ratio:

(p

ij

f

b

i

i

m

ij

)

(w

i

+

s

b

i

i

) m

ij

(37) Let

m

=

P

i

n

i

and

k

= 1, . . . , m

be the item indi es in that ordering.

K

i

is the set of items

k

that belong to lass

i

:

(19)

For

i

∈ {1, . . . , n}

, let the riti al itemfor lass

i

be

c

i

∈ K

i

, be su h that

X

k∈K

i

, k<c

i

m

k

≤ b

i

but

X

k∈K

i

, k≤c

i

m

k

> b

i

.

(38) Let

K

i

(l) = {k ∈ K

i

: k < c

i

and

k < l

}

,

I

b

(l) = {i : c

i

< l

}

, and

W

(l) =

X

i

X

k∈K

i

(l)

(w

i

+

s

i

b

i

) m

k

+

X

i∈I

b

(l)

(w

i

+

s

i

b

i

) (b

i

X

k∈K

i

(l)

m

k

) .

(39)

Then, let the global riti alitem,

c

∈ {1, . . . , m}

, be the highestindex item su h that

W

(c) ≤ W

but

W

(c) + (w

i

c

+

s

i

c

b

i

c

) m

c

> W

(40)

where

i

c

refers to the lass ontaining the global riti alitem (i.e.

c

∈ K

i

c

) and set

x

k

= 1

for

k

∈ K

i

(c)

and

i

= 1, . . . , n,

(41)

x

c

i

=

1

m

c

i

(b

i

X

k∈K

i

(c)

m

k

)

for

i

∈ I

b

(c),

(42)

x

c

=

1

(w

i

c

+

s

ic

b

ic

) m

c

(W − W (c))

if

c

∈ K

i

c

(43)

x

k

= 0

otherwise (44)

y

i

= 1

for

i

∈ I

b

(c)

(45)

y

i

c

=

P

k∈K

ic

(c)

m

k

+ m

c

x

c

b

i

c

for

i

: c ∈ K

i

(46)

y

i

= 0

otherwise. (47)

Proof: Observation 7 implies that in the LP formulation (31-35) we only keep the

z

b

ij

variables. The simplied formulation is that of a ontinuous multiple lass knapsa k problemthat admits agreedy solutionas proved in [15℄. Converting the greedy solution

z

intothe originalvariables

x

and

y

providesthe desired result.

2.2 Bran h-and-Bound

The greedy pro edure that allows to solve (31-35) under Assumption 8 an be the basisforaspe ializedbran h-and-boundalgorithmforMBKSthatgeneralizesthe depth-rst-sear halgorithmof Horowitz and Sahni. However, we are onfronted with the same di ulty as for modelCKS: the greedy pro edureis dened forthe

z

-formulationwhose IP ounterpart is not equivalent to model MBKS. To over ome it, we bran h on

z

vari-ables but make orre tions tothe primalsolutions tomake them feasible for MBKS.

To simplify the presentation, we make Assumptions 1 and 2 that imply Assumption 8. Then, the integerversion of the

z

-formulation takes the form

max

n

X

i=1

n

i

X

j=1

(p

ij

f

i

b

i

m

ij

) z

i j

(48)

References

Related documents

What don’t we know about using smart meters and feedback to reduce water

detalles; este criterio también está presente en Ciencias Sociales pero además alu- den (12%) al empleo de fuentes documentales; en Naturales, además referirse a la observación de

Besides the fact that we found no significant difference between the two types of lec- ture recordings, nearly all aspects we evaluated suggest that the enhanced recording

Hill-to-Downtown Community Plan |  The Community Plan Chur ch St College St Orange St Union A ve Columbus Ave C ed ar S t Lafayette St Trowbridge Square Clemente Leadership

In order to access cyclic peptoids via a Suzuki cross-coupling approach the linear parent peptoid has to contain both an aromatic halide (e.g. bromide or iodide) and

The Optimum system consists of an integrated array of highly durable upper-completion components, including an interventionless removable production packer, subsurface safety

The Pfizer Medical Education Group (MEG) is the unit within Pfizer that provides independent grants to facilitate patient care improvements by supporting initiatives aimed at

For one with a tranquil body and happiness his mind becomes concentrated, and monks, at whatever time a monk has a tranquil body and happiness and a mind