AN EXACT ARBORESCENT METHOD FOR SOLVING 0-1 KNAPSACK PROBLEM

Similar documents
Radius STEM Readiness TM

Multimedia Application Effective Support of Education

THE UNIVERSITY OF SYDNEY Semester 2, Information Sheet for MATH2068/2988 Number Theory and Cryptography

Reinforcement Learning by Comparing Immediate Reward

Learning Methods for Fuzzy Systems

(Sub)Gradient Descent

GACE Computer Science Assessment Test at a Glance

Designing a Rubric to Assess the Modelling Phase of Student Design Projects in Upper Year Engineering Courses

A Reinforcement Learning Variant for Control Scheduling

Proof Theory for Syntacticians

Evolutive Neural Net Fuzzy Filtering: Basic Description

University of Groningen. Systemen, planning, netwerken Bosman, Aart

Beveridge Primary School. One to one laptop computer program for 2018

Delaware Performance Appraisal System Building greater skills and knowledge for educators

OCR for Arabic using SIFT Descriptors With Online Failure Prediction

Research Article Hybrid Multistarting GA-Tabu Search Method for the Placement of BtB Converters for Korean Metropolitan Ring Grid

AGENDA LEARNING THEORIES LEARNING THEORIES. Advanced Learning Theories 2/22/2016

Module 12. Machine Learning. Version 2 CSE IIT, Kharagpur

Australian Journal of Basic and Applied Sciences

Artificial Neural Networks written examination

Knowledge-Based - Systems

Given a directed graph G =(N A), where N is a set of m nodes and A. destination node, implying a direction for ow to follow. Arcs have limitations

Chinese Language Parsing with Maximum-Entropy-Inspired Parser

CS Machine Learning

A cognitive perspective on pair programming

Reducing Features to Improve Bug Prediction

AQUA: An Ontology-Driven Question Answering System

Bluetooth mlearning Applications for the Classroom of the Future

EECS 571 PRINCIPLES OF REAL-TIME COMPUTING Fall 10. Instructor: Kang G. Shin, 4605 CSE, ;

FUZZY EXPERT. Dr. Kasim M. Al-Aubidy. Philadelphia University. Computer Eng. Dept February 2002 University of Damascus-Syria

Carter M. Mast. Participants: Peter Mackenzie-Helnwein, Pedro Arduino, and Greg Miller. 6 th MPM Workshop Albuquerque, New Mexico August 9-10, 2010

Probabilistic Latent Semantic Analysis

Seminar - Organic Computing

Workload Policy Department of Art and Art History Revised 5/2/2007

Test Effort Estimation Using Neural Network

Objectives. Chapter 2: The Representation of Knowledge. Expert Systems: Principles and Programming, Fourth Edition

Automating the E-learning Personalization

Self Study Report Computer Science

Rule-based Expert Systems

Rule Learning With Negation: Issues Regarding Effectiveness

Software Maintenance

MGT/MGP/MGB 261: Investment Analysis

Regret-based Reward Elicitation for Markov Decision Processes

Grade 6: Correlated to AGS Basic Math Skills

Developing a concrete-pictorial-abstract model for negative number arithmetic

Learning Optimal Dialogue Strategies: A Case Study of a Spoken Dialogue Agent for

Software Security: Integrating Secure Software Engineering in Graduate Computer Science Curriculum

OPTIMIZATINON OF TRAINING SETS FOR HEBBIAN-LEARNING- BASED CLASSIFIERS

Major Milestones, Team Activities, and Individual Deliverables

The 9 th International Scientific Conference elearning and software for Education Bucharest, April 25-26, / X

BADM 641 (sec. 7D1) (on-line) Decision Analysis August 16 October 6, 2017 CRN: 83777

Firms and Markets Saturdays Summer I 2014

SARDNET: A Self-Organizing Feature Map for Sequences

CS 1103 Computer Science I Honors. Fall Instructor Muller. Syllabus

PH.D. IN COMPUTER SCIENCE PROGRAM (POST M.S.)

Rule discovery in Web-based educational systems using Grammar-Based Genetic Programming

Word Segmentation of Off-line Handwritten Documents

AGS THE GREAT REVIEW GAME FOR PRE-ALGEBRA (CD) CORRELATED TO CALIFORNIA CONTENT STANDARDS

An Introduction to Simio for Beginners

Laboratorio di Intelligenza Artificiale e Robotica

What is beautiful is useful visual appeal and expected information quality

An Introduction to the Minimalist Program

Machine Learning from Garden Path Sentences: The Application of Computational Linguistics

A Case Study: News Classification Based on Term Frequency

Cooperative evolutive concept learning: an empirical study

ACTL5103 Stochastic Modelling For Actuaries. Course Outline Semester 2, 2014

The open source development model has unique characteristics that make it in some

Trends in College Pricing

