C.: A new modeling and solution approach for the number partitioning problem

The number partitioning problem has proven to be a challenging problem for both exact and heuristic solution methods. We present a new modeling and solution approach that consists of recasting the problem as an unconstrained quadratic binary program that can be solved by efficient metaheuristic methods. Our approach readily accommodates both the common two-subset partition case as well as the more general case of multiple subsets. Preliminary computational experience is presented illustrating the attractiveness of the method.


Introduction
The number partitioning problem (NPP), being one of Garey and Johnson's [3] six basic NP complete problems, has been the subject of considerable research in recent years.In the simplest case, the problem consists of partitioning a set of numbers into two subsets such that the sums of the numbers in each subset are as close as possible.The more general case of NPP seeks to partition the original set into n subsets (n > 2) such that the sums for each set are as close to each other as possible.Most of the work reported in the literature has been directed to the two-subset case.This problem is known to be computationally challenging and, except for small instances, is most productively approached by heuristic means.
The literature contains several papers describing methods for solving NPP.One of the most widely referenced methods is the differencing method (DM) of Karmarkar and Karp [11] which is O(nlogn) for the two-subset case.Several computational studies, including those of Johnson et al. [10] and Arguello et al. [1], report that DM outperforms, in terms of both solution quality and computation time, alternative methods such as simulated annealing and GRASP.Due to it's effectiveness, Korf [13] employs DM to produce initial solutions for an improvement method that is reported to be very successful on a large variety of partitioning problems.An analysis of various published methods for NPP can be found in the paper by Gent and Walsh [4].
In this paper, we present a new way of modeling and solving a variety of NPPs.Several versions of the NPP, each a generalization of the one preceding it, are considered.We show that each version of NPP can be cast into the common modeling framework of the unconstrained quadratic binary program (UQP).In turn, this common formulation enables solutions by recently developed metaheuristics for this model.
The UQP can be written in the form where Q is an n-by-n matrix of constants and x is an n-vector of binary variables.UQP is notable for its ability to represent a significant number of important problems.A discussion of a wide variety of applications can be found in Kochenberger et al. [12].
Our purpose here is to show how this versatile model can be used to model and solve NPPs.In the sections below, we illustrate the use of UQP for various NPPs.Preliminary computational experience is presented for the two-subset case.

The two-subset case
The most common version of NPP involves partitioning a set of numbers into two subsets such that the subset sums are as close to each other as possible.We model this problem as follows.
Consider a set of numbers S = {s 1 ,s 2 ,s 3 ,...,s m }.The goal is to partition S into two subsets such that the subset sums are as close to each other as possible.Let x j = 1 if s j is assigned to subset 1, 0 otherwise.Then sum 1 , subset 1's sum, is sum 1 = m j=1 s j x j and the sum for subset 2 is sum 2 = m j=1 s j − m j=1 s j x j .The difference in the sums is then given by diff = (2.1) We approach the goal of minimizing the absolute value of diff by minimizing where Dropping the additive and multiplicative constants, our optimization problem becomes simply UQP : minxQx. (2.4) As a foundation for applying the UQP model to solve NPP, we first review solution methodologies created for UQP.
Bahram Alidaee et al. 115 2.1.Solution approaches for UQP.Due to its computational challenge and application potential, UQP has been the focus of a considerable number of research studies in recent years, including both exact and heuristic solution approaches.These various papers approach UQP by branch and bound, decomposition, semidefinite programing and cutting planes, tabu search, simulated annealing, evolutionary methods such as genetic algorithms and scatter search, as well as simple one-pass heuristic methods.Each of these approaches exhibits some degree of success and could in principle be utilized to solve problems reformulated as UQP.However, the exact methods degrade rapidly with problem size, and have meaningful application to general UQP problems with no more than a few hundred variables.For larger problems, heuristic methods are required.Below, we highlight our tabu search heuristic [5,6] which has proven to be very successful on a wide variety of UQP instances and that was used to produce the computational results presented later in the paper.Reference [12] gives an overview of other solution approaches for UQP.

