THE CARDINALITY CONSTRAINED MULTIPLE KNAPSACK PROBLEM



Similar documents
Modified Line Search Method for Global Optimization

Asymptotic Growth of Functions

A Combined Continuous/Binary Genetic Algorithm for Microstrip Antenna Design

Chatpun Khamyat Department of Industrial Engineering, Kasetsart University, Bangkok, Thailand

5 Boolean Decision Trees (February 11)

In nite Sequences. Dr. Philippe B. Laval Kennesaw State University. October 9, 2008

The Power of Free Branching in a General Model of Backtracking and Dynamic Programming Algorithms

Domain 1: Designing a SQL Server Instance and a Database Solution

A probabilistic proof of a binomial identity

1. Introduction. Scheduling Theory

*The most important feature of MRP as compared with ordinary inventory control analysis is its time phasing feature.

.04. This means $1000 is multiplied by 1.02 five times, once for each of the remaining sixmonth

Chapter 7 Methods of Finding Estimators

Running Time ( 3.1) Analysis of Algorithms. Experimental Studies ( 3.1.1) Limitations of Experiments. Pseudocode ( 3.1.2) Theoretical Analysis

THE ARITHMETIC OF INTEGERS. - multiplication, exponentiation, division, addition, and subtraction

Soving Recurrence Relations

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

Taking DCOP to the Real World: Efficient Complete Solutions for Distributed Multi-Event Scheduling

I. Chi-squared Distributions

Output Analysis (2, Chapters 10 &11 Law)

Properties of MLE: consistency, asymptotic normality. Fisher information.

Chapter 6: Variance, the law of large numbers and the Monte-Carlo method

Lecture 2: Karger s Min Cut Algorithm

The analysis of the Cournot oligopoly model considering the subjective motive in the strategy selection

Measures of Spread and Boxplots Discrete Math, Section 9.4

ODBC. Getting Started With Sage Timberline Office ODBC

Chair for Network Architectures and Services Institute of Informatics TU München Prof. Carle. Network Security. Chapter 2 Basics

A Constant-Factor Approximation Algorithm for the Link Building Problem

(VCP-310)

Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

MTO-MTS Production Systems in Supply Chains

where: T = number of years of cash flow in investment's life n = the year in which the cash flow X n i = IRR = the internal rate of return

NEW HIGH PERFORMANCE COMPUTATIONAL METHODS FOR MORTGAGES AND ANNUITIES. Yuri Shestopaloff,

Department of Computer Science, University of Otago

Vladimir N. Burkov, Dmitri A. Novikov MODELS AND METHODS OF MULTIPROJECTS MANAGEMENT

Integer Factorization Algorithms

Hypergeometric Distributions

Stochastic Online Scheduling with Precedence Constraints

A Faster Clause-Shortening Algorithm for SAT with No Restriction on Clause Length

Dynamic House Allocation

Sequences and Series

Recovery time guaranteed heuristic routing for improving computation complexity in survivable WDM networks

Chapter 5 Unit 1. IET 350 Engineering Economics. Learning Objectives Chapter 5. Learning Objectives Unit 1. Annual Amount and Gradient Functions


Irreducible polynomials with consecutive zero coefficients

Engineering Data Management

CS103X: Discrete Structures Homework 4 Solutions


Estimating Probability Distributions by Observing Betting Practices

Iran. J. Chem. Chem. Eng. Vol. 26, No.1, Sensitivity Analysis of Water Flooding Optimization by Dynamic Optimization

Week 3 Conditional probabilities, Bayes formula, WEEK 3 page 1 Expected value of a random variable

Example 2 Find the square root of 0. The only square root of 0 is 0 (since 0 is not positive or negative, so those choices don t exist here).

Infinite Sequences and Series

Incremental calculation of weighted mean and variance

CHAPTER 3 DIGITAL CODING OF SIGNALS

Designing Incentives for Online Question and Answer Forums

Hypothesis testing. Null and alternative hypotheses

Maximum Likelihood Estimators.

Basic Elements of Arithmetic Sequences and Series

COMPARISON OF THE EFFICIENCY OF S-CONTROL CHART AND EWMA-S 2 CONTROL CHART FOR THE CHANGES IN A PROCESS

Your organization has a Class B IP address of Before you implement subnetting, the Network ID and Host ID are divided as follows:

1 Computing the Standard Deviation of Sample Means

Theorems About Power Series

Chapter 7: Confidence Interval and Sample Size

Lecture 3. denote the orthogonal complement of S k. Then. 1 x S k. n. 2 x T Ax = ( ) λ x. with x = 1, we have. i = λ k x 2 = λ k.

3. Greatest Common Divisor - Least Common Multiple

Trigonometric Form of a Complex Number. The Complex Plane. axis. ( 2, 1) or 2 i FIGURE The absolute value of the complex number z a bi is

Confidence Intervals for One Mean

The Forgotten Middle. research readiness results. Executive Summary

PENSION ANNUITY. Policy Conditions Document reference: PPAS1(7) This is an important document. Please keep it in a safe place.

CS100: Introduction to Computer Science

Research Article Allocating Freight Empty Cars in Railway Networks with Dynamic Demands

Research Article Sign Data Derivative Recovery

THE ABRACADABRA PROBLEM

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 13

Lesson 15 ANOVA (analysis of variance)

Amendments to employer debt Regulations

5: Introduction to Estimation

Evaluating Model for B2C E- commerce Enterprise Development Based on DEA

Statistical inference: example 1. Inferential Statistics

Subject CT5 Contingencies Core Technical Syllabus

DAME - Microsoft Excel add-in for solving multicriteria decision problems with scenarios Radomir Perzina 1, Jaroslav Ramik 2

TIGHT BOUNDS ON EXPECTED ORDER STATISTICS

CHAPTER 3 THE TIME VALUE OF MONEY

Managing Risk in a Four-Digit Number Game

The Stable Marriage Problem

AP Calculus AB 2006 Scoring Guidelines Form B

Perfect Packing Theorems and the Average-Case Behavior of Optimal and Online Bin Packing

INVESTMENT PERFORMANCE COUNCIL (IPC)

Using a genetic algorithm to optimize the total cost for a location-routing-inventory problem in a supply chain with risk pooling

Project Deliverables. CS 361, Lecture 28. Outline. Project Deliverables. Administrative. Project Comments

Tradigms of Astundithi and Toyota

Research Method (I) --Knowledge on Sampling (Simple Random Sampling)

Heterogeneous Vehicle Routing Problem with profits Dynamic solving by Clustering Genetic Algorithm

Domain 1: Configuring Domain Name System (DNS) for Active Directory

Ekkehart Schlicht: Economic Surplus and Derived Demand

CS103A Handout 23 Winter 2002 February 22, 2002 Solving Recurrence Relations

1 Correlation and Regression Analysis

SEQUENCES AND SERIES

Stock Market Trading via Stochastic Network Optimization

Transcription:

THE CARDINALITY CONSTRAINED MULTIPLE KNAPSACK PROBLEM A THESIS SUBMITTED TO THE GRADUATE SCHOOL OF NATURAL AND APPLIED SCIENCES OF MIDDLE EAST TECHNICAL UNIVERSITY BY MURAT ASLAN IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE IN INDUSTRIAL ENGINEERING NOVEMBER 2008

