• No results found

Improved approximation algorithms for a bilevel knapsack problem

N/A
N/A
Protected

Academic year: 2021

Share "Improved approximation algorithms for a bilevel knapsack problem"

Copied!
10
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Contents lists available atScienceDirect

Theoretical

Computer

Science

www.elsevier.com/locate/tcs

Improved

approximation

algorithms

for

a

bilevel

knapsack

problem

Xian Qiu

a

,

,

1

,

Walter Kern

b

aCollegeofComputerScience,ZhejiangUniversity,China

bDepartmentofAppliedMathematics,UniversityofTwente,Netherlands

a

r

t

i

c

l

e

i

n

f

o

a

b

s

t

r

a

c

t

Articlehistory:

Received20September2014 Receivedinrevisedform13May2015 Accepted13June2015

Availableonline19June2015 CommunicatedbyX.Deng Keywords: Bilevel Knapsack Approximationalgorithm Stackelberg

Westudythe Stackelberg/bilevelknapsackproblemasproposedbyChenand Zhang[1]: Consider two agents, a leader and a follower. Each has his own knapsack. (Knapsack capacitiesare possibly different.) Asusual, there is aset of itemsi=1, . . . , n ofgiven weights wiandprofitspi.Itisallowedtopackitemi intobothknapsacks,butinthiscase

thecorrespondingprofitforeachplayerbecomespi+ai,whereai isagiven(positiveor

negative)number.Theobjectiveistofindapackingfortheleadersuchthatthetotalprofit ofthetwoknapsacksismaximized,assumingthatthefolloweractsselfishly.Wepresent tightapproximationalgorithmsforallsettingsconsideredin[1].

©2015ElsevierB.V.All rights reserved.

1. Introduction

The standardknapsackproblemisoneofthemostfundamentalandwell-studiedproblemsincombinatorial optimiza-tion: There isa knapsackofprescribed capacityW and n items withgivensize wi andprofit pi.The taskisto selecta set ofitemsoftotalsize atmostW and maximumtotalprofit. Afirst bilevelvariant(in theformofa

Stackelberg game)

was introducedbyDempeandRichter

[2]

:Therearetwodecisionmakers(players)–a

leader and

a

follower –

aswellasa (universal)knapsackwithflexiblecapacityandasetofitemswithgivensizesasabove,yetitemprofitsmayvaryw.r.t. the leader andthefollower,respectively.Theleaderfirstdeterminesthecapacityoftheknapsack,andafterwardsthefollower, assumedtobeselfish,packsitemstotheknapsack,maximizinghisownprofit.The(leader’sbilevel)problemistocompute the knapsackcapacitysuch that the leader’s profit–definedby a linearfunction oftheknapsack capacityplus histotal profitofpackeditems–ismaximized.

Severalotherbilevelvariantsofknapsackhavebeenproposedaswell. Forexample,Mansi etal.

[12]

studyasettingin whichboth theleaderandthefollowerpackitemsintoaknapsack(offixedcapacity).DeNegre [17]investigatesabilevel version whereboth playersown aprivate knapsackeachandpackitemsfroma commonitemset.Again,theleader acts first,selectingasetofitemsforhisownknapsack,thenthefollowerpacksitemsfromtheremainingitemsetintohisown knapsack,seekingtomaximize histotalprofit.The objectiveofthe(hostile)leaderisto choosehissetofitemssuchthat thefollower’sprofitisminimized.

*

Correspondingauthor.

E-mailaddresses:xianqiu@zju.edu.cn(X. Qiu),w.kern@utwente.nl(W. Kern).

1 SupportedbytheNaturalScienceFoundationofZhejiangProvince,No.LQ15A010001andtheFundamentalResearchFundsfortheCentralUniversities ofChina.

http://dx.doi.org/10.1016/j.tcs.2015.06.027 0304-3975/©2015ElsevierB.V.All rights reserved.

(2)

Cases Approx. ratios[1] Lower bounds ai≤0 2+ 1.5 ai≥0 W1>W2 W1<W2 1+√2+ 2+ 1.5 2 Fig. 1. Known lower bounds.

Inthispaperweconsideryetanothervariantofthebilevelknapsackproblem,duetoChenandZhang

[1]

.Inthissetting, again,eachplayerhashisownknapsackoffixedcapacities W1and

W

2,respectively.Items1

,

. . . ,

n have fixedweights wi andprofits

p

i.Thecharacteristicfeatureofthemodelin

[1]

isthatitemsmaybe

double-packed, i.e. packed

bybothplayers. Incaseitem

i is

packedonlybyoneplayer,itaccountsforaprofitof

p

i,asusual, however,if

i is

packedbybothplayers, itsprofit(forbothplayers)ismodified to pi

+

ai forgiven

profit modifier a

i

∈ R

.Again,thesettingisthatofaStackelberg game,andtheobjectiveistoexhibit an optimalpackingfortheleader,

i.e.,

one thatmaximizesthetotal profitassuming that the second player (the follower) actsselfishly (disregarding the impact anydouble packing mayhave on the items packedby theleader).Asamotivatingexample,ChenandZhangmentionthecaseoftwoinvestors,say,the government andacompany withbudgets W1 and W2,respectively.Items correspondtopotential projects ofcost wi andreward pi, resp. pi

+

ai with

a

i

>

0 ifbothplayersinvestinprojecti. Dependingontheapplication, thenumbers

a

i maybepositive ornegative (“double booking”).Incaseall

a

i are positive,ChenandZhang

[1]

call itthe

beneficial model and

ifall

a

i are negative,itisreferredtoasthe

competitive model.

Bileveloptimizationis oftencomputationally difficultandlikely toextend beyondNP.In thelast decades, bilevel and multilevel optimizationhavereceived much attentionin theliterature (cf. books by Migdalas, Pardalos andVärbrand [4]

andDempe

[3]

,asurveybyColsonetal.

[5]

).DempeandRichter

[2]

introducedamixedintegerbilevelprogramfortheir problemvariant andproposed an algorithm basedon branch andbound. Afterwards,a dynamic programmingalgorithm forthisproblemwasgivenby Brotcorneetal.

[6]

.Recently, Capraraetal.

[7]

provedthat thefirstthreeproblemvariants mentionedaboveare



2P-hard(probablythefourthoneisaswell),

i.e.,

