Efficient Pre-Solve Algorithms for the Schwerin and Falkenauer_U Bin Packing Benchmark Problems for Getting Optimal Solutions with High Probability

Bin Packing is one of the research areas of Operations Research with many industrial applications, as well as rich theoretical impact. In this article, the authors deal with Bin Packing on the practical side: they consider two Bin Packing Benchmark classes. These benchmark problems are often used to check the “usefulness”, efficiency of algorithms. The problem is well-known to be NP-hard. Instead of introducing some exact, heuristic, or approximation method (as usual), the problem is attacked here with some kind of greedy algorithm. These algorithms are very fast; on the other hand, they are not always able to provide optimal solutions. Nevertheless, they can be considered as pre-processing algorithms for solving the problem. It is shown that almost all problems in the considered two benchmark classes are, in fact, easy to solve. In case of the Schwerin class, where there are 200 instances, it is obtained that all instances are solved by the greedy algorithm, optimally, in a very short time. The Falkenauer U class is a little bit harder, but, here, still more than 91% of the instances are solved optimally very fast, with the help of another greedy algorithm. Based on the above facts, the main contribution of the paper is to show that pre-processing is very useful for solving such kinds of problems.


Introduction and Literature Review
Bin Packing (BP) is a classical area within Combinatorial Optimization, with widerange applicability in the everyday life. The optimal usage of the available capacity, e.g., in storing or transportation tasks, results in a smaller number of required containers, fewer vehicles, fewer flights, or fewer trips of ships. These advantages mean faster delivery processes and lower level of the transportation's impact on the environment. Another application area is the design of different devices/products (e.g., cubesat, mobile phone, etc.), where all the parts of the device have to be placed in the volume of the product, usually, resulting as small device as possible. In the former mentioned application area, the bin sizes are often identical (e.g., containers on a ship), while, in the latter case, the sizes of the devices' different parts are mainly different. However, in both cases, the theory of bin packing can optimize the packing process.
BP can be introduced as follows. Given are items with sizes p 1 , p 2 , . . . , p n (positive rational numbers between 0 and 1), to be packed into the minimum number of unitcapacity bins, not exceeding the bin capacity. The problem is well-known to be NP-hard (see, e.g., Reference [1] or Reference [2]). What is more interesting, BP was "born" in the early seventies as the "test-bed" of so-called approximation algorithms. Johnson's thesis [3] on bin packing (together with Graham's work on scheduling [4,5]) belongs to the early influential works that started and formed the whole area of approximation algorithms. These algorithms run in polynomial time, and they find optimal or near-optimal solutions in some sense.
The offline case is considered, where all items are known before the packing procedure. Below, a short review is given about what kind of algorithms have been considered to solve the bin packing problem.

Approximation Algorithms
Johnson's thesis analyzes several "Fit-type" algorithms, like First Fit (FF), Best Fit, and others. In this article, only the FF algorithm is dealt with, which can be defined as follows. (Algorithm First Fit probably appears first in the work of Ullman in 1971 [6], which is considered as the first work on BP).
The First Fit algorithm (FF for short) packs the items in a given order. The next item is always packed into the first bin where it fits, possibly opening a new bin if it does not fit into any currently open bin. The algorithm is called First Fit Decreasing (FFD for short) if the order of the items is decreasing by size.
The efficiency of a bin packing algorithm is traditionally measured by approximation ratio. Its two main versions are the asymptotic and the absolute approximation ratios. Let L denote the set of the items to be packed. Let OPT denote an optimal offline algorithm and A an arbitrary packing algorithm. Let OPT(L) and A(L) denote the number of bins created by them to pack the items of L, respectively. The absolute and asymptotic approximation ratios of A are defined as Below, only the main results will be reviewed regarding approximation algorithms for BP.
The proof that R as (FF) is, at most, 1.7 was given already by Ullman [6] and the matching lower bound by Garey et al. and Johnson et al. [7,8]. These were among the first results on approximation algorithms. An estimate about the absolute ratio appeared in 1994 by Simchi-Levy [9], who proved that R abs (FF) ≤ 1.75. The tight absolute bound for FF is R abs (FF) = 1.7, and this is proved in [10,11]. Regarding FFD, the tight result can be sated as FFD(L) ≤ 11/9 · OPT(L) + 6/9 in References [12,13], where tightness means that the additive term 6/9 cannot be decreased.
These algorithms (i.e., FF and FFD) are also very popular today and often used in several applications of BP, as they are very simple and very efficient in practice. There is much more work on this topic; in particular, there exist many other (classical or new) algorithms, as well as asymptotic polynomial-time approximation schemes (APTAS), for this problem [14,15]. An approximation scheme means that, for any ε > 0, there exists some algorithm A ε with R as (A ε ) < 1 + ε, with running time (number of steps) polynomial in ε. Note that, in practice, these algorithms are not efficient if the number of bins provided by the algorithm for item-set L is, at most, (1 + ε) · OPT(L) + C (where C does not depend on the input) because the additive term C can be so large that the number of used bins is very big if L is small. So, the algorithm can be efficient only for very "large" OPT values, which is rare in "real-life".

Exact Methods
Many exact algorithms have been published to solve the bin packing problem. BP can be tried to solve, among others, by dynamic programming, LP-relaxation (and some postprocessing), branch-and-bound, branch-and-price, and constraint programming methods.
The exact methods indeed provide the optimal solution, but they can usually be applied only to solve relatively small bin packing problem instances in a reasonable time. Below, only a few related publications are mentioned.
Delorme et al. [16] review the most important mathematical models and algorithms developed for the exact solution of BP and experimentally evaluate, on state-of-the-art computers, the performance of the main available software tools. Carvalho [17] treats LP models for bin packing (and the closely related Cutting Stock Problem). Wei et al. [18] solve the bin packing problem with a new branch-and-price-and-cut algorithm. This exact algorithm is based on the classical set-partitioning model and the subset row inequalities.
Note that the MILP model of the bin packing problem is quite simple. The next model is one option. Assume that there are n items with sizes p 1 , p 2 , . . . , p n . It is also assumed that there are n bins. Binary variables x(i, j) are introduced whose value is 1 if item i is packed into bin j (otherwise zero). Moreover, let also y(j) be a binary variable: its value is 1 if bin j is used (otherwise zero). Let M be a "big constant"; its value can be chosen, e.g., to M = n. Then, there are the following constraints: Interestingly, even a relatively small model cannot be solved in reasonable time, with a commercial solver. This is not the fault of the solver, this is the property of the problem (and implicitly, caused by its NP-hardness).

