Sunday, March 7, 2021

Polyominoes: How Thin Can We Go?

What is the narrowest rectangle (or vaguely rectangular shape) that can be constructed with each set of polyominoes?

Lets get the easy cases out of the way first. For pentominoes, there are 4 possible rectangles that can be made, the narrowest of which is 3x20:

Fig. 1: One of two ways of doing this (excluding rotations and reflections).
See if you can find the other way. Go on. I double dare you.

The tetrominoes don't do any rectangles due to parity issues, but if you add the triominoes (and optionally domino) into the mix you get a set that can fit nicely within a 2xn rectangle:

Fig. 2: Apparently there are 84 solutions to this excluding rotations and reflections.

 For hexominoes, each individual piece can fit within a 3xn space but we are able to rule 3xn rectangles out for the entire set together - see this older post for the grisly deets. 4xn however is totally possible as illustrated below:

That's all well and good, but what about heptominoes?

An obvious starting place is the well-known 7x107 rectangle which can be made in a variety of ways using the 107 non-holey heptominoes. There's one a little way down this really old post which I found, but I was hardly the first to do so. A few weeks ago I went one better, building the following 6x127 which ended up being the inspiration for this blog post:

(Click for full size)

Thin rectangles are a fair bit harder to solve (manually at least) than wider, more squarish rectangles of the same area. I'm guessing it's just to do with the higher perimeter-to-area ratio. Every extra square bordered by perimeter is a further restriction on the heptominoes within the shape (as are things like holes). And once you get thin enough it begins to restrict weird things, like the orientation of polyominoes within the shape. A heptomino that spans 6 cells in one direction will touch both the top and the bottom side of the 6x127 rectangle for example, and if placing that shape partitions the rectangle into two areas whose areas aren't a multiple of 7 then you've just rendered the lot unsolvable.

A 5 square high rectangle with a mixture of the 1- through 7-ominoes is possible, as demonstrated in the picture below, solver unknown.

I don't know where I got this image from or who to credit for the solution. If anyone knows anything about its mysterious origins please stick it in a comment below.

Here's a neater version with the polyominoes coloured by size:

(Click to embiggen)
 

I also found the following 5x152 pure heptominoes solution using Aad van de Wetering's FlatPoly2 software.

Click for larger. It was either this or insert it vertically and make this post a mile-long scrolling marathon.

The first three quarters or so were placed by hand, and then the final 26 were input into the solver. For whatever reason (I think it's just my computer) the software takes aaages to find anything if you just give it the full shape and all the heptominoes - in fact I've never actually been patient enough to let it finish - so the only way I can find solutions is to solve manually until there's about 20 (or fewer) pieces then let it solve from there.

And height 5 might be the best we can do.

In a similar way to what we did for hexominoes, we can rule out shapes of width 3 and lower - there's a V-shaped heptomino that reaches out 4 squares in two directions, which isn't going to fit no matter how you place it. And for 4xn we run into issues too. According to the analysis that Peter Esser's 'mops' solver does, the set of heptominoes can cover a total of 373 border squares. And a 4 unit high rectangle has to be at least 190 units long for the area to be >756 (allowing for holes for the harbour heptomino.) This means we have 380 border squares for the two long edges alone (and a few more for the little short edges) which the heptominoes just can't manage. So 5 might just be as thin as we can go.

No comments:

Post a Comment