Approval of the thesis: THE CARDINALITY CONSTRAINED MULTIPLE KNAPSACK PROBLEM submitted by Murat ASLAN i partial fulfillmet of the requiremets for the degree of Master of Sciece i Idustrial Egieerig Departmet, Middle East Techical Uiversity by, Prof. Dr. Caa Özge Dea, Graduate School of Natural ad Applied Scieces Prof. Dr. Nur Evi Özdemirel Head of Departmet, Idustrial Egieerig Prof. Dr. Meral Azizoğlu Supervisor, Idustrial Egieerig Dept., METU Examiig Committee Members: Prof. Dr. Ömer Kırca Idustrial Egieerig Dept., METU Prof. Dr. Meral Azizoğlu Idustrial Egieerig Dept., METU Asst. Prof. Dr. F. Ca Çetikaya Idustrial Egieerig Dept., Çakaya Uiversity Asst. Prof. Dr. Sedef Meral Idustrial Egieerig Dept., METU Asst. Prof. Dr. Seçil Savaşaeril Idustrial Egieerig Dept., METU Date: 2..2008

I hereby declare that all iformatio i this documet has bee obtaied ad preseted i accordace with academic rules ad ethical coduct. I also declare that, as required by these rules ad coduct, I have fully cited ad refereced all material ad results that are ot origial to this work. Name, Last ame: Murat ASLAN Sigature : iii

ABSTRACT THE CARDINALITY CONSTRAINED MULTIPLE KNAPSACK PROBLEM ASLAN, Murat M.S., Departmet of Idustrial Egieerig Supervisor : Prof. Dr. Meral AZİZOĞLU November 2008, 6 pages The classical multiple kapsack problem selects a set of items ad assigs each to oe of the kapsacks so as to maximize the total profit. The kapsacks have limited capacities. The cardiality costraied multiple kapsack problem assumes limits o the umber of items that are to be put i each kapsack, as well. Despite may efforts o the classical multiple kapsack problem, the research o the cardiality costraied multiple kapsack problem is scarce. I this study we cosider the cardiality costraied multiple kapsack problem. We propose heuristic ad optimizatio procedures that rely o the optimal solutios of the liear programmig relaxatio problem. Our computatioal results o the large-sized problem istaces have show the satisfactory performaces of our algorithms. Keywords: Cardiality Costraied Multiple Kapsack Problem, Liear Programmig Relaxatio, Optimizatio iv

ÖZ SAYI KISITLI ÇOKLU SIRT ÇANTASI PROBLEMİ ASLAN, Murat Yüksek Lisas, Edüstri Mühedisliği Bölümü Tez Yöeticisi : Prof. Dr. Meral AZİZOĞLU Kasım 2008, 6 sayfa Klasik çoklu sırt çatası problemi toplam kazacı e çoklaya parça kümesii seçer ve seçile her parçayı sırt çatalarıda birie atar. Sırt çatalarıı sıırlı kapasiteleri vardır. Sayı kısıtlı çoklu sırt çatası problemi her bir sırt çatasıa koa parça sayısıda da kısıt olduğuu varsayar. Klasik çoklu sırt çatası problemi içi pek çok çaba sarf edilmiş olsa da, sayı kısıtlı çoklu sırt çatası problemi üzerideki araştırmalar sıırlıdır. Bu çalışmada sayı kısıtlı çoklu sırt çatası problemii ele aldık. Doğrusal programlama gevşetmesi problemii e iyi çözümlerie dayaa sezgisel ve eiyileme yötemleri öerdik. Büyük boyutlu problemler üzeride aldığımız deeysel souçlar yötemlerimizi tatmi edici performasıı göstermektedir. Aahtar Kelimeler: Sayı Kısıtlı Çoklu Sırt Çatası Problemi, Doğrusal Programlama Gevşetimi, E İyileme v

To my parets, Çağlaya ad Yasemi vi

ACKNOWLEDGEMENTS I am deeply grateful to my thesis supervisor Prof. Dr. Meral Azizoğlu for her efforts, guidace ad support throughout the study. She ot oly guided me perfectly, but also ecouraged me to perform better i the study. thesis. I would like to thak ury members for their valuable cotributios o the I would like to thak to my family members: Hasa Asla, Nuray Asla, Çağlaya Asla ad Yasemi Saldalı for their moral support. I would like to thak my compay, ASELSAN, for the support about thesis study permissios. I would like to thak my maager Zafer Dokuzoğlu for allowig me to go for thesis study wheever I eeded ad coverig my vacacy. I would like to thak my dear frieds Alper Taş ad Güveç Değirmeci for their ivaluable help; Altay Emre Poyraz for the articles he supplied from the Library of Bilket Uiversity ad cheerful compay; Şafak Baykal for her support ad guidace; Zafer Yahşi ad Tuç Taer Gürlek for their isight ad wisdom; Bau Lokma, Eda Göksoy ad Nesliha Özlü for their moral support, ad my dear frieds from the group of Edustri Tayfasi for their useful feedbacks ad ivaluable friedship. Ad fially, thaks to TÜBİTAK for the scholarship, which is provided throughout my master study. vii

TABLE OF CONTENTS ABSTRACT... iv ÖZ...v ACKNOWLEDGEMENTS... vii TABLE OF CONTENTS... viii LIST OF TABLES... x LIST OF FIGURES... xi CHAPTER INTRODUCTION... 2 PROBLEM DEFINITION AND LITERATURE REVIEW...4 2. Problem Defiitio...4 2.. Classical Kapsack Problem...4 2..2 Subset Sum Problem (SSP)...5 2..3 Multiple Kapsack Problem (MKP)...5 2..4 Cardiality Costraied Sigle Kapsack Problem...6 2..5 Cardiality Costraied Multiple Kapsack Problem...7 2.2 Literature Survey for Cardiality Costraied Multiple Kapsack Problem...8 2.2. Sigle Kapsack Problems with the Cardiality Costrait...9 2.2.2 Literature Related With Multiple Kapsack Problems... 3 THE kmkp...2 3. Upper Bouds ad Heuristic...3 3.. Upper Bouds...3 3..2 Heuristic Procedure...7 3.2 Brach ad Boud...28 4 COMPUTATIONAL RESULTS...39 4. Iput Geeratio...39 4.2 Performace Measures...40 4.3 Strategy Selectio...4 viii

4.4 Effects of Parameters...42 4.5 Effects of Mechaisms...46 4.6 Mai Rus...50 4.7 Limit of Our Solutio Method...56 5 CONCLUSIONS...58 REFERENCES...60 ix

LIST OF TABLES Table 3.: The Profit ad Weight Values for the 2-Item ad 2-Kapsack Example Problem... 20 Table 3.2: The Optimal Iteger Programmig Solutio of the k-mkp... 2 Table 3.3: LP-Relaxed Solutio of the k-mkp... 22 Table 3.4: Greedy Assigmet of Items Accordig to Maximum p Rule... 24 Table 3.5: Greedy Assigmet of Items Accordig to Maximum /w Rule... 25 Table 3.6: Greedy Assigmet of Items Accordig to Maximum p /w Rule... 26 Table 3.7 : The Profit ad Weight Values for the 8-Item 2-Kapsack Example Problem... 32 Table 3.8: The Optimal LPR Solutio of 8-Item 2-Kapsack Example Problem... 33 Table 3.9: The Data for the 6-Item 2-Kapsack Example Problem... 36 Table 4.: Geerated Problems... 40 Table 4.2: Brachig Strategy Evaluatio for B&B... 42 Table 4.3: Capacity Effect o the Performace of B&B... 43 Table 4.4: Cardiality Effect o the Performace of B&B... 44 Table 4.5: Weight Effect-Lower Boud Compariso... 45 Table 4.6: Weight Effect-Brach ad Boud Compariso... 46 Table 4.7: Effects of UB... 47 Table 4.8: Effects of UB 2... 48 Table 4.9: Effects of UB 3... 49 Table 4.0: Effects of LB o Brach ad Boud CPU Values.... 50 Table 4.: Upper Boud Performaces at Root Node... 5 Table 4.2: Performace of Naïve Lower Boud... 52 Table 4.3: Performace of Heuristic Algorithm (LB 2 )... 53 Table 4.4: Number of Fractioal x Variables... 54 i Table 4.5: Performace Evaluatio for B&B Part... 55 Table 4.6: Performaces of B&B ad CPLEX algorithms... 56 Table 4.7: Limit Ru Experimets... 57 x