Metaheuristics, the Main Directions
As BP is NP-hard, and there can be "problems" with an exact algorithm (i.e., such a method may need too much time to get an optimal solution), many kinds of metaheuristic approaches, such as genetic algorithms (GA), particle swarm optimization, tabu search, variable neighborhood search, etc., also have been introduced. These kinds of algorithms find near-optimal solutions; in fact, many times (applying for certain instances), they are able to get the optimal solution of the input. In Reference [19], the total number of 1318 benchmark problems are examined with the proposed grouping genetic algorithms, and, in 88.5% of these instances, the obtained solutions are optimal.
Loh et al. [20] developed an algorithm that uses a simple and fast heuristic based on the concept of weight annealing metaheuristic. The algorithm found the existing best known or optimal solutions to 1584 instances taken from benchmark problem sets and generated new optimal solutions for three instances.
Kucukyilmaz et al. [21] also proposed grouping genetic algorithms. They examined 1318 benchmark problems and got the optimal result in their 99.6%. On the hard28 test set, they found 23 optimal solutions out of 28. However, the genetic algorithm used has a high running time.
Borgulya [22] developed a hybrid evolutionary algorithm where an individual is a feasible solution, and it contains the description of the bins. The algorithm works with two new mutation operators and improves the quality of the solutions with local search procedures. He solved 1615 benchmark problems, and, in 99.7% of these instances, the solutions were optimal. On the hard28 test set, this algorithm outperforms the earlier heuristics, it found the optimal solution for all instances.
Buljubašić and Vasquez [23] proposed a local search-based algorithm. The main feature of this algorithm is to proceed by partial configurations of the search space. Items are assigned to bins, while satisfying the capacity constraint, or are not assigned at all. This algorithm seeks to derive a set of non-assigned items that can be packed into two bins to obtain a completely feasible solution.
Only a few metaheuristic algorithms are mentioned. The interested reader can find many more in the references of the articles mentioned above. There are also hybrids, where two types of metaheuristics are combined; see, e.g., Reference [24].

The Metaheuristic Zoo
Recently, many other kinds of metaheuristic methods appeared. They all mimic the habit of some kind of animal. Maybe the first such algorithm was the Ant Colony Algorithm, which appeared efficient for many different optimization problems; see, e.g., Reference [25]. A similar, but not the same, kind is Particle Swarm Optimization [26].
However, there are many more. A whale optimization algorithm for BP is proposed in Reference [27]; some more "animal algorithms" are cuckoo search [28], squirrel search algorithm [29]; firefly, cuckoo search, and artificial bee colony algorithms are investigated (among others) in Reference [30], bat optimization is considered in Reference [31], and African buffalo optimization in Reference [32,33]. It is hard to imagine an animal whose habits cannot be used for optimization. Search on the Internet for "kangaroo search" will be successful, one can find, e.g., Reference [34]. What is not mentioned yet: grasshopper [35].

Very Recent Relevant Publications
Below are several very recent publications collected from the literature of bin packing, showing that this research is still active, moreover demonstrating that there are many competing research directions, as well as that the theoretical results are commonly used in a variety of industrial problems.
In Reference [37], the authors propose a novel slack-based flexible bin packing framework called reinforced bin packing framework for one-dimensional BP.
Ref. [38] proposes two new bin packing problems with many practical applications, particularly in logistics capacity planning. In both problems, besides the classical bin-selection costs, other assignment costs are also considered, and several constructive heuristics are proposed. The heuristics are evaluated by an extensive computational experimentation. The numerical results show good performance of the proposed heuristics, as well as the potential benefits of using the new models in practical applications. Ref. [39] deals with scheduling of aircraft maintenance tasks that are needed to keep a fleet of aircraft airworthy. This is a complex combinatorial problem that needs to be solved daily by maintenance operators. The problems is formulated as a time-constrained variable-sized bin packing problem. A novel approach is proposed that is capable of efficiently solving the multi-year task allocation problem for a fleet of aircraft in a few minutes. To solve this problem, a constructive heuristic based on the worst-fit decreasing algorithm is proposed. The heuristic is tested and validated using the maintenance data from a European airline. Compared with the previous solution, the proposed heuristic is more than 30% faster for all the test cases discussed with the airline, and, for most of the cases, the optimality gap is below 3%.
Ref. [40] presents a survey of the recent advances for one-dimensional BP, with specific interest on population-based metaheuristic algorithms. This paper wishes to give a reference guide for researchers to explore and develop more robust state-of-the-art metaheuristic algorithms for solving the emerging variants of the bin-parking problems. Ref. [30] presents a systematic performance evaluation study for some representative algorithms, with some initial computational results to show their effectiveness and their ability to achieve promising solutions. The experiments were made using three standard bin packing problem dataset categories with more than 1210 instances. The numerical results of the considered algorithms were compared with the solutions achieved with the the best fit and better fit heuristics, respectively. Some issues regarding the individual algorithm implementation are also treated.
In Reference [41], the authors consider a specific version of the temporal bin packing problem that occurs in job-to-server scheduling. This problem is a generalization of the bin packing problem with respect to an additional time dimension, and it requires to find the minimum number of bins (servers) to accommodate a given list of items (jobs) at any instance of time. Moreover, recent publications suggest to also incorporate the number of fire-ups of the respective servers as an important factor in sustainable and energy-efficient overall operation. Dealing with both of these objectives by a weighted sum method increases the complexity of the model, thus leading to challenging ILP formulations. It is shown that the current approaches fail to compute an exact solution of many moderatelysized instances in reasonable time. For this reason, the authors propose various new pre-processing techniques to reduce the number of variables or constraints. Based on numerical experiments on different sets of benchmark instances, the new and improved formulations are shown to lead (on average) to better performances in terms of instances solved to optimality and computation times.

