An Analysis of Solutions to the 2D Bin Packing Problem and Additional Complexities

The Bin Packing problem in 2 space is an NP-Hard combinatorial problem in optimization of packing and arrangement of objects in a given space. It has a wide variety of applications ranging from logistics in retail industries to resource allocation in cloud computing. In this paper, we discuss the mathematical formulation of this problem. Furthermore, we analyse its time complexity, its NP-Hardness and some of its stochastic solutions with their eﬃciencies. We then propose additional complexities that would make the problem more ﬁt for industrial use and discuss in depth the domains in which it might prove to be useful. We conclude while suggesting areas of improvement in operations research on this subject


Introduction
The 2D Bin Packing problem represents an array of industrial applications.It has usage in a variety of fields, like industrial logistics, and cloud resource allocation.In its most nascent form, the problem asks of the most optimised (and least resource intensive) way to arrange a given set of rectangles into a larger square/rectangle.The 2D Bin-Packing Problem (2D-BPP) is strongly NP-Hard since it is but a generalization of the NP-Complete 1D Bin Packing Problem.[1] Figure 1: Two Representations of a Bin Packing Arrangement [2] The 2D Bin Packing problem can be defined as a simple optimisation of the Height (H) of an arrangement, given a container of infinite height and fixed width.The lower this height (H), the better the arrangement.An optimization as such in the case of the single dimensional Bin Packing problem is achieved through algorithms like k-Harmonic and RFF Bin Packing.However, for the 2D BPP, more nuanced solutions need to be acquired.Solutions using a genetic algorithm are "heuristic", meaning that they are not the best solutions out there, but are 'good-enough' for industrial use.[3] 2 Mathematical Formulation An ILP (Integer Linear Programming) equation is used to define optimization problems in a mathematically rigorous way.Though the 1D Bin Packing Problem can simply be defined as in equation (1).[4] Definition 2.1 Instance: Finite set I of items, a size s(i) ∈ Z + for each i ∈ I, a positive integer bin capacity B, and a positive integer K. Definition 2.2 Question: Is there a partition of I into disjoint sets I 1 , . . ., I K such that the sum of the sizes of the items in each I j is B or less?
where y j = 1 if bin j is used and Here, K is subject to multiple constraints.However, a definition of the 2D Bin Packing Problem retains complexity, and a generalization uses more nuanced Linear Programming techniques.Moreover, the formulation is subject to many more constraints, some of which we have detailed in the equations that follow.The 2BP problem consists of a set of n rectangular items, each having a height h i and a width w i , i = 1, ..., n.The objective is to pack them into a minimum number of rectangular bins, each having height H and width W . Items may not overlap and we do not consider rotation.
A feasible layout for 3-stage 2BP consists of a set of bins, each bin consists of a set of stripes, each stripe consists of a set of stacks, and each stack consists of items having equal width.Every such pattern can be reduced into its so-called normal form by moving each item to its uppermost and leftmost position, so that void space appears only at the bottom of stacks, to the right of the last stack in each stripe and below the last stripe.
In the sequel we consider only patterns in normal form.In [4] a polynomial-sized ILP model for 2-stage 2BP has been proposed.We extend this model in order to get a polynomial-sized ILP formulation for 3-stage 2BP.The items are sorted so that h 1 ≥ h 2 ≥ ... ≥ h n .The order of the items within each stack is not relevant, so they can always be ordered according to their indices.A solution may contain at most n stacks.We label each stack with the index of the highest item it contains, i.e., the smallest item index.
Similarly, a solution has at most n stripes, and a stripe's label is the label of its highest stack.Finally at most n bins are needed and we label each of them with the smallest index of the stripes it contains.The model uses the following variables -α j,i , j = 1, . . ., n, i = j, . . ., n . ., n, and j = l, . . ., i − 1 : item i contributes to the total height of all stripes in bin l; i.e., item i appears in stack j, stack j appears in stripe j, and stripe j appears in bin l.All algorithms that we will review later will be an attempt to minimize equation ( 2) while satisfying the constraints as shown.[5] minimize subject to NP or Non-Deterministic Polynomial Time is a complexity class used to arrange decision problems on the basis of their complexity.Problems in the NP class have proofs of solutions verifiable in polynomial time.NP-Hard is also a complexity class, and it is used to arrange problems that are at least as hard as the hardest problems in the NP class.For proving that a problem is NP-Hard, the most common way is to deduce it from another previously known NP-Hard Problem.Here, we use the NP-Hard Partition Problem.We follow the proof described in [6] Definition 3.1 (Partition Problem) The Partition Problem is the task of deciding whether a given multi-set S of positive integers can be partitioned into two subsets S 1 and S 2 such that the sum of the numbers in S 1 equals the sum of the numbers in S 2 .
Lemma 1 Whether the problem: Given a finite set I of items, a size s(i) ∈ Z + for each i ∈ I, a positive integer bin capacity B, and a positive integer K.Is there a partition of I into disjoint sets I 1 , . . ., I K such that the sum of the sizes of the items in each I j is B or less is NP-Hard or not.
Given an instance i 1 , i 2 , i 3 ....i n of the Partition problem let us consider that, I = Σi j and an input instance of the Bin Packing to be s j = 2i j /I.The above equation postulates for the splitting of a single instance of Bin Packing into two distinct instances such that the summation of both the sub-sets are equal, given that both are disjoint.This instance proves that the answer to the Partition problem is True if and only if the number of bins to pack for the Bin Packing problem is 2. If in case there exists a k-approximation algorithm which would solve Bin Packing in polynomial time (k < 3/2) then the answer to the above problem of "2 bins" would be always found.If the algorithms were to require more than 2 bins, i.e 3 bins then the optimal factor would be greater than 3/2.Hence, the algorithm would solve the Partition problem in polynomial time which implies that P = N P , in which case Bin Packing can then be solved in polynomial time.Therefore, Bin Packing is an NP-Hard problem with approximation value ¿ 3/2.Theorem 2 It is NP-complete to decide if an instance of Bin Packing admits a solution with two bins.Corollary 2.1 There is no ρ-approximation algorithm with ρ < 3/2 for Bin Packing unless P = N P .
The NP-Completeness of the problem can be derived using the 3-Partition Problem, a variant of the problem we used to prove 2D-BPP's NP-Hardness.

