---
title: 'Polyomino Packing: Theory & Algorithms'
url: https://www.emergentmind.com/topics/polyomino-packing
type: topic
---

# Polyomino Packing: Theory & Algorithms

Polyomino packing is the study of placing polyominoes—finite unions of unit grid cells—inside a region or across the plane subject to non-overlap, containment, coverage, or optimization constraints. Depending on the model, copies may be translated, rotated, or reflected; the objective may be exact tiling, maximum-cardinality or maximum-area packing, minimum-cardinality covering, maximality under further placement, or online competitive performance. The subject includes highly structured plane-tiling problems, finite-board constraint models, compactly represented orthogonal containers, local reconfiguration, and extremal covering problems.

## 1. Definitions and problem variants

A polyomino is a finite union of unit squares joined edge-to-edge. In the boundary-word model, a simply connected polyomino is represented by a circular word over $\{u,d,l,r\}$, recording unit upward, downward, leftward, and rightward boundary steps. If the boundary has $n$ unit edges, the polyomino is an $n$-omino in the terminology of “An Optimal Algorithm for Tiling the Plane with a Translated Polyomino” [1504.07883]. Polyominoes may also be represented explicitly by their cells, by boundary cells, or compactly by polygon corners with integer coordinates encoded in binary [2011.10983].

A packing is a collection of pairwise interior-disjoint copies contained in a container. Boundary contact is generally permitted. A tiling is a packing whose union equals the container or, for plane tilings, the whole plane. Thus tiling imposes both non-overlap and exact coverage:

$$
\text{every cell is covered exactly once}.
$$

A finite packing may instead leave cells uncovered. In an exact-cover formulation, a binary variable $x_p$ represents a placement $p$ and the cell constraints are

$$
\sum_{\text{placements covering cell }c} x_p=1
$$

for exact tiling, or

$$
\sum_{\text{placements covering cell }c} x_p\leq 1
$$

for packing.

The allowed transformations define distinct problem classes. A fixed packing permits translations only. A free packing permits translations and rotations by multiples of $90^\circ$, but not reflections, in the clumsy-packing model [2203.06675]. Other models permit rotations and reflections, as in the Patchwork constraint model, which uses up to eight orientations after removing equivalent transformations of symmetric pieces [2001.04233]. Plane tiling by translated copies is more restrictive: rotations and reflections are forbidden, and every copy has the same orientation [1504.07883].

Important objective classes include:

- **Maximum packing**: maximize the number of pieces or occupied cells.
- **Exact tiling**: cover the entire target without overlap or gaps.
- **Maximal packing**: no additional allowed copy can be inserted.
- **Clumsy packing**: minimize the number of pieces among maximal packings.
- **Covering**: cover the target while allowing overlap, usually with as few pieces as possible.
- **Online packing**: place objects irrevocably as they arrive without knowledge of future objects.

These objectives are not interchangeable. A maximal packing need not have maximum area, a covering may permit overlap, and a tiling is a perfect packing rather than merely a maximal one.

## 2. Plane tilings by a single polyomino

The most strongly characterized setting uses one simply connected polyomino and translated copies to tile the entire plane. A plane tiling is an infinite set $\mathscr T$ of copies such that every cell belongs to exactly one copy. A regular, or isohedral, translated tiling has copy origins of the form

$$
\vec o+\{i\vec u+j\vec v:i,j\in\mathbb Z\},
$$

so the translation vectors form a rank-two lattice.

For this model, the Beauquier–Nivat criterion gives a complete boundary characterization. If $W$ is the circular boundary word, then the polyomino tiles the plane by translations if and only if

$$
W=ABC\overline A\,\overline B\,\overline C,
$$

where $\overline{\phantom{x}}$ is the direction complement

$$
\overline u=d,\qquad \overline d=u,\qquad \overline l=r,\qquad \overline r=l.
$$

Such a factorization is called a BN factorization. The factors encode the matching boundary contacts between a central tile and neighboring translated copies. The equivalences are

$$
\text{plane tiling}
\Longleftrightarrow
\text{regular tiling}
\Longleftrightarrow
\text{BN factorization}.
$$

The translation-only theory therefore has an exceptional reduction: existence of any plane tiling implies existence of a regular one. A BN factorization may contain factors of length zero, but no BN factorization has more than two zero-length factors [1504.07883].

The same result can be expressed geometrically through local contacts. If three copies occur clockwise around a common point, their neighboring boundary factors generate translation vectors

$$
\vec u,\ \vec v,\ \vec v-\vec u,\ -\vec u,\ -\vec v,\ \vec u-\vec v,
$$