A "New" Paradigm
In this article, a new kind of paradigm is proposed. First, some kind of pre-processing will be performed. Let an instance of BP be given, that has to be solved optimally. This task "can be hard", as the problem is NP-hard. However, this fact does not mean that finding the optimal solution is really hard for each instance. For example, if all the sizes are equal, say p > 0, then the problem is trivial. One can pack exactly 1/p items into each bin "without thinking", and the work is done. Of course, usually the packing problem is harder or much harder. Nevertheless, it will be shown a little later that, for many commonly used Benchmark problems, it is still able to find the optimal solution very easily.
So, the proposal of the authors is the following: First, try to get the optimal solution for the instance with a greedy-type method. If it is successful, the task is done. If not, apply some more sophisticated method (which is not treated in this paper). This kind of application of greedy methods is ubiquitous in the personal life, too, e.g., when one find shortcuts in the traffic, or when a person is doing the shopping. Operations Research also uses these tricks. For example, Reference [27] also builds some tricky improvements into the initial whale optimization algorithm (e.g., applies Lévy flight for whale movements, adds a new mutation phase, and switches in a clever way between the exploration and the exploitation phases by a logistic chaotic map). Now, let us have a closer look at the so-called Benchmark Problems.

Bin Packing Benchmarks
In this section, the wide collection of benchmark problems that are listed on the homepage of Operations Research Group Bologna [42] are briefly introduced, which is a very good source if one would like to get acquainted with the bin packing literature, mainly from the point of view of "how to solve the instances optimally".
The instances are given in the following formats: The number of items and the capacity of the bins are denoted by n and c, respectively, and for each item j (j = 1, . . . , n), the size of the item (also called weight) is w j . The benchmark instances are categorized into several classes. Below, the authors briefly overview the classes one by one (just the same way as they can be found on the homepage). For each class, the article that introduces it is also provided.
Falkenauer [43]. The instances are divided into two classes, with 80 instances in each. The first class ("Falkenauer U") is divided into four subclasses (20 instances in each), and, in each subclass, the number of items is n = 120, n = 250, n = 500, and n = 1000, respectively.
In all subclasses, the item sizes are uniformly distributed between 20 and 100, and the bin capacity is c = 150.
The instances of the second class ("Falkenauer T") include triplets (groups of three items) that need to be assigned to the same bin in any optimal packing, where n is between 60 and 501, and c = 1000.
Wäscher [45]. These instances are considered as (some of) the most difficult ones. Here, n is between 57 and 239, and c = 10, 000.
In total: 17 instances. Schwerin [46]. These instances are divided into two sets ("Schwerin 1" and "Schwerin 2") of 100 instances, each with n = 100 and n = 120, respectively, and c = 1000. The items sizes are randomly drawn and uniformly distributed between 150 and 200.
In total: 28 instances. Some further benchmark sets. There are three more classes on the Unibo homepage. There are Randomly Generated Instances given in Reference [16]. Here, there are 8 different values of n between 50 and 1000, with 12 options for choosing c between 50 and 1000. The item sizes are between the minimum size (0.1c, 0.2c) and the maximum size (0.7c, 0.8c). For each quadruplet, 10 instances (in total: 8 · 12 · 2 · 2 · 10 = 3840 instances) were generated. The same paper also provides the Augmented Non-IRUP and Augmented IRUP Instances. These are 250 instances within each set (Augmented Non-IRUP: ANI and Augmented IRUP: AI). In total: 500 instances.
Moreover, the GI Instances are proposed in Reference [48] with various instances. In total: 240 instances.
Altogether, the total number of instances in all groups listed on the homepage is 6195. It is supposed that the items are ordered by decreasing sizes before any further discussion (they are already listed in this order on the homepage in Reference [42]).
Comparison with FFD. The first experience was that algorithm FFD performs quite well for many of the above-listed benchmark classes. First (separately), the results for the AI and ANI classes are provided because, for these classes, the optimum value is not given for each instance, only a lower bound and an upper bound (UB), which sometimes coincide. In Table 1, the results of FFD are compared with the upper bound. It can be realized that FFD provided the "best known" solution for more than half of the AI class instances and all instances in the ANI class! In Table 2, some of the other classes are considered. One can conclude that FFD is very efficient for the instances in DataSet 1 (more than 75 percent of the instances were solved optimally); for (the harder) DataSet2, this ratio is still almost 50%. However, for the ten instances in DataSet3 (not included in the table above), FFD could not solve any instance optimally. Continuing the "negative side", FFD could not solve optimally any instance within the Falkenauer T class, and solved optimally only one instance from the GI class. No instance is solved optimally by FFD for the Schwerin class, only 2 (out of 17) for the Washer class, and 5 (out of 28) from the Hard28 class.
If FFD does not provide the optimal solution, usually it uses only one more bin. In total, FFD provided the "best known" solution for 2778 instances (44.84%) out of the 6195 instances. In some classes, this ratio is higher, and, in some other classes, it is lower, as shown by the data above.
Let Reference [49] be mentioned here. It proposes a new (sophisticated) algorithm and solves 120 instances from the Scholl group. The algorithm is able to solve all instances optimally. However, FFD is also able to solve all these instances optimally. Then, why should one use a more sophisticated algorithm?
The conclusion is the following: • Algorithm FFD is not always efficient, but it is a good idea to run FFD first, and almost half of the instances are already solved optimally! • Two classes are chosen: these are the Schwerin class and the Falkenauer U class. For these classes, FFD is not efficient; see the results above. However, it will be shown a little later in Section 3 for the Schwerin class and in Section 4 for the Falkenauer U class) that "smart", but greedy-type algorithms are still able to solve all, or almost all, of these instances optimally. Note that a key property of these chosen classes that the item sizes are drawn randomly and uniformly from some given interval.