Optimization Techniques
In this section we will review some of the most promising mathematical and computational models that yield consistent and precise arrangements for the 2D-BPP.Over the years, there have been numerous heuristic solutions to the problem suitable for industrial applications.These solutions represent vital findings in Operations Research and Industrial Engineering.We will broadly review 2 such solutions, based on entirely different techniques.One of the techniques uses a computational evolutionary algorithm whereas the other uses multi-variable calculus to offer solutions.We will also discuss the drawbacks and upsides of both the approaches in detail.

Approach 1
The m-M Calculus algorithm is the basis for our first approach.It starts with a reshaped bounding box and performs cell-decomposition until there are no more feasible cells, or some predefined level of accuracy is accomplished.In [7], the authors implemented a heuristic model to obtain an ILP equation equation ( 6) to maximise and used the m-M Calculus algorithm to solve it.
Through the algorithm, they could obtain a theoretical expression for the x and y coordinates for an arbitrary rectangle that must be placed in the region.The expression is in equation (7).
Here, ay i and by i are lower-left and upper-right y-coordinate of the i th rectangular, respectively.The authors then bench marked the model's efficiency.
The results of their study, run on a PC with P4 2G CPU and 960Mb RAM are shown in Figure 2. It is apparent to understand why this approach will be less resource intensive.The algorithm is a simple culmination of the m-M method, and even machines dating back 2 decades have the computational power to run this program without bottleneck.However, since the essence of the algorithm, the ILP equation itself is derived theoretically, and the parameters for computation are rooted deeply in combinatorial mathematics, inclusion of additional complexities as listed in section 5 will prove to be quite challenging.To solve the problem using a Multi-Start Genetic Algorithm, we need an algorithm for placing the rectangular bins inside the region.For this purpose, we use the Bottom-Left-Filling (BLF) Heuristic algorithm.The BLF Algorithm is an algorithm with a O(N 2 ) time-complexity.As it arranges the bins, our genetic algorithm introduces previously explained mutations and crossovers to achieve the desired results.Every genetic algorithm requires a 'Lower Bound', a threshold to signal the stop of the algorithm, even before all the iterations are complete.This bound must be chosen optimally, and must satisfy precision constraints in the use-case.The authors find the Lower Bound in equation ( 8) to be pareto-optimal for an MSGA-BLF implementation.

Additional Complexities
A variety of complexities can be introduced to the nascent problem.In reality, it makes more pragmatic sense for the problem to be in R 3 .This problem already exists, and trivially goes by the moniker "The 3D Bin Packing Problem".It minimises the blank space in an arrangement of cuboids (or boxes) in a given volume V .In Figure 4, we have provided a visualization of how cuboids of different dimensions might be placed in a fixed volume.Additionally, in industrial use, it is sometimes useful to have some area reserved while packing objects in fixed space.This area can be for transportation purposes, machinery space or ease of accessibility.In this case, the problem expands on the simple rectangular region, and an arbitrary region is constructed, as shown in Figure 5.There are ways to tackle this complexity without making changes to the core algorithm we use.For instance, the region can be divided into ever-so-fitting smaller rectangular regions and the algorithm could then be used for each of the sub-rectangles individually.

Conclusion
Through the means of this paper, we have explored two approaches that can be used to construct arrangements that act as solutions to the 2D Bin Packing Problem.Using the inference from the Multi-start Evolutionary Genetic Algorithm, we also discussed possibilities of extension of the problem to more nuanced combinatorial arrangements for real world use.

Scope for Further Research
With the combinatorial problem at hand, possibilities of further research are multifold.More optimization research can be undertaken to truly generalize an evolutionary algorithm to accommodate paths in the rectangular region.Additionally, research can be conducted to understand in greater detail the functionalities of NP-Hard optimizaiton problems in Virtual Machine resource allocation in cloud servers.

Figure 2 :
Figure 2: Results from m-M Calculus Method

Figure 6 :
Figure 6: How inclusion of a path changes an arrangement