thereisnowayofformulatingthemassingle-level integer programs of polynomial size unless the polynomial hierarchy collapses (cf. [7]for more details).In particular, they showedthatthefirsttwovariants(cf. DempeandRichter

[2]

,Mansietal.

[12]

)donotpossessapolynomialapproximation algorithmwithfiniteworst caseguaranteeunless P

=

NP and proposed apolynomial timeapproximation schemeforthe thirdvariant(cf. DeNegre

[17]

),whichisknownasthefirstapproximationschemefora



2P-hardproblem.Forothervariants andrelatedproblems,

cf.

[8–12].

Regarding the problem to be considered in this paper, Chen and Zhang [1] proposed a

(

2

+



)

-approximation algo-rithmforthecompetitivemodel(ai

0),and,forthebeneficialmodel(ai

0),a

(

1

+

2

+



)

-approximationforthecase

W1

>

W2 anda

(

2

+



)

-approximationforthecase

W

1

W2.

In thispaper, we presentbetter approximation algorithms forthe beneficial model aswell asthe competitive model andshowthat theapproximationratiosaretight ineachcase, i.e., theapproximationratios canbemadearbitrarily close to theknownlower bounds(cf. Fig. 1). The mainingredients ofour approachare: An



-approximation ofthemaximum profitproblemincasebothplayerscooperate–whichmaybeofindependentinterest,

cf.

(P3)inSection2–andafactor revealingLPforestimatingthequalityofourapproximationalgorithms(cf. Jainetal.

[18]

).

Therestofthepaperisorganizedasfollows:Inthesectionbelow,we formallyintroducethebilevel problem(cf.(P1)

inSection2)andits“cooperative”counterpart(cf.(P3)).InSection3,wedescribeapolynomialtimeapproximationscheme (PTAS)forthecooperativeproblemversion

(P3)

.InSection4,wepresentnewapproximationalgorithmsandanalyzetheir approximationratios.Finally,inSection5,wementionsomeopenproblems.

2. Bilevelknapsackwithindependentknapsacks

Let W1, W2 be capacities ofthe knapsacks ownedby player 1 (leader)and player2 (follower), respectively. Let A

=

{

1

,

2

, . . . ,

n

}

be a set of itemsof weight wi, profit pi and “double packing modifier” ai for all i

A. Let xi

,

y

i

∈ {

0

,

1

}

indicatewhetheritem

i is

packedbyplayer1andplayer2,respectively.

Recallthatthe profitofitem i is modified to pi

+

ai ifi is packedby bothplayers. Thusthe leader’s problemcan be formulatedasabilevelintegerprogramasfollows:

max x n



i=1 pi

(

xi

+

yi

)

+

2 n



i=1 aixiyi (P1) s.t. n



i=1 wixi

W1

,

xi

∈ {

0

,

1

} ,

i

=

1

,

2

, . . . ,

n

,

(3)

max y n



i=1 piyi

+

n



i=1 aixiyi (P2) s.t. n



i=1 wiyi

W2

,

yi

∈ {

0

,

1

} ,

i

=

1

,

2

, . . . ,

n

.

Notethatforfixed

x there

mayexistmultiplecorrespondingoptimalsolutions y for player2.Inouranalysis,wealways assumeaworstcasescenario,

i.e. we

focusona“pessimistic”versionoftheabovebilevelproblem,whereplayer2chooses an optimalsolution y of (P2)minimizing the objectiveof

(P1)

. Wecall theoutcome ofthispessimistic versionthe com-petitive optimum and –asinthepaperbyChen andZhang

[1]

–compareittotheso-calledcooperative optimum, i.e., the maximumtotalprofitthetwoplayerscouldachieve.Thelattercanbeexpressedbya(singlelevel)integerprogram

max n



i=1 pi

(

xi

+

yi

)

+

2 n



i=1 aixiyi s.t. n



i=1 wixi

W1

,

n



i=1 wiyi

W2

,

xi

,

yi

∈ {

0

,

1

} .

(P3)

Example.Considertwoknapsacksofcapacity

W

1

=

1 (fortheleader)andcapacityW2

=

2 (forthefollower).Theitemset

containstwoitemsofweights

w

1

=

1,

w

2

=

2,profits

p

1

=

2, p2

=

1 andmodifiers

a

1

= −

1 (a2 isarbitrary).

Observethatplayer1onlyhastwooptions: Packingitem1orpackingnothing.Ifplayer1packsitem1,then player2 gets amaximalprofit1 byeitherpackingitem1oritem2,resultinginatotalprofit2 or3 respectively.Ifplayer1packs nothing,thenplayer2packsitem1,resultinginatotalprofit2.Thus,thecooperativeoptimummaybeaslargeas1

.

5 times thecompetitive optimum.Weaimatshowingthatthisexampleisaworst caseexampleinthesense thatifallmodifiers

aiarenegative,thentheratiobetweenthecooperativeandcompetitiveoptimumisboundedby1.5andthatsolutions

x for

theleader’sproblemensuringaratioof1

.

5

+



canbefoundinpolynomialtime.Similarly,wepresenttightboundsforthe caseofnon-negative

a

i and,eventually,themixedcasewithbothpositiveandnegativedoublepackingmodifiers.

2.1. Dynamic programming for (P3)

We derivea straightforwardpseudo-polynomialalgorithmfor

(P3)

basedondynamic programming.Let fi

(

a

,

b

)

be the maximumtotalprofitwithknapsackcapacities

a

,

b w.r.t. itemset

{

1

, . . . ,

i

}

,for

a

,

b

,

i

∈ Z

+,1

i

n, a

W1,

b

W2.The recursiveformulaisdefinedby

fi+1

(

a

,

b

)

=

max

{

fi

(

a

,

b

),

fi

(

a

wi+1

,

b

)

+

pi+1

,

fi

(

a

,

b

wi+1

)

+

pi+1

,

fi

(

a

wi+1

,

b

wi+1

)

+

2pi+1

+

2ai+1

}.

Theinitialconditionis f1

(

a

,

b

)

=



max

{

p

1

,

2p1

+

2a1

} ,

a

=

w1

,

b

=

w1

,

p1

,

a

=

w1

,

b

<

w1or a

<

w1

,

b

=

w1

,

0

,

a

<

w1

,

b

<

w1

.

It isstraightforwardtocheckthat fn

(

W1

,

W2

)

returnsthemaximumprofitfor

