An Exact Algorithm for the Unbounded Knapsack Problem with Minimizing Maximum Processing Time

: We address a variant of the unbounded knapsack problem (UKP) into which the processing time of each item is also put and considered, referred as MMPTUKP. The MMPTUKP is a decision problem of allocating amount of n items, such that the maximum processing time of the selected items is minimized and the total profit is gained as at least as determined without exceeding capacity of knapsack. In this study, we proposed a new exact algorithm for this problem, called MMPTUKP algorithm. This pseudo polynomial time algorithm solves the bounded knapsack problem (BKP) sequentially with the updated bounds until reaching an optimal solution. We present computational experience with various data instances randomly generated to validate our ideas and demonstrate the efficiency of the proposed algorithm.


INTRODUCTION
One of the most frequently used decision making that operations researchers must deal is to decide which subset of n items or projects should be selected such that the total profit sum of the selected items or projects is maximized, without exceeding the capital budget, referred generally as the knapsack problem (KP). This problem can be formulated as a mathematical model (an integer linear program) and is one of an NP-hard combinatorial optimization problem by which can be solved successfully by various exact algorithms. The commonly used techniques are the dynamic programming and branch-and-bound methods and the branch-and-cut and branch-and-price methods as described in Toth [1] . This kind of problem can be applied and arises in many real world situations. In the following, we will provide a historical overview of this problem and various involved algorithms.
For the 0-1 knapsack problem (KP), it involves with selecting items or projects to maximize total profit without exceeding the existing capital budget or knapsack capacity. Exact algorithms for this problem are mainly based on two approaches: branch-and-bound and dynamic programming. Examples of branch-andbound algorithms can be found in [2][3][4][5][6][7][8][9][10] and more recently in [11,12] . Dynamic programming approaches are presented in [5,13,14] and more recently in [15] . A hybrid algorithm, combining the dynamic programming and the branch-and-bound algorithms has been recently proposed by Martello et al. [16] . Different hybrid algorithms for the knapsack problem were presented by Plateau and Elkihel [10] and Martello and Toth [17]. An experiment comparison of the most effective exact algorithms for KP is given in [18] .
The 0-1 multidimensional knapsack problem (0-1 MKP) is a generalization of the 0-1 knapsack problem and a special case of general 0-1 integer programming. The objective is the same as the 0-1 knapsack problem. Several heuristics or meta-heuristics have been used to solve the 0-1 MKP and updated and comprehensive survey for 0-1 MKP dealing with applications, complexity and heuristics can be found in Freville [19,20] .
The multiple-knapsack problem (MKP) is the problem of assigning a subset of n items to m distinct knapsacks to maximize total profits without exceeding the capacity of each of the knapsacks. The problem has several applications in naval, financial management and steel industry [21] . The MKP is NP-hard in the strong sense and thus any dynamic programming approach would result in strictly exponential time bounds. Several branch-and-bound algorithm for MKP have thus been presented during the last two decade in Hung and Fisk [22] , Martello and Toth [23] , Neebe and Dannenbring [24] and Christofides et al. [25] , Pisinger [26] and Martello and Toth [27] .
The multiple-choice knapsack problem (MCKP) is defined as a 0-1 Knapsack Problem with the addition of disjoined multiple-choice constraints. MCKP is NPhard as it contains KP as a special case, but it can be solved in pseudo-polynomial time through dynamic programming in Dudzinski and Walukiewicz [28] . The problem has a large range of applications: Capital Budgeting in Nauss [29] , Menu Planning in Sinha and Zoltners [30] , transforming nonlinear KP to MCKP in Nauss [29] , determining which components should be linked in series in order to maximize fault tolerance in Sinha and Zoltners [30] and to accelerate ordinary LP/GUB problems by the dual simplex algorithm in Witzgal [31] . Moreover MCKP appears as Lagrangian relaxation of several integer programming problems in Fisher [32] . Several algorithms for MCKP have been presented during the last two decades: e.g. Nauss [29] , Sinha and Zoltners [30] , Dyerm Kayal and Walker [33] and Psinger [34] .
The budgeting problem with bounded multiple choices constraints (BBMC) is a generalization of the multiple choice knapsack problem (MCKP). It has a wide variety of applications in budgeting, where a number of projects from each class has to be selected, such that the overall gain is largest possible and such that the costs demanded for the chosen projects do not exceed a fixed upper limit. It may be applied in sequencing and scheduling problems, strategic production and hospital planning with production constraints in each department, or government budgeting with demands in different sectors. The algorithm was presented in Pisinger [35] .
To the best of our knowledge, the unbounded knapsack problem with minimizing maximum processing time, (MMPTUKP) in this study has not been studied in the literature. So the objective of this study is to present a new optimal solution algorithm for this type of problem and to evaluate performance of this algorithm by randomly generated data.