which surround the central copy and generate the regular tiling.

The linear-time algorithm of “An Optimal Algorithm for Tiling the Plane with a Translated Polyomino” [1504.07883] takes the boundary length $n$ as input and has two outputs: whether the polyomino tiles the plane by translations and all corresponding regular tilings represented by BN factorizations. It first computes all admissible factors, then enumerates BN factorizations.

An admissible factor is a maximal matched boundary factor whose material immediately outside the two occurrences does not backtrack. Every factor in a BN factorization is admissible. There are at most $2n$ candidate centers, consisting of one-letter and two-letter centers. Longest-common-extension preprocessing on doubled circular words, including $WW$ and $\overline W\,\overline W$, allows each center to be processed in constant time after linear preprocessing.

For a fixed admissible factor $A$, the algorithm writes

$$
W=A\,Y\,\overline A\,Z,\qquad |Y|=|Z|,
$$

and searches admissible prefix and suffix factors $B$ and $C$ satisfying

$$
|A|+|B|+|C|=\frac{|W|}{2}.
$$

A Galil–Seiferas-style extremal lemma implies that valid choices form intervals in length-sorted lists. Two monotone “two-finger” scans therefore avoid testing all pairs of candidates. Duplicate cyclic factorizations are removed by a canonical reporting rule.

The total running time is

$$
O(n),
$$

which is optimal in the boundary-word model. The number of regular tilings is $O(n)$, and this bound is asymptotically tight. The family

$$
W=ur^i dl^i,\qquad i\geq1,
$$

has

$$
\frac{|W|}{2}-1
$$

regular tilings, yielding a $\Theta(n)$ worst-case bound on the number of regular tilings.

## 3. Isohedral tilings with rotations and reflections

Isohedral tiling generalizes translation-only tiling by allowing congruent copies related through symmetries of the entire tiling. A monohedral tiling has congruent tiles; it is isohedral when the symmetry group acts transitively on the tiles. The copies may involve translations, half-turns, quarter-turns, reflections, and combinations of half-turns and reflections. For polyominoes, rotations by $60^\circ$ and $120^\circ$ are excluded by the relevant boundary-angle restrictions [1507.02762].

“A Quasilinear-Time Algorithm for Tiling the Plane Isohedrally with a Polyomino” [1507.02762] decides whether a polyomino with $n$ boundary edges admits an isohedral plane tiling in

$$
O(n\log^2 n)
$$

time. The result improves the $O(n^{18})$ algorithm of Keating and Vince and generalizes the optimal $O(n)$ translation-only algorithms.

The algorithm uses the Heesch–Kienzle classification and tests seven polyomino-compatible boundary forms, associated with isohedral types IH $1,4,28,2,3,5,6$:

1. **Translation**:
   $$
   W=ABC\,\overline A\,\overline B\,\overline C.
   $$

2. **Half-turn**:
   $$
   W=ABC\,\overline A\,DE,
   $$
   where $B,C,D,E$ are palindromes.

3. **Quarter-turn**:
   $$
   W=ABC,
   $$
   where $A$ is a palindrome and $B,C$ are $90^\circ$-dromes.

4. **Type-1 reflection**:
   $$
   W=ABf_\Theta(B)\,\overline A\,Cf_\Phi(C).
   $$

5. **Type-2 reflection**:
   $$
   W=ABC\,\overline A\,f_\Theta(C)f_\Theta(B).
   $$

6. **Type-1 half-turn-reflection**:
   $$
   W=ABC\,\overline A\,Df_\Theta(D),
   $$
   where $B,C$ are palindromes.

7. **Type-2 half-turn-reflection**:
   $$
   W=ABCD\,f_\Theta(B)f_\Phi(D),
   $$
   where $A,C$ are palindromes and $\Theta-\Phi=\pm90^\circ$.

The translation case is solvable in $O(n)$ time. The half-turn case requires $O(n\log^2 n)$; the quarter-turn and type-2 reflection cases require $O(n)$; and type-1 reflection, type-1 half-turn-reflection, and type-2 half-turn-reflection require $O(n\log n)$. The half-turn case therefore determines the overall bound.

Its main machinery includes prefix and suffix palindrome factorizations, primitive repeated blocks, longest-common-extension queries, the Fine–Wilf theorem, palindrome pumping, and extremal-double-palindrome lemmas. Prefix-palindrome factorizations contain only $O(\log n)$ compressed repeated blocks, permitting batch processing of candidates.

The theorem concerns isohedral tilings, not arbitrary plane tilings. The existence of a general algorithm for deciding whether an arbitrary polyomino tiles the plane remains open. The paper also introduces $k$-isohedral tilings, in which the tiles split into $k$ symmetry orbits; these are not characterized by a single boundary factorization, and efficient recognition remains open [1507.02762].

