Enhanced Pseudo-Polynomial Formulations for Bin Packing and Cutting Stock Problems

We study pseudo-polynomial formulations for the classical bin packing and cutting stock problems. We first propose an overview of dominance and equivalence relations among the main pattern-based and pseudo-polynomial formulations from the literature. We then introduce reflect, a new formulation that uses just half of the bin capacity to model an instance and needs significantly less constraints and variables than the classical models. We propose upper and lower bounding techniques that make use of column generation and dual information to compensate reflect weaknesses when bin capacity is too high. We also present non-trivial adaptations of our techniques that solve two interesting problem variants, namely, the variable sized bin packing problem and the bin packing problem with item fragmentation. Extensive computational tests on benchmark instances show that our algorithms achieve state of the art results on all problems, improving upon previous algorithms and finding several new proven optimal solutions.


Introduction
The bin packing problem (BPP) requires to pack a set of weighted items into the minimum number of identical capacitated bins. The cutting stock problem (CSP) is the BPP version in which all items having the same weight are grouped together into item types. The term packing is normally adopted for applications devoted to the minimization of the number of boxes (containers, cells, . . . ) required to allocate a set of items, and the term cutting for industrial process where stocks of a material (steel bars, pipes, . . . ) have to be cut into demanded items while minimizing waste. Apart from these applications, the BPP and the CSP also serve in the optimization of a variety of real-world problems, including capacitated vehicle routing, resource-constrained scheduling problems, and production systems, just to name a few. Their wide range of applications motivated a large research interest, and, indeed, the two problems have been tackled by almost all known combinatorial optimization techniques. We refer to the recent surveys by Coffman et al. (2013), who focused on approximation algorithms, by Alves et al. (2016), who studied the use of dual-feasible functions, and by Delorme et al. (2016), who reviewed and tested exact algorithms and mathematical models.
The BPP and the CSP have also been the training ground of some mixed integer linear programming (MILP) models, and corresponding solution algorithms, that later became useful tools for many other that have been proposed for the BPP and the CSP; • We introduce our new formulation, reflect, and show that it improves the classical arc-flow by needing significantly less constraints and variables; • We develop improvement techniques based on the combined use of reflect with column generation, dual cuts, and heuristics. We show that our heuristics are faster and more efficient than traditional approaches based on the solution of set-covering models with restricted sets of columns; • We extend reflect and reflect+ by devising formulations and algorithms that solve two important BPP variants, namely, the variable-sized BPP and the BPP with item fragmentation; • We perform extensive computational tests and show that our algorithms achieve state of the art results, improving previous algorithms from the literature, finding several new optimal solutions for the BPP and the CSP, and solving to optimality all attempted instances of the variable-sized BPP and the BPP with item fragmentation.
The remainder of the paper is organized as follows. In Section 2, we give the necessary notation and review the main formulations proposed for the BPP and the CSP. In Section 3, we establish the full set of relations among the existing formulations. In Section 4, we present reflect and reflect+. The variable-sized BPP is solved in Section 5, and the BPP with item fragmentation in Section 6. In Section 7, we present the outcome of extensive computational experiments, and then, in Section 8, we draw some conclusions. For the sake of conciseness, all proofs of our statements and some additional algorithms and examples are reported in an appendix.
2 The BPP, the CSP, and their well-known MILP formulations In this section, we formally describe the BPP and the CSP, give the necessary notation, and present the main formulations developed in the literature for their solution.

Problem description and notation
In the BPP, we are given a set of n items, each having weight w j (j = 1, . . . , n), and an unlimited supply of identical bins of capacity c. The aim is to pack all items into the minimum number of bins, so that the sum of the item weights in any bin does not exceed the capacity. To better adapt to either the concept of packing or that of cutting, in the following we use alternatively the terms weight or width when referring to w j . We assume that all input values are integer and 0 < w j < c holds for any j. The CSP has the same aim of the BPP, but, apart from the unlimited supply of stocks (bins) of capacity c, its input consists of a set of m item types. Each item type j has a demand of d j items, all having width w j (j = 1, . . . , m). A CSP instance can be obtained from a BPP one by grouping into item types all items having the same width. So, a solution method for the CSP also solves the BPP, and viceversa. Unless stated otherwise, the formulations that we report below refer to the CSP.
We use F X to denote a generic MILP formulation. We use L(F X ) to denote the continuous (linear programming) relaxation of F X , which is obtained by dropping the integrality constraints from F X . When no confusion arises, we also use L(F X ) to denote the optimal solution value of L(F X ). We say that a formulation F X is equivalent to a formulation F Y , if L(F X ) = L(F Y ) holds for any instance. As we deal with minimization problems, we say that a formulation F X dominates a formulation F Y , if L(F X ) ≥ L(F Y ) holds for any instance and L(F X ) > L(F Y ) holds for at least one instance. If F X dominates F Y , then we also say that F X is included into F Y . Suppose a given formulation contains a variable x: We use the notationx to denote the value taken by x in a given solution of that formulation.

Pattern-based formulations
We define a pattern p as an array (a 1p , . . . , a mp ), with a jp being a non-negative integer that gives the number of items of type j that are included in the pattern. Let P define the class of feasible patterns, i.e., those patterns p for which m j=1 a jp w j ≤ c holds. Gilmore and Gomory (1961) associated with each pattern p an integer decision variable ξ p , indicating the number of times the pattern is selected, and modeled the CSP as the following set-covering problem (F GG ) min z = p∈P ξ p : p∈P a jp ξ p ≥ d j for j = 1, . . . , m, ξ p ∈ N for p ∈ P . (1) Note that in (1) nothing prevents a jp from being larger than d j , and hence there could be optimal solutions of F GG , or of its continuous relaxation L(F GG ), that include patterns containing a number of items larger than their demands. Consider the following example.
The proper relaxation (see, e.g., Nitsche et al. 1999) overcomes this F GG drawback by focusing on a restricted set P ′ of feasible patterns. Each pattern p ∈ P ′ satisfies m j=1 a jp w j ≤ c and also 0 ≤ a jp ≤ d j for j = 1, . . . , m. The CSP can then be modeled as (F P R ) min z = p∈P ′ ξ p : p∈P ′ a jp ξ p ≥ d j for j = 1, . . . , m, ξ p ∈ N for p ∈ P ′ .
Note that for most of the CSP instances the rounded-up lower bound values of the two formulations (⌈L(F GG )⌉ and ⌈L(F P R )⌉) coincide. Still, there are cases for which ⌈L(F GG )⌉ < ⌈L(F P R )⌉. Such cases have been investigated intensively in studies over the Mixed-Integer Round-Up (MIRUP) conjecture, which states that both (z opt − ⌈L(F GG )⌉) ≤ 1 and (z opt − ⌈L(F P R )⌉) ≤ 1 hold for any CSP instance, with z opt being the optimal integer solution value. For further details, we refer to, e.g., Caprara et al. (2015) and Kartak et al. (2015). Note also that branch-and-price algorithms explicitly devoted to the solution of the BPP are based on patterns with binary a jp values, and hence they use the proper relaxation.

