A Polynomial Algorithm of Optimum Cutting a Rectangle into Rectangles with Two Heights

We consider the problem of guillotine cutting a rectangular sheet into rectangular pieces with two heights. A polynomial time algorithm for this problem is constructed.


Introduction
The problems of rectangular packing and cutting are difficult problems of discrete optimization (for references see [1]).For example, the computational complexity of the problem of packing in a rectangular sheet ( ) the maximum number of equal small rectangles ( ) , c d (pallet loading problem (PLP)) is unknown.Fast polynomial algorithms [2,3] are known for the problem of optimally guillotine cutting a rectangle ( ) , A B into rectangles ( ) , c d where 90˚ rotations are allowed.In [4,5] the problem of guillotine cutting a rectangular sheet ( ) , A B into rectangles ( ) ( ) , , , a b c d with a minimal trim loss is considered and polynomial algorithms for its solution are presented for the case when the number of occurrences of small rectangles in a cutting pattern is not restricted and rectangles cannot be rotated.Adding a constraint on the number of occurrences of rectangles , c d belongs to  (the class of the problems which are solvable in polynomial time).The general problem of packing is strongly NP-hard, and in a guillotine case it has pseudopolynomial algorithm of dynamic programming.For integer variant of a problem, from polynomial algorithm of Lenstra [6] for a problem of integer linear programming, it follows a polynomial algorithm for optimum packing of rectangles ( ) , A B with the fixed set I .When there are constraints on number of rectangles, the existence of polynomial algorithm is problematic.The matter is that the problem about optimum packing 1 n rectangles ( ) , A B is equivalent to a problem MSP3 (the problem of packing bins with three lengths), for which the existence of polynomial algorithm is an unsolved problem of the schedulling theory so far [7].We consider the problem of optimum (i.e with the minimum trim lost) guillotine cutting a rectangle ( ) , A B into rectangles with two heights ( )

 
This paper is organized as follows: In Section 2, we consider the properties of a knapsack polygon (the convex hull of the set of feasible solutions of a 2-dimensional knapsack problem).Section 2 is auxiliary for Section 3 but it is self-interesting for the theory of knapsack problems.In Section 3, we prove the main results about the existence of polynomial algorithm for considered cutting problem.

Some Properties of a Knapsack Polygon
The set of feasible solutions of a knapsack problem plays an important role for problems of guillotine cutting.In a 2-dimensional case, this set is presented as: where co denote the convex hull operation.Let's show, that a knapsack polygon A P can be presented as where ( ) T x y is a right triangle with vertices ( ) ( ) ( ) 0,0 , 0, , ,0 + is a number of nonzero vertices of A P , the symbol ⊕ denotes an algebraic sum (the Minkowski sum) of sets: , then it is easy to see, that 0, is a singular triangle-an interval, connecting points ( ) . Let nonzero vertices of A P are sorted by increasing x-coordinates.
Then the first vertex is ( ) , X Y be the second nonzero vertex of A P .Then where A P′ is defined as: , ,

A P co x y Z ax by A aX
and all nonzero vertices of A P′ are translation of vertices of A P , excepting the first, by ( ) . Applying an induction, we obtain required representation.
Remark.This representation follows from a well-known representation of a convex polygon up to translation by the set of its sides sorted in counter-clockwise or clockwise order [8].Note also that the Minkowski sum of two polygons can be presented by the union of their sides up to translation.
It is easy to establish the following recurrent equations, connecting coordinates of vertices and parameters of right triangles in the above representation: , , Note the following properties of this representation: If in (1), where right triangles ( ) T x y are sorted by increasing i i y x order, there are no singular triangles, then it is possible to add singular the first and last triangles ( ) ( ) . Thus, from the beginning we may assume, that 1 , m T T are singular triangles ( ) T y .Among other properties note the following property.If