(P3)

andthealgorithmhasarunningtime O

(

nW1W2

)

.

3. Polynomialtimeapproximationschemefor(P3)

As afirststep,wecompute approximatelyoptimalcooperativesolutions.Itiswell knownthatknapsackcanbesolved byafullypolynomialtimeapproximationscheme(FPTAS)(cf.[13,14]).As

(P3)

with

a

i

→ −∞

becomesamultipleknapsack problemwithtwo knapsacks,wecannot expectanFPTASfor

(P3)

unless P

=

NP (cf.[15]).Inthefollowing,we seekfora polynomialtimeapproximationscheme(PTAS)for

(P3)

.

(4)

We startwithsome notations.Foranyset S of items, let w

(

S

)

and p

(

S

)

denotethe totalweight andthetotal profit of itemsin S, respectively, i.e., w

(

S

)

=



iSwi and p

(

S

)

=



iSpi. Since theprofits of itemsmaybe modified dueto double-packing, p

(

S

)

mayalsodenotethemodifiedtotalprofitofitemsin S if nomisunderstandingispossible.

As it turnsout,

negative items,

i.e., those with

a

i

<

0,and

non-negative items (those

withai

0) can be treated inde-pendently. Therefore,we simplifymattersby first assuming thatall items arenegative (non-negative itemswill be dealt afterwards).Fortechnicalreasons(tobeexplainedintheproof)we slightlygeneralizeourproblem,assuming thatcertain items,say,itemsintheset

N

1

N, arenotallowedtobedouble-packed.Welet

n

1

= |

N1

|

denotethenumberofitemsthat

areprescribedtobesingle,and

n

2isthenumberofitemsin

N

2

=

N

\

N1thatmaybedouble-packed.Thus

n

1

+

n2

=

n. Our

prooffortheapproximationratiowillbebyinductionon

n

1

+

2n2.

Wedescribe an O

(

1

1

/

k

)

-approximationalgorithm–againdenotedbyALG –proceedingina similarwaytothatof Sahni

[16]

.Onedifferenceisthatforadouble-packableitem

i we

distinguishbetweenits

primary copy i with

anassociated profit pi andits

secondary copy i with

profit pi

+

2ai

<

pi.Let S

=

S1

S2

=

supp x

supp y∗ be anoptimalsolution of(P3).Observethat–aswedistinguishprimaryandsecondarycopies–theset S∗maybeunderstoodasa

set rather

than amultiset.InphaseI,ALGseeksto“guess”the

k most

profitableitemsfromtheoptimumsolution

S

1

S2 toincludethem intheinitialpacking.Incaseanitem

i is

double-packedin

S

∗,and(theprimarycopyof)

i belongs

tothe

k most

profitable items, wewantALGto includealsothesecondary copyintotheinitialpacking.Forthisreason, welet ALGstartfromall initialpackings withupto

k primary

itemsplussome oftheir secondarycopiesandlet S

=

S1

S2 be thissetofitems,

with

S

1

,

S

2packedonknapsacks1and2,respectively.

Thesecondphase,again,considerstheremainingitemsinorderofnon-increasingprofitrates.Asinthesingleknapsack case,itproceedsinatrueonlinemannerasexplainedbelow.Inparticular,wheneverALGchecksanitem

i,

itimmediately decidesuponpackingornotpacking

i,

butdoesnotyetdecidewhether

i should

bedouble-packed.Notethat,aswestickto thecaseofnegativeitemshere,wehave

p

i

+

2ai

<

pi,sothatprimaryitemscomewithhigherprofitratesandarechecked forinclusionbeforetheircorrespondingsecondarycopiesarrive.

Summarizing,inphaseII,ALGconsidersthe(copiesof)itemsin

{

1

, . . . ,

n

} \

S in orderofnon-increasingprofitrates ri1

ri2

≥ . . . ≥

rim

(

m

=

n1

+

2n2

− |

S

|)

definedasexplainedabove.

WheneverALG checksa primaryitem

i

=

it,theitem ispackedwherever itfits. Incaseitdoesnot fitanywhere,the itemisskipped.WheneverALGchecksasecondaryitem i

=

it,itisperfectlyclearonwhichknapsack

i should

bepacked andALGseekstoaccommodateitem

i there,

say,onknapsack1,by“switching”singleitemsfromknapsack 1toknapsack 2 ifnecessary.Moreprecisely,ALG considersallsingle (primary)itemsfrom

{

1

,

. . . ,

n

}\

S currently packedonknapsack1in someorderandswitchesthemontoknapsack2whenevertheyfitthere,untileitheritem

i can

eventuallybeaccommodated onknapsack1ornofurthersingleitemcanbeswitchedtoknapsack2whileitem

i still

cannotbeaddedtoknapsack1.In thelattercase,item

i

=

it isskipped.Theorderinwhichitemsareconsideredforswitchingfromknapsack1toknapsack2 isnotrelevant,butitisconvenienttousea“lastinfirstout”orderasswitchingrule.

Notethatanypackeditemremainspacked,onlytheassignmenttoaparticularknapsackmayberevised(possiblyeven severaltimes),duetoswitching.

Lemma1.

ALG as described above yields a

(

1

2

/

k

)

-approximation for (P3)(assuming that all items are negative).

Proof. Theproof isbyinductionon

n

1

+

2n2.The claimisobviouslytruefor

n

1

+

2n2

k. Indeed,whenevertheoptimal

solution

S

=

S1

S2contains2k orlessitems,thenALGwillexhibit

S

∗ inphaseI.

Hence, let us assume that n1

+

2n2

>

k and follow the computation of ALG, assuming that in phase I, S

=

S1

S2

containingthe

k largest

profititemsfrom

S

∗arepackedinthesamewayandwiththesamemultiplicitiesasintheoptimal solution.Let

i

=

it denotethefirstitemthatisskippedbyALG.If

i

N1,theproofisalmostidenticaltothesingleknapsack

case:As wi exceedstheremainingcapacity,say,

c

1

,

c2 respectively,forbothknapsacks,thetotalremainingcapacity

c

1

+

c2

satisfies

c

1

+

c2

<

2wi.Ifwecompare thecurrenttotalprofit Pt−1 ofALG, justafteritem

i

t−1 hasbeenplaced,thetotal

usedcapacityequals

W

1

+

W2

− (

c1

+

c2

)