Data Integration through Clustering and Finding Statistical Relations - Validation of Approach

The Good Judgment Project: A large scale test of different methods of combining expert predictions

Improving software testing course experience with pair testing pattern. Iyad Alazzam* and Mohammed Akour

Visit us at:

Learning From the Past with Experiment Databases

Prof. Dr. Hussein I. Anis

NCEO Technical Report 27

A GENERIC SPLIT PROCESS MODEL FOR ASSET MANAGEMENT DECISION-MAKING

PROCESS USE CASES: USE CASES IDENTIFICATION

Designing a Computer to Play Nim: A Mini-Capstone Project in Digital Design I

Laboratorio di Intelligenza Artificiale e Robotica

Agent-Based Software Engineering

Designing e-learning materials with learning objects

Diagnostic Test. Middle School Mathematics

Deploying Agile Practices in Organizations: A Case Study

Number of students enrolled in the program in Fall, 2011: 20. Faculty member completing template: Molly Dugan (Date: 1/26/2012)

A simulated annealing and hill-climbing algorithm for the traveling tournament problem

New Venture Financing

AN EXAMPLE OF THE GOMORY CUTTING PLANE ALGORITHM. max z = 3x 1 + 4x 2. 3x 1 x x x x N 2

Student Handbook. This handbook was written for the students and participants of the MPI Training Site.

How to Judge the Quality of an Objective Classroom Test

Computer Science 141: Computing Hardware Course Information Fall 2012

Software Development: Programming Paradigms (SCQF level 8)

Introduction to Ensemble Learning Featuring Successes in the Netflix Prize Competition

On Human Computer Interaction, HCI. Dr. Saif al Zahir Electrical and Computer Engineering Department UBC

Utilizing Soft System Methodology to Increase Productivity of Shell Fabrication Sushant Sudheer Takekar 1 Dr. D.N. Raut 2

COMPUTER-ASSISTED INDEPENDENT STUDY IN MULTIVARIATE CALCULUS

Lecture 10: Reinforcement Learning

A SURVEY OF FUZZY COGNITIVE MAP LEARNING METHODS

Reduce the Failure Rate of the Screwing Process with Six Sigma Approach

MASTER OF SCIENCE (M.S.) MAJOR IN COMPUTER SCIENCE

Program Assessment and Alignment

Transcription:

AN EXACT ARBORESCENT METHOD FOR SOLVING 0-1 KNAPSACK PROBLEM 1. Introduction Our work focuses on the knapsack problem in which we have a set of objects and each one with a weight and a utility. We want to choose a subset of objects which does not exceed the capacity of the bag while ensuring a maximum benefit. This problem takes its name from the situation that confronted a hiker while preparing his trek. It was identified in 1972 as an NP-complete problem among the hardest in combinatorial optimization. From that date until now, many approaches have been proposed. We distinguish: (i) the exact methods that achieve an optimal solution at the expense of long processing time if the problem is of considerable size. (ii) The approximate methods which allow to obtain an approximate solution quickly and not necessarily an optimal one. (iii) The hybrid methods that combine the two types of methods described above to benefit from the advantages they bring. Our work is to propose a new algorithm that is a part of exact methods. This algorithm is BOUAKKAZ FERIEL Badji Mokhtar university,annaba, Algeria BABES MALIKA Badji Mokhtar university,annaba, Algeria ABSTRACT In this paper, we consider the resolution of knapsack problem whose importance is due to the fact that it appears as subproblem in various complex problems. And mainly because it can represent a large number of practical situations as it is found in different sectors such as finance (in portfolio management), industry and telecommunications (in the allocation of frequencies), as well as in computer science (in cryptography, in management process etc.). Our work consists in presenting a new method of resolution based on existing methods. Our exact method is an arborescent one and it has proved its efficiency, especially in terms of saving memory space compared to conventional arborescent methods. Our results will be discussed and analyzed in order to trace properly the contributions of our approach, and also its disadvantage. This will certainly help us in defining the prospects of our work. Keywords: Knapsack problem, Arborescent method, Branch and Bound method, Cryptography, Management process. inspired by the Branch and Bound method and of genetic algorithms. The first one directed us to the representation of the solution space as a tree, while the second one made us realize the advantage of representation in binary solutions. With our method and specifically with the new rules of separation that we set, we were able to reduce significantly the size of the solution s tree. This induced a decrease in time required to achieve the best results. However our method has disadvantages that we suggest to be adjusted in the near future. 2. State of the Art For this problem we have a knapsack with a maximum capacity of W and a set of n objects each one characterized by a weight w i and a utility p i. The goal is to choose among these objects those that maximize the profit while respecting the capacity of the knapsack. The mathematical formulation is as follows [7]: Data of the problem: 167

