Showing posts with label pentominoes. Show all posts
Showing posts with label pentominoes. Show all posts

Sunday, December 6, 2020

Squares

This has bound to have been done before, it seems too obvious a thing not to. But rediscovery or not I'm going to write about it at length anyway and nobody can stop me.

Imagine this: squares, right, but made out of polyominoes. Gripping stuff, eh?

Pentominoes

With tetrominoes and below you can't really do a lot, for all the usual reasons. Tetrominoes have got parity imbalance, triominoes and dominoes are just tiny sets you can't do a lot with, and while I suppose you can make a 1x1 square out of the set of monominoes (all one of them) it's not the most interesting thing in the world so we'll jump ahead to where it starts to get interesting.

One set of pentominoes can pack a 5x5 square and a 6x6 square simultaneously, if you don't mind an off-centre hole in the 6x6 to bring its total area down to 35. Shown above is one way of doing this, but there are at least 2 more, not counting rotations and reflections as distinct solution. Sadly there is no combination of squares without holes that the pentominoes can fill, just because 60 can't be partitioned into square numbers divisible by 5.

Hexominoes

This lot are frustrating due to the usual parity constraints but nevertheless we'll give it a go. Square sizes permitted are 6² = 36 and 12² = 144 for solid squares, and 5² = 24+1, 7² = 48+1, 11² = 120+1, 13² = 168+1 if you want to allow a square with one solitary central hole. Which feels like bending the rules but alleviates parity issues somewhat, and will be needed for heptominoes and above where we've got pieces with holes whether we like it or not.

Making 210 with a combination of the above squares is our next problem. Each of the above squares would contain an even number of hexominoes, meaning that no combination of them would ever contain exactly 35 hexominoes. Damn.

One avenue to explore is to allow duplication of one of the hexominoes, bringing the set size up to 36 and total area to 216. This can be broken into squares, the most obvious partition being six 6x6 squares. This is... difficult. I've tried it by hand, I've tried running various software to find a solution, no luck so far. All I know is that for this to work the duplicated hexomino must be one of the ones with 2-4 parity imbalance. And that it's possible to solve six 6x6s for the set of hexominoes plus triominoes. So if solutions do exist, they look to be pretty few and far between.

But there are other ways of making 216 from the above numbers. 6² + 6² + 12² works, as does 7² + 13² with a central hole in each. The duplicated hexomino in each case is shown in a different colour (again, the duplicate must be one of the 11 pieces with unbalanced parity.)

6² + 6² + 12² = 216

 

7² + 13² = 216 + 2

As a general rule, the more squares and the smaller the squares are, the harder it is to find a solution.

5² + 5² + 7² + 11² = 216 + 4

Another fun challenge would be to place the two duplicate pieces in a symmetrical or otherwise aesthetically pleasing way. I've just been letting pure chance dictate which piece is duplicated and where it ends up, i.e. solving the 35 unique pieces and hoping the 6 remaining squares are all joined together. It works but the solutions aren't always the prettiest.

Heptominoes

This is where it starts getting fun. For the first time we've got a real choice of how many squares we can do and what size they are. For unholey squares the sizes possible are 7², 14² and 21² (28² > 757 so we don't need to worry about that) and for squares with a centre hole (which we're gonna need for the harbour heptomino) the available sizes are 13² and 15². Actually, a 6² or 8² would be possible but the hole would be off-centre so I didn't consider these. We can afford to be picky here.)

I didn't do an exhaustive list of what was possible, I just found a bunch of squares whose area added up to 756 and jumped right in. The first solution I found was the picture below.

Three 7x7s, a 13x13 and 21x21 with heptominoes.

I did the little squares first because they're the most restrictive in terms of which pieces can be used then did the great big square at the very end. I then realised that instead of having a 21x21 square, I could create four 7x7s, two 14x14s and a 13x13 which would yield a little more challenging of a solve.

 

'A little more challenging' is putting it lightly.

For a start, it took me two attempts. Admittedly this was down to my own stupidity - on the first attempt I'd done the four small squares first then moved onto the larger three, only to discover near the end that one of my 7x7 squares was actually a 6x7 and I had one leftover piece too many. The second attempt (the one pictured above) just took ages to do. Same solve order, but when I got to the last square (the bottom right 14x14) I was left with some really difficult uncooperative pieces and completing it took probably about six hours spread out over the space of the weekend.

The obvious next step here is this: One 14x14 is equivalent to four 7x7s. So It should be possible to solve a full set of heptominoes into the following:

  • Eight 7x7s, a 13x13 and a 14x14.
  • Twelve 7x7s and a 13x13.

Whether either of these is possible (or feasible solving by hand) is another matter entirely. I noticed with the construction with four 7x7s I was running out of pieces that would fit comfortably in corners or along edges by the end of the last square, and introducing even more edge is only going to make that worse. I might tackle those other possibilities at some point soon. But that's a pretty big 'might'.