Problem formulation and a new exact algorithm Problem formulation:
The problem studied in this work can be formulated as follows. We are given a knapsack with capacity c and expected profits at least B into which we may put n types of objects. Each object of type i with parameters, the profit, p i , the weight w i and the processing time t i and with n, B and c are all positive integers and we have an unbounded number of copies of each object type. The problem calls for selecting the set of items with minimizing the maximum processing time and must have at least profit of B without exceeding the knapsack capacity (budgeting, c). Mathematically, the problem can be described as the following integer linear programming formulation: After getting an optimal solution, let z* be the optimal objective value and let To verify the correctness of the proposed algorithm, the following theorem is proven as follows: T=T 0 for all x j . If Z * <B then 0 T does not exist as claimed. Otherwise, T u = T 0 which leads to the impossible case that T u > T l . By contradiction, T * is optimal as stated.
For the complexity of MMPTUKP, the possible bottleneck computation is due to either solving the UKP in step 1 or solving the corresponding BKP at most [Log 2 T u *] times where T u * is the initial upper bound of T obtained from step 2. From theoretical standpoints, there exists at least a pseudo polynomial time algorithm for the proposed MMPTUKP procedure as summarized in the following theorem.
Theorem 2: MMPTUKP procedure can be solved as a pseudo polynomial time algorithm. Proof: Since the number of iterations in the procedure is logarithmically bounded, a linear complexity is implied. In the procedure, the corresponding UKP and BKPs must be solved. Computationally, both problems can be solved efficiently in a pseudo polynomial bounded algorithm such as dynamic programming (bounded by the complexity of the right hand side and variables upper bound). Therefore, MMPTUKP can also be solved within a number of times bounded by a linear function and each time solved within a complexity of pseudo polynomial time bounded.

Performance evaluation experiments:
We have investigated how the MMPTUKP algorithm behaves for many problem-sizes. The algorithm was coded as a C++ program and was complied as an .EXE file to run against solving the problem by direct mixed integer programming (MIP) methods using CPLEX software for small/intermediate scale and large scale problems respectively. All experiments were tested on a PC notebook with CPU GenuineIntel, Pentium(r) III processor 1 Ghz, 256 MB RAM, 20 GB hard disk. Firstly, it is critical to find a highly efficient method to solve the corresponding bounded and unbounded knapsack problems in the proposed algorithm. Though, there are many special algorithms with pseudo polynomial time complexities proposed to solve these problems. Experimentally, we have found that the direct approach using CPLEX can provide quite an acceptable result in term of computational time even when a small computer is used. The basic results are shown Table 1. The test data in each problem size is randomly generated as p j =[1,1000], w j =[1,1000], b j [1,10] for all j = 1,2,..,n and n j j j 1 C 0.5* w b = = ∑ following [18] . The above results indicate that CPLEX is more efficient when solving the BKP as compared to solving the UKP since the bounded variable constraints in the BKP help reducing alternatives in the search tree during its branch and cut processes. Moreover, these results imply possibilities to solve very large scale BKP and UKP using the current state of the art mixed integer linear programming software especially when utilized Table 2: Comparative results between using MMPTUKP algorithm (1) and the direct method (2) *From 5 generated problems cooperatively with modern parallel processing technology. Next, the C++ executed program of MMPTUKP algorithm is experimented with a set of randomly generated problems comparing with solving the direct model as described earlier using CPLEX. The obtained results are shown in Table 2. From Table 2, 10 replications for each problem size are randomly generated except large sizes of 50,000 and 100,000 where 5 replications are used due to their large amount of computation time consumed. Again, we use the ranges according to [18]  (more than thousand variables). An interesting statistic of the number of nodes with integer solution directly from the branch and bound process illustrates that the use of cutting planes in the branch and cut process utilized in CPLEX plays an important role as the problem size grows because these numbers become none for large scale test problems. Finally, the program is used to solve a set of five very large generated problems with 1,000,000 variables. The average computational time is more than 24 hours with the minimum is below 17 hours and the maximum is over 3 days. Parallel programming might be an alternative approach for improving the algorithm performance in this case.

CONCLUSION
In this study we derived a new exact algorithm, MMPTUKP algorithm, to the problem that the maximum processing time of the selected items is minimized and the total profit is gained as at least as determined without exceeding capacity of knapsack. This algorithm uses CPEX first for solving the subproblem, the unbounded knapsack problem (UKP), in order to get an initial upper bound and optimal solution of a subset of items, then updating both lower/upper bounds of each item through a binary search approach and solve the corresponding BKP sequentially. The results from computational experiments with various data instances randomly generated validate this idea and demonstrate the efficiency of MMPTUKP algorithm. For comparisons between MMPTUKP results with the direct approach results, they indicate that MMPTUKP algorithm performs better on average especially in large size test problems.