and–sinceALGpacksinorderofnon-increasingprofitrates–nootherpacking

canachieveahigherprofitonthispart.Consequently,nootherpackingalgorithmcanachieveatotalprofitlargerthanor equalto Pt−1

+

2

(

c1

+

c2

)

ri(theamountthatwouldbeachievedbypackinganitemwithprofitrateequalto

r

i,butsmaller size(c1

,

c2 respectively), therebyexhausting exactlybothknapsack capacities).Hence, thefinal totalprofit P achieved by

ALGcomparestotheoptimumprofit P∗asfollows: P

P

+ (

c1

+

c2

)

ri

<

P

+

2wiri

=

P

+

2pi

.

Thus, ifi

S1

S2,then pi

P

/

k and we get P

P

(

1

2

/

k

)

asrequired. Else,ifi

/

S∗1

S∗2,then P and P∗ remain

unchangedifweremoveitem i,therebydecreasing

n

1

+

2n2 byone,sotheclaimfollowsbyinduction.

The same argumentworks without anychange in casei

=

it

N2 is a primary item, exceptthat by removing i, we

decrease

n

1

+

2n2 by two. Thus assume nowthat i

=

it

N2 isalready packed,say, onknapsack 1,but thesecondary i

doesnot fitonknapsack2,evenafterswitchingamaximal setofitemsfromknapsack2toknapsack1.Thesituationcan be described asfollows: Besides the initial packing S1

,

S2, thereis a certain set D of itemsthat aredouble-packed and

(5)

Fig. 2. Packing negative items.

sets J1

,

J

2 ofsingle/primary itemson knapsack1and2,respectively. Byassumption,the remaining capacities

c

1 and

c

2

on knapsack 1 and2 satisfy: c2

<

wi (item i does not fit) and c1

wj for every j

J2 (no j

J2 can be switched to

knapsack 1).Let D∗ denotetheset ofitemsthat aredouble-packedinthe optimumsolution.

Fig. 2

belowillustrates the currentsituation.

First note that, again, we mayassume that i

J1

D∗.Otherwise, ifi

J1

\

D∗,prescribing i as single wouldreduce n1

+

2n2 butotherwise affectneither ALG nor the optimum solution, and the claim would follow by induction. Hence i

=

it

J1

D∗ indeed.Hence pi

1kp

(

S1

S2

)

1kP∗ follows.

Asimilarargumentshowsthatwemayassume j

/

S1

S2 forany j

J2:If j

S∗1

S∗2,then pj

1kp

(

S∗1

S∗2

)

1kP∗. Thus if c1

,

c2 are the remaining capacities on knapsack 1 and 2 respectively, then (due to the fact that ALG proceeds

accordingtonon-increasingprofitrates)wehave

r

j

riandhence P

P

+ (

c1

+

c2

)

ri

P

+

c1rj

+

c2ri

<

P

+

wjrj

+

wiri

=

P

+

pj

+

pi

P

+

2 kP

andtheclaimwouldfollow.Hencewemayassumeindeedthat J2

∩ (

S1∗

S∗2

)

= ∅

.

Aswehaveseenabove,wemayassumethat

p

i

P

/

k, sowecanaffordskippingthesecondaryitem

i

=

it.Theproblem isthat

i

t+1

,

it+2 etc.mightbesimilarsecondaryitemsthatwehavetoskip.Thus howmuchskippingcanweafford?The

answerisgivenby thesizeof J2 andD

\

D∗:Astheitemsin J2 arenot packedintheoptimumsolutionandtheitemsin D

\

D∗ areatleastnotdouble-packedintheoptimumsolution.ALGspendsatotalof

w

=

w

(

J2

)

+

w

(

D

\

D

)

packingitems

atrate

r

ri which arenot packedby an optimalalgorithm, say,OPT. Instead,OPTpacksthe secondaryitems

i

=

it and subsequentsecondaryitemsatrate

r

ri.Thuswecanaffordskippingsecondaryitemsoftotalsize

w without

fallingback behind OPT(theonethatbuilds S

=

S1

S2).Thegoodnewsisthat,roughly,nomorethanthisisabouttocome:IfOPT buildstheoptimumsolution

S

1

,

S

2,thenitpacks

S

2 and

D

D∗onknapsack2,sotheremainingspaceforsecondaryitems i

S1

S2 isboundedby

W2

w

(

S2

)

w

(

D

D

)

w

(

D

\

D

)

+

w

(

J2

)

+

wi

=

w

+

wi

.

Thusthetotalsizeofsecondaryitemsthatweskipcanbecompensatedbytheprofitwegainwhilepacking J2and

D

\

D∗,

exceptforanamountofatmost

w

iri

=

pi.

Thus atleast after skipping that many secondary itemssomething else must happen: Either a single item i that we skip or a secondary item j

J2 that we cannot accommodate on knapsack 1. But then, again, even without anyeffort

of reassigning items, we conclude that j

S1

S2 (otherwise prescribe j as single and apply induction), implying that

pj

P

/

k and, hence–disregardingatotalofw for theskippedsecondary itemscompensatedby J2 and D

\

D∗ –allwe

looseisboundedby

p

i (onknapsack2)andpj(onknapsack1).Summarizing,weget P

≥ (

1

2

/

k

)

P∗alsointhiscase. WeliketostressthattheaboveargumentholdsalsowhenthesecondaryitemsthatALGskipsdonotcomeinarow.For example,itmightwellhappenthatALGskips

i

=

it,but

i

t+1isa(primaryorsecondary)itemthatfitswellonknapsack 2,

thereby enlargingD or J2.Itmayalsohappenthat–possiblyafterreassigningsome itemsin J1toknapsack2–anitem j

=

it+1 canbeaccommodatedonknapsack1.Inanycase,wheneverthenextsecondaryitem j to beputonknapsack2is

skippedbyALG,thenthisisbecauseALGhastriedinvaintoaccommodate j by switchingsingleitemsfromknapsack2to knapsack1.Accordingtotheswitchingrule,ALGreassignsitemsina“lastinfirstout”order,ensuringthattheset J2that

wasblockingthesecondaryitem

i

=

it willstaypackedonknapsack2.(Thus,atalaterstage,wemightevenhavealarger set J 2

J2, J2

∩ (

S∗1

S∗2

)

= ∅

,tocompensateforskipping.)

2

It is an easy exercise tobound the runningtime:There are O