LIST OF FIGURES Figure 3.: Summary of Problem i Item Represetatio.... 20 Figure 3.2: Kapsacks o Nodes Represetatio... 29 Figure 3.3: Items o Nodes B&B Represetatio... 30 Figure 3.4: Brachig Tree... 3 Figure 3.5: 6-Item 2-Kapsack Brach ad Boud Tree... 38 xi

CHAPTER INTRODUCTION Cosider a capable sportsma who is good at playig several braches of sports icludig football, basketball, volleyball ad teis. The sportsma gets differet utility from each sport brach. To play a game he has to take the correspodig ball havig a specified volume. His sport bag has a limited capacity so that he caot take all balls oe at a time. His problem is to fid the set of balls to take, hece the set of sports to play, so that the capacity of bag is ot exceeded ad the total utility is maximized. This optimizatio problem is kow to be the Sigle Kapsack Problem (KP) i OR literature. If the sportsma has more tha oe sport bag the the associated problem is referred to as Multiple Kapsack Problem (MKP). Additioally, if there are limits o the umber of balls that each sports bag ca take, the the associated problem is the Cardiality Costraied Multiple Kapsack Problem (kmkp). The part selectio problem i automated maufacturig systems is aalogous to the kmkp. Assume there are part types that are to be selected for processig by m Computerized Numerically Cotrolled (CNC) machies where machie i has a limited capacity of C i time uits. Part type has a processig requiremet of w time uits ad there is a profit p moey uits if selected for processig. The problem is to select a subset of the part types so as to maximize the total profit. The cardiality costraits of the KMKP may correspod to the tool magazie capacities of the CNC machies i the part selectio problem. The umber of setups that ca be made o each machie may also defie the cardiality costraits.

The kapsack problems have several practical applicatio areas i the maufacturig ad service idustries. Oe applicatio area for the KP is the hitchhiker problem that is stated i Martello ad Toth (990). The hitch-hiker has to fill up his kapsack amog various possible obects so as to maximize his comfort. I the problem p i is the measure of his comfort take from obect i, w is its size, ad C is the size (volume) of the kapsack. The cuttig stock problem is aother area where the kapsack problems fid their applicatios. The cuttig stock problem ca be stated as follows: Assume you work i a paper mill ad you have a umber of rolls of paper of fixed width waitig to be cut, yet differet customers wat differet umbers of rolls of various-sized widths. The problem is to fid a way to cut the rolls so that the scrap is miimized. Solvig this problem to optimality ca be ecoomically sigificat: a differece of % for a moder paper machie ca be worth more tha millio US$ per aum (Wikipedia, free ecyclopedia). The KP is used as a subproblem i solvig the cuttig stock problems with colum geeratio techique. I the busiess eviromets, the KP is used for ivestmet plaig. Cosider a ivestor who has a certai amout of moey (C) ad a list of possible ivestmet alteratives. Each ivestmet alterative has a capital required (w ) ad a expected retur (p ) over a plaig period. The problem is to select the set of ivestmet alteratives so that the budget is ot exceeded ad the total retur is maximized. Clearly, such a ivestmet problem associates to the KP. Despite its simple structure, the solutio of the KP is ot that easy. Each item selectio is defied by a biary decisio variable that takes value if the item is selected ad 0 otherwise. A simple approach would be to examie all possible arragemets of the biary variables. For items problem there are 2 such biary variables. As Martello ad Toth (990) state, o a computer that examies oe billio variables per secod, it takes 30 years to eumerate the possible solutios whe there are 60 items. If you icrease the umber of items to 65 the it will take te ceturies. 2

The kapsack problems have bee studied for several decades as they are the simplest maximizatio problems. Mathews (897) shows how several costraits may be compiled ito oe sigle kapsack costrait. What Mathews (897) had doe is ow called as reductio of a iteger program to KP. Garey ad Johso (979) focus comprehesively o the theory of itractability ad NP-completeess of the KP. They show that the KP is NP-hard i the ordiary sese. The problem ca be solved by pseudopolyomial time dyamic programmig algorithm. O the other had, the Multiple Kapsack Problem is strogly NP-hard, hece there caot exist polyomial, eve pseudopolyomial algorithm, to fid optimal solutios. The cardiality costraied multiple kapsack problem is strogly NP-hard, as all geeralizatios of the MKP. The KP ad MKP are widely studied i the literature. However, there are limited reported studies o the kmkp. Recogizig this fact, we itroduce solutio algorithms for the kmkp. We observe that the liear programmig relaxatio of the problem produces very satisfactory results ad ca be used as a basis i developig solutio algorithms. The rest of the thesis is orgaized as follows. I Chapter 2 we give the mathematical represetatio of the kapsack problems ad review the related literature. Chapter 3 is the mai body of our work where the heuristic algorithm ad brach ad boud algorithm are preseted. I Chapter 4 we preset the results of our computatioal experimets. I Chapter 5 we coclude by poitig our mai results ad possible future research directios. 3

CHAPTER 2 2 PROBLEM DEFINITION AND LITERATURE REVIEW I this chapter, we first discuss several versios of the kapsack problem. We the review the literature o cardiality costraied sigle kapsack problem ad multiple kapsack problem. Those two problems appear as special cases of the cardiality costraied multiple kapsack problem. 2. Problem Defiitio 2.. Classical Kapsack Problem The classical kapsack problem ca be formally defied as follows: Cosider a set of items N={,.,} ad a kapsack with capacity of C time uits. Item i set N has a profit p ad capacity usage of w time uits. The profit ca be iterpreted as the relative importace of the item or simply the beefit (like moey) brought due to its selectio. The capacity usage w for item ca as well be iterpreted as the amout of space occupied by the item. I a productio eviromet, w ca represet the processig time, i.e., requiremet, by item. C is the kapsack capacity which may represet the amout of space available. I productio eviromets, C may represet the time capacity, i.e, available machie time. Oe more importat poit is that w ad C are i the same uits. Usually p, w ad C are assumed to be positive iteger umbers. The classical kapsack problem, deoted as KP, is the simplest o-trivial iteger programmig model with biary variables, with a sigle costrait ad biary variables. The model is preseted below. 4

(KP) maximize p = x subect to = w x C x {0,} =,., The sigle kapsack problem is show to be NP-hard i the ordiary sese (Garey ad Johso, 979). The studies i the literature assume that w C, =,., ad w C w C is required as otherwise item would be trivially removed. = > = w > C is assumed as otherwise a trivial solutio that assigs all items would be foud. 2..2 Subset Sum Problem (SSP) If the profits ad weights are idetical for all items, i.e., p =w for all, we get the well kow Subset Sum Problem (SSP). The SSP fids a subset of N items such that the correspodig total profit is maximized without exceedig the available capacity C. I productio eviromets, the obective fuctio ca be iterpreted as the used capacity which is to be maximized. The SSP is NP-hard i ordiary sese. (Martello ad Toth, 990) 2..3 Multiple Kapsack Problem (MKP) The Multiple Kapsack Problem is a geeralizatio of the sigle classical kapsack problem. I the MKP we are give a set of items N = {,.,} with profits p ad weights w, =,.., ad set of kapsacks M = {,.,m} with positive capacities C i, i=,.,m. The MKP is NP-hard i the strog sese (Martello ad Toth, 990). 5

