Partitioned Rectangle

A guillotine cutting: an optimised sheet of smaller rectangles which can be divided intact through the correct series of bisecting end-to-end cuts.
  • Everyday Math Series uses this strategy in Grade 4, Unit 4 to teach multidigit multiplication.
  • Rectangular Partitioning has an equivalent decision problem that is defined as follows: Given the values, is there a partitioning (, ) of the - plane such that = and = and such that each cell, intersects at most one of the rectangles 𝑅. We show this by reducing the Balanced Bipartite Cover (BBC) problem to Rectangular Partitioning.
A non-guillotine cutting: these rectangles cannot be separated by making single bisecting cuts across the plane.

Partition a rectangle into rows and columns of same-size squares and count to find the total number of them. 2.G.A.3 Partition circles and rectangles into two, three, or four equal shares, describe the shares using the words halves, thirds, half of, a third of, etc., and describe the whole as two halves, three thirds, four fourths.

Guillotine partition is the process of partitioning a rectilinear polygon, possibly containing some holes, into rectangles, using only guillotine-cuts. A guillotine-cut (also called an edge-to-edge cut) is a straight bisecting line going from one edge of an existing polygon to the opposite edge, similarly to a paper guillotine.

Guillotine partition is particularly common in designing floorplans in microelectronics. An alternative term for a guillotine-partition in this context is a slicing partition or a slicing floorplan.[1] Guillotine partitions are also the underlying structuer of binary space partitions. There are various optimization problems related to guillotine partition, such as: minimizing the number of rectangles or the total length of cuts. These are variants of polygon partitioning problems, where the cuts are constrained to be guillotine cuts.

A related but different problem is guillotine cutting. In that problem, the original sheet is a plain rectangle without holes. The challenge comes from the fact that the dimensions of the small rectangles are fixed in advance. The optimization goals are usually to maximize the area of the produced rectangles or their value, or minimize the waste or the number of required sheets.

Computing a guillotine partition with a smallest edge-length[edit]

In the minimum edge-length rectangular-partition problem, the goal is to partition the original rectilinear polygon into rectangles, such that the total edge length is a minimum.[2]:166–167

This problem can be solved in time O(n5){displaystyle O(n^{5})} even if the raw polygon has holes. The algorithm uses dynamic programming based on the following observation: there exists a minimum-length guillotine rectangular partition in which every maximal line segment contains a vertex of the boundary. Therefore, in each iteration, there are O(n){displaystyle O(n)} possible choices for the next guillotine cut, and there are altogether O(n4){displaystyle O(n^{4})} subproblems.

In the special case in which all holes are degenerate (single points), the minimum-length guillotine rectangular partition is at most 2 times the minimum-length rectangular partition.[2]:167–170 By a more careful analysis, it can be proved that the approximation factor is in fact at most 1.75. It is not known if the 1.75 is tight, but there is an instance in which the approximation factor is 1.5.[3] Therefore, the guillotine partition provides a constant-factor approximation to the general problem, which is NP-hard.

These results can be extended to a d-dimensional box: a guillotine-partition with minimum edge-length can be found in time O(dn2d+1){displaystyle O(dn^{2d+1})}, and the total (d-1)-volume in the optimal guillotine-partition is at most 2dβˆ’4+4/d{displaystyle 2d-4+4/d} times that of an optimal d-box partition.[4]

Arora[5] and Mitchell[6] used the guillotine-partitioning technique to develop polynomial-time approximation schemes for various geometric optimization problems.

Number of guillotine partitions[edit]

Besides the computational problems, guillotine partitions were also studied from a combinatorial perspective. Suppose a given rectangle should be partitioned into smaller rectangles using guillotine cuts only. Obviously, there are infinitely many ways to do this, since even a single cut can take infinitely many values. However, the number of structurally-different guillotine partitions is bounded.

  • In two dimensions, there is an upper bound in O(n!25nβˆ’3n3/2){displaystyle Oleft({frac {n!2^{5n-3}}{n^{3/2}}}right)} attributed to Knuth. the exact number is the SchrΓΆder number.[7]
  • In d dimensions, Ackerman, Barequet, Pinter and Romik[8] give an exact summation formula, and prove that it is in Θ((2dβˆ’1+2d(dβˆ’1))nn3/2){displaystyle Theta left({frac {(2d-1+2{sqrt {d(d-1)}})^{n}}{n^{3/2}}}right)}. When d=2 this bound becomes Θ((3+22)nn3/2){displaystyle Theta left({frac {(3+2{sqrt {2}})^{n}}{n^{3/2}}}right)}.
  • Asinowski, Barequet, Mansour and Pinter[9] also study the number of cut-equivalence classes of guillotine partitions.

Coloring guillotine partitions[edit]

A polychromatic coloring of a planar graph is a coloring of its vertices such that, in each face of the graph, each color appears at least once. Several researchers have tried to find the largest k such that a polychromatic k-coloring always exists. An important special case is when the graph represents a partition of a rectangle into rectangles.

  • Dinitz, Katz and Krakovski[10] proved that there always exists a polychromatic 3-coloring.
  • Aigner-Horev, Katz, Krakovski and Loffler[11] proved that, in the special sub-case in which the graph represents a guillotine partition, a strong polychromatic 4-coloring always exists.
  • Keszegh[12] extended this result to d-dimensional guillotine partitions, and provided an efficient coloring algorithm.
  • Dimitrov, Aigner-Horev and Krakovski[13] finally proved that there always exists a strong polychromatic 4-coloring.