(

nk+1

)

sets S of size

|

S

| ≤

k to choose fortheprimary

items. Given S, weare lefttofixforeach

i

S whether todouble-pack i or not,and, inthelattercase,wheretopackit (knapsack1or2).Thusintotalthenumberof“guesses”isboundedby

O

(

nk+13k

)

.

Nextletusturntothebeneficialmodel,whichturnsouttobeeasier:Assumethatallitemsin

N are

non-negative,

i.e.,

ai

0.Ourapproximationalgorithm–denotedby ALG–inthiscase,will againhavea“guessing” phaseI, followedbya phase II, whereitemsare processedinorder ofnon-increasingprofitrates.Notethat thistime, however,double-packing yields higher profit rates than single packing, so ALG will first decide about double-packingitem i (at profit rate ri

=

(

pi

+

a1

)/

wi) and then – in case of non-acceptance consider single-packing i at a later stage. Correspondingly, in the beneficial model,it doesnot makesense to distinguishbetweena primary andsecondary copyofitem i (as both arrive

(6)

atthesametime).Thus, inwhat followswewill interpretan optimalsolution of(P3)asamultiset S

=

S1

S2, where

D

=

S1

S2 isthesetofdouble-packeditems.

Inphase I,ALG guesses aset D

⊆ {

1

,

. . . ,

n

}

ofsize

|

D

|

k (as acandidatefora setofmostprofitabledouble-packed itemsinan optimalsolution) aswellasaset S

⊆ {

1

,

. . . ,

n

}\

D,

|

S

|

k of mostprofitablesingle-packeditems. Inaddition, itguessesanumber

l

n indicating thetotalnumberofitemsthatshouldbedouble-packedbyALG(ontopofthealready chosenset

D).

InphaseII,ALGprocessestheremainingitemsinorderofnon-increasingprofitratesasusual.Moreprecisely, let ri1

=

pi1

+

ai1 wi1

≥ . . . ≥

ril

=

pil

+

ail wil

bethe

l highest

double-packingprofitratesin

N

2

\

D. ThenALGdouble-packsasmuchaspossibleof

i

1

,

. . . ,

il (ontopof D) andthencontinues(afterpacking S1 andS2)withsinglepackingoftheremainingitems(i.e.,itemsin

(

N1

N2

)

\(

D

S

{

i1

,

. . . ,

il

})

)inorderofnon-increasingprofitrates.

Thereare O

(

n2(k+1)

)

possiblechoicesfor

D and S,

andO

(

2k

)

bipartitionsof

S.

Togetherwiththedifferentchoicesfor

l,

thereare

O

(

n2k+32k

)

differentchoicesofparameters.

Lemma2.

For suitable choice of parameters D

,

S1

,

S

2and l, ALG yields an approximation ratio

(

1

4

/

k

)

.

Proof. Theproofisbyinductionon

n

1

+

2n2.Let

S

∗1

,

S

∗2beanoptimalsolutionandlet

W

:=

w

(

S1∗

S∗2

)

bethetotalsizeof

double-packeditems.If



S1

S2

 ≤

k, thenALGwillguess

D

=

S1

S2 exactly,otherwiselet D denote thesetof

k highest

profit

(

=

pi

+

ai

)

itemsin

S

∗1

S∗2 andassume

l is

chosen suchthat w

(

D

)

+

wi1

+ . . . +

wil

W∗ but w

(

D

)

+

wi1

+ . . . +

wil+1

>

W∗.

ThusALG,withthischoiceofparameters

D and l will

double-pack

i

1

,

. . . ,

il(ontopof

D),

butallfurtheritemswillgetat mostsingle-packed.Weclaimthatthetotaldouble-packingprofitisatleast

(

p

+

a

)(

S1

S2

)(

1

2k

)

,where

(

p

+

a

)(

S1

S2

)

:=



iS1S2

(

pi

+

ai

)

.Indeed,ifi

=

il+1

S∗1

S∗2,thisfollowsin the–by now–usual mannerfrom pi

+

ai

1

k

(

p

+

a

)(

D

)

. Else,if

i

/

S1

S2,wemightprescribe

i as

single,thusdecreasing

n

1

+

2n2 andtheclaimfollowsbyinduction.

ThusALGperformsverywellw.r.t.doublepacking,achievingalmostoptimalprofit,byusinglessspaceingeneral.Sowe arelefttoanalyzethesinglepackingpart.Ifatmost

k items

aresingle-packedintheoptimumsolution S1

S2,ALGwill exhibitthese(alongwiththecorrectassignmenttoknapsack1andknapsack2).Else,let S

=

S1

S2 denotethe

k highest

profitsingle-packeditemsintheoptimumsolution(with Si packedonknapsack

i).

AsALG,whenitstarts single-packing items, hasatleastasmuchcapacityleft asOPToneachknapsack, S1 and S2 canbe single-packedwithoutanyproblem.

Theremaining itemsare thenprocessedinorderofnon-increasingprofitratesandtheremaining partoftheproof isby nowroutine:Let

i

=

it bethefirstitemthatcannotbeaccommodated,neitheronknapsack1noronknapsack2.(Herewe donot needto trytoreassign anyitems.)Then thetotalprofit, say P , includingsingle-packeditemsobtainedby ALGat thistime,isatleasta

(

1

4

/

k

)

-fractionof P∗thetotalprofitintheoptimumsolution:

Incase

i

/

S1

S2,theclaimfollowsbyinductionon

n

1

+

2n2 ifweprescribe

i as

single item.Else,if

i

S1

S2,then pi

pi

+

ai

k1

(

p

+

a

)(

S1

S2

)

1kP∗.Hence,addingacopyofitem

i to

bothknapsacks(therebyviolatingtheir capacity constraints)wouldyieldaprofitlargerthan

P

(

1

2k

)

.(Thefactor1

2k takescareofthepossiblelossinthedouble-packing case.)Thus,intotal,whenskippingitem

i,

wecanensureatotalprofitofatleastP

(

1

2k

)

2pi

P

(

1

4k

)

.

2

Remark1.Weliketopointoutthatnegativeitemscannotbetreatedinsuchaneasyway:Consider,forexamplealistof2n itemswithpi

=

10,

a

i

= −

5 plus2n items withpi

=

5

,

ai

= −



andwi

=