Friday, September 18, 2020

A Fun Little Challenge with Pentominoes and Hexominoes

 I've probably seen this done somewhere else but I can't think where or else I'd drop a link in and let them explain it better than I can. Basically, the idea is to create a rectangle (or another shape, I won't judge) out of the pentominoes and hexominoes together - 270 units total so you've got a few choices here. But, there are a few restrictions you can place on the positioning of the pentominoes.

For the easiest option, forbid the pentominoes from touching each other (either by sharing an edge or touching point-to-point.) Or if you want to ramp up the challenge a bit, prohibit the pentominoes from touching the edge of the rectangle too. This is essentially a hexomino construction with 12 pentomino-shaped holes in it, if you want to think about it that way. Below are pictures for the 15x18 and 10x27 cases, but there are several other aspect ratios possible, the thinner the rectangles become the harder I imagine it'll be to keep the pentominoes away from one another.

Fig. 1: The 15x18 solution in a colour scheme that would have Ikea's lawyers frothing at the mouth

Fig. 2: A 10x27 solution

Tuesday, September 10, 2019

Combining Pentominoes and Hexominoes (into one nice big happy family)

In an earlier post, (this one in fact) I mentioned the possibility of combining the sets of hexominoes and pentominoes together, creating a nice (if mathematically incomplete) set of 47 pieces covering a total area of 270 square units and not having any of the irritating parity issues that make hexominoes on their own such a ball-ache to build shapes with.

And as an extra added bonus, you can hoard some of the nicer pentominoes until the end (ones like the P, L and V) which makes solving things with these generally fairly easy too. Nice practice before tackling pure hexomino things, if nothing else.

Rectangles

So... the rectangles. 270 divides by nearly anything so we've got a lot of choice here. 1x270 and 2x135 can be ruled out straight of the bat, because the pieces are too big. 3x90 I don't know, I mean, every piece fits within a 3xn box but I could see that getting ugly fast - look at how few 3xn solutions there are for just the pentominoes alone! Maybe it has a solution, like the thin solution with the pentahexes, but I don't have the balls to go looking for it.

5x54 is where things start to get definitely possible, and the rest of the possible rectangles (6x45, 9x30, 10x27 and 15 by whatever 270 divided by 15 is) are all easy enough if you don't mind a little trial and error.

Seriously, get yourself a set of these. Buy them, make them, hack them out of the back of a cereal box, whatever it takes. You won't regret it.*

Fig. 1: Some rectangles. Looking at the notebook I transcribed these from, some of these were done back in 2015 or so, before I'd really refined what little technique I have.
Now, moving onwards to some more tricky stuff...

Rectangles 2: The Revenge

Since 270 divides up so well, not only can you make rectangles but you can do sets of congruent smaller rectangles too! Check it out:
Fig. 2: Three 5x18s, two 9x15s, three 9x10s and five 6x9s.
The challenge here is making sure you have the right balance of pent- and hexominoes in each rectangle. For example, for the bottom row (the five pink 6x9s) each rectangle is 54 units, and the only way to get 54 by adding 5's and 6's is either nine hexominoes (9x6) or six pentominoes and four hexominoes (6x5 + 4x6 = 54).
For the same sort of reason, we can rule out six 5x9s. Each rectangle would have 45 units, which can only be filled by 3 pentominoes and 5 hexominoes (since 3x5 + 5x6 = 45) but that would require 15 pentominoes total so it can't be done :(

Nine 5x6s is out too. A 30-cell rectangle must have either 0 or 6 pentominoes so that the remainder can be filled with hexominoes - that is, it must be either all pent or all hex. This would mean that all the hexominoes would end up together in seven 5x6 blocks... but then you could just push those together and make a 6x21 rectangle of pure hexominoes, which ain't possible because of parity constraints.

Parallelograms

Moving on to some less rectangular shapes...
Again, we've got a lot of variety possible here -  the base lengths 6, 9, 10, 15, 18, 27, 30, 45 and 54 are solvable in theory, but in reality it's a little bit of a different story.