The MKP Model ca be stated as maximize m i= = p x i subect to w xi = C i i=,..,m m i= i x =,.., i x {0, } i=,,m =,,. The followig assumptios are made for the MKP i the literature.. Every item must fit to at least oe of the kapsacks, i.e., wmax C max where C max =max{c,c 2, C m } ad w max =max{w,w 2,.,w } otherwise the associated items are trivially elimiated. 2. All kapsacks should take at least oe item, i.e., wmi C mi where C mi =mi{c,c 2, C m } ad w mi =mi{w,w 2,.,w } otherwise the associated kapsacks are elimiated. 3. Moreover, the trivial solutios that select all items should be avoided, i.e., = w > C max otherwise all items would be put to the maximum capacity kapsack. 2..4 Cardiality Costraied Sigle Kapsack Problem If there is a costrait o the umber of items icluded i each kapsack, the associated problem is referred to as cardiality costraied sigle kapsack problem. Whe the selectio of the item causes explicit hadlig, the solutios with a small umber of larger items will be preferred to the oe with large umber of smaller items. 6

x = The umber of items ca be icluded i the obective fuctio so as to x = obtai a bi-obective kapsack problem, or ca be a costrait, i.e., = x K. The latter problem is a cardiality costraied sigle kapsack problem, which is deoted as kkp i the OR literature. The kkp model is give below. (KP) maximize p = x subect to = w x C = x K x {0,} =,., Recall that the KP is NP-hard but pseudopolyomially solvable by a dyamic program. Caprara et al. (2000) show that the kkp is NP-hard i the ordiary sese, as well. 2..5 Cardiality Costraied Multiple Kapsack Problem If the cardiality costraied sigle kapsack problem has multiple kapsacks the it is referred to as the cardiality costraied multiple kapsack problem (kmkp). That meas each bag has a limit o the umber of balls you put i the bag. I productio eviromets, there ca be limits o the umber of obs if each ob requires a set-up, hece they ca have upper bouds o the umber of the items. MKP is a special case of the kmkp with ifiite kapsack cardialities. MKP is strogly NP-hard, so is the kmkp. The kmkp model is expressed below: 7

Let K i be the maximum umber of items that ca be assiged to kapsack i. The the kmkp model is expressed below. maximize m i= = p x i subect to w xi = C i i=,..,m m i= x =,.., i x i = K i i=,.,m x {0, } i=,,m =,,. i The model has mx biary decisio variables x i ad 2m+ costraits 2.2 Literature Survey for Cardiality Costraied Multiple Kapsack Problem The classical kapsack problem ad its variatios are studied eormously i the OR literature due to its simple structure ad ability to model may idustrial situatios. The practical implicatios iclude but ot limited to, capital budgetig, cargo loadig, productio plaig or cuttig stock cases. We study the literature o the kapsack problems that are most closely related to our problem: amely sigle kapsack problem with cardiality costraits ad multiple kapsack problem. For both problems, we make the survey i the chroological order. For the classical sigle ad multiple kapsack problems ad their variatios, we refer the reader to the book by Kelleler, Pferschy ad Psiger (2004). I the book, the models ad the associated solutio algorithms are studied thoroughly. 8

2.2. Sigle Kapsack Problems with the Cardiality Costrait Campello ad Makula (987) are oe of the first researchers who focused o the cardiality costraied sigle kapsack problem (kkp). They study the cardiality costraied liear programmig relaxatio of the kapsack problem (LPK-k). They itroduce the followig model: Q(k) = max p x subect to = = w x C = x = K 0 x =,., A O( 3 ) algorithm is developed by Campello ad Makula (987) solvig the problem (LPK-k). for Dudziski (989) also deals with the cardiality costraied liear programmig kapsack problem (LPK-k). To fid a upper boud he presets a more relaxed model tha the oe itroduced by Campello ad Makula (987). Dudziski (989) revises the otatio used i Campello ad Macula (987) as follows, Q(k) = max ( Kp + ( p p ) x ) subect to i = i = ( w w ) x i T kw i = x = K 0 x =,., 9

Dudziski (989) improves the O( 3 ) algorithm, developed by Campello ad Makula (987) ad proposes O( 2 ) algorithm for the cardiality costraied liear programmig kapsack problem (LPK-k) ad obtais the followig model LPK-i-k. Q i (k) = kp i + max = ( p p ) x i subect to = ( w w ) x i T Kw i 0 x =,., Q(k) Q i (k) i N Caprara et al. (2000) study the k-item Kapsack Problem (kkp) ad exact k- item Kapsack Problem (E-kKP). The kkp ca be formulated as KP with a additioal costrait. The E-kKP is a variat of the kkp where the umber of items must be exactly K, i.e., = x = K. Caprara et al. (2000) show that the kkp ad E- kkp ca be trasformed to each other, hece ay kkp istace ca be solved usig the methods developed for the E-kKP. Caprara et al. (2000) develop a ½ approximatio algorithm that rus i O() by usig the LP relaxatio of the kkp. This algorithm is used by, Caprara et al. (2000) i developig a Polyomial Time Approximatio Scheme. The scheme rus i (O /ε - ) time ad requires a liear space. Fially i 2006, Mastrolilli ad Hutter study the same problem ad preset a liear-storage polyomial time approximatio scheme (PTAS) ad a fully polyomial time approximatio scheme (FPTAS). They use iput roudig (arithmetic or geometric roudig) techiques ad show that PTAS requires liear space ad has a ruig time of O(+k(log/ε ) O(/ε ) ). Hece it is superior to PTAS proposed by Caprara et al. (2000). 0

2.2.2 Literature Related With Multiple Kapsack Problems Igargiola ad Korsh (975) propose a algorithm for 0- Loadig Problem i which te radom istaces are solved with 5 items ad 6 kapsacks. This paper was oe of the first papers focusig o the Multiple Kapsack Problem. Hug ad Fisc (978) also focus o the Multiple Kapsack Problem ad preset Lagragea ad Surrogate relaxatio techiques. A brach-ad-boud algorithm that avoids the redudacy of the partial solutios is preseted. They compare their results by those of Igargiola ad Korsh (975) ad show the superiority of their approach. Martello ad Toth (98) propose a heuristic algorithm for the Multiple Kapsack Problem (MKP). They solve practical istaces with up to 000 items ad 00 kapsacks ad show that their solutios are satisfactory. A Polyomial Time Approximatio Scheme (PTAS) is provided by Murgolo (987). Hochbaum ad Shymoys (988) give PTAS usig the dual based approach where they covert the schedulig problem ito a bi packig problem. Lawler et al. (993) also propose a PTAS that uses the ideas from uiform multi-processor schedulig. The obective is to assig a set of obs with give processig times to the machies of differet speeds so as to miimize the makespa. The most recet PTAS is proposed by Chekuri ad Khaa (2000).

CHAPTER 3 3 THE kmkp referece. The mathematical model of the kmkp is restated below for the ease of maximize m i= = p x i m subect to x =,.., () i= i w xi = x i = K i C i i=,..,m (2) i=,.,m (3) where, Obective : Maximizig the total profit Parameters p : profit of item w : weight (capacity usage) of item x {0, } i=,,m =,,. i C i : capacity of kapsack i K i : cardiality of kapsack i Decisio Variables i x : the biary decisio variable about whether item is assiged to kapsack i or ot. 2