1 forall 4n items.Anoptimumpackingfortwo knapsacksofcapacity3n eachwouldsingle-packallitemswith

p

i

=

10 anddouble-packallremainingitems.Yet,a simple greedyheuristiclikethe“positiveitemvariant”ofALGwouldalwaysstartdouble-packingthe“highprofit”items–atleast wecannotpreventitfromdoingsobyprescribingthenumber

l of

itemstobedouble-packed.

We are left to combinethe two algorithms for negative and non-negative items in order to deal with “mixed” sets ofitems. The onlyway wefound worksin asense by “brute force”:We guesstheamount W1+ andW2+ ofcapacityan optimum solutionuses on knapsack 1and2 fornon-negative itemsrespectively andthen splitthe problemaccordingly intoonewithnegativeandone withnon-negativeitems.Inourcase,itissufficienttoapproximate

W

1+ and

W

2+ uptoa factor1

/

k, soweactuallyguess

m

i

:= 

log1+1/kWi



andrunthealgorithmwithW

˜

i+

= (

1

+

1

/

k

)

mi insteadof

W

i+.Thetotal numberofguessesweneedis O

(

klogWi

)

for

i

=

1

,

2,thus

O

(

k2

(

logW1

)(

logW2

))

intotal.

Thisintroduces another possibleloss oforder1

/

k on thetotal profitgainedwithpositive items, so thatafter all,the combinedalgorithmALG willyieldatotal profitP with P

≥ (

1

1

/

k

)(

1

4

/

k

)

P∗,where P∗ istheoptimumprofit. Thus wehaveshown

Theorem1.

For fixed k, there exists a polynomial time algorithm ALG that approximates

(P3)up to a factor

(

1

5

/

k

)

in time O

(

n2k+52klog W1log W2

)

.

(7)

4. Approximationalgorithmsfortheleader

Let S1 and S2 be optimalsolutions forthestandard single knapsackinstances withknapsack capacities W1 and W2,

resp., and profits pi for all items. In other words, S1 and S2 denote the support of optimal solutions of the following

problemwith

W

=

W1 and

W

=

W2,resp.:

max n



i=1 pixi s.t. n



i=1 wixi

W

,

xi

∈ {

0

,

1

} ,

i

=

1

,

2

, . . . ,

n

.

(P4)

Let

(

S1

,

S

∗2

)

beanoptimalsolutionofthecooperativerelaxation

(P3)

.Wefirstnotethatthevalue

OPT of (P3)

satisfies

OPT

=

p

(

S1

)

+

p

(

S2

)

+

2h

,

where h

:=



iS1S2

ai

.

(1)

Furthermore,wetriviallyhave

p

(

S1

)

p

(

S1

)

and p

(

S∗2

)

p

(

S2

).

(2)

As

(

S1

,

S

2

)

canbefoundbydynamicprogramming(cf. Section2.1)andcanbeapproximatedarbitrarilycloselybyaPTAS (cf. Section3),wefirstpresentanalgorithmbyassumingthat S1

,

S

2

,

S

1and

S

2 canbefoundexactly.Afterwards,weshow

thatweloseafactorof



ifthesesolutionsareapproximatedcorrespondingly(cf. Section4.3).We(first)treatthebeneficial andthecompetitivemodelseparately.

4.1. The beneficial model: ai

0

We presenta very simple algorithm and show that the approximation ratios are tight in both cases (W1

W2 and W1

<

W2).

Algorithm1.Packoneof

S

1 andS1 (whicheverresultsinamaximumtotalprofit1).

Assume firstthat player1packs S1 andplayer 2packssome set S.

ˆ

Leth

ˆ

=



iS

1∩ˆS2ai.Then p

( ˆ

S2

)

+ ˆ

h

p

(

S

2

)

+

h∗.

Denoteby

ALG the

valueobtainedbythealgorithm.Thus ALG

=

p

(

S1

)

+

p

( ˆ

S2

)

+

2h

ˆ

p

(

S1

)

+

p

(

S2

)

+

h

+ ˆ

h

.

Since

p

( ˆ

S2

)

p

(

S2

)

,wehave

ˆ

h

p

(

S2

)

p

( ˆ

S2

)

+

h

p

(

S∗2

)

p

(

S2

)

+

h

,

implying ALG

p

(

S1

)

+

2p

(

S2

)

p

(

S2

)

+

2h

.

(3)

Nowassumethatplayer1packs S1.Thenplayer2willgetatleast

p

(

S2

)

bypacking S2,implying ALG

p

(

S1

)

+

p

(

S2

).

Besides,weobservethefollowing“knapsackconstraints”:

p

(

S1

)

p

(

S2

)

if W1

W2

,

(4)

p

(

S1

)

p

(

S2

)

if W1

W2

.

(5)

Let

α

=

ALG

/

OPT. Wederivethefollowinglinearprogramforestimatingtheapproximationratio:

(8)

minimize

α

subject to p

(

S1

)

+

p

(

S2

)

+

2h

=

1

,

α

p

(

S1

)

+

2p

(

S2

)

p

(

S2

)

+

2h

,

α

p

(

S1

)

+

p

(

S2

),

p

(

S1

)

p

(

S∗1

),

p

(

S2

)

p

(

S∗2

),

p

(

S1

),

p

(

S2

),

p

(

S∗1

),

p

(

S∗2

),

h

0

and the knapsack constraints hold

.

(6)

Theminimumvalue equals2

/

3 if

W

1

W2 and1

/

2 if

W

1

<

W2,proving that

OPT

/

ALG is atmost3

/

2 resp. 2,matching

thelowerbounds(cf.[1]).

4.2. The competitive model: ai

<

0

Inprinciple,wecouldalsoapply

Algorithm 1

tothiscase:Ifplayer1packs

S

∗1,similartotheaboveargument,wehave ALG

p

(

S1

)

+

2p

(

S2

)

p

(

S2

)

+

2h

.

In case of packing S1, we want to show that ALG

p

(

S1

)

+

p

(

S2

)

+

2h, where h

=



iS1∩S2ai. This is clearly true ifplayer 2 packs S2. Otherwise,player 2packs a set,say, S

ˆ

2,with h

ˆ

=



iS1∩ˆS2ai,such that p

( ˆ

S2

)

+ ˆ

h

p

(

S2

)

+

h. As p

( ˆ

S2

)

p

(

S2

)

,thisimpliesh

ˆ

