Performance of a Heuristic Total Weight in Combinatorial Mixture Packaging of Two Types of Items

In this paper, a combinatorial optimization model of mixture packaging of two types of items is treated, which arises in actual packing systems, so-called multi-head weighers. The primary objective is to minimize the total weight of chosen items for a package under the condition that the total weight must be no less than a specified target weight. For a package to be produced, the weight sum of chosen items of each type must also be no less than a prescribed necessity minimum. In this paper, a heuristic algorithm is designed for the problem of minimizing the total weight, and for a given positive real ε, the performance factor is shown to be (1 + ε).


Introduction
In this paper, we consider the following 0-1 integer programming problem: x ik ∈ {0, 1}, i = 1, 2, k = 1, 2, . . ., n i , (4)   where as the instance, • n i : The number of given items of type i ; • w ik : A positive integer weight of the k-th item of type i ; • t : A prescribed target weight of a package, which is assumed to be a positive integer; • b i : A prescribed necessity minimum of the weight sum of chosen items of type i in a package, which is also assumed to be a positive integer are given, and the solution is a 0-1vector x = (x 1 ; x 2 ) = (x 11 , x 12 , . . ., x 1,n1 ; x 21 , x 22 , . . ., x 2,n2 ) of n = n 1 + n 2 variables defined to be A 0-1 vector x satisfying Eqs. ( 2)-( 4) is referred to as a feasible solution of problem Q.For an instance of problem Q, let f * denote the minimum of the total weight of chosen items in a feasible solution, and let x * = (x * 1 ; x * 2 ) denote an optimal solution which is a feasible solution satisfying f (x * ) = f * .
Such a combinatorial optimization model as problem Q arises in automated food packing systems, known as multihead weighers (1,2,3) .The food packing system possesses several (typically, around twenty) hoppers with a weighing function, and some amount of food (such as a green pepper, a handful of potato chips, some pieces of candies, and so on) is thrown into each weighing hopper (see Fig. 1).We call the food in each hopper an item.The food packing system chooses some current items from the corresponding weighing hoppers for a package.The resulting empty hoppers are supplied with next new items, and such a packing operation is repeated to produce a large number of food packages one by one.A more practical model involving the durations of remaining items in hoppers can be found in the literature (4) , while in this paper, we concentrate our attention on the primary objective of the total weight (equivalently, the surplus over the target weight) of a package from a viewpoint of mathematical interest.
It has already been known that problem Q is NP-hard, and that it can be solved in pseudo-polynomial time (5,6) .Recently, it has been shown that a feasible solution whose total weight is at most twice the minimum is obtained by a polynomial time greedy heuristic algorithm, when the weights of items are bounded by the necessity minimum of the weight sum of each item type from the above (7) .In this paper, we design another heuristic algorithm for the problem of minimizing the total weight of chosen items in a feasible solution, and we also show that for a given positive real ε, the performance factor is at most (1 + ε).The time complexity of the proposed heuristic algorithm is polynomial in n and 1/ε.Such a design manner of heuristic algorithms is known as a technique of polynomial time approximation schemes (8) .

Assumptions and Additional Notations
In order to omit some trivial cases (5,6) , we assume that for each type of items, and also assume that We define the maximum of an item weight of each type by and further assume that We are going to consider two partial instances, Q-1 and Q-2, of a given instance of problem Q, which are described as follows: A partial solution x i is feasible in the sense of problem Q-i if it satisfies Eqs. ( 10) and (11).We remark that for a combination x of feasible partial solutions x 1 and x 2 , f (x) = f 1 (x 1 ) + f 2 (x 2 ) < t may hold, i.e., the x may be an infeasible solution of problem Q.
Problem Q-i is the minimum subset sum problem (5) , and there exists a pseudo-polynomial time dynamic programming procedure (9) .By utilizing the dynamic programming procedure, we can easily see that the following property holds : Lemma 1.For an instance of problem Q-i, a maximal subset X i of feasible solutions of the problem such that any two feasible solutions in the X i have different objective function values each other can be obtained in O(n i W i ) time.