Tabu search overview.
Our TS method for UQP is centered around the use of strategic oscillation, which constitutes one of the primary strategies of tabu search.The variant of strategic oscillation we employ may be sketched in overview as follows.The method alternates between constructive phases that progressively set variables to 1 (whose steps we call "add moves") and destructive phases that progressively set variables to 0 (whose steps we call "drops moves").To control the underlying search process, we use a memory structure that is updated at critical events, identified by conditions that generate a subclass of locally optimal solutions.Solutions corresponding to critical events are called critical solutions.
A parameter span is used to indicate the amplitude of oscillation about a critical event.We begin with span equal to 1 and gradually increase it to some limiting value.For each value of span, a series of alternating constructive and destructive phases is executed before progressing to the next value.At the limiting point, span is gradually decreased, allowing again for a series of alternating constructive and destructive phases.When span reaches a value of 1, a complete span cycle has been completed and the next cycle is launched.The search process is typically allowed to run for a preset number of span cycles.
Information stored at critical events is used to influence the search process by penalizing potentially attractive add moves (during a constructive phase) and inducing drop moves (during a destructive phase) associated with assignments of values to variables in recent critical solutions.Cumulative critical event information is used to introduce a subtle long-term bias into the search process by means of additional penalties and inducements similar to those discussed above.A complete description of the framework for the method is given by Glover et al. [6].

Computational experience.
The standard comparison in the literature for new approaches to the NPP is with the differencing method (DM) of Karmarker and Karp [11], which has proven to be both fast and effective in several comparative studies.Due to its prominence in the literature, we include it here as a benchmark as well.The results reported here are on modest-sized random problems of size m = 25 and m = 75.Five instances of each size are considered with the elements drawn randomly from the interval (50,100).Each of the 10 problems was solved by our UQP approach as well as the method of Karmarker and Karp.The results are shown in Table 2.1.For each problem, our tabu search heuristic was run for 20 "span" cycles.
The solutions shown in Table 2.1 indicate that our method dominates DM in terms of solution quality.For five of the problem instances, our approach found partitions with equal sums (differences of 0).For the other five problems, our method produced partitions whose sums differed by only 1.We suspect that these later results are optimal as well.
Bahram Alidaee et al. 117 In contrast to this, DM was unable to produce equal-sum partitions for any of the problems, yielding solutions with unequal sums of substantial margins across all ten problems.Solution times, shown in seconds on a Pentium 333 laptop, are roughly the same for both methods.