Objective: maximize Under constraints: x i takes the value 1 if the object is added to the bag, and 0 otherwise. The knapsack problem is used to model the following situations: In cryptography: NP-hard version of this problem has been used in primitive and cryptographic protocols, such as the Merkle-Hellman cryptosystem invented in 1978 [9] or the Chor-Rivest cryptosystem invented in 1988 [2]. The asymmetric encryption algorithms based on the knapsack problem were all broken to date, the latest being that of Chor-Rivest that was broken by Schnorr and Horner in 1995, by the technique of network reduction. In support systems for portfolio management: to balance selectivity and diversification in order to find the best balance between risk and return for capital invested in several financial assets. In the loading plane or ferry: all luggage must be brought to destination, without being overloaded; In the materials cutting: to minimize falls at the cutting sections of various lengths in iron bars. The problem defined above is the problem in binary variables (01KP). This is actually a variant among others. The specifications of these variants are done on the field of variables, the number of values of objects, the number of dimensions of the bag, etc. These features can also be combined. These include the problems with continuous variables (LKP) obtained by removing the integrity constraint on the variables. The problem with integer variables in which we consider that we have several copies of each object, we want to find the number of copies to be taken for each object. There are also multidimensional knapsack (d-kp), multiobjective knapsack, quadratic knapsack (QKP) etc. Our work deal with the first variant (the 0-1 knapsack problem). Many studies have aimed to solve this variant since the fifties. The first algorithms were produced by the theory of dynamic programming of Bellman [1]. Danzig has proposed a formula for calculating the upper bound [3]. The year 1967 marked the birth of the first branch-and-bound algorithm [6]. We can also cite the reduction procedure of Ingargiola Korsh [4], the upper bound of Martello and Toth and their branch and bound procedure [8]. Genetic algorithms in 1994 [10] and more recently quantum genetic algorithms [5]. To summarize we can say that in addition to these methods there are many others. However we can enumerate their faults as follow: (i) the exact methods such as dynamic programming and branch-and-bound method are known to be slow in addition of taking a lot of memory space for problems of considerable size (they exploit the solution space in its entirety). (ii) The approximate methods suffer from the problem of solution s quality, but also the difficulty of the parameter s choice we meet in using genetic algorithms, quantum genetic algorithms etc. This brings us to always think about new approaches to solve this difficult problem. This is the purpose of our work. 3. Our method We propose a method of resolution which is an exact arborescent method. A classical arborescent method will list all possible solutions using a binary tree, in which each level represents an object. And the first branch represents the addition of the object in the bag, while for the other branch the object is being removed. The tree is as follow: 168

Figure 3. Search tree with half number of nodes. Figure 1. Representation of classic arborescent method. The observation we made on this tree is that if we cut it horizontally at the root, we get at each level two distinct and complementary sets. That is to say that if we have a solution in the first set which contains the subject 1, in the second set there is necessarily a solution with the rest of the objects. On our tree each level corresponds to the object number (level+1): the root (level 0) corresponds to the first object, the second level corresponds to the second object etc. As mentioned above, each node has a solution (black) and its complement (in red). This gives new meaning to the branches: one branch corresponds to the addition (respectively removal) of the object at the next level in the solution (respectively the complement) of the current node. The second branch means that the object has not been added (respectively removed) to the solution (respectively the complement) of the current node. The second object was added to the solution {1}, and removed from the complement {2,3,4}. Figure 2. Sets of representation of classic arborescent method. Following this observation and in order to address one of the disadvantages of arborescent method (the tree can become very large if the number of objects increases), we thought about considering in each node of the tree two solutions instead of one. Each node will then have a solution and its complement which allows us to divide the size of the tree in a half. Figure 4. Meaning of the branches of the tree. In addition to save memory space (the size of the tree is divided into two), this representation also allows us to save time during the evaluation phase of the nodes. We will proceed as follows: evaluate a node of our tree is based on the weight of the solution and the weight of 169