Rounding Weights of Items
Let δ ≥ 1 denote a positive rounding divisor.The rounded weight of each item is set to be From the above rounding definition, we have For a real ε > 0, let Then we provide the following formulation of a rounded instance of a given instance of problem Q : A 0-1 vector x = (x 1 ; x 2 ) satisfying Eqs. ( 16)-( 18) is feasible in the sense of problem R. Notice that two problems Q and R have the same constraints, and hence a feasible solution of problem Q is also a feasible solution of problem R, and vice versa.For an instance of problem R, let r * denote the minimum of the total rounded weight of chosen items in a feasible solution of problem R, and let x ′ = (x ′ 1 ; x ′ 2 ) denote a feasible solution of problem R satisfying r(x ′ ) = r * .That is, the x ′ is an optimal solution of problem R.
As for problem Q, we are going to consider two partial instance, R-1 and R-2, of an instance of problem R as follows: and let Then, from Eqs. ( 13) and ( 14), we have Problem R-i is the minimum knapsack problem and also for the problem, there is a pseudo-polynomial time dynamic programming procedure (8,10,11) .By using the dynamic programming procedure with a small modification, as Lemma 1, we also have the following lemma : Lemma 2. For an instance of problem R-i, a maximal subset X R i of feasible solutions of the problem such that any two feasible solutions in the X R i have different objective function values can be obtained in O(n i W R i ) = O(n 3 /ε) time.

Algorithm
Let , since the number of distinct objective function values r i (x i ) to be taken by a feasible solution i have been ordered without an additional sorting as if we apply the pseudo-polynomial time dynamic programming procedure for the minimum knapsack problem.
Of course, it holds f i (x from the maximality of the set X R i .As the next step, the proposed heuristic algorithm in this paper finds a 0-1 vector x ′ which is a combination of two partial solutions x1 ∈ X R 1 and x2 ∈ X R 2 such that it meets the target weight constraint f (x ′ ) ≥ t, and for any other combination x ∈ X R 1 × X R 2 with f (x) ≥ t, it satisfies r(x ′ ) ≤ r(x).Hence, the solution x ′ is a feasible and an optimal solution of problem R. The x ′ is returned as a heuristic feasible solution of problem Q.
The proposed heuristic algorithm is summarized as follows: 1 and x2 ∈ X R 2 such that the x ′ meets the target weight constraint f (x ′ ) ≥ t, and for any other combination In Step 1, we obtain two maximal sets X R 1 and X R 2 in Lemma 2, and the first step requires O(n 3 /ε) time.We then compute a combination of two partial solutions in the two maximal sets X R 1 and X R 2 by Step 2. Since the partial solutions in the sets X R 1 and X R 2 have already been sorted (see Eq. ( 22)), we can utilize an application of the well known linear search technique (5) to find a required combination.It takes The final step clearly runs in O(n) time.Therefore, the time complexity of Algorithm 1 is evaluated as O(n 3 /ε), which is polynomial in n and 1/ε.

Analysis
Finally, we are going to prove the following theorem: Theorem 1.For an instance of problem Q, let f * denote the minimum of the total weight, and for the corresponding instance of problem R with a real ε > 0, let x = x ′ denote a feasible solution of problem Q obtained by Algorithm 1 with the time complexity of O(n 3 /ε).Then, it holds Proof.The solution x ′ has been seen to be feasible in the sense of problem Q.We then need to show f (x ′ ) ≤ (1 + ε)f * .Again recall that two problems Q and R have the same constraints, and hence a feasible solution of problem Q is also a feasible solution of problem R, and vice versa.Since the x ′ is an optimal solution of problem R, and the x * is a feasible solution of problem R, it holds r(x ′ ) ≤ r(x * ), i.e., Together with Eq. ( 13), we obtain which completes the proof. 2

Concluding Remarks
In this paper, we considered a combinatorial optimization model of mixture packaging of two types of items, which arises in actual food packing systems, so-called multi-head weighers.The total weight of chosen items for a package is asked to be minimized under the condition that the total weight must be no less than a specified target weight.For a package, the weight sum of chosen items of each type must also be no less than a prescribed necessity minimum.In this paper, we designed a heuristic algorithm for the problem of minimizing the total weight, and showed that for a given positive real ε, the time complexity is polynomial in n and 1/ε, where n is the number of all the current items, and the performance factor is (1 + ε).
For future research, it is left for us to incorporate a recursive of computing the total priority of chosen items as the second objective with the proposed heuristic algorithm, in order to reduce the durations of remaining items in hoppers (5) , and to examine the empirical performance.Also, the time complexity of the proposed heuristic algorithm may be improved by regarding an upper bound on the optimal weight sum (i.e., the f i (x * i )) of chosen items of each type.Further, it would be interesting to examine a performance guarantee of a heuristic algorithm on the total weight of the mixture packaging problem with more than two types of items (6) .