Algorithm Search⌘K

Definitioncore

Slicing floorplan

Also called slicing structure, guillotine floorplan.

A floorplan obtained by cutting the chip rectangle again and again by horizontal or vertical lines, represented by a slicing tree.

A slicing floorplan is a division of the chip rectangle into rectangular rooms that can be made by straight cuts alone: cut the rectangle from one side to the opposite side by a vertical or a horizontal line, then cut each part in the same way, until each part holds one block. It is the guillotine structure of cutting stock, used for floorplanning in chip design, and it is stored as a slicing tree, a binary tree whose inner nodes are the cuts and whose leaves are the blocks. Its value is that the tree can be optimized bottom up: shape functions and Stockmeyer's algorithm find the best shapes of all blocks in polynomial time, while for general floorplans the same problem is NP-complete. The cost is that some packings, such as the pinwheel of five blocks, are not slicing.

Definition

Dissection. Let RR be an axis-parallel rectangle. A dissection of RR into nn rooms is a set of nn axis-parallel rectangles with disjoint interiors whose union is RR.

Slicing floorplan. A dissection of RR is slicing if n=1n = 1, or if some vertical or horizontal line segment from one side of RR to the opposite side, a cut, crosses no room and splits RR into two rectangles R1R_1 and R2R_2 such that the rooms inside R1R_1 and the rooms inside R2R_2 are both slicing. In a floorplan, each room holds one block, and the block fits in its room.

Slicing tree. A slicing tree is a full binary tree: each inner node has two children. The leaves are the rooms. Each inner node is labeled VV or HH. A node labeled VV stands for a vertical cut, with the left child for the part to the left of the cut and the right child for the part to the right. A node labeled HH stands for a horizontal cut, with the left child for the part below and the right child for the part above. This is the convention of the normalized Polish expression page, whose words are the postorders of these trees. The tree of a slicing floorplan follows the cuts in the definition, and conversely a tree with given block sizes gives a floorplan by the bottom-up rule: a VV node has width Wa+WbW_a + W_b and height max⁡(Ha,Hb)\max(H_a, H_b), and an HH node has width max⁡(Wa,Wb)\max(W_a, W_b) and height Ha+HbH_a + H_b.

Same floorplan, several trees. Three side-by-side rooms aa, bb, cc have two trees, (a b V) c V(a\,b\,V)\,c\,V and a (b c V) Va\,(b\,c\,V)\,V, because the order of two parallel cuts is not fixed. A slicing tree is skewed if no node has a right child with the same label. Take slicing floorplans up to sliding of segments and with no point where four rooms meet. Then each slicing floorplan has exactly one skewed tree, and each skewed tree gives exactly one such floorplan (Wong and Liu 1986). Collapse each maximal chain of equal labels into one node: the result is an ordered tree in which each inner node has at least two children, and the labels alternate between VV and HH from a node to its children. So the label of the root fixes all the others.

Counting. Let t(n)t(n) be the number of ordered trees with nn leaves in which no node has exactly one child. A leaf gives t(1)=1t(1) = 1, and a tree with n≥2n \ge 2 leaves is a root with an ordered list of k≥2k \ge 2 subtrees whose leaf counts add up to nn. So t(n)t(n) is the sum, over all ordered ways n=n1+⋯+nkn = n_1 + \cdots + n_k with k≥2k \ge 2 and all nj≥1n_j \ge 1, of t(n1)⋯t(nk)t(n_1) \cdots t(n_k). This gives 1,1,3,11,45,197,9031, 1, 3, 11, 45, 197, 903 for n=1,…,7n = 1, \ldots, 7. By the collapse above, the number of slicing floorplans with nn unlabeled rooms is 11 for n=1n = 1 and 2 t(n)2\,t(n) for n≥2n \ge 2, the factor 22 for the label of the root:

rooms nn 1 2 3 4 5 6 7
slicing floorplans 1 2 6 22 90 394 1806
full binary trees with labels, Cn−1 2n−1C_{n-1}\, 2^{n-1} 1 2 8 40 224 1344 8448

The first row is the sequence of large Schröder numbers Sn−1S_{n-1}, as Yao, Chen, Cheng and Graham (2003) state. The second row counts all slicing trees, with Cn−1C_{n-1} the Catalan number of full binary trees with nn leaves; the gap between the rows is the redundancy that normalization removes. With nn different blocks in the rooms, each count is multiplied by n!n!: there are 3!⋅6=363! \cdot 6 = 36 normalized Polish expressions of three blocks and 4!⋅22=5284! \cdot 22 = 528 of four.

Recognition. A dissection is slicing exactly when the recursive search for a cut succeeds. A cut of a part is a maximal segment of the dissection that runs from one side of the part to the other, so a search over the segments of each part decides the question in polynomial time.

Examples and non-examples