x i if item is assiged to kapsack i = 0 otherwise Costrait sets, 2 ad 3 explai assigmet, capacity ad cardiality costraits respectively. I this chapter, we preset our approach to study the kmkp. We first discuss our boudig mechaism: upper boud ad lower boud (heuristic), ad the preset our brach ad boud algorithm. 3. Upper Bouds ad Heuristic I this sectio, we first preset several upper bouds that are obtaied through various relaxatios of the problem. We the preset our heuristic procedure that aims to fid a satisfactory approximate solutio. The heuristic solutio is used as a iitial feasible solutio i our brach ad boud algorithm, discussed i Sectio 3.2. 3.. Upper Bouds Recall that our problem has a maximizatio type obective fuctio. This follows that ay relaxatio of the problem provides a upper boud o the optimal obective fuctio value. I this study we use two types of relaxatios: costrait relaxatio ad cotiuous relaxatio. Each of these relaxatios is discussed below; 3... Costrait Relaxatio Our problem has three costrait sets: assigmet, capacity ad cardiality costraits. Whe ay oe of the capacity ad cardiality costrait sets is removed, a optimal solutio to the resultig problem provides a upper boud o the maximum total profit value. If the resultig solutio, by chace satisfies the removed costraits, the the optimal solutio is also optimal for the origial problem. We ow discuss each of these costrait relaxatios. 3

Relaxatio of the Capacity Costraits: Whe the capacity costraits are removed, the resultig model ca be stated as follows: kmkp Model (Capacity Costrait Relaxed) : maximize m i= = p x i m subect to x =,.., i= i x i = K i i=,.,m items. x {0, } i=,,m =,,. i A optimal solutio to this relaxed problem assigs a total of m Mi K i= i, If m K i i= the all items will be assiged with a total profit of p =. If > m K i i= m K i i= the the items havig the maximum profits will be assiged to m kapsacks. I such a case, the maximum total profit is p[ ] where m K i i= p [ ] is the th largest profit ad R= deoted as UB. R = Mi{, R}. The overall upper boud is p [ ], ad is = Relaxatio of the Cardiality Costraits: Whe the cardiality costraits are removed, the resultig model is a classical multiple kapsack model that is stated below. kmkp Model (Cardiality Costrait Relaxed) : maximize m i= = p x i 4

subect to w xi = C i i=,..,m m i= i x =,.., i x {0, } i=,,m =,,. Recall that the multiple kapsack problem is strogly NP-hard. I place of usig optimal solutios that are obtaied i expoetial time, a polyomial time upper boud ca be used. A upper boud o the multiple kapsack problem is a valid upper boud for our problem. This is due to the fact that a upper boud for ay relaxatio of a maximizatio problem is a valid upper boud o the origial problem. I the literature, several upper bouds are proposed for the multiple kapsack problem. A optimal solutio to the cotiuous relaxatio of the problem (that replaces x i {0,} with 0 x ) is a upper boud. This optimal solutio is stated below: i Cosider a sigle surrogate kapsack with capacity Ci. Order the items i their oicreasig p /w values, ad assig them to the kapsack accordig to the order util the capacity is fully used or o item remais, whichever is observed first (Martello ad Toth, 990). Note that such a assigmet eds up with at most oe fractioal item. We refer the boud foud by the cotiuous relaxatio of the multiple kapsack problem as UB 2. Formally the upper boud, UB 2, is stated below: Assume R satisfies, R w[ ] C = i R+ ad w[ ] > C = i R C i w is the total capacity remaiig to the (R+) th = [ ] item. The cotributio of the (R+) th item to the total profit is, 5

p [ R+ ] R Ci w = [ R+ ] w [ ] The overall upper boud, UB 2, becomes R UB 2 = p [ ] + p[ R+ ] C = [ R ] = + i w R w [ ] 3...2 Liear Programmig Relaxatio (LPR) Whe the costraits o the itegrality of the assigmet variables are removed the problem becomes maximize m i= = p x i subect to w xi = C i i=,..,m m i= x =,.., i x i = K i i=,.,m 0 x i=,,m =,,. i The above model is the Liear Programmig Relaxatio (LPR) of the origial problem, ad its optimal solutio provides a upper boud o the maximum total profit value. To the best of our kowledge, o simple algorithm is available to solve the LPR of the problem. Hece a optimal solutio, UB 3, ca be foud by usig ay commercial LP software. We use the upper bouds i the followig sequel: UB -UB 2 -UB 3, i.e., from easiest to hardest. That is, we first evaluate the partial solutios by UB, if we caot make ay elimiatio the we compute UB 2. If UB 2 is ot of ay help the we compute the most powerful, however most costly upper boud, UB 3. 6

We beefit from the optimal LPR solutio i fidig a feasible solutio to our problem as well. The associated heuristic is discussed i the ext sectio. 3..2 Heuristic Procedure below: I the heuristic procedure, we basically follow three steps that are stated Step. Solve the LP relaxed problem, LPR. Let LP xi be the optimal LP assigmet. Assig item to kapsack i oly if LP x i = for all i ad. Such a assigmet results i a feasible solutio as it satisfies the capacity ad cardiality costraits ad the itegrality requiremets. This value is a lower boud too but it is aive. We call it as aive lower boud (LB ). Step 2. Let T be the set of items that are ot assiged i Step, ad S be the set of assiged i Step, i.e., S={,2,..}/T. The, solve the followig reduced problem. maximize subect to T i p x i w x C w x i=,..,m i i S i m i= i x =,.., i x K x i=,..,m i i S i x {0, } i=,,m =,,. The reduced problem is strogly NP-hard, as well. However due to the expoetial ature of the problem fidig a optimal solutio to the problem is much easier tha fidig a optimal solutio to the origial problem. Alterately the reduced problem ca be solved heuristically through the followig procedure. 7

Step 2. Assig the uassiged items accordig to a greedy procedure. Step 2.2 Improve the solutio obtaied i Step 2. via iterchages. Step 2. is referred to as costructio phase whereas Step 2.2 is a improvemet phase. 3..2. Costructio Phase The items are sorted accordig to a priority rule ad they are assiged to a kapsack accordig to a assigmet rule. We use the followig three priority rules for item orderig:. Maximum p Rule: The items are sorted i their oicreasig order of p values. Accordig to this rule, priority is give to the items havig higher profit values. 2. Miimum w Rule: The items are sorted i their odecreasig order of w values. Accordig to this rule, priority is give to the items havig lower capacity usages. 3. Maximum p /w Rule: The items are sorted i their oicreasig order of p /w values. Accordig to this rule, priority is give to the items havig higher uit profit values. We use the followig four kapsack assigmet rules:. Maximum Remaiig Capacity Rule: The first item of the order is assiged to the kapsack havig the maximum uused capacity. 2. Miimum Capacity Used Rule: The first item of the order is assiged to the kapsack havig the miimum used capacity. As the capacities of the kapsacks are ot ecessarily idetical, the kapsack with maximum remaiig capacity is ot ecessarily the oe havig the miimum used capacity. 3. Maximum Remaiig Cardiality Rule: The first item of the order is assiged to the kapsack havig the maximum umber of items that ca be assiged. 8

4. Miimum Number of Items Used Rule: The first item of the order is assiged to the kapsack havig the miimum umber of items already assiged. As the cardialities of the kapsacks are ot ecessarily idetical, the kapsack with the maximum remaiig cardiality is ot ecessarily the oe havig the miimum used cardiality. Note that we have 3 priority rules ad 4 assigmet rules. This results i 2 solutios, some of which may be idetical. We obtai all these solutios ad select the oe havig the maximum total profit value. The selected solutio is improved by the improvemet phase discussed ext. 3..2.2 Improvemet Phase The improvemet phase looks for the possibility of icreasig the maximum total profit by puttig a uassiged item to a kapsack i place of a already assiged item. We let r be a uassiged item ad s be a assiged item. We check whether puttig item r i place of item s is feasible ad p r >p s, i.e., the exchage icreases the total profit value. Amog all feasible pairs that icrease the total profit, we select the oe that leads to a maximum improvemet. We termiate either all pairs lead to ifeasible or oimprovig solutios. Example: We illustrate the heuristic via a example problem. Table 3. gives the profit ad weight values i a 2-item 2-kapsack problem 9

