To all you math dopers

Here’s one for you:

You have 5 squares to put in a pattern with the following 2 rules:

  1. at least 1 complete side of a square must be in contact with 1 complete side of another square.
  2. no rotations or mirror images allowed.

how many patterns can be formed?

no trick questions here. no hidden answers. actually, i’m gonna give you the answer, because answering the top problem isn’t the big concern. the answer is 12.

what i want to know, is given number of squares n, what is the formula that tells you the number of distinct patterns that can be formed?

I assume the squares are all the same size, right? And that rotating individual squares doesn’t change the pattern?

yes, all squares are the same size. we can just say 1 unit by 1 unit to make things simple.

I found 14 arrangements that fullfil your requirements. There are two arrangements that you didn’t count. (And I know which two. :slight_smile: )

I found them by brute force; I don’t know the solution to the general problem.

I got the fourteen, but I question if a pattern can be disjoint. I may have a recursive solution, maybe not.

These shapes are called polyominos (see here). (With 5 squares, they’re called pentominos, etc.) There’s no simple expression known for the number of polyominos.

I have a set of pentominoes - you can make quite a few interesting shapes wtih them, both lying flat and 3D shapes.

Some bounds are given here.