Pre-Solve Methods in the Literature
"Pre-solve" is a well-known and frequently applied technique in optimization. It mainly means that before the solution of a problem is started, the instance is simplified (if possible). If some kind of linear optimization problem is dealt with, first the redundant constraints are removed to shorten the problem. Possibly, the first publication about a pre-solver technique in Linear Programming was the work of Brearley, Mitra, and Williams in 1975 [50], the subsequent similar publications are Tomlin and Welch in 1983 [51,52], Andersen and Andersen in 1995 [53], and Gondzio in 1997 [54].
Reference [55] considers pre-solve for Mixed Integer Programming problems. Some further publications on the same topic are Reference [56,57], from the same authors, and Reference [58].
Mészáros and Suhl deal with pre-solve in Linear and Quadratic programming [59]. A survey article on pre-processing techniques for integer programming is Reference [60]. (The model (3)-(6) is also an Integer Programming model.) Note that even the ordering of the items is already a "pre-processing", and it is very efficient. If the First Fit algorithm is applied for a given list L, in the "worst" case, its solution can give FF(L) = 1.7 · OPT(L), no matter how big OPT(L) is Reference [10]. However, if the items are sorted into non-increasing order, and only after this is ordering the First Fit algorithm applied (i.e., in fact, it is FFD), in the worst case, one will get FFD(L) ≈ (11/9)·OPT(L) for "big" OPT(L) values [3,13].
After shortly going through the above points, several slave algorithms will be introduced that are needed later. Then, a pre-processing technique will be shown that is applied for the Schwerin set of benchmark problems in Section 3 and the Falkenauer U class in Section 4.
Finally, the investigation will be closed by the Conclusions.

Greedy Knapsack Packing and Optimal Path Search
First, several slave algorithms are described. None of them is "new", as they are commonly applied simple algorithms; but, for the sake of completeness, they are shortly introduced here. Note that the total size of items in a bin is called level.

The Knapsack Problem and Its Relation to BP
The Knapsack Problem (KP) (Algorithm 1) is the following. Given n items, each item i has a weight w i and a gain value g i . Moreover, given is a knapsack with capacity C. The goal is to pack a subset of the items into the knapsack so that their total weight is, at most, C and their total gain is as big as possible. It is well known [61] that KP is NP-hard in the ordinary sense, but BP is strongly NP-hard. Thus, it is a straightforward idea to apply the next type of algorithm that is called Knapsack. It will be described in a general way; the special settings about its application will be treated later.
Algorithm 1 Knapsack algorithm Input: the items of a BP instance (with given sizes p 1 , p 2 , . . . , p n ) Output: packing of items into unit capacity bins 1.
Choose several items to fill one bin "well". Here, one bin plays the role of a knapsack. The items of the BP instance will be considered as items of the KP. The weight of each item (in the KP) is defined as its size (in the BP). The gain g i of item i can be defined in several ways; 2.
Choose (by some knapsack algorithm) several items that fit into the knapsack and have maximum total gain; 3.
Remove the items that are just packed into the knapsack (these items are packed into a bin), and go to Step 2 to pack the next bin.
First of all, it is necessary to note that there is no guarantee that the above algorithm will provide an optimal solution for BP. However, it will be shown that even this simple "greedy-type" method, or even some kind of its relaxation, will provide an optimal solution for many inputs. The algorithm is of greedy type, as instead of taking care of all items and all bins that should be filled "well", at any moment, only one bin is dealt with and only a subset of all unpacked items is considered. However, as it is mentioned, this simple greedy-type method still works, at least for some kinds of inputs.
There are several ways to determine the gains of the items for the KP. (Recall, that the weights in KP are already given as they are equal to the sizes of the items in the BP, but there is a freedom to choose well the gain values.) The role of making a "good" choice for the gains is to fill the knapsack "well". The simplest option is: g i = w i . Observation 1. Assume that the bin capacity is C > 0 (an integer) and all item sizes are positive integers between 1 and C. Applying the gain function g i = w i for the items, algorithm Knapsack will choose an item-set for packing the knapsack with a maximum total size (but at most K ≤ C). This subproblem is usually called Subset Sum (which is a special case of KP).
One may want to pack the items into the bins so that the bins are filled as much as possible. The above gain function (i.e., g i = w i ) is a suitable choice (a possible option) for this purpose. However, it can happen that the resulting packing is not so good in some sense, as it does not make a difference between different choices if the sum of sizes of packed items is just C.
A better choice can be, because of the mentioned phenomenon, the following: g i = w i − 1 (if all sizes are greater or much greater than 1). This setting of the gain function will give preference to choosing bigger items rather than smaller ones, if possible. For example, let the bin size be 10, and let there be seven items: 6, 4, and five copies of 2. It is possible to fill the knapsack completely in different ways. However, the total gain will be largest if one completely fills the bin with as few items as possible. So, the gain function g i = w i would consider all full fillings equally fine, but applying g i = w i − 1 the algorithm will prefer {6, 4} rather than choosing, e.g., the five small items of size 2.
There are also other possible options; that will be discussed where needed later.
Let it be emphasized that the authors do not plan to build an "exact" algorithm. They build "only" some greedy-type algorithms that are able to find very good (in fact, optimal) solutions in many of the cases.

A Path Search Algorithm
The next algorithm is a well-known simple path search algorithm; it will be described it briefly. The algorithm determines if there is a collection of items that together fit into a bin and their total size is K, where K ≤ C.
Step by step a (directed) path will be built from some node to another node in a graph. The initial node n 0 corresponds to the empty bin, and a directed path from n 0 to some other node n i corresponds to a packing with level (i.e., the total size of items in the bin) i.
Initially, the items i = 1, 2, . . . , n are given, in a given order (recall that the size of item i is p i ). A directed graph is built where each vertex also has a label. First, the graph has C + 1 nodes and no edges. Node n i is represented by the value i of the horizontal axis. The smallest node is n 0 at the zero value, and the last node is n C , at value C. In the beginning, the label l i of any node is −1, except that the label of node n 0 is l 0 = 0. If a label of some node is −1, this means that the node is "unreached"; otherwise, it is "reached". If a node j is reached, the label l j means the last edge of the directed path from n 0 to node j (i.e., the size of the last item packed into a bin with level j). "Temporary labels", denoted by k i , will be used also.
Then, the next steps are repeated (Algorithm 2): Consider the next item i; 2.
Consider all nodes with label bigger than −1 (i.e., all nodes that are already reached). For any such node, say node j, do the following. Add a directed edge from node j to node t, where t = j + p i (if t ≤ C), and let the temporary label of node t be k t = i. If node t was not reached before, let l t = k t . If node t was already reached, there is an option to leave its label as it was before this step, or change it to k t , as will be determined later; 3.
Go to Step 2 if there is at least one more item. Otherwise, Stop.
Note that there can be several versions of the Path Search algorithm; the applied one is a very simple version that still works.