Table 3.: The Profit ad Weight Values for the 2-Item ad 2-Kapsack Example Problem Item 2 3 4 5 6 7 8 9 0 2 p 50 50 64 46 50 5 50 40 70 62 6 28 w 56 59 80 64 75 7 25 20 35 3 2 0 Capacities of kapsacks are C = 90 ad C 2 = 70. Cardialities for kapsacks are K = 4 ad K 2 =4. Figure 3. summarizes the problem eviromet. The represetatio profit is ItemNumber. For example, 50 weight 56 states that item has a profit of 50 uits ad a weight of 56 uits. 50 56 2 50 59 3 64 80 4 46 5 50 64 75 6 5 7 7 50 25 8 40 20 9 70 35 0 62 3 6 2 28 2 0 Figure 3.: Summary of Problem i Item Represetatio. We first costruct the kapsack model for the example problem as k-mkp Model maximize 2 2 i= = p x i 2 subect to w 90 = 2 = w x x2 70 20

2 i= 2 = 2 = i x =,..,2 x i x 4 2 4 x {0, } i=,2 =,,2. The optimal values of the decisio variables are summarized i the below table. Table 3.2: The Optimal Iteger Programmig Solutio of the k-mkp Variable Value Variable Value x 0 x 7 0 x 2 0 x 27 x 2 x 8 x 22 0 x 28 0 x 3 0 x 9 x 23 x 29 0 x 4 0 x 0 0 x 24 0 x 20 x 5 x 0 x 25 0 x 2 0 x 6 0 x 2 0 x 26 0 x 22 0 Next we fid a approximate solutio with the heuristic procedure. Heuristic Method Solutio: Step. Solve the followig LP relaxed problem, LPR. 2

maximize 2 2 i= = p x i Solutio: 2 subect to w 90 = 2 = 2 i= 2 = 2 = w x x2 70 x =,..,2 x i x 4 2 4 0 x i=,2 =,,2. i The optimal LP Relaxed solutio has a obective fuctio value of 428.89, ad the solutio values of the decisio variables are tabulated below. Table 3.3: LP-Relaxed Solutio of the k-mkp Variable Value Variable Value x 0 x 7 x 2 x 27 0 x 2 0 x 8 0.45 x 22 x 28 0.55 x 3 x 9 x 23 0 x 29 0 x 4 0 x 0 0 x 24 0 x 20 x 5 0.55 x 0 x 25 0.3 x 2 0 x 6 0 x 2 0 x 26 0 x 22 0,32 22

We assig item to kapsack i if LP x i = Accordigly, x 2 =, x 22 =, x 3 =, x 7 =, x 9= ad x 20 =. The remaiig items 4, 5, 6, 8, ad 2 are either partially assiged or uassiged. Step 2. Solve the followig problem with the remaiig items ad reduced capacities ad cardialities maximize T i p x i subect to w x 90 w x S 2 i= i w x2 70 w x2 S x =,..,2 i x 4 x S xi 4 x2 S x {0, } where assiged items set = {,2,3,7,9,0 } T = { 4,5,6,8,,2 } procedures. S ad uassiged items set. Next we solve the reduced problem with our heuristic assigmet Step 2. Assig the uassiged items accordig to a greedy procedure (costructio phase) This step is summarized i the tables below; I each colum the items are listed accordig to their p, /w or p /w values. I case of a tie i p, /w ad p /w orders we select accordig to /w ad p ad p orders, respectively. For further ties we use p /w ad p /w ad /w, respectively. The remaiig items are assiged to the remaiig capacities ad cardialities accordig to the assigmet rules: maximum capacity left, miimum capacity used maximum cardiality left ad miimum cardiality used. 23

Table 3.4: Greedy Assigmet of Items Accordig to Maximum p Rule p Max Capacity Left Mi Capacity Used Max Cardiality Left Mi Cardiality Used Rem C =50 Used C =40 Rem K = Used K =3 5 50 75 Fixed: 3 64, 7 50, 9 70 80 25 35 Fixed: 3 64, 7 50, 9 70 80 25 35 Fixed: 3 64, 7 50, 9 70 80 25 35 Fixed: 3 64, 7 50, 9 70 80 25 35 4 46 64 Assiged: Assiged: Assiged: Assiged: 8 40 20 8 40 20 8 40 20 8 40 20 8 40 20 2 28 0 Rem C 2 =24 Used C 2 =46 Rem K 2 = Used K 2 =3 6 2 Fixed: Fixed: Fixed: Fixed: 6 5 7 50 50, 56 2 59, 0 62 3 Assiged: 50 50, 56 2 59, 0 62 3 Assiged: 50 50, 56 2 59, 0 62 3 Assiged: 50 50, 56 2 59, 0 62 3 Assiged: 2 28 0 2 28 0 2 28 0 2 28 0 44 44 44 44 Ob 346(fixed) + 346(fixed) + 346(fixed) + 346(fixed) + Value 68 (greedy as) 68 (greedy as) 68 (greedy as) 68 (greedy as) 24

/w Table 3.5: Greedy Assigmet of Items Accordig to Maximum /w Rule Max Capacity Mi Capacity Max Cardiality Mi Cardiality Left Used Left Used Rem C =50 Used C =40 Rem K = Used K =3 2 28 0 6 2 6 5 7 8 40 20 Fixed: 3 64, 7 50, 9 70 80 25 35 Assiged: 2 28 0 Rem C 2 =24 Fixed: 3 64, 7 50, 9 70 80 25 35 Assiged: 2 28 0 Used C 2 =46 Fixed: 3 64, 7 50, 9 70 80 25 35 Assiged: 2 28 0 Rem K 2 = Fixed: 3 64, 7 50, 9 70 80 25 35 Assiged: 2 28 0 Used K 2 =3 4 46 64 5 50 75 Fixed: 50 50, 56 2 59, 0 62 3 Assiged: Fixed: 50 50, 56 2 59, 0 62 3 Assiged: Fixed: 50 50, 56 2 59, 0 62 3 Assiged: Fixed: 50 50, 56 2 59, 0 62 3 Assiged: 6 2 6 2 6 2 6 2 Ob Value 390 346(fixed) + 44 (greedy as) 390 346(fixed) + 44 (greedy as) 390 346(fixed) + 44 (greedy as) 390 346(fixed) + 44 (greedy as) 25

p /w Table 3.6: Greedy Assigmet of Items Accordig to Maximum p /w Rule Max Capacity Mi Capacity Max Cardiality Mi Cardiality Left Used Left Used Rem C =50 Used C =40 Rem K = Used K =3 2 28 0 8 40 20 6 2 4 46 64 Fixed: 3 64, 7 50, 9 70 80 25 35 Assiged: 2 28 0 Rem C 2 =24 Fixed: 3 64, 7 50, 9 70 80 25 35 Assiged: 2 28 0 Used C 2 =46 Fixed: 3 64, 7 50, 9 70 80 25 35 Assiged: 2 28 0 Rem K 2 = Fixed: 3 64, 7 50, 9 70 80 25 35 Assiged: 2 28 0 Used K 2 =3 5 50 75 Fixed: 50 50, 56 2 59, 0 62 3 Fixed: 50 50, 56 2 59, 0 62 3 Fixed: 50 50, 56 2 59, 0 62 3 Fixed: 50 50, 56 2 59, 0 62 3 6 5 7 Assiged: Assiged: Assiged: Assiged: 8 40 20 8 40 20 8 40 20 8 40 20 44 44 44 44 Ob Value 346(fixed) + 68 (greedy as) 346(fixed) + 68 (greedy as) 346(fixed) + 68 (greedy as) 346(fixed) + 68 (greedy as) We obtai all these solutios ad select the oe havig the maximum total profit value. Accordigly, Max{ 44,44, 44,44,390,390,390,390, 44,44, 44,44} = 44 is the total profit value of the selected solutio. 26