Pseudo-polynomial formulations
Pseudo-polynomial formulations involve a large number of variables and constraints, and hence they have been usually proposed in the literature together with appropriate reduction techniques. We focus in this section on basic models that do not make use of any reduction, and discuss existing reduction techniques at the end of Section 3.
The one-cut formulation (F OC ) was formally introduced by Rao (1976) and Dyckhoff (1981). It simulates the physical cutting process by choosing a set of cuts, each dividing the bin (or a portion of the bin) into two smaller pieces, a left one and a right one. While the left piece is an item, the right piece is either an item or a residual that can be re-used to produce smaller items with successive cuts. To describe the model, we need some additional notation. Let W = {w 1 , w 2 , . . . } define the set of different item widths, and S be the set of item widths combinations not exceeding c. Set S can be computed trough a standard DP and can be formally stated as Let R define the set of residual widths, computed as R = {c −w :w ∈ S andw ≤ c − min j {w j }}. The width of any left piece produced by a cut is in W, while the width of any right piece (including c) is in R. For a given width q ∈ W ∪ R, let L q give the demand of q, i.e., L q = d j if ∃ j having w j = q and L q = 0 otherwise. One-cut makes use of three additional sets of widths. Set A(q) contains piece widths that can be used for producing a left piece of width q, if any: A(q) = {p ∈ R : p > q} for q ∈ W, and A(q) = ∅ for q / ∈ W. Set B(q) = {p ∈ W : p + q ∈ R} contains item widths that, whether cut as a left piece, would produce a right piece of width q, for q ∈ R. Set C(q) = {p ∈ W : p < q} contains item widths that can be cut as a left piece by using a residual of width q, for q ∈ R.
One-cut uses an integer decision variable y pq giving the number of pieces of width p that are cut into a left piece of width q. The model is then While function (4) minimizes the number of bins used, constraints (5) ensure that the sum of the left and right pieces having width q is not smaller than the demand of width q plus the number of times a residual of width q is re-cut to produce other items. The arc-flow formulation (F AF ) was formally proposed for the CSP by Valério de Carvalho (1999) and builds upon the networks in Shapiro (1968) and Wolsey (1977). Formally, let G = (V, A) be a graph having vertex set V = {0, 1, . . . , c − 1, c} and arc set A = A I ∪ A ℓ , where A I = {(d, e) : d, e ∈ S and ∃ j ∈ {1, . . . , m} : e − d = w j } is the set of item arcs, and A ℓ = {(d, d + 1) : d = 0, 1, . . . , c − 1} is the set of loss arcs. Items arcs model the items' positions in the bin, accomplishing with (3), whereas loss arcs model empty bin portions. The filling of a bin corresponds to a path from root node 0 to sink node c. Let δ + (e) (respectively, δ − (e)) give the subset of arcs emanating from (respectively, entering) vertex e. By introducing an integer variable x de equal to the number of times arc (d, e) is chosen, the CSP becomes s.t.
(e,f )∈δ + (e) Objective function (7) minimizes the number of bins, expressed by variable z, whereas constraints (8) impose flow conservation and constraints (9) ensure that demands are fulfilled. The dynamic programming-flow formulation (F DP ) was formally introduced for the BPP by Cambazard and O'Sullivan (2010), but, similarly to F AF , has origins in the early works by Shapiro (1968) and Wolsey (1977). It can be seen as a disaggregated form of F AF that uses an expanded graph obtained from a DP table. In detail, let G ′ = (V ′ , A ′ ) be a DP graph, where V ′ = {(j, d) : j = 0, . . . , n; d = 0, . . . , c} ∪ {(n + 1, c)} has a vertex for each DP state plus a dummy node (n + 1, c), and A ′ = {((j, d), (j + 1, e)) : (j, d) ∈ V ′ ; (j + 1, e) ∈ V ′ } contains arcs connecting two consecutive DP states. There are two types of arcs: Those for which e = d + w j model the selection of item j when the bin is partially filled with d units; those having e = d discard instead the selection of j in d. All vertices (j, d) having j = n are connected to the dummy vertex (n + 1, c). A path from (0, 0) to (n + 1, c) represents a feasible bin filling. A decision variable ϕ j,d,j+1,e is associated with each arc ((j, d), (j + 1, e)) ∈ A ′ . By setting V ′ 0 = V ′ \ {(0, 0), (n + 1, c)}, the BPP can be modeled as Constraints (12) force flow conservation and constraints (13) impose that each item, adopting the BPP notation, is selected once. Variables are set to take integer values by (14), but, due to (13), variables associated with ((j − 1, d), (j, d + w j )) arcs are binary. A CSP instance can be modeled by F DP by splitting each item type j into d j items, obtaining a BPP instance with n = m i=1 d j items.