Partitioning with multiple subsets
The problem of the previous section can be generalized to accommodate n > 2 partitions.As before, the goal is to assign numbers to subsets such that the subset sums are as close to each other as possible.For this more general case, we start with a constrained model containing assignment equations ensuring that each number is assigned to one of the subsets.This constrained model is then recast into the form of UQP by introducing quadratic infeasibility penalties into the objective function as an alternative to the explicit imposition of the assignment constraints.This approach, shown by Kochenberger et al. [12] to be very successful in a wide variety of other problem classes, is presented below.
As before, we start with a set of m numbers S = {s 1 ,s 2 ,...,s m } to be partitioned into n subsets.Let x i j = 1 if element s i is assigned to subset j, 0 otherwise.
The sum for subset j (sum j ) is given by and we seek to minimize Since the objective of (3.2) is quadratic in the assignment variables, we can rewrite (3.2) as x 0 = xQx, where x = (x 11 ,x 12 ,...,x 1n ,x 21 ,...,x mn ) is the binary vector of length m by n and Q is the square, symmetric matrix resulting from combining terms in (3.2).Our model is now of the form This constrained model, following the general reformulation put forth by Hammer and Rudeanu [7], can then be recast as an unconstrained quadratic model by imposing the constraints implicitly via quadratic penalties added to the objective function.Specifically, for a positive scalar P, we have where the matrix D and the additive constant c result directly from the matrix multiplication indicated.Dropping the additive constant, the equivalent unconstrained version of our constrained problem becomes UQP(PEN) : min x Qx, x binary, ( and we see that the multiple-subset case considered in this section, like the two-subset case of Section 2, can be modeled by UQP.A suitable choice of the scalar penalty P, for the general application of this reformulation approach, can always be chosen so that the optimal solution to UQP(PEN) is the optimal solution to the original constrained problem.(Hammer and Rudeanu [7], Hansen [8], Hansen et al. [9], and Boros and Hammer [2]).We illustrate the procedure in the following example.
For each case, the transformation to x Qx is accomplished using an arbitrarily chosen penalty value of P = 900.Solving UQP for each case results in the assignments shown in Table 3.1.For each case, the numbers in the "subset assignment" column are the subset indices of the assignments made.For example, for the n = 3 case, the first number ( 15) is assigned to subset 3, the second number (3) is assigned to subset 1, and so forth.The assignments shown are very well balanced with subset sums of 102, 102, and 102, respectively for the n = 3 case, 76, 76, 77, and 77 for the n = 4 case, and 62, 61, 61, 61 and 61 for the n = 5 case.
The results given in Table 3.1 show the assignment of all elements (numbers), confirming that the penalty used was in fact sufficiently large to yield feasible assignments.Note that the UQP problems solved to produce the results of Table 3.1 were of size 75 variables, 100 variables, and 125 variables, respectively.The largest of these were solved in less than 2 seconds on a Pentium 333 laptop by our tabu search heuristic [6].

Nonhomogeneous case
To motivate this section, consider a machine-loading problem where a set of m jobs must be assigned to n machines such that the aggregate loading of the machines is as level as possible.If the machines are identical, job times are independent of the assignments made and the problem can be correctly modeled and solved by the representation given in the previous section.
A more general machine-loading problem, however, would allow for nonidentical machines and machine-dependent job times.The development of the previous section can easily be modified to accommodate this more general problem setting as indicated below.
Our problem is to level the loading of m jobs assigned to n machines where t i j is equal to the time required to accomplish job i on machine j.Following our earlier development, let x i j = 1 if job i is assigned to machine j, 0 otherwise.Then the total time (load) of the jobs assigned to machine j is and we want to minimize the aggregate squared deviation, By exactly the development of the previous section, this model can be recast into the form of minx Qx.Note that for the machine-loading problem context considered here, we may have additional constraints that job assignments must satisfy in addition to simply ensuring that each job gets assigned.Such constraints, provided that they are linear, can be "folded" into the Q matrix via additional quadratic penalties to once again yield an equivalent representation in the form of x Qx.
4.1.Related applications.Our focus in the development given above was to indicate how various versions of the NPP seeking equal subset sums could be modeled and solved via the common UQP framework.Additional partitioning problems, closely related to those considered above, can also be productively addressed by this approach.For instance, consider the problem where each subset has a predetermined target sum, tar j , and we seek a partition of the original set into n subsets that minimizes the aggregate deviation from these target values.Utilizing sum j and x i j as defined earlier, we have the problem minx 0 = sum 1 − tar x i j = 1, i = 1,m, ( which by the developments illustrated earlier can be readily recast into UQP.

Summary
In this paper, we have introduced the unconstrained quadratic program (UQP) as a new and fruitful representation of various forms of the NPP.This model (xQx) is shown to be robust in its ability to accommodate problem variations, affording an opportunity to solve any or all problem versions by a single solution method.
In addition to introducing a new model for this class of problems, we have presented preliminary computational experience demonstrating the attractiveness of our tabu search method for solving NPPs via the xQx representation.Our outcomes show that this approach is both conceptually and computationally attractive.
problem is min x 0 = xQx with