h. Thus,

ALG

p

(

S1

)

+

p

( ˆ

S2

)

+

2h

ˆ

p

(

S1

)

+

p

(

S2

)

+

h

+ ˆ

h

p

(

S1

)

+

p

(

S2

)

+

2h

,

asclaimed.

Nowweobtainthefollowinglinearprogramboundingtheapproximationratioof

Algorithm 1

.

min

α

s.t. p

(

S1

)

+

p

(

S2

)

+

2h

=

1

,

α

p

(

S1

)

+

2p

(

S2

)

p

(

S2

)

+

2h

,

α

p

(

S1

)

+

p

(

S2

)

+

2h

,

p

(

S1

)

p

(

S∗1

),

p

(

S2

)

p

(

S∗2

),

p

(

S1

),

p

(

S2

),

p

(

S∗1

),

p

(

S2∗

)

0

,

h

,

h

0

and the knapsack constraints hold

.

(7)

Letting p

(

S1

)

=

p

(

S1

)

=

p

(

S2

)

=

1, h

= −

1 and

h

=

p

(

S2

)

=

0,we can easily seethat theoptimal objectivevalue is0.

We observe that in thisworst-case instance the penalty h is too large: A better choice for player 1 isto pack nothing. Then player2mustpackS2,implying

ALG

p

(

S2

)

.Addingthissimpleconstrainttotheaboveprogram yieldsan optimal

objectivevalue0

.

5.

Thus,excludingitemswithlargepenaltyfrom

S

1canimprovetheperformanceofALG,however,itdoesnotyieldatight

approximation yet.The idea forfurtherimprovement isnot only toavoid packingitemswithlarge penalties butalsoto packitemswith

small penalties.

Wedefinethefollowingsets:

S+2

=



i

S2

| |

ai

| >

pi 2



,

S2

=

S2

\

S+2

,

(8)

where

S

+2

,

S

2 aresetsofitemshavinglargepenaltiesandsmallpenaltiesrespectively.Ouralgorithmcannowbedescribed asfollows.

Algorithm2.Packoneof

S

∗1

,

S1

\

S+2 and

(whicheverresultsinamaximumtotalprofit).

Toanalyzeitsperformance,wedistinguishthreecases:

(9)

Case2.Player1packs S1

\

S+2.Weprovethat

ALG

p

(

S1

)

+

p

(

S−2

)

+

2h−,where

h

=



iS2ai.Clearly,thisistruewhen player 2packs S2.Ifplayer 2packssome otherset,say

ˆ

S2

=

S2,withh

ˆ

=



i∈(S1\S+

2)∩ˆS2ai,then p

( ˆ

S2

)

+ ˆ

h

p

(

S2

)

+

h, implyingh

ˆ

h− (recallthat

p

( ˆ

S2

)

p

(

S2

)

).Hence,

ALG

p

(

S1

)

p

(

S2+

)

+

p

( ˆ

S2

)

+

2h

ˆ

p

(

S1

)

p

(

S+2

)

+

p

(

S2

)

+

h

+ ˆ

h

p

(

S1

)

p

(

S2+

)

+

p

(

S2

)

+

2h

=

p

(

S1

)

+

p

(

S2

)

+

2h

.

Case3.Player1packsnothing.Thenplayer2canguaranteeatotalprofit p

(

S2

)

bypacking

S

2.Thus,

ALG

p

(

S2

)

.

Furthermore,inadditiontotheknapsackconstraints

(4)

,

(5)

wehavethefollowingconstraints:

p

(

S2

)

=

p

(

S+2

)

+

p

(

S2

)

and h

≥ −

p

(

S2

)

2

.

Thisfinallyyieldsthefollowinglinearprogramwithanoptimalvalueof2

/

3 (forboth

W

1

W2 and

W

1

<

W2).

minimize

α

subject to p

(

S1

)

+

p

(

S2

)

+

2h

=

1

,

α

p

(

S1

)

+

2p

(

S2

)

p

(

S2

)

+

2h

,

α

p

(

S1

)

+

p

(

S−2

)

+

2h

,

α

p

(

S2

),

p

(

S2

)

=

p

(

S+2

)

+

p

(

S−2

),

h

≥ −

p

(

S − 2

)

2

,

p

(

S1

)

p

(

S∗1

),

p

(

S2

)

p

(

S∗2

),

p

(

S1

),

p

(

S2

),

p

(

S+2

),

p

(

S−2

),

p

(

S∗1

),

p

(

S∗2

)

0

,

h

,

h

0

and the knapsack constraints hold

.

(9)

Hence

OPT

/

ALG

1

.

5,whichistight(cf. theexampleinSection2).

Remark2. Since player2 actsafterplayer 1,thereadermaywonder how tofind themaximal totalprofitover all cases (in

Algorithms 1 and

2).Thiscanbedonebycheckingtheinequalities“

α

≥ . . .

”in

(6)

and

(9)

respectively:Ifanyofthese inequalitiesgetstight,thealgorithmmaypicktheassociatedset(forplayer1).

4.3. Approximating S1and S2

Algorithms 1 and 2 mayequally well be applied, ifwe replace S1

,

S

2

,

S

∗1 and S∗2 by corresponding



-approximations

(to be computed as explained in Section 2.1, say, S

˜

1

,

˜

S2

,

˜

S∗1 and S

˜

∗2 with corresponding S

˜

+2

= {

i

∈ ˜

S2

| |

ai

|

>

pi

/

2

}

and

˜

S2

= ˜

S2

S2+). A close lookat the analysisof Algorithms 1 and 2 revealsthat optimality of

(

S1

,

S

2

)

is only used in (1)

and(3).Itiseasytoseethat

(1)

becomes

(

1



)

OPT

p

( ˜

S1

)

+

p

( ˜

S2

)

+

2h

˜

,

whereh

˜

=



i∈˜S1∩ ˜S2 ai

.

Notethatthe“

˜

-version”of

(2)

maybeassumedtobesatisfiedwithoutanychanges.(Replacetheapproximation S

˜

1 by

˜

S1 incasep

( ˜

S1

)

<

p

( ˜

S∗1

)

.)Thesameis trueforthe knapsackconstraints.Thusall thatchanges inthelinearprograms in

theprevioustwosectionsisthattherighthandsideofthefirstconstraintchangesfrom1 to

(

1



)