Lower Bounds
Finally, some words about lower bounds for BP. These lower bounds play an important role when one would like to get an optimal solution. For example, if there is a feasible solution to BP and also a matching lower bound, then it is known that the feasible solution is, in fact, optimal; thus, the procedure can be stopped from searching for an optimal solution. There is quite a big literature on lower bounds for BP and other problems, e.g., References [62,63]. Now, some well-known obvious lower bounds will be shown, that will be useful for later discussion. Let i.e., the sum of sizes divided by the bin capacity and rounding up. Another trivial lower bound is the number of items bigger than half of the bin capacity, which will be denoted by LB 2 . More generally: If one consider all items that are bigger then C/k, for some k > 1, then this number divided by (k − 1) is again a lower bound.

Schwerin Class
This Benchmark set contains 200 instances in two parts, with 100 instances in each.

Schwerin 1: The First 100 Instances
Here, the bin capacity is 1000, and, in the case of each instance, there are given n = 100 items. The item sizes were randomly chosen from the interval between 150 and 200; of course, after drawing the items, the instances are fixed.
For each of the 100 instances, the optimum value is 18. Note that the lower bound LB 1 also provides 18 for each input.
One can observe at first sight that now, in fact, there are only 60 items to pack carefully, rather than 100. The reason is that the following two properties trivially hold by the given bin capacity and lower and upper bounds for the item sizes: • no seven items fit into a bin, and • any five items fit into a bin.
Hence, any bin will contain five or six items (except, at most, one bin). Consequently, at least 8 of the, at least, 18 bins will contain, at most, five items. Thus, the 40 biggest items can be packed arbitrarily into 8 bins without losing optimality, and only the packing of the other 60 items remains to think about. It should be emphasized that the input is already significantly simplified! Almost no time is spent for packing 40% of the items, thus not violating optimality! How can one smartly pack the remained 60 items? Can one pack them into 10 bins (can one partition the 60 items into 10 groups so that any group contains six items that fit into a bin)?
One can try some version of Algorithm Knapsack (introduced in the previous section) for packing the remained 60 items (packing "well" one bin, excluding the items from the remained set of items, and repeating this step). However, it is found that the next much simpler greedy-type algorithm also helps. It is called Algorithm Rem SW (Algorithm 3), denoting that it is applied for packing the remaining items of a Schwerin type input .

1.
Let 0 ≤ k ≤ 6 be the biggest integer for which the k biggest items and the 6 − k smallest items (from the set of unpacked items) fit altogether into a bin; 2.
Pack the k biggest items into the bin; 3.
Apply Algorithm Path Search to fill the remained room in the bin as much as possible; 4.
Remove the packed items from the set of "unpacked items"; 5.
Go to Step 1 if there is at least one more item. Otherwise, Stop.
Experience showed that, for the instances of this Benchmark set, k is generally 3 in the first few iterations; then it turns to 4, then to 5, and, finally, to 6.
Rarely, it happens that k = 2 in the beginning, then it increases to 3, and so on. It never happened that the six smallest items do not fit into the bin, so k is well defined (for the considered instances of the Schwerin class).
Due to the embedded Path Search subroutine, the running time of algorithm ALG Rem SW is pseudo-polynomial when applied for n items in general. Naturally, for 60 items the running time is constant. Nevertheless, it should be emphasized that the running time is really small.
The main consideration is that an optimal solution is obtained (i.e., the 100 items are packed into 18 bins) for all of the cases in the Schwerin 1 subclass.

Schwerin 2: The Second 100 Instances
For the second 100 instances, the bin capacity is still 1000, but there are n = 120 items in each instance. The sizes are again randomly drawn from the interval between 150 and 200 (by uniform distribution).
For each of the 100 instances, the optimum value is either 21 or 22. Note that the lower bound LB 1 equals the optimum value for each input.
If the same algorithm is applied as for the first 100 instances, it finds (also very fast) optimal solutions in 99 cases out of the 100 cases. However, if one restrict the choice of k only to 2 ≤ k ≤ 3, the algorithm finds the optimal solution for all 100 cases. Moreover, this restricted choice of k also solves all 100 instances of the first 100 instances optimally. So, in this way, one can get the optimal solution for all 200 instances of the Schwerin type. The solution of each of the 200 instances can be checked step by step on the page [64].

Discussion of Scalability and Complexity
What happens if the input is different from the Schwerin type? If the size of the bins is not 1000, or the items are drawn not from [150,200]? In other words, how can one scale the algorithm to a more general input class?
The authors think that if the item sizes are randomly chosen according to uniform distribution from a "narrow" interval (like [150, 200]), then an optimal solution is usually easy to found. The next idea can be followed:

1.
Calculate the lower bound LB 1 (total size/bin size, rounded up).

2.
Determine the minimum and the maximum number of items that can be packed into a bin. Suppose that this number can be only K − 1 or K. (For the Schwerin type K = 6).

3.
Fill a certain number of bins with the biggest items, with K − 1 items packed in each bin. After that, deal only with the remained set of items.

