GenerateRandomSearch

Pentomino Tiling Puzzle Generator

There are exactly twelve shapes you can make from five squares joined edge to edge, and they are named after the letters they roughly resemble: F, I, L, N, P, T, U, V, W, X, Y and Z. Together they cover sixty squares, which is why the boards here are sixty squares — a 6 by 10, 5 by 12 or 4 by 15 rectangle, or an 8 by 8 square with its middle four squares taken out. The puzzle is to fit all twelve on, each one used once, turned or flipped however you like, with nothing overlapping and nothing left uncovered. Two or three pieces are usually already drawn in, and they are not a hint in the loose sense: they are chosen so that from where they sit there is exactly one way the remaining nine or ten can go.

What this generator does

Draws a complete tiling of the board at random — all twelve pentominoes, each turned and placed so that every square is covered exactly once — and then takes pieces away one at a time, in a random order, keeping each removal only while what is left can still be finished in exactly one way. That is checked afresh after every removal by a search that sees only the pieces still on the board and knows nothing about the tiling they were cut from. Thinning usually goes a long way: across the four boards the finished puzzle typically shows just one, two or three of the twelve.

How to use this tool

  1. Choose a board, then print or copy it.
  2. Note which pieces are already drawn in — those are fixed.
  3. Fit each of the remaining pentominoes on, turning or flipping them as you need.
  4. Every square has to end up under exactly one piece, and every piece used exactly once.
  5. Show the answer to check the finished board.

Understanding the controls

Board
Three rectangles of sixty squares — 6 by 10, 5 by 12, 4 by 15 — and an 8 by 8 square with the middle four squares removed, which is also sixty. Narrower boards are harder, because a long thin strip gives each piece fewer places to sit.
Seed (optional)
Type anything to rebuild the same puzzle later, which is how you reprint a page you have lost. The seed makes the puzzle repeatable; it carries no cryptographic strength and is not a secret.

Common use cases

  • A dissection puzzle with a single answer, rather than the usual open 'find any tiling'
  • Practice with rotations and reflections — most pentominoes have eight orientations, and three of them have fewer
  • A printable page for a puzzle club, a maths classroom or a wet afternoon
  • Reprinting the identical board later from its seed

How this generator works

The search always fills the lowest empty square on the board, trying each piece that could cover it, which is what makes every tiling reachable once and only once. Two things stop that taking longer than anyone would wait. The covered squares are carried as a pair of whole numbers with one bit per square, so testing whether a piece collides with what is already down is a couple of arithmetic steps rather than a loop. And after every piece goes down, the empty squares left are split into connected regions and each region's size is checked against five: a pentomino covers five squares, so a region of seven or thirteen can never be filled no matter what follows, and the whole branch is abandoned there instead of being found out forty pieces later. The two together took the slowest of ten seeded puzzles on the 4 by 15 board — the worst of the four — from 9,399 milliseconds down to 1,095. The strongest evidence that all of this is right is not a self-check: the number of ways each board can be tiled is a known quantity, worked out when these puzzles were first studied, and counting them here gives 2,339 for the 6 by 10, 1,010 for the 5 by 12, 368 for the 4 by 15 and 65 for the 8 by 8 with the hole — the published figures, to the unit, on all four.

Randomness and fairness

Which piece is tried first at each square while the full tiling is drawn, and the order pieces are then tested for removal, both come from your browser's cryptographic random source. Giving a seed replaces that source with a repeatable one, so the same puzzle can be printed again; the seed is for reproducibility, not cryptographic strength.

For how randomness is produced across the whole site, see how Generate Random works.

Limitations and good to know

  • The boards are fixed at sixty squares, because twelve pentominoes cover sixty squares and every one of them is used. A board of any other size would mean leaving pieces out or repeating them, which is a different puzzle.
  • Difficulty is not graded. A puzzle showing one piece is not reliably harder than one showing three: how much the given pieces pin down depends far more on where they sit than on how many there are.
  • The 4 by 15 board has only 368 tilings and the 8 by 8 with a hole only 65, so those two will repeat themselves much sooner than the 6 by 10, which has 2,339.
  • There is nothing to fill in on screen. The board is drawn to be printed or copied and worked on with pencil and paper.

Privacy and your data

The tiling is drawn, thinned and checked for a single answer entirely in your browser. Nothing you type as a seed, and no puzzle made from it, leaves the device.

Frequently asked questions

Why are there only twelve pentominoes?
Because that is how many distinct shapes five squares make when joined edge to edge, once you treat a shape and its rotations and mirror images as the same shape. Count them any other way and you get different numbers — 18 if mirror images are counted separately, 63 if rotations are too — but the twelve lettered pieces are the set everyone means.
How can two or three pieces be enough to force a single answer?
Because the constraint is extremely tight: sixty squares, twelve pieces, no gaps and no overlaps leaves very little slack anywhere on the board. A single piece in the wrong place strands a pocket of three or seven squares that nothing can fill. Even so, whether a particular pair is enough is not something to assume — every puzzle here has it checked, by finishing the board every way it can be finished and confirming there was only one.
Is this the same as fitting tetrominoes into rooms?
No. This site's region-tetromino puzzle shades one four-square piece inside each marked room and leaves most of the grid alone. Here there are no rooms, nothing is left over, and the twelve pieces are all different from each other and each used exactly once — the question is a dissection of the whole board rather than a shading of part of it.
Which pentominoes are hardest to place?
X and I are the awkward ones, for opposite reasons. X — the plus sign — looks the same however you turn or flip it, so it has exactly one orientation and the only freedom left is where to put it. I is five in a row, which has two orientations and needs a clear run of five squares, so it usually ends up against an edge. T, U, V, W and Z have four orientations each; F, L, N, P and Y have all eight.