Step 2.2 Improve the solutio obtaied i Step 2. via iterchages. Uassiged Set (T): The set cosists of items which are ot assiged to ay kapsack i previous steps. T = {5 50 75,4 46, 6 5 64 7, 6 } 2 Assiged Set (S): The set cosists of items which are assiged to ay kapsack i the previous steps. S= { 3 64, 7 50, 9 70, 50 80 25 35 56,2 50 59, 0 62 3, 8 40 20, 2 28 } 0 This phase looks for the opportuity of icreasig the maximum total profit by puttig a uassiged item to a kapsack i place of a already assiged item. We termiate whe all pairs lead to ifeasible or oimprovig solutios. Pick the pair that causes the maximum improvemet 5 50 75 228 0 Violates the capacity costrait. 4 46 64 2 28 0 Violates the capacity costrait. 5 50 8 40 75 20 4 46 8 40 64 20 chaged. Violates the capacity costrait. Violates the capacity costrait. Note that ay pair does ot lead to a improvemet, hece the solutio is ot 27

The optimal total profit value is 44. Note that costructio phase, by chace, has eded up with the optimal solutio. Hece, o improvemet is possible i the succeedig phase. 3.2 Brach ad Boud Recall that, the cardiality costraied multiple kapsack problem is strogly NP-hard. This ustifies the use of a implicit eumeratio techique to fid a exact solutio. I this study, we desig a brach ad boud algorithm that uses the boudig mechaisms discussed so far. Our brachig scheme is based o the optimal solutio of the LPR problem. We observe that the LPR produces very few cotiuous variables, hece base our brachig scheme o these variables. There are differet brachig methods that are used for the kapsack problem i the literature. Accordig to the first scheme, the levels are represeted by items. At each level, for a particular item, there are m+ odes where the first ode represets the decisio of ot assigig the item to ay kapsack, ad each of the remaiig odes represets the assigmet of a item to a particular kapsack. This brachig scheme is proposed by Valerio (996) ad is figured below. 28

Root Node Item Item 2 Node : No assigmet Node k : Asssigmet of related item to kapsack k-. Figure 3.2: Kapsacks o Nodes Represetatio At each level, m+ decisios are cosidered. There are levels. At the last level, all possible m+ decisios become available. The secod brachig scheme first cosiders kapsack ad tries to fill the kapsack as much as possible, ad the proceeds to the secod kapsack, whe the first kapsack is full, i.e., caot take a additioal item. The brachig termiates wheever all kapsacks are cosidered. The below figure gives the associated brachig scheme. The scheme is proposed by Kelleler et al. (2004). 29

............... Figure 3.3: Items o Nodes B&B Represetatio 30

Istead of usig the above alteratives we costruct our brachig method based o the fractioal x i solutios. As metioed before the optimal LPR solutio produces very few cotiuous variables ad this motivates us usig this type of brachig. We use the result of the optimal LPR solutio to defie our brachig structure. At every brach, we solve the LP problem ad brach o a fractioal variable of the LP solutio. For the chose fractioal variable x such that 0 x <, we geerate the followig two subproblems. i < i Subproblem. x =0 i Subproblem 2. x = i The associated tree is give i the figure below. x i (mai ode) 0< x < i x i = x i =0 (left ode) (right ode) Figure 3.4: Brachig Tree 3

We employ the followig three strategies to select the fractioal variable from which two subproblems are geerated. Strategy : Select the highest x i value Strategy 2 : Select the lowest x i value Strategy 3 : Select the x i value radomly Strategies ad 2 expect that the optimal iteger solutio is close to the optimal LP relaxed solutio. This forces big i x values to oe (Strategy ) ad small x values to zero (Strategy 2). Strategy 3, o the other had, selects a fractioal variable radomly, thereby lookig for the effect of a solutio foud without ay ituitive reasoig. i Example : We illustrate the brachig strategies via a example problem, havig 8 items ad 2 kapsacks. The data are tabulated i Table 3.7. Table 3.7 : The Profit ad Weight Values for the 8-Item 2-Kapsack Example Problem Items 2 3 4 5 6 7 8 p 35 65 64 46 60 5 50 40 w 56 59 80 64 75 7 25 20 Capacity of kapsacks: C = 65 ad C 2 = 20 Cardialities for kapsacks: K = 2 ad K 2 =2 32

Above metioed three strategies are based o the LP Relaxed solutio of the kmkp. The LP Relaxed solutio of the kmkp is give i below table. Table 3.8: The Optimal LPR Solutio of 8-Item 2-Kapsack Example Problem Variable * Value x 2 0.59 x 22 0.4 x 23 x 25 0.02 x 7 0.43 x 27 0.57 x 8 0.98 * The variables that do ot appear i the table receive value zero. Strategy forces the fractioal variable havig the biggest fractioal variable, i.e., x 8. If strategy 2 is selected, the brachig starts with the smallest fractioal variable, i.e., x 25. O the other had Strategy 3 depeds o pickig radomly betwee variables x 2, x 22, x 25, x 7, x 27 ad x 8. Note that the highest fractio 0.98 associates to the variable x 8. I the optimal solutio, it is very likely to have value oe for variable x 8, hece Strategy makes a coscious choice. We fid a iitial feasible solutio usig our heuristic procedure discussed i Sectio 3..2. We update the best kow, i.e., icumbet, solutio wherever we fid a feasible solutio with higher total profit value. 33

We fathom the ode if ay oe of the followig cases occurs: i. The LP solutio is ifeasible. This occurs for the partial solutio i which x i =, but ot for x i =0. ii. The solutio has all iteger decisio variables. I such a case, a optimal solutio from that ode is already foud. The icumbet solutio is updated, if the resultig solutio value is better. iii. Wheever the upper boud is o greater tha the icumbet solutio. I such a case, the resultig solutio caot lead to a uique optimal solutio, i.e., it is ot promisig. We backtrack wheever both odes at a level are fathomed. We stop wheever we reach the root ode; hece search all partial solutios implicitly. For a particular ode, we calculate the total realized profit by collectig the profits of the items that are already assiged to ay kapsack. We let TC(S) = p i x i (S) where x i (S) is the value of x i for ode S ad TC(S) is the total realized profit. x i The upper boud is foud by addig the associated costrait, x i = 0 or = to the problem solved i the paret ode. We calculate the upper bouds i sequel from the easiest to the hardest to compute. Accordigly we first fid UB the UB 2 ad fially compute the LP based upper boud, UB 3. We beefit from the LP solutio of the ode i derivig lower bouds. We compute a aïve lower boud by takig the iteger part of the solutio ad update the icumbet if the lower boud at the ode is higher. I place of solvig the LP at each ode, we implemet the additio ad deletio of a costrait idea. I doig so, we solve the LP oly at the root ode ad use the additio of a costrait optio while brachig ad the deletio of a costrait while backtrackig. The added or deleted costraits are x =. i x i = 0 or 34

Below is the algorithmic descriptio of our brach ad boud algorithm, we state the algorithm accordig to Brachig Strategy. Brach ad Boud Algorithm: Step 0. Fid a iitial feasible solutio usig the procedure discussed i Sectio 3..2. Let INC be the total profit of schedule, ad set the icumbet solutio to INC. Level= Solve the LP relaxatio of the problem, ad let the solutio be LPR If LPR produces all iteger decisio variables the it is optimal, STOP. Step. Let x k = Max{ r i solutio. Geerate the followig two subproblems: Subproblem. Subproblem 2. x k = r x k =0 r x / 0< x i <} where x i is the optimal LP relaxatio Fathom subproblem i if ay of the followig coditios holds: i. The solutio has all iteger variables. If LPR > INC INC = LPR ii. The solutio is ifeasible. This happes oly for subproblem. iii. UB i INC, (first try i=, the i=2 ad fially i=3) i.e., the subproblem caot lead to a uique optimal solutio. Step 2. If both subproblems i Step are elimiated the go Step 3. If both subproblems remai, brach from the oe havig the largest upper boud value. If oly a sigle subproblem remais, cotiue from this subproblem. Level=Level+ Go to Step Step3. Level=Level- If Level= the Stop else Go to Step. 35