Relations among models
In this section, we prove the relations that exist among the introduced patterns-based and pseudopolynomial formulations. To the best of our knowledge, this is the first time that a complete characterization of this area of research is provided. We first need two preliminary results.
Lemma 1 (Valério de Carvalho 1999) Any solution of arc-flow or of its continuous relaxation can be decomposed into a set of paths.
Lemma 1 is based on the decomposition of non-negative flows into paths and cycles (see Ahuja et al. 1993, Chapter 3), with the only remark that, being the arc-flow graph acyclic, only paths may occur. Consider Example 1: An optimal L(F AF ) solution, shown in Figure 1-(a), has value 4/3 and consists ofx 0,7 = 1,x 0,4 = 1/3,x 4,7 = 1/3,x 7,10 = 2/3,x 7,11 = 2/3, andx 10,11 = 2/3. By applying to this solution the procedure given in Section Appendix A, one obtains the decomposed flow made by three paths which is depicted in Figure 1- Lemma 2 Any solution of one-cut or of its continuous relaxation can be decomposed into a set of binary trees.
Proof. Given in Section Appendix B.
Consider again Example 1: An optimal L(F OC ) solution has value 4/3 and consists ofȳ 11,7 = 1, y 11,4 = 1/3,ȳ 7,3 = 1/3, andȳ 4,3 = 2/3. By applying the procedure described in Section Appendix B, we obtain the three trees depicted in Figure 2. The leaves of each tree correspond to either produced items (as leaves 4, 3, and 3 in the left-most tree) or residuals (as leaf 1 in the left-most tree). Intuitively, we can state a relation between the paths of the decomposed arc-flow solution and the trees of the decomposed one-cut solution. Figures 1 and 2 show a well-constructed example of this relation (consider one at a time paths from top to bottom and trees from left to right). In reality, a few cases should be considered, especially in consideration of the fact that solutions of arc-flow and one-cut are not guaranteed to be left-aligned (as happens in the figures). We leave the technicalities to the appendix, and provide our first result in terms of models relations.
Proof. Given in Section Appendix C.
Note that the proof of Proposition 1 contains two algorithms to directly transform an F AF solution into an F OC one, and viceversa. Note also that, by using the equivalence between F AF and F GG proved in Valério de Carvalho (1999), we can observe that F OC too is equivalent to F GG . Now, let us concentrate on F DP . An optimal L(F DP ) solution of Example 1 has value 3/2 and is shown in Figure 3. The arcs in bold lines are associated with the selected variables (whose values are reported on the arcs). This example is useful for the second relation that we prove. Proposition 2 F DP dominates F AF (and hence F OC ).
Proof. Given in Section Appendix D.
The relations among the pseudo-polynomial formulations are graphically depicted in the right part of Figure 4. The discussed equivalence among F AF , F OC , and F GG is depicted by the use of a dotted line. The other dotted line depicts our next result.
Proposition 3 F DP is equivalent to F P R .
Proof. Given in Section Appendix E.  We conclude this section with some remarks. Figure 4 does not depict the "descriptive" CSP formulation (having integer variables for the assignments items-bins and binary variables for the use of the bins), which is largely dominated by all other formulations. As previously noted, pseudo-polynomial formulations were proposed together with some reduction criteria. Dyckhoff (1981) reduced the size of set S in (3) by forcing x j ≤ d j , thus focusing on the set of normal patterns: This improves F OC but does not make it equivalent to F P R (consider that the L(F OC ) solution of Example 1 already accomplishes with (15) but is worse than the L(F DP ) solution). Valério de Carvalho (1999) proposed a set of reduction techniques for F AF . In particular, he built the arcs by using a DP algorithm that considers item types according to decreasing width, thus reducing symmetries. Also in this case, the continuous relaxation of the resulting formulation is not as strong as that of F DP (once again, the L(F AF ) solution of Example 1 already accomplishes with the proposed reduction but is worse than the L(F DP ) solution). Formulation F DP provides a very strong lower bound, but requires too many variables. The tests in Delorme et al. (2016) showed indeed that the computational performance of F DP is much weaker than that of F AF and F OC . Other related formulations having a good performance have been recently presented. Brandão and Pedroso (2016) developed, among other improvements, a lifting procedure that is based on the fact that packing an item in a position might lead to an unused space in the bin. For each arc, their procedure estimates the minimum unused space by solving a subset sum (as in, e.g., Boschetti andMontaletti 2010 andDell'Amico et al. 2012) and then uses this value to extend the head of the arc. They are forced to use a multigraph, as arcs having the same widths may correspond to different items, but obtain a good speed-up in the solution time. Clautiaux et al. (2017) proposed a method that iteratively aggregates and disaggregates nodes of an arc-flow model to produce both upper and lower bounds, eventually terminating with a proof of optimality. Their method was computationally evaluated on some cutting stock and vehicle routing instances. Côté and Iori (2016) considered the normal patterns in (15), but conveniently decreased their number by means of a meet-in-the-middle procedure. Instead of performing a classical DP, they solved a two-way DP which created patterns starting both from the left and from the right. They then built a reduced arc-flow formulation that required less variables, less constraints, and a quicker solution time. These cited formulations lie in the (small) space between F AF and F DP , the same holds for the formulation that we present in the next section. Côté and Iori (2016) also proposed to modify F AF by removing unit-width loss arcs (d, d + 1) and creating longer loss arcs that connect each vertex in N to its consecutive vertex in N , and the last vertex in N to c if c / ∈ N (as shown in Figure 5). This implies reducing constraints (8) to e ∈ N ∪ {c} and adopting a multigraph structure (because there can be item and loss arcs having the same head and tail). We embed this straightforward improvement in all next formulations.

Reflect, an improved arc-flow formulation
In this section, we propose a new formulation, called reflect (F RE ), which models a CSP instance by considering only half of the bin capacity, thus resulting in a sharp decrease in the required number of variables and constraints. The two main features of F RE are: • In terms of vertices, F RE considers only those corresponding to partial bin fillings with size smaller than c/2, plus an additional vertex, called R, corresponding to c/2; • In terms of arcs, F RE considers the same ones of F AF , but: (i) "reflects" each item arc (d, e) having d < c/2 and e > c/2 into an arc (d, c − e); (ii) removes all item and loss arcs (d, e) having d ≥ c/2; and (iii) creates a last loss arc by connecting the right most vertex before R with R.
Intuitively, a path in F AF becomes in F RE a pair of colliding paths, i.e., two paths both starting in 0 and ending in the same vertex, but only one of the two passing through a reflection. For Example 1, the arcs required by F AF and F RE are shown in Figure 5. F AF contains 6 items arcs and 5 loss arcs. To build F RE , (i) we reflect item arcs (0,7) in (0,4) and (4,7) in (4,4); (ii) we remove item arcs (7,10) and (7,11) and loss arcs (7,10) and (10,11); and (iii) we replace loss arc (4,7) with (4,R) and insert (R, R), thus resulting in 4 item arcs and 4 loss arcs. The formulation is built on a multigraph G = (V, A). The set V of vertices comprises all partial bin fillings between 0 and c/2 that correspond to arc tails and heads. The set of arcs A is partitioned into A s and A r , where A s denotes the set of standard arcs, i.e., all those item and loss arcs that proceed from left to right as in F AF , and A r the set of reflected arcs, i.e., those item arcs (d, e) from F AF that have been reflected into item arcs (d, c− e). Each arc in A s is defined by the triplet (d, e, s), whereas each arc in A r by the triplet (d, e, r) (note that there can be standard and reflected arcs having the same head and tail). We include in A r an arc (c/2, c/2, r) to model pairs of paths that collide in c/2. We use (d, e, κ) to denote a generic arc belonging to either A s or A r , and define the set of item arcs associated with item type j. Let also δ − s (e) ⊆ A s (respectively, δ − r (e) ⊆ A r ) denote the set of standard (respectively, reflected) arcs entering e. By associating an integer variable ξ deκ with each (d, e, κ) ∈ A, we can model the CSP as Objective function (16) minimizes the number of reflected arcs, which is equivalent to the number of bins. Constraints (17) ensure that the flow on standard arcs entering a node e is equal to the flow (on both standard and reflected arcs) emanating from e plus the flow on reflected arcs entering e. Constraints (18) impose boundary conditions by enforcing the flow emanating from 0 to be twice the number of bins, and constraints (19) ensure that demands are fulfilled.
An optimal L(F RE ) solution of Example 1 having value 4/3 is given in Figure 6-(a), and can be decomposed into the pairs of colliding paths shown in Figure 6-(b). The first pair is made by paths (0, 4, s) and (0, 4, r), which collide in 4 and corresponds to a bin containing an item of width 4 and another of width 7. The second pair is made by arcs (0, 3, s), (3, 4, s), and (4, 4, r). Note that arcs (0, 3, s) and (3, 4, s) are both depicted twice to emphasize that the flow on them is split to form the two colliding paths, the first being {(0, 3, s), (3, 4, s), (4, 4, r)} and the second {(0, 3, s), (3, 4, s)}, both with flow 1/3. Note also that, if no reflected arc enters e, then e is just a partial filling of one or more bins (e.g., vertex 3 in the example), if instead some reflected arcs enter e, then e is a vertex of collision for one or more bins (e.g., vertex 4).  The following result proves the correctness of F RE .
Proposition 4 F RE models the CSP.
Proof. Given in Section Appendix F.
For the sake of completeness, we provide in Algorithm 7, Section Appendix G, the procedure that we use to construct the multigraph required by F RE . In the same section, we also provide in Algorithm 8 the procedure that we use to decompose a F RE (or L(F RE )) solution into pairs of colliding paths. One can notice that Algorithm 7 does not create any reflected arc (d, e, r) having d > e (step 15 of the algorithm). This reduction criterion is motivated by the following result.
Proposition 5 Any feasible CSP pattern can be represented in F RE by a pair of colliding paths whose reflected arc (d, e, r) has d ≤ e.
Proof. Given in Section Appendix F.

Adapting reflect to solve large size instances: Reflect+
Even if the number of arcs used by F RE is considerably reduced with respect to those required by F AF , some instances with huge capacity and many small items may still generate models that contain millions of variables and are thus too difficult to tackle. To overcome this issue, we propose some lower and upper bounding techniques and embed them into a new algorithm, called reflect+.
Column generation. We first solve L(F P R ), the linear relaxation of (2), by means of a standard column generation technique. The reduced master problem is initialized with the identity matrix and solved as a linear program to obtain dual variable valuesπ j for each item type j. Columns with negative reduced costs are found and added to the reduced master on the fly, by solving a knapsack subproblem, until a proof of optimality is reached. For the subproblem, we make use of combo by Martello et al. (1999), which solves the binary knapsack. We first use combo as a heuristic by feeding it with m items j of profitπ j and weight w j (just one item per item type). If this attempt fails in finding a negative reduced cost column, we use combo as an exact by feeding it with the entire set of items, but invoking a binary expansion (see, e.g., Vanderbeck and Wolsey 2010). Each item type j having demand d j is represented by ⌊log d j ⌋ + 1 items, the first items k = 0, 1, . . . , ⌊log d j ⌋ − 1 have profit 2 k π j and weight 2 k w j , and the last item l = ⌊log d j ⌋ has profit (d j − (2 l − 1))π j and weight (d j − (2 l − 1))w j . The first heuristic has the purpose of avoiding patterns with many small items that can appear in early column generation iterations and slightly deteriorate our successive upper bounding procedures.
Let P LP ⊆ P denote the set of columns that have been generated to reach linear optimality. A classical way to obtain an upper bound from this information is to solve to optimal integrality the restricted master problem with just the set P LP of columns. This procedure, usually known as restricted master heuristic, is easy to implement but might produce low quality solutions (see, e.g., Sadykov et al. 2016). Here, we propose a simple yet effective improvement that consists in solving F RE on a multigraph that contains only the arcs produced by P LP . In detail, we start with the empty F RE multigraph, consider all items contained in a column p by non-increasing weight, and generate a single arc for each item in that order (using the algorithm sketched in the proof of Proposition 5). We repeat the process for all p ∈ P LP and then solve F RE on the reduced instance. Our method is motivated by the following Remark 1 Let z(F P R (P LP )) be the optimal solution value of the restricted F P R that contains only the columns in P LP , and z(F RE (P LP )) be the optimal solution value of the restricted F RE that contains only the arcs produced by the columns in P LP , then z(F RE (P LP )) ≤ z(F P R (P LP )).
In our implementation, we first compute P base ⊆ P LP as the subset of columns whose associated variables take positive value in the linear solution. We then compute z(F RE (P base )), which is usually quick, and then z(F RE (P LP )) if needed.
Node deactivation and dual cuts. We solve L(F RE ) with the complete set of arcs, and then use its linear solutionξ to build the set of non-active vertices V n = {d ∈ V : ∄ξ (d,e,κ) > ǫ}. Then, we solve F RE with the additional constraints Constraints (21) make the solution of the model much faster but might remove too many feasible solutions. We experimentally noticed that better solutions could be found by allowing some large items to be split into smaller items. To this aim, we create a set T of possible transformations (i, j, k), in which i, j, k = 1, . . . , m, i < j ≤ k, and w i = w j + w k . We create a family of integer variables t ijk , for (i, j, k) ∈ T , each counting how many times an item i is transformed into items j and k. We then replace (19) with and solve model (16)-(18), (20)-(23). This procedure is reminiscent of the dual cuts by Valério de Carvalho (2005). Arc deactivation. Our third heuristic attempts to find a solution having exactly value L = ⌈L(F RE )⌉. To this aim, we gather in a set A z all arcs whose reduced cost is greater than L − L(F RE )+ ǫ, and restrict the F RE model by setting Indeed, selecting one or more of arcs in A z would imply a solution value greater than L. We then solve model (16)-(20), (24). If no solution of value L is found, we increase L by one, update A z , and iterate. Note that, if the MIRUP conjecture holds, then the process is iterated at most once.
The resulting reflect+ algorithm makes use of these techniques in the order in which we presented them. An informal pseudocode is given in Algorithm 1. Although not explicitly stated, the algorithm clearly stops as soon as upper and lower bound values are equal. Each time a model is solved as an MILP, it is allowed only a restricted execution time, as discussed in Section 7 below.

The Variable Sized BPP
In this section, we detail the modifications that we developed to solve the variable sized bin packing problem (VSBPP). In the VSBPP, we are given a set T of bin types, each having capacity c t , cost p t , and a number b t of available bins, for t ∈ T . The aim is to pack all items into a set of bins of minimum cost. The solution of the VSBPP (which is also known in the literature as multiple length CSP) has been attempted through several methods, including arc-flow (Valério de Carvalho 2002), branch-andcut-and-price Scheithauer 2002, Alves andValério de Carvalho 2008), reformulations by discretization (Correia et al. 2008), and methaheuristics (Hemmelmayr et al. 2012), among others.
Valério de Carvalho (2002) described how to adapt F AF to the VSBPP by using a vertex set from 0 to c, with c = max t {c t }, and an additional family of integer variables ω t , giving the number of bins of type t selected in the solution, for t ∈ T . The total flow emanating from 0 is set to t∈T ω t , whereas the difference between incoming and emanating flow at each bin capacity c t is not forced anymore to be 0, as in the other vertices, but is equal to ω t . The resulting flow can be decomposed into a set of paths ending at a c t position and thus being associated with a specific bin type.
Such adaptation is not straightforward for reflect, where we need to enforce ω t to be equal to the number of selected pairs of colliding paths of total length c t . We can meet this requirement, while still using half of the nodes, by associating ω t with the reflected arcs and using the fact that just one such arc is used for each colliding pair. In detail, we create a multigraph G = (V, A) that is similar to the one adopted for F RE but contains a few relevant modifications. Apart from the vertices obtained by item widths combinations and reflections, V now also includes the set {c t /2 : t ∈ T }. The arc set A is still partitioned in A s and A r , where A s is created as in F RE , but A r is enlarged to take into account reflections at all possible bin capacities, namely, A r = ∪ t∈T A r (t), where A r (t) is the set of arcs that have been reflected at c t /2. We also use the notation (d, e, r(t)) to denote an arc belonging to A r (t). The algorithm that we implemented to build G is given in Section Appendix H. We explain here the intuition behind our formulation by means of the following example.
The arcs required by reflect to model Example 2 are shown in Figure 7. The vertices used for reflection are 3 (for bins of size 6) and R = c/2 (for bins of size c 2 =11). Item 1 is represented by arc (0, 4, r(1)), item 2 by arcs (0, 4, s) and (0, 2, r(2)), and item 3 by arcs (0, 3, s) and (4, 4, r(1)). Loss arcs are created between pairs of consecutive vertices. The arc set is completed by (3, 3, r(2)) and (R, R, r(1)) to model pairs of paths that collide in 3 or in R. An optimal solution has cost 17 and consists of two pairs of paths: (0, 4, s) and (0, 4, r(1)), which correspond to a bin of type 1 containing items 1 and 2; and (0, 3, s), (0, 2, s), (2, 3, s), and (3, 3, r(2)), which corresponds to a bin of type 2 containing item 3. By associating once more an integer variable ξ deκ to each arc, we can model the VSBPP as Objective function (25) minimizes the cost of the selected bins, whereas constraints (26) impose flow conservation. Constraints (27) still force the amount of flow emanating from 0 to be twice the number of bins used, but takes into account the fact that it is now possible for a reflected arc to directly enter vertex 0 (in case ∃ j and t for which w j = c t ). Constraints (28) impose ω t to be equal to the flow on the reflected arcs in A r (t), and constraints (29) ensure that demands are met. Note that variables ω t are not mandatory because of (28), but their use proved to be computationally useful, especially for instances where p t values were not proportional to c t ones. Algorithm reflect+ is adjusted to cope with the VSBPP as follows. At step 1 (refer to Algorithm 1), a VSBPP column generation procedure is invoked (we use the approach described in Section 3.1 of Alves and Valério de Carvalho 2008, and adopt combo by Martello et al. 1999 for the solution of the slavhee problems). At steps 2 and 3, restricted versions of F V S RE are solved instead of F RE . At step 4, L(F V S RE ) is invoked, whereas step 5 is skipped because of poor computational performance. The main loop is modified by invoking F V S RE at step 8 and increasing L to (min t∈T p t ω t : t∈T p t ω t > L, ω t ∈ {0, 1, . . . , b t } for t ∈ T ) at step 10. We call reflect V S + the resulting algorithm.