( )
gcd , The similar possibility of further decomposition appears in the case, when boundary of a knapsack polygon besides vertices contains also other points of an integer lattice 2 .Z + Consider an example of a knapsack polygon: , 49 80 632, , .
It has 6 non zero vertices (0,7), (1,7), (3,6), (8,3), (11,1), (12,0) and can be presented by the Minkowski sum of right triangles: where ( ) if the sets of feasible solutions of corresponding knapsack problems are equal: We say that a triplet ( ) , , a b A can be decreased, if there exists an equivalent triplet ( ) ( ) Suppose on the contrary that there exists a triplet ( ) , , .ax by ab ra sb x y Z + ⇔ + ≤ + + ∈ Because points , ,  ,  r b s r a s S x y Z ax by ab ra sb From here follows, that At the same time, this point does not satisfy (3):

a r b b b s a ab ra sb ba ab ab ra sb
, then by the properties of Farey series x y Z a x b y ra sb Inequality ( 4) is equivalent to ( ) ( ) , i.e., ( ) The equivalence of Inequalities ( 4) and ( 5) shows a possibility of decreasing the parameters of Inequality ( 4) if , , .
First of all, ra sb A ′ ′ ′ + ≤ , as ( ) , r s is a solution of ( 6), (7) At the same time, ( 6) is not carried out because max .
Proof.The proof is standard and can be omitted.Knapsack problem (8) in the case of fixed sets 1 2 , I I can be solved by the well known polynomial algorithm of Lenstra [6] for integer linear programming.Therefore, next lemma is valid.
Lemma 3 For a problem of cutting , , , A t A t .But then by presenting the side 1 t as the Minkowski sum of elementary triangles we can transform this cutting into cutting with the first cut dividing the side A .The lemma is proved.
Uniting all results we obtain the following theorem.

Theorem 2 For a problem of optimum cutting ( )
, A B into rectangles ( ) , , 1, 2, , , , with the fixed sets of indexes 1 2 , I I there exists a polynomial algorithm.

Conclusion
As it is said in introduction, the problems of guillotine rectangular cutting belong to the set of problems with pseudopolynomial algorithms.Intuition makes the hypothesis of existence of polynomial algorithm for the problem of optimum guillotine cutting into fixed number of small rectangles probable.In this paper, this hypothesis is justified for the problem of guillotine cutting a rectangular sheet into rectangular pieces with two heights.
a b c d complicates the problem.It is not known whether the problem of guillotine cutting a rectangular sheet ( ) , A B into m rectangles ( ) , a b and n rectangles ( ) the number of copies of each rectangle.Let's designate this problem Z + ∈ =  .The convex hull of this set refers to as a knapsack polygon denoted by

1 1
,0 T is a singular triangle.Remark.If we denote by ( ) , I T α β the set of integer points in ( ) the next formula for the set of feasible solutions in a 2-dimensional knapsack problem: is characterized by a triplet of integer non-negative numbers () , describing a knapsack polygon, is equivalent to a triplet ( ) . a a a b b b ab ba a b ab + role for a possibility of decreasing a triplet ( ) .It is easy to show, that if A is replaced by the optimum value of a knapsack problem: .If r b ≥ or s a ≥ , then the triplet ( ) , , a b A can not be decreased.Let's show, that the triplet () not be decreased.

1 ,
x r b s y − ≤ − .Consider three cases: a) x r = , b) x r > , c) x r < .a).If x r = , then y s ≤ and ( ) three cases: a) x r = , b) x r > , c) x r < .a).If x r = , then y s ≤ .From here follows, that ( ) shall show, that it is impossible to decrease parameters.Let, on the contrary, the triplet Consider two possible cases: a)That is, in this case decreasing of parameters is impossible.

⊕
, x y xb yb B x y Z+ + ≤ ∈ = The convex hull of this set can be presented as the algebraic sum (Minkowski sum) of elementary triangles Application of the proved theorem and a the theorem 1 of equivalence[3] reduces the initial problem of optimum cutting to the set of problems of optimum cutting the rectangles Y .The next lemma follows from area estimations.Lemma 2 Optimum cutting of a rectangle fixed sets of indexes 1 2 , I I there exists a polynomial algorithm of optimum cutting.Proof.If the first cut divide the side A , i.e. we have cutting .Then we have cutting into two rectangles ( ) ( )1 2 Let be given a knapsack problem, the set of feasible solutions of which is given by an inequality