We implemet our Brach ad Boud algorithm o a example problem, with 6 items ad 2 kapsacks. The profit ad weight values are tabulated i the below table. Table 3.9: The Data for the 6-Item 2-Kapsack Example Problem Items 2 3 4 5 6 p 35 65 64 46 60 5 w 56 59 80 64 75 7 Capacity of kapsacks are C = 65 ad C 2 = 95 Cardialities for kapsacks are K = ad K 2 = At the root ode: UB = 89 UB 2 = 45.8 UB 3 = 45.8 LB Naïve = 65 LB Heuristic = 6 INC = 6 The brach ad boud solutio is summarized i the below figure. The umbers o the odes show the solutio path. The maximum fractioal variables are show i odes. There are three fathomig coditios as stated i algorithm: ALL: we hit a full iteger solutio, INF: the subproblem is ifeasible, UB i (i=,2,3) : the brach is 36

fathomed as UB i INC. The type of upper boud that fathoms the brach is show o the odes. UB meas that UB 2 ad UB 3 are ot computed as UB INC. Note that Iitial Icumbet Solutio (INC) is updated oly oce at the 4 th ode where it becomes 30. The braches followig odes 2, 4, 7, 9,, 3, 7, 23 ad 28 are fathomed due to ifeasibility. The other braches are fathomed by upper bouds, i.e., they are ot promisig. The solutio is foud at the 8 th level. A total of 32 odes are searched ad the optimal solutio is foud at the 4 th ode. 37

Figure 3.5: 6-Item 2-Kapsack Brach ad Boud Tree 38

CHAPTER 4 4 COMPUTATIONAL RESULTS 4. Iput Geeratio I this chapter, we first preset the data geeratio scheme ad the discuss the results of our computatioal experimet. Our aim here is to test the efficiecy of our algorithms ad detect the effects of certai parameters o the difficulty of the solutios. To geerate p, w ad C i values, we use the scheme proposed by Martello ad Toth (990) for the multiple kapsack problem. Accordig to this scheme, the p ad w values are geerated from discrete uiform distributio [0,00] ad C i values are discrete uiform betwee 0 ad (0.5 = w i k = C k ). We set the lower limit of the discrete distributio to w mi for C i values, otherwise the kapsack havig a capacity betwee 0 ad w mi - would ever be used. We geerate the cardiality of kapsack i, i.e., K i from discrete uiform distributio U[,( / m cardiality costrait is forcig, i.e., oredudat. -)]. Our upper limit somewhat guaratees that the We use two discrete uiform distributios U[0,00] ad U[0,250] for low ad high profit variability. We hereafter call these profit sets as Set I ad Set II. The umber of items ad umber of kapsacks are tabulated below. 39

Table 4.: Geerated Problems Number of Items () Number of Kapsacks (m) 00 5 00 8 50 5 50 8 200 0 For each combiatio i the table, we geerate ad solve 0 problems ad we perform the experimets for both sets I ad II. We also geerate large-sized problem istaces with up to 900 items ad 20 kapsacks to set the solutio capability of our brach ad boud algorithm. Iput geeratio part is coded with C programmig laguage with Microsoft Visual 6.0. (2003). The experimets are coducted with C# programmig laguage with Microsoft Visual 8.0.(2005). 4.2 Performace Measures I this sectio we set our performace measures that are used to evaluate the performace of the heuristic algorithm, brach ad boud algorithm ad upper bouds. The performaces measures used are as listed below: 40

For Upper Bouds The average ad maximum percetage deviatio from the optimal solutio. UB OPT The percetage deviatio is defied as 00 where UB is the upper boud OPT value ad OPT is the optimal total profit. For Heuristic Algorithm The average ad maximum CPU times i secods The average ad maximum percetage deviatio from the optimal solutio OPT LB The percetage deviatio is defied as 00 where LB is the lower OPT boud value. For Brach ad Boud Algorithm The average ad maximum CPU times The average ad maximum umber of odes geerated The average ad maximum umber of odes geerated util OPT is foud. The average ad maximum level of the tree reached (the depth of the brach) The algorithms are coded with C# programmig laguage with Microsoft Visual 8.0.(2005) ad ru o Microsoft Widows XP. For optimizatio problems Cplex versio 0. is used. The istace rus are performed o the Itel 4 CPU 3.20 GHz ad MB of Ram computer. 4.3 Strategy Selectio I Sectio 3.2 we metioed that the brachig strategy of selectig highest fractioal variable is likely to be the best strategy. Now we will perform a experimet to verify this issue. I below table results of three cases are observed. Remember that strategy refers to selectig maximum fractioal xi value, strategy 4

2 refers to selectig miimum fractioal xi radom fractioal xi value ad strategy 3 refers to selectig value while performig brach ad boud algorithm. Table 4.2: Brachig Strategy Evaluatio for B&B Strategy Strategy 2 Strategy 3 # of odes CPU (secods) # of odes CPU (secods) # of odes CPU (secods) m avg max avg max avg max avg max avg max avg max 00 5 96,3 22,5 4, 2,4 233,7 4,8 36,2 233 2,4 5,9 00 8 6,4 245,6 3,0 36, 30 2,5 5, 59,3 325 3,6 7,2 50 5 86,5 253,5 5, 2,8 39 2,6 4,7 39,6 32 3,4 6, 50 8 97, 264,6 4, 2,4 32 2,8 5,2 28,3 340 3,2 5,6 200 0 26,6 28,8 5,4 4,2 345 3, 5,8 58,6 369 4,2 7, Note that selectig the maximum fractioal variable, i.e., Strategy, produces smaller umber of odes ad CPU times, whe compared with the other strategies. Hece, we use Strategy i our experimets. We ext aalyze the effects of parameters ad mechaisms o the problem, ad base our mai rus o the results from these experimets. 4.4 Effects of Parameters The kmkp has certai parameters; umber of items, umber of kapsacks m, profit value p, weight usage w, capacity usage C i ad cardiality amout K i. I this sectio we aalyze the effects of these parameters o the difficulty of the solutios. 42

Our mai rus iclude the, m ad p effects. I this sectio, we aalyze the effects of C i, K i ad w values. Effect of Capacity Value C i To see the effect of the capacity value o the difficulty of the problem we use two differet capacity settigs. We first use U[w mi, (0.5 = w i k= C ) ] to geerate k C i s ad the geerate aother class by halvig the capacities of the first two kapsacks. capacity. We refer to first set as C ad secod set as C2. Note that C2 has restricted Table 4.3: Capacity Effect o the Performace of B&B SET C SET C2 CPU(secods) # of odes CPU(secods) # of odes m avg max avg max avg max avg max 00 5,5 4, 96,3 22,4 3,6 8, 38 00 8,6 3,0 6,4 245,3 2,7 04,6 22 50 5,5 5, 86,5 253,4 4,9 83,8 22 50 8,6 4, 97, 264,5 3,9 78, 69 200 0,8 5,4 26,6 28,6 5,9 97,2 9 As ca be observed from the above table, the average umber of odes ad CPU times decrease whe capacities become tighter. This is due to the fact that more solutios become feasible whe the capacities are larger ad this leaves more odes for further ivestigatio. Note that whe =50 the maximum umber of odes 43