BPP with item fragmentation
The bin packing problem with item fragmentation (BPPIF) is the BPP generalization in which items are allowed to be fractionally packed into different bins. Several BPPIF variants have been studied in the literature, see, e.g., Casazza and Ceselli (2016). In this section, we show how to solve the two main problem variants: (i) minimize the number of bins used for the packing while the total number of fragmentations is at most F (bm-BPPIF); and (ii) minimize the number of fragmentations while the number of bins is at most B (fm-BPPIF). For both variants, we first propose an extension of the classical arc-flow model which produces good lower bounds, and then show how to adapt F V S RE to derive good quality upper bounds. Without loss of generality, we suppose that w j < c holds for any j.
In our new arc-flow model, arcs can exceed c and re-enter the bin from 0. As in the previous sections, our approach starts by constructing the multigraph G = (V, A) that is at the basis of the formulation. In this case, set V contains vertices between 0 and c. When attempting to create an arc (d, e) having e > c, its head e is moved to e mod c, resulting in a transposed arc. The arc set is consequently divided in A = A s ∪ A t , where A s is the set of standard arcs and A t the set of transposed arcs. Once again, for the sake of conciseness we provide the algorithm to build G in the appendix (Section Appendix I), but provide here a clarifying example.
The bm-BPPIF can be modeled as s.t.
(e,f )∈δ + (e) Objective function (32) Model (37) minimizes the number of fragmentations (instead of limiting it to F , as in (35)) and imposes a feasible flow containing all items. The last part of (37) forces the use of at most B bins. As it will be shown by the experimental evaluation in Section 7, these formulations are useful to obtain good quality lower bounds but quite weak in quickly finding feasible solutions. We could not find a direct formulation of the problem based on reflect, but, with the aim of obtaining good quality upper bounds, we implemented an approach based on tailored VSBPP instances solved by slightly modified F V S RE formulations. Let us describe it first for the bm-BPPIF. Let the bin types in set T be numbered as t = 1, 2, . . . , |T |. For each bin type t, we define an arbitrarily large availability b t , a capacity c t = tc, and a cost p t = t. Under this construction, using a bin of type t in the VSBPP corresponds to using t bins of capacity c in the BPPIF. This derives from the fact that a fractional packing in t bins can always be obtained by using no more than t − 1 fragmentations (see, e.g., Casazza and Ceselli 2016). Thus, an optimal bm-BPPIF solution can be obtained by solving a modified F V S RE that includes the additional constraint When |T | is sufficiently large, this approach leads to an optimal solution. However, this may result in a long computing time because of the consequent large capacities involved. Our approach, called reflect IF , attempts instead different increasing values of |T | in the set {1, 2, 3}. For each value, it invokes the modified F V S RE with a limited time and checks whether the solution found (if any) is proven optimal. If not, it continues to the next T value. If the three attempts are concluded without a proof of optimality, then reflect IF invokes F bm AF . The adaptation of this approach to the fm-BPPIF is easy, as it only requires to modify F V S RE by setting the objective function to |T | t=1 (t − 1)ω t and imposing the additional constraint |T | t=1 tω t ≤ B, and then invoking F f m AF in the last step. We opted not to modify the advanced bounding procedures for the large-size instances (Section 4.1) to cope with the BPPIF, because, as shown in Section 6 below, the approach that we just described could optimally solve all benchmarks.