## 4. Finite-board packing and constraint programming

Finite-board packing differs structurally from plane tiling because the container is bounded, future pieces may be unknown, and exact coverage may not be required. The Patchwork model provides a constraint-programming formulation for incremental packing on a $9\times9$ board with a selectable subset of 33 polyomino patches [2001.04233].

Each patch may be translated and rotated, and the implementation permits reflections, producing up to eight transformations. A patch may remain unused. For each patch $p$, binary variables $B_p$ encode its occupied cells in row-major order:

$$
B_p[i]\in\{0,1\}.
$$

The board variables encode the patch occupying each cell, `empty`, or an auxiliary `end` state. A dummy column fixed to zero separates rows and prevents a regular-language expression from wrapping from one row into the next.

Legal transformed placements are represented by finite automata and imposed through a global `regular` constraint. Explicit transformation variables $S_{ps}$ identify the selected orientation, while usage variables control whether the patch is placed. A fully reified regular constraint represents either a genuine placement or the unused case, allowing propagation to force $U_p=0$ when no legal placement remains.

The model also introduces row and column usage variables:

$$
C_{pc}^{\Sigma}=\sum_{r=0}^{8}B_p[r,c],
\qquad
R_{pr}^{\Sigma}=\sum_{c=0}^{8}B_p[r,c].
$$

The total area satisfies

$$
\sum_{r=0}^{8}R_{pr}^{\Sigma}
=
\sum_{c=0}^{8}C_{pc}^{\Sigma}
=
S_pU_p,
$$

and board non-overlap is enforced by

$$
\sum_pB_p[r,c]\leq1.
$$

The model separates placement policies from placement evaluations. Policies generate legal alternatives, while evaluations select among them. Policies include Bottom-Left, BL/LB, Pareto Bottom-Left, In Order, Size, AFC, Activity, and CHB. The `All` policy enumerates every legal placement.

The principal evaluation is propagation guided global regret (PGGR). Given a candidate placement, the model clones the current state, imposes the placement, propagates, and measures global domain loss:

$$
\operatorname{pggr}(B,B',p)
=
\sum_{i=0}^{8}\sum_{j=0}^{8}
\begin{cases}
0,& |B_{ij}|=1,\\
0,& B'_{ij}=p,\\
|B_{ij}|-|B'_{ij}|,&\text{otherwise}.
\end{cases}
$$

The selected placement minimizes this quantity. PGGR treats propagation-induced loss as a negative signal: a placement is preferred when it removes fewer future placement possibilities. It differs from impact-based search because it performs current one-step look-ahead rather than relying on historical propagation statistics.

In experiments using 1000 random patch orders, the strongest reported packing result was obtained by `All + Every + Regret`, with mean area $78.40$, mean streak $16.56$, mean placement time $1464.55$ milliseconds, and mean alternatives $59.48$. `In Order + Some + First` was much faster, with mean placement time $25.37$ milliseconds and mean area $76.51$. `All + ReverseRegret` obtained mean area $62.73$ and mean streak $9.49$. The results indicate a pronounced quality–time tradeoff: broader alternative generation improves PGGR’s choices but substantially increases propagation cost.

The constraint model is exact, but the policies and evaluations are heuristic. They do not guarantee maximum eventual area or a feasible completion sequence. The `All` policy provides complete enumeration of current legal placements; PGGR only chooses among the generated alternatives.

## 5. Polynomial-time special cases and compact containers

The complexity of packing depends strongly on the piece, container representation, and objective. “Tiling with Squares and Packing Dominos in Polynomial Time” [2011.10983] considers a polyomino container represented compactly by its polygon corners, with integer coordinates encoded in binary. If the container has $n$ corners, its area and perimeter may be exponentially larger than $n$, so algorithms polynomial in area are only pseudo-polynomial.

For fixed $k$, tiling the container with $k\times k$ squares can be decided in

$$
O(n\log n)
$$

time. A valid tiling, if it exists, is unique: at a convex corner of the container, at most one $k\times k$ square can cover the corner. The algorithm uses a vertical sweep line and maintains interior-disjoint intervals in each cross-section. Each interval stores a residue in $\{0,\ldots,k-1\}$ indicating the phase of the square grid. Neighboring intervals must satisfy a residue invariant, and every surviving interval must have length divisible by $k$ when the sweep advances. Balanced search trees support the interval updates.

Domino packing has a different structure. For a container $P$, construct the cell-adjacency graph $G(P)$, whose vertices are cells and whose edges join side-adjacent cells. A domino corresponds to an edge, so

$$
\text{maximum domino packing}
=
\text{maximum matching size of }G(P).
$$

Although $G(P)$ may have exponentially many vertices under binary corner encoding, the paper constructs a reduced planar bipartite graph $G^*$ with $O(n^3)$ vertices and edges while preserving the matching deficiency.

The reduction includes:

1. extracting a consistent-parity region;
2. carving channels to remove holes;
3. removing a deep interior $Q$ that can be completely tiled in some maximum packing;
4. identifying long rectangular pipes;
5. contracting the central paths of those pipes;
6. computing a maximum matching in $G^*$.

The resulting running time is

$$
O(n^3\operatorname{polylog} n).
$$

The optimum equals $|M|+(N_0-N_2)/2$, where $M$ is a maximum matching of $G^*$, $N_0=\operatorname{area}(P)$, and $N_2=|V(G^*)|$. Domino tilability is decided by testing

$$
\max|\mathcal D|=\frac{\operatorname{area}(P)}2.
$$

This result contrasts with maximum packing of $2\times2$ squares, which is NP-hard, even though tiling by fixed-size squares is solvable in $O(n\log n)$ time. The difference arises from the forced-corner structure of exact square tilings versus the matching structure of domino packing.

## 6. Maximal, clumsy, and covering variants

A maximal packing is a valid non-overlapping arrangement to which no further congruent copy can be added. The clumsy packing number minimizes the number of pieces among maximal packings:

$$
\operatorname{cp}(P)
=
\min\{|\mathcal P|:\mathcal P\text{ is a maximal packing of }P\}.
$$

This objective deliberately favors sparse, hole-producing arrangements rather than maximum coverage. “Clumsy Packing of Polyominoes in Finite Space” [2203.06675] studies square $n\times n$ boards, usually with $n=|P|$, for rectangles, $L$-, $T$-, and plus-polyominoes.

For fixed-orientation rectangles $R_{a,b}$ with $a,b\ge2$,

$$
\operatorname{cp}_{\mathrm{fix}}(R_{a,b})
=
\left\lceil\frac{ab-a+1}{2a-1}\right\rceil
\left\lceil\frac{ab-b+1}{2b-1}\right\rceil.
$$

For straight pieces, the fixed and free clumsy numbers equal the board side length:

$$
\operatorname{cp}_{\mathrm{fix}}(SV_n)
=
\operatorname{cp}_{\mathrm{free}}(SV_n)
=
\operatorname{cp}_{\mathrm{fix}}(SH_n)
=
\operatorname{cp}_{\mathrm{free}}(SH_n)
=
n.
$$

For symmetric $L$-polyominoes,

$$
\operatorname{cp}_{\mathrm{fix}}(L_{a,a})=1,
\qquad
\operatorname{cp}_{\mathrm{free}}(L_{a,a})=2.
$$

For arbitrary $L_{a,b}$,

$$
2\leq\operatorname{cp}_{\mathrm{free}}(L_{a,b})\leq5.
$$

For fixed $T$-polyominoes,

$$
\operatorname{cp}_{\mathrm{fix}}(T_{a,b})
=
\begin{cases}
\left\lceil\dfrac{2a+1}{2b+1}\right\rceil,&b\leq2a,\\[1.2ex]
\left\lceil\dfrac{b+1}{2a+1}\right\rceil,&b>2a.
\end{cases}
$$

For symmetric free $T$-polyominoes,

$$
\operatorname{cp}_{\mathrm{free}}(T_{a,a})=2,
$$

while in general

$$
2\leq\operatorname{cp}_{\mathrm{free}}(T_{a,b})\leq4.
$$

For plus polyominoes,

$$
\operatorname{cp}_{\mathrm{fix}}(P_a)
=
\operatorname{cp}_{\mathrm{free}}(P_a)
=
1.
$$

The proofs use anchor counting, separated-strip constructions, boundary trapping, rotational blocking, and parity analysis. Many general free cases remain unresolved, including the exact free rectangular value and the parameter ranges determining whether free $L$- and $T$-polyominoes have clumsy numbers $2$, $3$, $4$, or $5$.

A distinct extremal problem concerns covering rectangles by monotonous polyominoes. A monotonous polyomino consists of the unit cells met by the graph of a monotone continuous function $f:[a,b]\to\mathbb R$ satisfying

$$
f(k)\notin\mathbb Z
\qquad\text{for integer }k.
$$

Overlap is allowed, so this is a covering problem rather than a packing or tiling problem. The least number of monotonous polyominoes covering an $m\times n$ rectangle is

$$
p(m,n)
=
\left\lceil
\frac23
\left(
m+n-\sqrt{m^2+n^2-mn}
\right)
\right\rceil.
$$

If a covering uses $i$ increasing and $d$ decreasing tiles, the maximum width coverable at height $n$ is

$$
m(n,i,d)
=
i+d+
\left\lfloor
\frac{id}{n-(i+d)}
\right\rfloor,
$$

when $n\ge i+d$. The proof uses full-domain extension, uncrossing of increasing tiles, endpoint ordering, forced crossings between increasing and decreasing tiles, and recursive staircase constructions. The crossing argument exploits overlap and therefore does not transfer directly to non-overlapping packing.

## 7. Reconfiguration, online packing, and complexity boundaries

Packing and tiling can also be studied through local reconfiguration. A $t$-omino tiling of a grid is a partition into connected $t$-cell sets. Two tilings are adjacent when they differ by repartitioning the union of exactly two tiles. A tiling is locked if it is an isolated vertex of this metagraph while at least one other tiling exists [2307.15996].

For dominoes, the metagraph of rectangular-grid tilings is connected, so no nondegenerate locked domino tiling exists. For $3$-ominoes, locked tilings occur on $6\times6$ grids and on arbitrarily large grids through rigid block constructions. Locked $4$-omino tilings exist on square grids of dimensions

$$
26+16n
$$

for every positive integer $n$. On periodic square grids, locked $t$-omino tilings exist for arbitrarily large $t$; the construction gives

$$
t=2n^2+2n+1
$$

on a torus with side length $2t$. These configurations are obstructions to two-tile recombination and are relevant to ReCom Markov chains for redistricting.

Online packing creates another sharp boundary. “Online Packing of Orthogonal Polygons” [2603.22098] studies continuous orthogonal polygons under translations into unit-square bins. Orthogonal $6$-gons correspond geometrically to L-shapes, while orthogonally convex orthogonal $8$-gons include Z-shapes. The results are not theorems about discrete polyominoes, but they indicate how small increases in shape complexity can change online packability.

For general L-shapes, every online algorithm has asymptotic competitive ratio

$$
\Omega\!\left(\frac{n}{\log n}\right)
$$

for minimizing the number of unit bins. Constant-competitive algorithms exist when all L-shapes are small or all are symmetric. For L-shapes, the paper also gives an $O(1)$ algorithm for perimeter packing and an $O(\sqrt n)$ algorithm for bounding-box area minimization.

For orthogonally convex orthogonal $8$-gons, no online algorithm has asymptotic competitive ratio better than $n$. The trivial strategy of assigning each object its own bin is therefore optimal. Degenerate zero-thickness L-skeletons admit an absolute competitive ratio of $2$, whereas Z-skeletons have an $n$ lower bound.

These continuous results do not automatically transfer to polyominoes. A discrete adaptation would need scaling to integer coordinates, preservation of strict separation inequalities, consistent treatment of boundary contact, and a positive minimum thickness. Nevertheless, they demonstrate that constant boundary complexity does not guarantee constant-competitive online packing.

Across the different models, the main complexity boundaries are determined by structural restrictions:

- **Single translated tile in the plane**: BN factorizations yield an optimal $O(n)$ algorithm.
- **Isohedral plane tiling**: seven boundary symmetry types yield an $O(n\log^2 n)$ algorithm.
- **Compact orthogonal containers with squares or dominoes**: specialized sweep-line and matching methods give polynomial-time algorithms.
- **Finite-board incremental packing**: regular constraints provide exact legality, while placement selection remains heuristic.
- **Maximal and clumsy packing**: boundary effects dominate and many general cases remain open.
- **Covering with monotone polyominoes**: an exact formula is available because monotonicity enables uncrossing and endpoint counting.
- **Local reconfiguration**: locked tilings demonstrate that exact coverage does not imply connectivity under two-tile moves.
- **Online packing**: even orthogonal shapes with few sides can exhibit sublinear or maximal competitive lower bounds.

Polyomino packing is therefore not a single complexity class or canonical optimization problem. Its behavior depends on whether the target is finite or infinite, whether coverage must be exact, whether copies are congruent under translations or general symmetries, whether the input is explicit or compact, whether the objective is maximum, minimum, or maximal, and whether placement is offline or online. The most successful algorithms exploit additional structure—boundary words, lattice symmetry, parity, matching, monotonicity, regular languages, or propagation—while the absence of such structure leads to unresolved, NP-hard, or adversarially inapproximable variants.

Source: https://www.emergentmind.com/topics/polyomino-packing