Of these, I've only done a selection of these by hand, mainly because they're not massively challenging or interesting (then again, if I didn't bang on about uninteresting things here this blog would have like no posts.) The longer the diagonal sides, the trickier it is, just because you run out of wiggly pieces building one side then have to use the nice easy pieces on the second side.
Fig. 3: Two example parallelograms. You can solve the rest yourself (with your newly-acquired set of pieces!) because it takes so long to transfer them from notebook sketches into pretty diagrams and it's really not worth it for not-that-interesting solutions like these.
Of course, you don't need to stop there. With the aid of computer search ('cause I'm lazy like that) I found the following two even taller skinnier parallelograms
Fig. 4: Just look at these freaks of nature. And I'm willing to bet the even thinner 6x45 is possible too, but so far FlatPoly2 has failed me.
Rectangles with little bits missing from inside 'em

...because not only does 270 factorise well, but some of the numbers just above it factorise fairly nicely too!

Fig. 5: Holey rectangles. (I fought the urge to follow that with 'Batman')
Getting all Fancy

Depending on how much you like solving wiggly diagonal edges there are all sorts of other possibilities too, so long as you don't mind the odd hole slap-bang in the middle of everything. Check out the following bad lads, sorted in order of how many tears were shed before finding the solution:

Fig. 6: How many images have I produced for this blog? And I still haven't settled on a colour scheme... sheesh!
That central heptomino is completely arbitrary really, it's just the most fitting one that has a few axes of symmetry. The same patterns could be done with a hole the shape of the H-looking heptomino (for example) but it just doesn't look as neat.

Another option (which to be honest I haven't really looked at myself on account of being proper lazy) is putting additional restrictions on the way the pentominoes are distributed, for example, making sure that each pentomino isn't touching any others, or that they are all bunched together in particular ways. The solution below has the pentominoes grouped into two symmetrical end bits. Actually, I didn't solve this one thinking about it as a pent+hex construction, I did the middle hexomino bit and only realised the two pentomino end caps were possible a while later.
Fig. 7: A nice five-cell high pattern with the pentominoes bunched together at each end all nice and symmetrical.

Another Possibility

A slightly more complete-feeling set would be the entire range of 1 through 6-ominoes, but sadly, their total area is 299 units, which you can't really do a lot with. There's a 13x23 rectangle, and by extension two 13x23 parallelograms, and adding a unit cell hole allows things like the 24x24 right-angled triangle.
But then you've got monominoes and monomino-sized holes together in the same construction, which just isn't very aesthetically pleasing for some reason. And since you've got all the tiny little triomino, domino and monomino pieces to work with, these aren't that much of a challenge either. So it's not such a good set after all.

Heptominoes next time. I promise.

-

* Polyominoes the Blog accepts no responsibility for any regret caused by the acquisition of any polyform sets.

Sunday, April 14, 2019

The Most Useful Pentominoes - An Experiment


The first strategy that I worked out for myself when just playing around with a set of pentominoes is to try and get certain shapes used up first, so you don't have to desperately find a home for them near the end of the construction. Pieces like the X pentomino especially I grew to hate with a vengeance. And after a while of solving I sort of developed a feel for which pieces needed to be used up pronto and which ones I didn't mind saving until near the end. This was generally something like:



This was all just based on gut feelings, on how much my blood boiled on picking up or even looking at a certain piece, and there was never anything approaching a sensible, methodical look into which pieces are most or least cooperative. Until now.

Whilst trying to do something else with the program mops (scroll to the bottom of the page for the various solvers) I discovered that if the rectangle size is set to something that doesn't use all the pieces, and you've got 'Determine Frequencies' ticked, it keeps counts of each time a piece is used in a solution.

So I set it to randomly solve 200,000 5x5 rectangles (since that's going to feel fairly similar to the last half of a 5x12 or 6x10 solution) and the frequencies of each pentomino are as follows:


Piece Count
L    149575
P    143160
Y    108150
I    107900
V    106884
C     91992
S     66828
F     55200
W     55017
T     55003
Z     50006
X     10285


Or, in hideous OpenOffice default graph form:



So my intuitions and this match up fairly well, for the most part - the L, P and I pentominoes are all near the top, and the X pentomino is right down there in a class of its own below useless.
Of course, whether these values have any bearing on how useful the piece is is up for debate. It's a rough guideline at the very least, I suppose.

And of course I want to go and do the same thing with hexominoes now, don't I?

Here's the raw values after running 125,000 6x8 boards in mops, using the hexomino naming scheme from here.

Hexomino      Count
A             37420
C     
       23250
D     
       33164
E      
       9351
HIGH F        18540
LOW F         19888
G    
         26659
H 
            21624
I      
       44063
J     
        37513
K    
         19738
L     
        63206
M      
       22871
LONG N        35834
SHORT N       27537
O             41949
P             61310
Q             30998
R             43327
LONG S        20482
TALL T        17613
SHORT T       27457
U             37957
V             57020
Wa  
         26479
Wb  
         14223
Wc  
         19354
X    
          6688
ITALIC X       6912
HIGH Y        47517
LOW Y         27467
SHORT Z       20379
TALL Z        16586
HIGH 4        15534
LOW 4         20090


So there's a similar kind of trend here as there was for the pentominoes - L-shaped pieces and 'blocky' pieces with 2x2 blocks in them are most 'useful', spiky/wiggle/cross-shaped bits, not so much.