See also[edit]


Partitioned Rectangle 4 Digit

  1. ^Lengauer, Thomas (1990), 'Circuit Partitioning', Combinatorial Algorithms for Integrated Circuit Layout, Wiesbaden: Vieweg+Teubner Verlag, pp. 251–301, ISBN978-3-322-92108-6, retrieved 2021-01-16
  2. ^ abDu, Ding-Zhu; Ko, Ker-I.; Hu, Xiaodong (2012). Design and Analysis of Approximation Algorithms. Springer Optimization and Its Applications. New York: Springer-Verlag. pp. 165–209, chapter 5 'guillotine cut'. ISBN978-1-4614-1700-2.
  3. ^Gonzalez, Teofilo; Zheng, Si-Qing (1989-06-01). 'Improved bounds for rectangular and guillotine partitions'. Journal of Symbolic Computation. 7 (6): 591–610. doi:10.1016/S0747-7171(89)80042-2. ISSN0747-7171.
  4. ^Gonzalez, Teofilo F.; Razzazi, Mohammadreza; Shing, Man-Tak; Zheng, Si-Qing (1994-05-01). 'On optimal guillotine partitions approximating optimal d-box partitions'. Computational Geometry. 4 (1): 1–11. doi:10.1016/0925-7721(94)90013-2. ISSN0925-7721.
  5. ^Arora, S. (October 1996). 'Polynomial time approximation schemes for Euclidean TSP and other geometric problems'. Proceedings of 37th Conference on Foundations of Computer Science: 2–11. doi:10.1109/SFCS.1996.548458.
  6. ^Mitchell, Joseph S. B. (1999-01-01). 'Guillotine Subdivisions Approximate Polygonal Subdivisions: A Simple Polynomial-Time Approximation Scheme for Geometric TSP, k-MST, and Related Problems'. SIAM Journal on Computing. 28 (4): 1298–1309. doi:10.1137/S0097539796309764. ISSN0097-5397.
  7. ^Yao, Bo; Chen, Hongyu; Cheng, Chung-Kuan; Graham, Ronald (2003-01-01). 'Floorplan representations: Complexity and connections'. ACM Transactions on Design Automation of Electronic Systems. 8 (1): 55–80. doi:10.1145/606603.606607. ISSN1084-4309.
  8. ^Ackerman, Eyal; Barequet, Gill; Pinter, Ron Y.; Romik, Dan (2006-05-31). 'The number of guillotine partitions in d dimensions'. Information Processing Letters. 98 (4): 162–167. doi:10.1016/j.ipl.2006.01.011. ISSN0020-0190.
  9. ^'Cut equivalence of d-dimensional guillotine partitions'. Discrete Mathematics. 331: 165–174. 2014-09-28. doi:10.1016/j.disc.2014.05.014. ISSN0012-365X.
  10. ^Dinitz, Yefim; Katz, Matthew J.; Krakovski, Roi (2009-12-01). 'Guarding rectangular partitions'. International Journal of Computational Geometry & Applications. 19 (06): 579–594. doi:10.1142/S0218195909003131. ISSN0218-1959.
  11. ^Horev, Elad; Katz, Matthew J.; Krakovski, Roi; LΓΆffler, Maarten (2009-06-15). 'Polychromatic 4-coloring of guillotine subdivisions'. Information Processing Letters. 109 (13): 690–694. doi:10.1016/j.ipl.2009.03.006. ISSN0020-0190.
  12. ^Keszegh, BalΓ‘zs (2008). Hu, Xiaodong; Wang, Jie (eds.). 'Polychromatic Colorings of n-Dimensional Guillotine-Partitions'. Computing and Combinatorics. Lecture Notes in Computer Science. Berlin, Heidelberg: Springer: 110–118. doi:10.1007/978-3-540-69733-6_12. ISBN978-3-540-69733-6.
  13. ^'Polychromatic colorings of rectangular partitions'. Discrete Mathematics. 309 (9): 2957–2960. 2009-05-06. doi:10.1016/j.disc.2008.07.035. ISSN0012-365X.
Retrieved from ''


partition_rectangle β€” Partition a region into rectangles of approximately equal size.


partition_rectangle(Region : Partitioned : Width, Height : )


partition_rectangle partitions the input region intorectangles having an extent of Width timesHeight. The rectangles are returned in Partitioned. The region is always split into rectangles ofapproximately equal size. If this is not possible with the requestedrectangle size, then Width and Height are adapted so that the size of the resulting rectangles is approximately equal. If the region is smaller than the given size, its output remains unchanged. A partition is only done if the size of the region is at least 1.5 times the size of therectangle given by the parameters.

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Automatically parallelized on tuple level.


Region to be partitioned.

Partitioned (output_object) region(-array) β†’object

Partitioned Rectangle Multiplication

Partitioned region.

Width of the individual rectangles.

Height of the individual rectangles.


partition_rectangle returns 2 (H_MSG_TRUE) if all parameters arecorrect. The behavior in case of empty input (no regions given) canbe set via set_system('no_object_result',<Result>),the behavior in case of an empty input region viaset_system('empty_region_result',<Result>),and the behavior in case of an empty result region viaset_system('store_empty_region',<'true'/'false'>).If necessary, an exception is raised.


Possible Predecessors

threshold, connection


See also

intersection, smallest_rectangle1, shape_trans, clip_region


Rows and columns second grade


HALCON Operator Reference Copyright Β© 1996-2019 MVTec Software GmbH