the complement, which confronts us on the following four cases: The solution and its complement have a weight less than the capacity of the bag: it is no longer necessary to consider complements (in red) in the coming nodes, as to the complement each branch corresponds to the removal of an object which we can t logically lead to a better solution (in terms of utility) of the current node. The solution and its complement have a weight greater than the capacity of the bag: it is no longer necessary to consider the solutions (in black) in the coming nodes, as the solution for each branch corresponds to adding an object and as the solution has a weight greater than the capacity of the bag, there is no chance to change that. The solution has a weight less than the capacity of the bag but the complement has a weight greater than the bag: we must consider all possibilities, because we have to add objects to the solution as it is possible (we have not exceeded the capacity of the bag), and we must remove the additional objects as they can t all fit in the bag. The solution has a weight greater than the capacity of the bag, unlike its complement: it is no longer necessary to consider the child of this node (stop), because the addition of the object can t be done (the weight of the solution exceeds the capacity of the bag), and the withdrawal of the object will not provide a better solution in terms of utility. To improve more our method, we thought about alternating phases of separation and evaluation, so that each time we create a node it is evaluated and his child are generated according to the four previous cases: we will ultimately have nodes with the solution and its complement, with only solution or with only the complement. There will be also nodes without child. This method will allow us to gain more in memory space and also in execution time, because we no longer have to generate the components that we are sure that we don t need. We have tested our method on the following example. The tree obtained by our method of evaluation is presented below: The capacity of the bag is 14kg. Object Weight Utility Tent 11 20 Food 3 50 Gourd 7 10 Mosquito 2 12 Table 1. Object s weights and object s values of the example. Figure 5. The tree obtained with our method. 4. Experimentation To implement our resolution method we have used the Java language which is an objectoriented language, and we have used the environment Borland JBuilder 9. The material environment is a laptop equipped with an Intel Pentium processor Dual CPU 1.73GHz and a 1.99 GB of RAM. The experiments are performed on instances generated as follows: The objects weights w i are randomly generated in [1, 10]. The values p i are given as: p i =w i + 5. The capacity of the bag was determined using the average weight of objects. 170

Dimension of the instance Capacity of bag (kg) execution (seconds) time distribution reasoning of our method on multiple machines and compare results. 10 5 0.012 15 7 0.173 20 6 7.407 Table 2. Run Times associated to the tested instances. According to various tests, we found that if the capacity of the bag is close to the average weight of objects, our method is more efficient (the size of the tree is minimal) because we can reach quickly the criteria of judgment of the separation phase. To summarize, our method is an exact method, it is very simple to implement. Its main advantage is that it manipulates a tree that is much smaller than the classic arborescent method (half size of the tree), because of the fact of removing solutions that are considered less effective than the ones already developed. This leads to another advantage of great importance which is the gain in execution time. By observing the behavior of our method, we could also identify the following property: the optimal solution is usually found in the early levels of the tree, this encourages us to think on a heuristic for arresting the development of unnecessary branches after a certain level. After highlighting the qualities and defects of our method, we proposed to implement it on several machines to benefit of resources located on other computers, in order to have better results in terms of execution time and memory space. Currently we use two machines organized in a client/server architecture and share the tasks so that each machine is responsible for evaluating and separating a part of the tree. The results obtained by distributing our method on two computers show improvement in execution time and memory space (the tree is distributed on two machines), which encourages us to generalize the 5. Conclusion The method we proposed has proven itself in terms of saving execution time, and also in terms of reduced memory space. Indeed, it is unusual to dismiss the solutions of a lower efficiency than those already visited. Nevertheless, by testing on instances of considerable size, we faced a problem of memory space. This does not undermine our approach, but rather the ability of the machine that we tested. Indeed, our tree method would need to be tested on machines whose memory is not limited. The work done so far gave birth to the following perspectives: Find solutions to the limitations we have identified in our method. Implement our method on several machines and compare results with those of one machine. Hybridize our method with others, in order to benefit from work already done. Adapt the algorithm realized in real cases (portfolio management, cryptography, frequency allocation etc.). Références [1] Bellman R. Dynamic Programming, Princeton Univercity Press, Princeton, 1957. [2] Chor Benny, Rivest Ronald L, A knapsack-type public key cryptosystem based on arithmetic in finite fields, IEEE Transactions on Information Theory 34(5), pp. 901-909, 1988. [3] Dantzig G, Discrete variable extremum problems, Operations Research 5, pp. 266-277, 1957. [4] Ingargiola G.P, Korsh J.F, Reduction algorithm for zero-one single knapsack prpblems, Management Sci. 20, pp. 460-463, 1973. 171

[5] Kim Y, Kim J, Han K, Quantum-inspired multiobjective evolutionary algorithme for multiobjective 0/1 knapsack problems, In Proceedings of the IEEE Congress on Evolutionary Compution, Vancouver, Canada, pp. 9151-9156, 2006. [6] Kolesar Peter, A branch and bound algorithm for the knapsack problem, Management Science, Vol. 13 Issue 9, pp. 723, 1967. [7] Martello S, Toth P, Knapsack Problems: algorithms and computer implementations, John Wiley & Sons, Chichester, West Sussex, England, 1990. [8] Martello S, Toth P, An upper bound for the zero-one knapsack problem and a Branchand-Bound algorithm, European Journal of Operational Research, vol. 1, pp. 169-175, 1977. [9] Merkle Ralph, Hellman Martin, Hiding Information and Signatures in Trapdoor Knapsacks, IEEE Trans. Information Theory 24(5), pp. 525-530, 1978. [10] Zbigniew Michalewicz, Jaroslaw Arabas, Genetic Algorithms for the 0/1 Knapsack Problem, ISMIS '94 Proceedings of the 8th International Symposium on Methodologies for Intelligent Systems, pp. 134-143, 1994. 172