.Thus,asimplescaling argumentshowsthattheresultingoptimumwilldifferbyatmostan O

(



)

-fractionfromtheoriginalvalue.

Remark3.To be precise, theabove argument is validonly ifwe assume that player 2 is ableto solve his (lowerlevel) problemexactly. Ifalsoplayer 2applies



-approximation algorithmsinstead, weget anotherfactorof

(

1



)

introduced in(3).

(10)

4.4. The mixed case

Finally,letusturntothecasewheretheitemsetcontains bothpositiveandnegativeitems.Thiscaseiseasilyreduced tothe twocases(beneficialandcompetitive modelrespectively)considered above: Allwehaveto doistosplit theitem set A into theset A+and A−ofnon-negativeandnegativeitems,respectivelyandtoguess–again,uptoacertainfactor, say, 1

/

k – the associated parts of knapsacks 1 and2 that are filled with non-negative andnegative items, resp., in an optimalsolution

S

∗1

S∗2of

(P3)

.Solvingthe“pure”(beneficialresp.competitive)casesfortheapproximatelycorrectchoice

ofcorrespondingknapsackcapacitieswillthengivesolutionsfortheleader’sproblemthatdifferfromthecooperativevalue byatmostafactorof

(

2

+



)

attheexpenseofanadditionalO

((

log W1

)(

log W2

))

factorintherunningtime.

5. Remarks

Wehavepresentedaunifiedapproachforcomputingsolutionstotheleader’sproblemwithapproximatelyoptimalratio, ifcomparedtotheoutcomeofthecooperativeversionoftheproblem.Withoutfurthergoingintodetails,wementionthat inthelowerboundexamples(cf. theexampleinSection2andtheexamplesin

[1]

),themaximumcooperativevalueequals themaximumvalue of(the optimistic versionof) thebilevel problem.Thus ourresultsalso providetightboundsforthe ratiobetweentheoptimisticandpessimisticversionofthebilevelproblemitself.

A natural question to ask is aboutside payments: Player 1 can certainly enforce the optimistic value of the bilevel problemwitharbitrarily small side payments.Thus, it seemsnatural toalso investigateapproximation algorithms inthe optimisticsetting.

References

[1]L.Chen,G.Zhang,Approximationalgorithmsforabi-levelknapsackproblem,in:ProceedingsofCOCOA’11,Springer-Verlag,Berlin,Heidelberg,2011, pp. 399–410.

[2]S.Dempe,K.Richter,Bilevelprogrammingwithknapsackconstraints,Cent.Eur.J.Oper.Res.8(2000)93–107. [3]S.Dempe,FoundationsofBilevelProgramming,KluwerAcademicPublishers,Dordrecht,2002.

[4]A.Migdalas,P.M.Pardalos,P.Värbrand,MultilevelOptimization:AlgorithmsandApplications,KluwerAcademicPublishers,Dordrecht,1998. [5]B.Colson,P.Marcotte,G.Savard,Bilevelprogramming:asurvey,4OR:Quart.J.Oper.Res.3 (2)(2005)87–107.

[6]L.Brotcorne,S.Hanafi,R.Mansi,Adynamicprogrammingalgorithmforthebilevelknapsackproblem,Oper.Res.Lett.37 (3)(2009)215–218. [7]A.Caprara,M.Carvalho,A.Lodi,G.Woeginger,Acomplexityandapproximabilitystudyofthebilevelknapsackproblem,in:ProceedingsofIPCO’13,

Springer,Berlin,Heidelberg,2013,pp. 98–109.

[8]P.Loridan,J.Morgan,WeakviastrongStackelberg problem:newresults,J.GlobalOptim.8 (3)(1996)263–287. [9]Z.Wang,W.Xing,S.-C.Fang,Two-groupknapsackgame,Theoret.Comput.Sci.411 (7–9)(2010)1094–1103. [10]Z.Wang,W.Xing,Two-personknapsackgame,J.Ind.Manag.Optim.6 (4)(2010)847–860.

[11]X.Deng,Complexityissues inbilevellinear programming,in:MultilevelOptimization:Algorithmsand Applications,KluwerAcademicPublishers, Dordrecht,1998,pp. 149–164.

[12]R.Mansi,C.Alves,J.deCarvalho,S.Hanafi,Anexactalgorithmforbilevel0–1knapsackproblems,Math.Probl.Eng.(2012),articleID504713. [13]O.H.Ibarra,C.E.Kim,Fastapproximationalgorithmsfortheknapsackandsumofsubsetproblems,J.ACM22 (4)(1975)463–468.

[14]V.V.Vazirani,ApproximationAlgorithms,Springer-Verlag,NewYork,Inc.,NewYork,NY,USA,2001.

[15]C.Chekuri,S.Khanna,APTAS forthemultipleknapsackproblem,in:ProceedingsofSODA’00,SocietyforIndustrialandAppliedMathematics, Philadel-phia,PA,USA,2000,pp. 213–222.

[16]S.Sahni,Approximatealgorithmsforthe0/1knapsackproblem,J.ACM22 (1)(1975)115–124.

[17]S.DeNegre,Interdictionanddiscretebilevellinearprogramming,Ph.D.thesis,Bethlehem,PA,USA,aAI3456385,2011.

Referenties

GERELATEERDE DOCUMENTEN

In addition, in this document the terms used have the meaning given to them in Article 2 of the common proposal developed by all Transmission System Operators regarding

Belgian customers consider Agfa to provide product-related services and besides these product-related services a range of additional service-products where the customer can choose

In the single-controller case the state estimator is a recursive, linear, finite-dimensional filter (the Kalman filter); in a multi-DM situation, a DM cannot estimate the state

Our Tsetlin algorithm uses the Boltzmann exploration to choose between these elements and instead of us- ing expected value as done in equation 2.5 it takes the states S t (i) in

(b) Show that up to isomorphism, A 4 has exactly three k-linear representations of dimension 1 and exactly one irreducible k-linear representation of dimension 38. Let S 4 be

Stakeholder Goals Asset manager o The model needs to estimate the RUL of an asset o Clear recommendation to either maintain or replace asset Maintenance manager o The

This Act, declares the state-aided school to be a juristic person, and that the governing body shall be constituted to manage and control the state-aided

In Chapter 5 we analyze breaking of ensemble equivalence for the case in which topological constraints are imposed not only on the total number of edges but also on the total number