Computational results
In this section, we computationally evaluate the proposed techniques and compare them with the existing literature. All our experiments have been executed on an Intel Xeon 3.10 GHz with 8 GB RAM (having CPU passmark indicator = 6594 in www.passmark.com), using Gurobi 6.5 as MILP solver. All tests were performed with a single core and by setting the number of threads to one in the MILP solver configuration. Due to the large number of instances attempted, in the following tables we mostly provide aggregate information for each algorithm and each group of instances, including the two following main indicators: • #opt = total number of proven optimal solutions among the instances in the line; and • sec = average of the CPU seconds elapsed across all instances in the line.
The best values of #opt in each line are highlighted in bold. When computing sec, we consider the time limit value for all instances that were not solved to proven optimality. Lines marked total/avg report total #opt and average sec values for groups of two or more lines.

Results on BPP and CSP
We tested our algorithms on the most-well known and challenging BPP and CSP benchmark sets: (1) Classical: A set of 1615 instances proposed in various articles in the last decades and having variegate characteristics (a complete description is given in Delorme et al. 2016); (2) GI: 4 sets of 60 instances proposed by Gschwind and Irnich (2016) and involving bin capacities up to 1 500 000; (3) AI/ANI: 2 sets of 100 challenging instances proposed by Delorme et al. (2016).
Instances and algorithms of this section are available at the BPPLIB by Delorme et al. (2017a). We first evaluate the entity of the improvement obtained by F RE on the classical F AF . Table 1 provides the results obtained by running the two formulations with a time limit of 3600 seconds. The first two columns identify the benchmark set and the corresponding number of instances. Apart from #opt and sec, the table gives the average number of variables (nb. var.) and constraints (nb. cons.) in the models. It can be noted that F RE outperforms F AF both in terms of #opt and sec. This can be explained by the drastic variable and constraint reductions obtained by reflect: An average 81.2% of variable reduction (ranging from 64.5% for AI 400 up to 98% for Scholl 3); and an average 64.1% of constraint reduction (ranging from 31.9% for Scholl 1 up to 92.2% for GI BA). However, even with these considerable reductions, reflect cannot handle the millions of variables and the hundreds of thousands constraints required to model the GI AB and GI BB instances.
We now analyze the performance of reflect+. We first focus on the difference between the classical restricted master heuristics (that solve F P R with less columns) adopted many times in the literature, and the first two new heuristics used in reflect+ (that solve F RE with less arcs). Table 2 provides the results obtained by running F P R and F RE considering only columns/arcs from P base or P LP (see Section 4.1), with a time limit of 60 seconds. Apart from #opt and sec, the table provides the number of times an execution reached the time limit (t.l.), and the average absolute gap from the best known lower bound (a.g.=U − L). Table 2: Comparison between classical restricted master heuristics (F P R (P base ) and F P R (P LP )) and new reflect based heuristics (F RE (P base ) and F RE (P LP )) on BPP/CSP benchmarks set of instances #inst.
#opt sec #t.l. a.g. #opt sec #t.l. a.g. #opt sec #t.l. a.g. #opt sec #t.l. a.g.  Table 2 shows that, when used on a restricted set of patterns, F RE largely outperforms F P R . Sometimes, both F P R (P base ) and F P R (P LP ) are fast but tend to terminate with sub-optimal solutions (e.g., on Waescher), while some other times they do not finish within the time limit (e.g., on Scholl 2). Both F RE (P base ) and F RE (P LP ) obtain good results as they solve to optimality most of the instances within a small time, achieving a small average gap on the unsolved instances. There is not a clear dominance between F RE (P base ) and F RE (P LP ): F RE (P base ) is faster, especially for instances with very large capacity (e.g., GI AB), but F RE (P LP ) terminates more often with a proven optimal solution (e.g., Falkenauer T). Note that no algorithm is capable of providing good results for the difficult AI/ANI instances, for which more advanced techniques are needed. Table 3 compares reflect and reflect+ with the best algorithms available in the BPP/CSP literature. On the basis of the results in Delorme et al. (2016), we selected the two approaches that largely dominated other 10 exact methods, namely, the branch-and-cut-and-price by Belov and Scheithauer (2006), simply called Belov hereafter, and the VPSolver by Brandão and Pedroso (2016). We ran the codes of the two methods on our machine. As required by the codes, Cplex (version 12.6) was used for Belov and Gurobi (6.5) for VPSolver. In addition to #opt and sec, Table 3 provides for reflect+ the number of times in which an instance was closed to optimality by F RE (P base ) and F RE (P LP ) (#U 1 , U 2 ), by F RE + (21) − (23) (#U 3 ), and by the main algorithm's loop (#U 4 ). The best configuration we found for Reflect+ is as follows: For the standard instances (nb. var. plus 10 times nb. cons. lower than 1 000 000), we gave up to 60 seconds for U 1 , up to 1200 for U 3 , and the remaining time for U 4 ; for the other very large instances, we gave up to 3600 seconds for computing U 1 , the remaining time, if any, to U 2 and then possibly to U 4 .  Table 3 shows that the behavior of reflect+ is very satisfactory and that the additional techniques help improving the results obtained by reflect alone. While U 1 and U 2 are effective for the first two benchmark sets, U 3 and U 4 are useful for the third difficult set. On average, reflect+ consistently outperforms VPSolver in terms of number of optimal solutions and time, especially on difficult instances (Waescher, GI AB and BB, and AI 400). When compared to Belov, reflect+ is less powerful on the AI 400 instances (where the issue is to find the good heuristic solution) but better for the ANI 400 instances (where it is difficult to raise the lower bound to the optimal value), and overall finds 11 more proven optimal solutions with a slightly smaller computational effort.

