# Smallest square that can pack thin digits

If we draw the digits 0 to 9, segmented into squares, across a rectangle of 2x5 (except the 1) they use up 81 total squares.

Is it possible to pack them all into a 9x9 grid.

What is the smallest n by n grid that can pack them all?

Reflection and rotation are allowed. Update

The above picture is a grid 9x11 and has 18 gaps.

After the answer below in a grid of size 9x10 leaving 9 gaps. I've discovered a solution in a grid of 8x11 with only 7 gaps Is 8x11 smallest size rectangle with the fewest gaps?

• do they need to be listed in any particular order? Feb 6 at 14:10
• Not at all. Rotations and mirroring is also allowed
– Maff
Feb 6 at 15:25
• No smaller rectangles than 8x11 are possible. The only candidates are 7x12, 6x14, 5x17, 4x21, 3x29, and 2x43 but none of them can take all the pieces. Feb 6 at 21:49

The smallest square that can contain the digits is

10x10.
Putting them in a 9x9 square is not possible unfortunately. By hand it does quickly become obvious that not all nooks and crannies of the digits can be filled, I don't know of a simple way to prove it impossible. A computer search quickly exhausts all possibilities.

The pieces do fit in a 10x9 rectangle, even without rotating/mirroring any pieces. For example: The 7 is sandwiched between the 2 and 4, but all the other pieces can be fairly freely permuted.

I believe I can prove that 9x9 is

Impossible

The structure of this proof is:

I will place the 3 without loss of generality, then prove that no set of figures can fill both of its gaps.

Argument to follow:

$$1$$. Place the 3 anywhere.
$$2$$. Rotate the grid so that the 3 is oriented like a numeral 3.
$$3$$. If the 3 is in the top two rows, flip the grid vertically. (The center of the 3 is now not above the center of the grid)
$$4$$. Observe that if 2, 5, 6, or 9 are used to fill the bottom gap, they must either cover the top gap (disallowed) or 3 spaces below the 3 (which would be out of bounds, by line $$3$$).
$$5$$. This means that the bottom gap must be filled by 1, 4, or 7, which must be oriented horizontally.
$$6$$. Now attempt to fill the top gap with any available numeral. Observe that it creates a new gap to the right of the middle of the 3, which is flush with the numeral from step $$5$$.
$$7$$. This new gap also can only be filled by 1, 4, or 7.
$$8$$. Now consider the space below the numeral from step $$5$$. This space can only be filled by the numeral 4, because any other option would leave an un-fillable space under the 3.
$$9$$. The 1, 4, and 7 are now all spoken for (steps $$5$$, $$7$$ and $$8$$). The upper gap of the 3 must be filled by 2, 5, 6, or 9. There is now a 3x1 gap above the 3's long vertical line.
$$10$$. Observe that no remaining numeral can fit in this gap when oriented vertically.
$$11$$. Observe that if any remaining numeral is placed horizontally in the top of the gap, it creates a 1x1 gap with a 1x2 filled space below it, and no remaining numeral could fill that space.
$$12$$. Observe that if any remaining numeral is placed horizontally in the bottom of the gap, no remaining numeral can be placed above it.

Therefore: There is no possible position of the 3 in a packed 9x9 square.