4.
Perform Algorithm Rem SW, with the only difference that when determining the value of k (some range within 0 ≤ k ≤ K), possibly choose k from some restricted interval (similarly to the discussion done in the previous subsection for the Schwerin 2 type, where k is chosen from 2 ≤ k ≤ 3).
Returning to the case of K = 6 as applied in the previous section, let the number of steps of ALG Rem SW be estimated if the instance has n items (now n = 100 in the Schwerin 1 set and n = 120 in the Schwerin 2 set). No matter how big n is, during Step 1, one make only a constant amount of computation, as for each value of k it is calculated the total size of six items, and k has seven different possible values. Only Step 3 needs more time. Here, the running time is O(C · n), since there are, at most, C nodes t to consider for any item i. As this step is executed about n/6 times (not taking into account that the number of items to be handled by ALG Rem SW is already reduced considerably by having a significant portion of the biggest items packed before executing this algorithm), the total running time is not more than C/6 · n 2 . A similar computation can be carried out for general K, as well, hence obtaining a guaranteed upper bound on the running time.
A computer with Intel Core i5-4300M CPU at 2.60 GHz CPU and 8.00 GB of RAM was used to execute the benchmark problems. Table 3 shows the total running times for each input class in seconds. The HEA algorithm was introduced and implemented by Borgulya [22]; this is one of the most effective and latest algorithms to solve these benchmark problems. It was executed on an iMAC with Intel Core i5 at 2.5 GHz CPU and 16.00 GB of RAM; this computer configuration is similar to the one used in the present research. From Table 3, one can conclude the following. The total running time of the algorithm proposed here for the entire set of 100 instances in case of Schwerin 1 is 0.3817811 s, and, in case of Schwerin 2, it is 0.408763 s. The average time of HEA for these input classes is 0.34 s for Schwerin 1 and 0.47 s for Schwerin 2. It can be seen that the present algorithm is 90 times faster for Schwerin 1 and 115 times faster for Schwerin 2. It should be noted, however, that HEA is a general-purpose algorithm applicable for all classes of the Benchmark site in question, while the faster method is a more specialized procedure that has so high efficiency on the Schwerin class.

Falkenauer U Class
There are 4 times 20 instances (altogether 80 instances) in the Falkenauer U class. The bin size is C = 150, and the item sizes are between 20 and 100. The items are randomly drawn from this interval, with uniform distribution. In the four subclasses, only the numbers of items differ; these numbers are 120 items, 250 items, 500 items, and, finally, 1000 items.
The main difference between the instances of the Falkenauer U class vs. the Schwerin class is in the range of the items compared to the bin size. Recall that, in the case of the Schwerin class, the items come from interval [150,200], and the bin capacity is 1000. Now, in the Falkenauer U class, the items come from interval [20,100], and the bin capacity is 150. The ratio of the biggest possible size and the smallest possible size is 100/20 = 5 in the present case, and it was 200/150 = 4/3 previously. So, it means that the variance of the items is much bigger. Now, one cannot declare in advance that the number of items is almost the same in all bins (as it was only 5 or 6 in the case of the Schwerin class). Still, it is possible to make a very simple observation that makes the optimization process for the Falkenauer U class much simpler! Observation 2. Suppose that there are two items, i and j, so that i + j = C, i.e., the sum of their sizes is exactly the bin capacity. It can be supposed that these two items (i.e., i and j) are packed into the same bin in the optimal solution.
Let the appropriate item pair in this observation be called a "good pair". It follows that one does not lose anything from the quality/optimality of a packing if the good pairs are packed together into bins. For a closer look at one of the instances, consider the Falkenauer_u120_00 input (the very first input within the Falkenauer U120 subclass). Here, one can find 15 good pairs. It means that the size of the instance is already reduced from having 120 items to have only 90 items. Again, this is a huge amount of reduction (similarly to the simplification that one could perform in the Schwerin class, where from 100 items, one could pack "well" 40 items and only 60 items remained to deal with)! One can check that the situation is very similar in the other instances within the Falkenauer U120 subclass. Now, the notion of initial reserve will be introduced. After computing the lower bound LB 1 , let the total size of items be subtracted from the product of LB 1 and the bin size C. This value shows how much space will not be filled in the optimal packing if OPT = LB 1 holds (which is the case in almost all instances in the Falkenauer U class).

Definition 1. The initial reserve of the instance is res
Investigating the instances of the problem class in consideration, since the item sizes are drawn from a uniform distribution, usually it happens that some significant amount of reserve is made; typically it is comparable with the item sizes. It means that usually it is not needed to pack all bins fully. So, if two items (a pair) can be found so that they do not fill a bin completely but fill it "almost completely", choosing this pair (instead of a good pair) still can be a good choice. Thus, sometimes it is satisfactory to fill the bin up to a certain level L, where L is "close" to the bin capacity. The reserve of the instance, denoted by res, will be calculated dynamically. In the beginning, this is the initial reserve r 0 , according to Definition 1. Then, if a bin is filled only up to L, and so lose l = C − L from the reserve, the reserve res will be reduced by l. (For example, if the initial reserve is r 0 = 50, and a bin is filled up to level L = 146, then, since the bin capacity is C = 150, 4 units are lost from the initial reserve, and reserve res = 46 remains.) One more definition is needed.

Definition 2.
An item is called big if its size is above half of the bin capacity C.
In the Falkenauer U set, an item is big if its size is bigger than 75. It is clear that two big items cannot be packed into a bin, so one need to be careful with the big items: too many big items cannot be left at the end of the packing procedure.
The following algorithms will start with the whole set of items.
Step by step, a bin is packed, then the already packed items are omitted from consideration, and the items not yet packed are called remained items. After creating a new bin, the value of the reserve res is reduced accordingly. To simplify the description of the main algorithm constructed here for the Falkenauer U class, several slave algorithms will be applied.
Recall that, by assumption, initially the items are sorted in non-increasing order.
Step by step, this set of "unpacked" items will change, as some items from the set are packed and then deleted from the set of unpacked items. The remained items keep their ordering. Consider now a certain unpacked item; that will be called "current" item. Then, the "subsequent" items mean all the other unpacked items.
The first slave algorithm is called Pair(L, r) (Algorithm 4). During this algorithm, pairs of items are packed in each new bin. If an appropriate pair with total size L is found, these two items are packed into a bin dedicated for them, then they will be deleted them from the set of remaining items, and the reserve will be modified accordingly. For making the decision about to pack or not to pack a pair of items, consider the total size of the chosen pair of items (it must be exactly L), and the current value of the reserve res (it cannot be smaller than r). First, the algorithm tries to find a pair for the largest unpacked item. If such a pair is found, they will be packed; otherwise, if such a pair is not found for the current item, nothing is done with it but go toward to find a pair for the next largest unpacked item, and so on.
Let i be the biggest unpacked item; 2.
If p i < L/2 or the current value of the reserve is res < r, then return; 3.
If there exists a subsequent item j such that p i + p j = L: pack i and j into a new bin, delete these items from the set of unpacked items, reduce res by (C − L), and go to Step 1; 4.
Let i be the next unpacked item (i = i + 1), and go to Step 2.
The next slave algorithm is Triplet(L, r) (Algorithm 5). During this algorithm, triplets (three items) are packed in any new bin. If an appropriate triplet is found, pack these three items into a bin dedicated for them, delete them from the remained set of items, and reduce the value of the reserve accordingly. To find a "good" triplet, the total size of the chosen three items is taken into account, as well as the current value of the reserve. When this algorithm is called from the master algorithm, it is also distinguished as to whether there exists a big unpacked item or not.