Results on the VSBPP
To test F V S RE and reflect V S + , we considered three VSBPP benchmark sets: (4) Crainic: 3 sets used in Crainic et al. (2011), gathering instances from the VSBPP literature having up to 12 bin types and 1000 items, and being rather easy because of small c values; (5) Hemmelmayr: 2 sets of instances used in Hemmelmayr et al. (2012) and derived from previous articles, containing up to 7 bin types and 2000 items, and having moderate difficulty; (6) Belov: 4 sets of difficult instances proposed by Belov and Scheithauer (2002). Each set contains 50 instances with around 5000 items and bin capacity up to 10 000. The maximum number of different bins is 2, 4, 8, and 16 for, respectively, Belov 1, 2, 3, and 4. Belov 2 is a standard reference set also addressed by Alves and Valério de Carvalho (2008). The other three sets are interesting to study the impact of |T |. Table 4 compares our methods with the best algorithms available in the VSBPP literature, namely: Belov, the branch-and-cut-and-price algorithm by Belov and Scheithauer (2002); Alves, the branch-andcut-and-price by Alves and Valério de Carvalho (2008); Hemmelmayr, the combination of lower bounds and variable neighbourhood search by Hemmelmayr et al. (2012). We also present the results of arcflow, that for the VSBPP was not computationally tested up to now. All methods were executed with a time limit of 3600 seconds on our machine, with the exception of Alves, executed on an Intel Core Duo 1.83GHz (passmark value 728), and Hemmelmayr, executed on an Intel Pentium D 940 3.20GHz (passmark value 710). We set the Reflect V S + configuration as follows: For small instances (n ≤ 500) we executed directly U 4 ; for the other instances, we gave up to 60 seconds for U 1 , up to 60 seconds for U 2 , and the remaining time to U 4 .  Table 4 shows that pseudo-polynomial formulations are, in general, very effective for most of the VSBPP instances. They are sufficient to solve all instances of the first two benchmark sets in just a few seconds, finding comparable results with Alves on Crainic 1 and outmatching Hemmelmayr on the second benchmark set. The real challenge is on the third difficult set. For example, for Belov 2 arc-flow finds only 34 proven optima and is outmatched by the two methods based on cut and column generation by Belov (38 optima) and Alves (47 optima). A similar behavior can be observed for Belov 1, 3, and 4. Reflect is better than Belov on average but slightly worse than Alves, whereas reflect V S + marks a strong improvement, solving in about 4 seconds all 200 instances (U 1 and U 2 found 194 proven optimal solutions and U 4 closed the 6 remaining instances). Overall, reflect V S + closed all instances in a second on average. It is also interesting to notice that parameter |T | does not influence reflect V S + , has a small impact on Belov algorithm, but affects the performance of both arc-flow (from 38 to 27 optima) and reflect (from 48 to 35 optima). This can be partially imputed to the number of variables in the models, which for reflect increases from an average value of 37 708 for Belov 1 (maximum |T |=2) to 52 248 for Belov 4 (maximum |T | = 16).

Results on the BPPIF
We used two BPPIF benchmark sets: (7) bm-BPPIF: A set of 540 instances by Casazza and Ceselli (2016) having up to 1000 items (divided in ranges 20-100 and 150-1000), two types of bin capacity (tight, loose), and three range of item weights (free, large, small); (8) fm-BPPIF: A copy of the previous set where the limit B on the number of bins has been replaced by a limit F on the number of items. Table 5 compares our results with those of the branch-and-price by Casazza and Ceselli (2016), denoted as Casazza. All algorithms were run with a time limit of 3600 second, Casazza on an Intel Core2 Duo E6850 3.00 GHz (passmark 1951). Apart from #opt and sec, the table also provides for reflect IF the number of instances solved to proven optimality by F V S RE with different |T | values (#|T |=1, 2, 3) and by F bm AF /F f m AF (#AF).  The results show that our algorithms are very effective. All instances with up to 100 items are easily solved by all methods. For the larger instances, our arc-flow formulations outmatch Casazza both in terms of #opt and sec on both problem variants. A good improvement is then obtained by reflect IF , which solves to optimality all bm instances and all fm instances but one. Between the two variants, bm is the easiest as all instances are solved by reflect IF in about 10 seconds on average, and by just invoking F V S RE with |T | = 1 or 2. The fm variant is harder and imposes a larger burden to all algorithms. The only fm instance that was unsolved to proven optimality in one hour could be solved by reflect IF in about 80 minutes. In this way, optimal solutions have been produced for all benchmark instances.

Conclusions and future research
Thanks to the sharp improvement in the performance of mixed integer linear programming solvers, pseudo-polynomial models have recently become a useful tool for the solution of many combinatorial optimization problems. This has raised interesting opportunities for the development of new effective combinatorial techniques and for devising dedicated solution algorithms.
In our work, we studied pseudo-polynomial models for the classical bin packing problem (BPP) and cutting stock problem. We gave a complete overview of the dominance and equivalence relations among the main formulations. We then introduced a formulation that models a BPP instance on a reduced network where source-to-sink paths are replaced by pairs of colliding paths. We improved the computational performance of this formulation by using techniques based on column generation, dual cuts, and heuristics, and showed the easy replicability of the proposed methods by adapting them to two relevant BPP generalizations, namely, the variable sized BPP and the BPP with item fragmentation. Extensive computational results proved that our algorithms are very effective, improving upon the existing literature and providing optimal solutions for many benchmark instances that were previously unsolved.
Research on pseudo-polynomial models is currently of great interest, because it could help improving state-of-the-art results in many decision problems of practical interest. Relevant applications could arise in one-dimensional cutting and packing, for example in problems with loose bin capacities (Ceselli and Righini 2008), reusable leftovers (Arbib et al. 2002) or cardinality constraints (Sadykov and Vanderbeck 2013), and in two-dimensional cutting and packing, for example as master problems in primal decomposition methods (as in Côté et al. 2014 andDelorme et al. 2017b). But they could arise also in resource-constrained and/or precedence-constrained problems, in the capacitated vehicle routing area, as well as in single and multiple machine scheduling problems under different objective functions. In practice, in many of those combinatorial optimization problems where capacity play a central role. Multi-objective optimization could also be tackled, by imposing the different profits/costs on the arcs of the network and using path reconstruction algorithms to derive Pareto optimal solutions. The development of new advanced techniques for improving the existing models is also of great interest. For the BPP, our pseudo-polynomial models are particularly put under strain by instances with large bin capacities and a large number of items of small weight, and, in fact, instances with just 400 items remain unsolved despite the application of dozens of algorithms. Future research is thus envisaged, both to devise new applied models and improve the existing ones.
Algorithm 3 requires a simple mapping M that associates each cut [p, q] with an index m pq . At step 3, it selects a cut [c, q] with positiveȳ cq value, and then, at steps 4-6, it uses the cut to initialize tree t, the set of cuts C used to generate t, and an array L storing the leaves of the tree. As long as there is a cut on a piece of width p stored in L, then the tree and the corresponding set of cuts are enlarged (steps 7-13). The array L is updated by removing the piece that was cut and inserting the two children. After the process of enlarging the tree terminates, the valuez t of the tree is set to a minimum considering the values of the selected cuts and the number of times they appear in the tree (step 14). The residual variables values are updated at step 15, and the process continues until all trees have been generated. T ← T ∪ {t} 17: end while 18: return T Algorithm 3 clearly creates binary trees, but, to prove that it effectively decomposes a one-cut solution, it must be shown that it also terminates with a situation in which all variables take value 0 and no uncut portions of the solution are left. This can be proved by showing that it is impossible to find a q ∈ W ∪ R \ {c} that satisfies Indeed, if (38) was satisfied, then a piece of width q different than c has to be recut (condition 1), but q is neither produced by a left cut (condition 2), nor by a right cut (condition 3).
To this aim note that, after the variables' update at step 15, there are two possible cases for q: • L(q) > 0, so q belongs to the final leafs of the tree that was just built. According to step 7, this means that for such q there is no cut [q, r] for whichȳ qr > 0 (otherwise the while loop would have been repeated), and consequently the first condition of (38) is not satisfied for this q; • L(q) = 0, or, in other words, q does not belong to any of the final leafs of the tree. This means that, in tree t, the amount ofȳ where q appears as a child ( p∈A(q)ȳ pq + p∈B(q)ȳ p+q,p ) is equal to the amount ofȳ where q appears as a father ( r∈C(q)ȳ qr ). This has the consequence of maintaining inequality (5) satisfied during the algorithmic iterations. Indeed, (5) was initially satisfied byȳ and now remains satisfied because step 15 removes the same amount ofȳ from both sides of it. This implies that the three conditions in (38) cannot be simultaneously satisfied for this q.
We remark that the decomposition shown in Figure 2 of Section 3 has been obtained by a slight modification of Algorithm 3 that only creates right-sided trees. The modification, which is only needed for the proof of equivalence of F AF with F OC , is formally discussed in Remark 3 below.