Three rooms. The six slicing floorplans of three rooms are three columns, three rows, a vertical cut with the left or the right part cut once more horizontally, and a horizontal cut with the lower or the upper part cut once more vertically. Their skewed trees are V(V(⋅,⋅),⋅)V(V(\cdot,\cdot),\cdot), H(H(⋅,⋅),⋅)H(H(\cdot,\cdot),\cdot), V(H(⋅,⋅),⋅)V(H(\cdot,\cdot),\cdot), V(⋅,H(⋅,⋅))V(\cdot,H(\cdot,\cdot)), H(V(⋅,⋅),⋅)H(V(\cdot,\cdot),\cdot) and H(⋅,V(⋅,⋅))H(\cdot,V(\cdot,\cdot)). The trees V(⋅,V(⋅,⋅))V(\cdot, V(\cdot,\cdot)) and H(⋅,H(⋅,⋅))H(\cdot, H(\cdot,\cdot)) are not skewed: they are the columns and the rows again.

A cross junction is allowed. Cut a square in half vertically, then cut both halves horizontally at the same height. The two horizontal cuts meet the vertical one at one point, where four rooms touch. The dissection is slicing, and it has two skewed trees, V(H(a,b),H(c,d))V(H(a, b), H(c, d)) and H(V(a,c),V(b,d))H(V(a, c), V(b, d)), with aa and bb on the left and aa and cc at the bottom. A mosaic floorplan does not allow such a point. Move the two horizontal pieces apart and the vertical segment stays whole, which gives the first tree. Move the two vertical pieces apart and the horizontal segment stays whole, which gives the second tree. The count 2222 for four rooms counts these two floorplans once each.

Non-example: the pinwheel. Dissect a 3×33 \times 3 square into the rooms [0,1]×[0,2][0, 1] \times [0, 2], [1,3]×[0,1][1, 3] \times [0, 1], [2,3]×[1,3][2, 3] \times [1, 3], [0,2]×[2,3][0, 2] \times [2, 3] and the center [1,2]×[1,2][1, 2] \times [1, 2]. A cut must be a straight segment from one side of the square to the opposite side. The dissection has four inner segments, and each of them ends at the boundary at one end and on another segment at the other end, so none of them is a cut. So the pinwheel is not slicing. Its mirror image is the other non-slicing floorplan with five rooms: there are 92 mosaic floorplans with five rooms (the Baxter number) and 90 slicing ones.

The price of slicing. Take the five blocks of the pinwheel with fixed orientation: two tall blocks 1×21 \times 2, two wide blocks 2×12 \times 1 and one square 1×11 \times 1. The pinwheel packs them into the 3×33 \times 3 square with no empty space. No slicing floorplan does. The width and the height of a slicing floorplan of these blocks are integers, since they are sums and maxima of block sides, so area 99 means a 3×33 \times 3, 1×91 \times 9 or 9×19 \times 1 rectangle with no empty space. The wide blocks do not fit in width 11 and the tall blocks do not fit in height 11. In the 3×33 \times 3 square the first cut makes a 3×13 \times 1 strip and a 3×23 \times 2 part, or the same turned by a quarter turn, which swaps the tall and the wide blocks, so one case is enough. The strip holds only blocks of height 11, so it holds a wide block and the square. The 3×23 \times 2 part must then hold both tall blocks and one wide block. A horizontal cut of it makes strips of height 11, too low for a tall block, and a vertical cut makes a 1×21 \times 2 part and a 2×22 \times 2 part that must hold a tall block and a wide block, which no cut of the 2×22 \times 2 part allows. The best slicing floorplan has area 1010: a tall block at each end of a 5×25 \times 2 rectangle, and between them a 3×23 \times 2 part with a wide block at the bottom and the square and the other wide block above it.

Non-example: a packing with a gap. Blocks placed freely in the chip, with empty space between them, do not form a dissection at all. A floorplan of a B*-tree or a sequence pair is such a packing. It is slicing in the sense of this page only when its blocks can be put into the rooms of a slicing dissection with the same relations.

References

  1. Ralph H. J. M. Otten, Automatic floorplan design, Proceedings of the 19th Design Automation Conference, 261 to 267, 1982, slicing structures, the recursive cuts and their trees
  2. D. F. Wong and C. L. Liu, A new algorithm for floorplan design, Proceedings of the 23rd ACM/IEEE Design Automation Conference, 101 to 107, 1986, slicing trees, skewed slicing trees and their one to one correspondence with slicing floorplans and normalized Polish expressions
  3. Larry Stockmeyer, Optimal orientations of cells in slicing floorplan designs, Information and Control 57(2-3), 91 to 101, 1983, the polynomial orientation algorithm for slicing floorplans, and NP-completeness for general floorplans
  4. Bo Yao, Hongyu Chen, Chung-Kuan Cheng and Ronald L. Graham, Floorplan representations: complexity and connections, ACM Transactions on Design Automation of Electronic Systems 8(1), 55 to 80, 2003, the exact number of slicing floorplans with n rooms
  5. Andrew B. Kahng, Jens Lienig, Igor L. Markov and Jin Hu, VLSI Physical Design, From Graph Partitioning to Timing Closure, second edition, Springer, 2022, Chapter 3, Chip Planning (slicing and non-slicing floorplans, slicing trees; general locator)

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/CD0S40/text.yaml