1.
Let i be the biggest unpacked item; 2.
If p i < L/3 or the current value of the reserve is res < r, then return; 3.
If there exist two subsequent items, j and k, such that p i + p j + p k = L, pack i, j, and k into a new bin, delete these items from the set of unpacked items, reduce res by (C − L), and go to Step 1; 4.
Let i be the next unpacked item (i = i + 1), and go to Step 2.
Finally, the last slave algorithm is Quadret(L, res) (Algorithm 6). During this algorithm, four appropriate items are packed in any new bin. If such four items are found, pack them into a bin, delete these items from the remained set of items, and reduce the value of the reserve accordingly. This algorithm is applied only if there is no unpacked big item.

1.
Let i and j be the two biggest unpacked items; 2.
If p i + p j < L/2 or the current value of the reserve is res < r, then return; 3.
If there exist two subsequent items, k and l, such that p i + p j + p k + p l = L, pack i, j, k, and l into a new bin, delete these items from the set of unpacked items, reduce res by (C − L), and go to Step 1; 4.
Let i = j, let j be the next unpacked item, and go to Step 2.
Now, it is possible to define the master algorithm Alg FU (Algorithm 7). For the sake of simplicity, it is designed for the Falkenauer U120 subclass; but only with changing its parameters can it be applied for the other three subclasses (U250, U500, and U1000), as well. The procedure of the algorithm is briefly summarized now. First, the algorithm tries to fill "well" as many bins as possible, with only two items. If the current value of the reserve is "big", the algorithm is more permissive to allow such bins where the level of the bin is below the capacity. As the reserve is decreasing, the algorithm becomes more exclusive. After filling "well" as many bins as possible with pairs of items, the algorithm turns to fill well bins with three items and then with four items. Then, the remained (usually only few) items are packed by FFD. The exact description of the algorithm is given below. In the second step, r b2i denotes some value of the reserve (that makes it possible to apply this step), where there exists a big item (this is the meaning of "b" in the notation), and, similarly, r n2i means some value of the reserve in the case when there is no unpacked big item (this is the meaning of "n" in the notation).
The efficiency of Algorithm ALG FU is discussed in the next subsection. Here, one should mention only that, in Step 2 (lines 7-22), if there exists an unpacked big item, the algorithm is more restrictive than when all big items are already packed. Note also that, in Step 3 (lines [23][24][25][26][27], the algorithm is not restrictive at all in the sense of the value of the reserve; no matter what the value of the current reserve is, bins will be packed if the level will be at least 148.

Evaluation of the Algorithm
In Tables 4 and 5, the applied values of the reserve in the algorithm are collected for the different subclasses. (In the description of the algorithm, the parameters for the U120 subclass are applied; naturally, in case of the other subclasses, other parameter values are applied, but the algorithm remains the same in any other sense).  U120  0  1  2  3  4  5  0  5  10  15  20  25  U250  0  1  2  30  40  50  0  5  10  30  30  30  U500  0  10  15  30  30  30  0  5  10  15  20  25  U1000  0  30  45  60  90  100  0  10  10  10 10 10 Note that the exact values of r 11 , r 12 , . . . , r 33 can be optimized by some method, as well as the levels of bins until the packings in Steps 1-3 are allowed. So far, a very careful optimization has not been performed regarding the "best" choice of the parameters. Only some trials have been made for getting "good enough" values for them, so even better efficiency may be achieved by some better choice.
In Table 6, one can see the results of the algorithm in different settings, for the U_120 subset of the instances. Green color means that the algorithm found the optimum, while red color indicates that the algorithm did not find the optimum. In each row, LB = OPT.

Evaluation
The following considerations and conclusions are established: 1. First, experiences are made so that the level of the next bin is not allowed to be smaller than L = 150, or L = 149, or L = 148. The results of ALG FU are presented in columns 2, 3, 4. It is concluded that being more restrictive, e.g., forbidding a level lower than 149, is not advantageous. This observation has led to allowing level, at least, 145 if the amount of reserve is "not too small".

2.
Experiments are also made so that the final step (Step 4, line 28) is changed from applying FFD to applying the path searching algorithm. The results of this modified algorithm are in the next three columns 5, 6, 7. It can be seen that there is no significant difference in the results: the algorithm is not sensitive for the packing of the last several unpacked items. This means that it is not very crucial how the algorithm is finished, if the majority of the items are already "well packed". Thus, it is decided to apply FFD in Step 4 (instead of a more tricky slave algorithm) in later runs v2 and v3.

3.
Further relaxation of the level constraint, namely L = 145, is applied in versions v2 and v3; the latter also takes into account whether there is still an unpacked big item. The output of this last (optimized) version of the algorithm can be seen in column 9.
Here, one can see that the algorithm could solve all 20 instances within the Falkenauer U_120 subclass optimally.

4.
Note that the optimum value (which is known from the literature) is the same as the value of the simple lower bound LB 1 , in all cases within the Falkenauer U_120 subclass. The same holds for all four subclasses (comprising 80 instances) in all but one case. The only exception is the case of instance u250_13, where LB 1 = 102 and OPT = 103.

5.
There are several cases where all algorithm versions find the optimal solution, e.g., Falkenauer_u120_01; but, in Falkenauer_u120_19, only the optimized v3 reached OPT = 49. Remarkably, in Falkenauer_u120_12, a rather small initial reserve of 20 allows all versions to run optimally, whereas, in Falkenauer_u120_00 and Falke-nauer_u120_11, an even much larger reserve is not sufficient for that.

Evaluation Regarding the Whole Falkenauer U Class
• The algorithm developed here solves 73 instances optimally out of the 80 instances. The situation with the other 60 instances is similar to that in the U120 class as detailed above, but, in some cases, no version of the algorithm can find the optimum. In Table 7, the running times are presented for the Falkenauer U class. The overall average running time of the new algorithm after a rough implementation is less than 0.4 s, and, for HEA, it is 1.48. Regarding the total running time of the algorithm, it is only 31.8683809 s, and, for HEA, it is 118.4 s. The greedy algorithm proposed here already has a 3.7 speed-up factor. With a more careful implementation, further significant improvement is achievable, possibly the algorithm can be made ten times faster.

Conclusions
The main conclusion is that applying pre-processing is very useful, as demonstrated here by bin packing benchmark classes. It is well known that the bin packing problem is strongly NP-hard, so one might think that optimally solving a BP instance is necessarily hard. But this is not the case: For some inputs, and even for certain input classes which look hard for first sight, the problem turns out to be relatively easy.
In other words, instead of saying that any BP instance is hard to solve, the truth is that there are hard instances beside the easy ones. It is an interesting problem to find or recognize the hard instances; at this moment, it is not clear at all how to distinguish between easy and hard instances.
If the universe of bin packing instances is imagined as a town having different districts where the easy and hard instances "live", the question is, according to what parameters or properties can one decide that some district likely has some hard instances? In this direction, there is some research about the hard instances, e.g., in Reference [45]; in the present paper, the authors focused on recognizing easy instances.
The proposed pre-processing procedures are very fast, and, in a high percentage of the inputs, they provided optimal solutions. It means that it is highly recommended to apply them and their relatives, and it is necessary to use more complicated algorithms only if the pre-processing procedure does not provide good enough (or optimal) solution.

Main Conclusions in Detail
Here, the considerations are briefly collected for the two considered benchmark classes: the Schwerin class and the Falkenauer U class. As shown above, in a given instance, several items can be packed very easily so that their packing does not violate optimality. This step is class-dependent to some extent.
In case of the Schwerin class, the five biggest items are taken and packed into a bin. Then, the next five biggest items are taken and packed into another bin. Following this procedure about 40% of the items are packed very fast, so that one could not do better about these items, and it is still possible to pack optimally the smaller items.
In case of the Falkenauer U class, "good pairs" are formed from the items. A good pair means two items so that their total size is just the bin capacity. It has been proved that the good pairs can be packed into their private bins, so that this packing does not violate optimal packing for the whole set. It is found that about 30% of the items can be packed in this way.
For the sake of simplier wording, let the items allowing a simple decision described above be called easy items (i.e., this includes 40% of items in the Schwerin instances, the biggest ones; and about 30% of items in the Falkenauer U class, those forming the good pairs), and call the remainder of the items hard items.
Conclusion 1. In case of both benchmark classes, the number of hard items is significantly smaller than the whole set of items.
This conclusion means that the number of items can significantly be reduced so that "hard decision" should be made only for the reduced set of items. Naturally, the smaller the number of items, the simpler is the decision of how to get an optimal packing. Hence, the "easy" items got packed, and there remained only the "hard" items. For the latter, some greedy-type algorithms have been designed, that successfully pack the hard items optimally for 100% of the instances in the Schwerin class and for about 91% of the instances in the Falkenauer U class. This yields a second conclusion.

Conclusion 2.
There exists a greedy-type algorithm that packs the items optimally for a high percentage of the instances.

Further Research
Here, some options are briefly reviewed that can be applied to improve the efficiency of the algorithm ALG FU further (that is applied to solve the instances from the Falkenauer U class). Recall that, in case of the Schwerin class, it is possible to solve all instances optimally, so there is no need to "improve" the algorithm applied for that class. But, in case of the Falkenauer U class, optimal solutions were obtained for about 91 percentage of the instances. So, here, there is some room for possible improvement.

1.
One can apply not only one but several parameter settings, i.e., make several runnings so that the parameters of the algorithm (listed in Tables 4 and 5) are chosen in several different ways, and finally choose the best solution. Naturally, if some running provides the optimal solution then there is no need to apply any further setting and running. 2.
One can take into account further parameters, e.g., not only the "existence" of some big unpacked items but also their number.
It is also a question, what happens if the number of items grows. Suppose that C (the integer bin size) is fixed, then as a consequence all integer sizes come from the interval [1, C]. Then, a classical theorem of Lenstra says that the problem can be solved in polynomial time in n, the number of items. Despite polynomial solvability, the number of steps in such an algorithm is huge, as the exponent of n is very big, as well as the coefficient in the O(.) notation can also be very big. For this reason, such an algorithm cannot be used in practice.
On the other hand, this theorem does not take into account if the sizes are drawn randomly from some interval. So, let the following conjecture be stated.
Conjecture 1. Let 1 ≤ a < b ≤ C be fixed integers, where C represents the bin size. Assume that the n item sizes are chosen at random with uniform distribution from the integers a, a + 1, . . . , b. Then, there exists an algorithm whose running time is a low-degree polynomial with practically applicable fairly small coefficients, that solves the instance optimally with probability tending to 1 as n → ∞.
For example, an algorithm with running time 20n 4 and performing optimally with probability 0.9 for n = 1000 may already be of interest.

Limitations
Naturally, greedy-type methods do have limitations, since the bin packing problem is strongly NP-hard. What are the limitations?
Note that, in both cases (Schwerin class and Falkenauer U class), the item sizes are drawn from some interval. In case of the Schwerin class, the bin size is 1000, and the item sizes are between 150 and 200. This is a relatively narrow interval. In case of the Falkenauer U class, the interval is not so narrow: the bin size is 150, and the items' sizes are between 20 and 100.
This leads to the following conclusion.

Conclusion 3.
The narrower the interval from which the item sizes are taken, the bigger is the chance that an efficient greedy algorithm can be built.
Note that, in both classes, the item sizes are drawn randomly, according to uniform distribution. It means that further research will be needed for other types of instances where the item sizes are determined in some other ways, e.g., by a very malicious adversary.
The results presented here also demonstrate that, in case of the Falkenauer U class, the greedy algorithm works well if the reserve (the total space left unused in the bins) is relatively large. If the initial reserve is small, then the chance to obtain an optimal solution by a greedy-type method is really small or even impossible.