Appendix C Proof of Proposition 1 and additional examples
We first observe two simple properties that will be used in the main proof.
Remark 2 Any solutionx de of L(F AF ) can be transformed into an equivalent solution which can be decomposed into left-aligned paths, that is, paths in which loss arcs, if any, appear at the right of all item arcs.
Recall that, according to Lemma 1, one can decomposex de into paths. Remark 2 then follows from the fact that one can select paths that are not left-aligned, and move to the left as much as possible all their item arcs, until no more move can be made. Note that an easy way to obtain a left-aligned solution is to replace in A each loss arc (d, d + 1) with a new loss arc (d, c). These new loss arcs can only appear at the end of a path, thus imposing a left-alignment. Then, a solution with these alternative loss arcs can be easily mapped into an original L(F AF ) solution by replacing each selected (d, c) arc with a chain of c − d unit-width loss arcs.
Remark 3 Any solutionȳ pq of L(F OC ) can be transformed into an equivalent solution which can be decomposed into right-sided trees, that is, trees in which only right children are allowed to have their own children.
According to Lemma 2, we know thatȳ pq can be decomposed into a set of trees. A decomposition into right-sided trees can be obtained by either (i) modifying the positions of the cuts, or (ii) modifying model (4)-(6) and Algorithm 3. Here we describe the second option, whose implementation is simpler. It consists of adding to model (4)-(6) the inequality r∈C(q) and removing step 10 from Algorithm 3. Inequality (39) is a symmetry-breaking constraint that imposes to select, among the equivalent solutions, one in which the number of times q is recut (left-hand side of the inequality) is not greater than the number of times it appears as a right child (right-hand side), thus ensuring that all recuts are performed on a right child. Then, the modification in Algorithm 3 guarantees that no left child enters the candidate list for recutting (array L), thus producing only right-sided trees. Proposition 1. F AF is equivalent to F OC .
Proof. We first prove that F AF is included in F OC , and then that F OC in included in F AF .
Arc-flow is included in one-cut.
Let us consider a generic solutionx de of L(F AF ). According to Lemma 1,x de can be decomposed into paths, and, according to Remark 2. we can suppose without loss of generality that these paths are left-aligned. We usex de to build a feasible and same-cost solutionȳ pq of L(F OC ) by using Algorithm 4. The intuition behind the algorithm is that any item arc (d, e) becomes a cut on a piece of length (c − d) to obtain a left piece of length (e − d).
Algorithm 4 Transform AF into OC 1: Input: A left aligned solutionx de of L(F AF ) 2: for all p ∈ R, q ∈ W, p > q doȳ pq ← 0 3: for all (d, e) ∈ A I :x de > 0, e < c doȳ c−d,e−d ←x de 4: returnȳ We first note that, at the end of Algorithm 4 we obtain We now show thatȳ has the same cost ofx. By using (8) and recalling that no arc enters 0, we know thatz = (0,f )∈δ + (0)x 0f . All paths inx de are left-aligned and so they start with one of the m item arcs. Moreover, we can equivalently use w i for i = 1, . . . , m or q ∈ W to express an item width. By using these considerations, in the given order, and applying (40) tox 0q , we get which is equivalent to (4).
To prove the feasibility ofȳ, we first note that Algorithm 4 only creates non-negative variable values, so we only have to show that constraints (5) are satisfied for any q ∈ W ∪ R \ {c}. We first focus on the case in which q is not an item width, that is, q ∈ R \ W \ {c}, which implies L q = 0 and A(q) = ∅. We rewrite the flow conservation at intermediate nodes e = 1, . . . , c − 1 in (8) as When q ∈ W, we also need to take into account L q and A(q). We consider again (8), but this time focus on a vertex e = c − w i . By replacing e with c − w i , we get which we rearrange as We now consider demand constraints (9) and rewrite their left hand side as We embed (42) into this last equation, and then use the result to rewrite (9) as We apply (40) to all members of (43) ( We use the definitions of sets A, B, and C and replace d i with L w i in (44), so we obtain We use index q ∈ W instead of w i for i = 1, . . . , m and rewrite the variables indices, so we get p∈A(q)ȳ pq + p∈B(q)ȳ p+q,p − r∈C(q)ȳ qr ≥ L q which proves that (5) is also feasible for any q ∈ W and concludes the first part of the proof.
One-cut is included in arc-flow.
Let us consider a solutionȳ pq of L(F OC ). From Lemma 2 we know thatȳ pq can be decomposed into a set of trees, and from Remark 3 we can suppose without loss of generality thatȳ pq accomplishes with (39) and can be decomposed into a set of right-sided trees. We useȳ pq to build a feasible and same-cost solutionx de of L(F AF ) by using Algorithm 5. The algorithm considers the alternative loss arcs (d, c) that we introduced in Remark 2. The intuition behind Algorithm 5 is that each cut becomes either a Algorithm 5 Transform OC into AF 1: Input: A solutionȳ pq of L(F OC ) + (39) 2: for all (d, e) ∈ A dox de ← 0 3: for all p ∈ R, q ∈ W, p > q :ȳ pq > 0 do 4:x c−p,c−p+q ←x c−p,c−p+q +ȳ pq 5:x c−p+q,c ←x c−p+q,c +ȳ pq

6:
if p = c thenx c−p,c ←x c−p,c −ȳ pq end-if 7: end-for 8: returnx path that increases the flow on two arcs or a cycle that decreases the flow on one arc and increases it on two other arcs (two clarifying examples are provided at the end of the proof).
We first derive two equations that are useful for the proof. Algorithm 5 increases (steps 4 and 5) or decreases (step 6) thex values on the basis of the cuts selected in the solution of L(F OC ) + (39).
Step 4 is invoked at most once for each pair of p and q values, thus leading tō Steps 5 and 6 may instead modify multiple times the same variable x c−q,c for a given value of q. By considering all cuts [r, s] for which r − s = q, step 5 leads tox c−q,c ← r∈R,s∈W,r>s:r−s=qȳ rs = s+q∈R,s∈Wȳ s+q,s . By considering all cuts [r, s] for which r = q, step 6 leads instead tox c−q,c ← − r∈W,s∈R,r>s:r=qȳ rs = q∈W,s∈R,q>sȳ qs . By summing these two components and recalling that B(q) = {p ∈ W : p + q ∈ R} and C(q) = {p ∈ W : p < q}, we get To show thatx has the same cost ofȳ, it is enough to apply (45) to (4) which is equivalent to (7). We now show that constraints (8) remain satisfied during any iteration of Algorithm 5. This can be intuitively noticed by the example presented after this proof (see Figure C1). Formally, constraints (8) are satisfied after the initialization step as all flows take value 0. Then, let us first consider the flow variation involved byȳ pq > 0 having p = c. At step 4, the flow leaving c − p is increased byȳ pq , but it is then reduced by the same amount at step 6, resulting in no flow variation. The same observation holds for the flow entering c at steps 5 and 6. The flows entering and leaving c − p + q are balanced at steps 4 and 5. Now, let us consider the flow variations involved by aȳ cq > 0. Again, the flows entering and leaving q are increased by the same amount at steps 4 and 5. At step 4, the flow leaving 0 is increased byȳ cq , which is the same amount added to the flow entering c at step 5. Consequently, constraints (8) are satisfied by the builtx values.
To prove that demand constraints (9) are also satisfied, we start by considering (5) for q ∈ W as p∈A(q)ȳ pq + p∈B(q)ȳ p+q,p − r∈C(q)ȳ qr ≥ L q q ∈ W, which, by applying (45) and (46), can be modified into We now set w i = q and e = c − p, replace L w i with d i , and obtain the desired result For what concerns non-negativity, this may be an issue only for variables x c−q,c , the only ones affected by step 6. We can notice, however, that the right-hand side of (46) is forced to be non-negative by the additional constraint (39) that we imposed, and thusx c−q,c ≥ 0 holds (an example of a solution that does not satisfy (39) and leads to a negativex value is shown in Figure C2). This shows thatx is a feasible L(F AF ) solution and concludes the proof.

Appendix E Proof of Proposition 3
Proposition 3. F DP is equivalent to F P R .
Proof. We first prove that F P R is included in F DP , and then that F DP in included in F P R . For the first part, we use the same idea of Lemma 1 and decompose an L(F DP ) solution into a set of paths. Then, we show that for each path p in F DP , there is a pattern p ′ (i.e., a column) in F P R . The idea is shown in Figure E4: Each vertical stage for p corresponds to a binary a jp ′ value of p ′ . If at stage j the arc in the path is vertical (i.e., ϕ j,d,j+1,d is selected), then a jp ′ = 0. If instead the arc is diagonal (i.e., ϕ j,d,j+1,d+w j is selected), then a jp ′ = 1.  Figure E4: Transforming a path p of an L(F DP ) solution (left) into a pattern p ′ for L(F P R ) (right) As F DP is dedicated to the BPP, the transformation produces binary columns. It is possible to recreate afterwards integer columns for the CSP by summing the binary values a jp ′ associated with the same item type. As constraints (13) are satisfied in the solution of L(F DP ), they are also satisfied in the transformed patterns of L(F P R ). The reverse process is very similar: A BPP pattern of L(F P R ) can be easily mapped in a pattern for the CSP and then transformed into a path for L(F DP ). Any path created in this way satisfies flow conservation constraints (12). Constraints (13) are also satisfied, because demand constraints are satisfied in the L(F P R ) solution. Remark that, to maintain the " = " in (13) (instead of a " ≥ ") one should possibly have to remove some redundant item copies from the solution.

Appendix F Proofs of Propositions 4 and 5
Proposition 4. F RE models the CSP.
Proof. Consider a generic solution of a CSP instance. We show that any pattern (bin filling) p in the solution can be transformed in reflect into a pair of paths that start in 0 and collide at a given vertex. To this aim, we sort items in p by non-increasing weight and divide them into two subsets, I 1 and I 2 . We start by filling I 1 with the items in the computed order until their total width is either greater than or equal to c/2 or until there are no more items in p. We insert the rest of the items, if any, in I 2 . For simplicity, suppose that items are numbered from 1 to |I 1 | in I 1 and from |I 1 | + 1 to |I 1 | + |I 2 | in I 2 . We can distinguish three cases: (1) i∈I 1 w i < c/2, so I 1 has not been filled up to c/2 and thus I 2 is empty. The pattern can be represented by a pair of paths colliding in c/2: (i) a path p 1 made by standard arcs corresponding to the items in I 1 (namely, (0, w 1 , s), (w 1 , w 1 + w 2 , s), . . . ), then loss arcs up to c/2, and then the reflected arc (c/2, c/2, r); and (ii) a path p 2 containing only loss arcs from 0 to c/2.
(2) i∈I 1 w i = c/2. The pattern can be created by a pair of paths in which: (i) path p 1 is formed by standard arcs associated with the items in I 1 , so ending in c/2, and a last arc (c/2, c/2, r); and (ii) path p 2 is formed by standard arcs associated with the items in I 2 (if any) and possibly concluded by loss arcs until c/2 is reached. Once more the two paths collide in c/2.
(3) i∈I 1 w i > c/2. In this case the total width of the items in I 1 exceeds c/2, and hence: (i) path p 1 is formed by standard arcs associated with the first |I 1 | − 1 items and a last reflected arc (d,ē, r), whered = i=1,...,|I 1 |−1 w i andē = c −d − w |I 1 | ; and (ii) path p 2 is formed by standard arcs associated with the items in I 2 (if any), possibly followed by loss arcs untilē is reached. The pattern is then represented by the pair of paths p 1 and p 2 , which collide inē.
The opposite procedure also holds, as any pair of colliding paths in reflect can be transformed into a feasible pattern, and this concludes the proof.
Proposition 5. Any feasible CSP pattern can be represented in F RE by a pair of colliding paths whose reflected arc (d, e, r) has d ≤ e.
Proof. Proof We need to prove that reflect can model any CSP pattern p by using a reflected arc whose tail is at the left of its head. In other words, this means that at least half of the item width modeled by the reflected arc is packed before reflection. Once again, we sort items in p by non-increasing weight, divide them into I 1 and I 2 , and consider the three cases in the proof of Proposition 4 above. The statement is clearly satisfied for cases (1) and (2), where the reflected arc is (c/2, c/2, r). Let us focus on case (3) and consider d > e. We obtain an equivalent pair of paths that satisfies the statement by modifying the way in which we fill I 1 and I 2 . We fill I 1 with the first |I 1 | − 1 items as before, but then insert the item |I 1 | in I 2 . We then scan items one at a time in the given order. Let j define the index of the current item. We insert j in I 1 if at least half of its width fits within c/2, namely, if w j /2 + i∈I 1 w i ≤ c/2 holds, as this would correspond to either a standard arc or a reflected arc accomplishing with d ≤ e.
Note that Algorithm 7 would provide a valid multigraph to F RE even if step 15 were replaced by a simple "else". Indeed, that would result in a larger graph, not accomplishing with the reduction of Proposition 5, but having all required arcs to model a CSP instance. Note also that the algorithm works for even values of c. In case c is an odd number, an easy adaptation is to double the capacity of the bin and the width of all item types. It is worth noticing that this operation does not affect the number of possible item widths combinations, and thus does not increase the number of variables and constraints in F RE . Otherwise, an additional dummy node R can be created and taken into explicit consideration in the algorithm.  p ← p 1 ∪ p 2 17:z p ← min(z p1 ,z p2 ) 18:z p1 ←z p1 −z p ;z p2 ←z p2 −z p 19: P ← P ∪ p 20: end do 21: end do 22: return P Algorithm 8 shows how to reconstruct a solution after F RE has been solved. The algorithm uses a set P of colliding paths, as well as two arrays of sets of standard and reflected paths, S and R, respectively. After initialization, it creates a path from 0 to its colliding node d (steps 3-12), and stores it either in R[d] if it contains a reflected arc, or in S[d] otherwise (step 11). The process is iterated until no more paths can be found. Then, for each possible colliding node d (step 13), the algorithm selects two paths from R[d] and S[d] (steps 14-15) and merge them to reconstruct a pair p (steps 16-19). Such merging is ensured by constraints (17), that guarantee that each selected reflected path can be matched with a selected standard path. For the sake of completeness, we remark that such merging is guaranteed if all item types i have w i < c, accomplishing with our initial assumption in Section 2.1. Otherwise, there could be a selected reflected arc (0, 0, r) corresponding to an item of size c that could not be matched with any standard path. Clearly, any item type having w i = c can be removed from the instance in a preprocessing phase.