Polyominoes 1
Public  07/03/15  11xp  Programming  26.7% 
A polyomino is a geometric figure obtained by joining equal squares edge by edge.
We consider that one side of each square is painted: when comparing two polyominoes for symetry, the painted sides must always stay up.
Two polyominoes are equal if they differ only by a rotation of a multiple of $ \frac{\pi}{2} $
To sort the polyominoes, we define the "canonical value" of a polyomino as follow:
It can be represented either by
$
\left( \begin{array}{}
0 & 0 & 1 \\
1 & 1 & 1 \end{array} \right)
$
or by
$
\left( \begin{array}{}
1 & 1 & 1 \\
1 & 0 & 0 \end{array} \right)
$
The first representation yields the values $ \{ 0, 0, 1, 0, 1, 1, 1, 0 \}$ = 46
The second representation yields the values $ \{ 1, 1, 1, 0, 1, 0, 0, 0 \}$ = 232
Thus, the canonical value for this polyomino is 46.
With 4 squares, there are 7 possible polyominoes (sorted by their canonical values):
How many polyominoes with 8 squares are there?
What is the canonical value of the 666th poylyomino?
Format answer: Count,Value
[My timing: 40 sec]
We consider that one side of each square is painted: when comparing two polyominoes for symetry, the painted sides must always stay up.
Two polyominoes are equal if they differ only by a rotation of a multiple of $ \frac{\pi}{2} $
To sort the polyominoes, we define the "canonical value" of a polyomino as follow:
 A polyomino is represented by a matrix of 0 and 1
 We consider all 4 rotations and keep those where the matrix is such as the number of rows is $\le$ the number of columns.
 We add a column of 0 at the end, flatten the values and consider them as a binary representation of some integer. The canonical value is the smallest of these integers.
The first representation yields the values $ \{ 0, 0, 1, 0, 1, 1, 1, 0 \}$ = 46
The second representation yields the values $ \{ 1, 1, 1, 0, 1, 0, 0, 0 \}$ = 232
Thus, the canonical value for this polyomino is 46.
With 4 squares, there are 7 possible polyominoes (sorted by their canonical values):

30

46

54

78

108

142

198
How many polyominoes with 8 squares are there?
What is the canonical value of the 666th poylyomino?
Format answer: Count,Value
[My timing: 40 sec]
New Members
 gunnez97 2d:19h
 CcGaviria 3w
 wuyingddg 3w
 curiosity_def 3w:1d
 skywalkert 3w:2d
Fresh Problems

Best Matrices Multiplication 2 2d:21h
solved by 7 
Central binomial coefficients 3d:20h
solved by 10 
Harmonic variations 6d:12h
solved by 7 
Special squarefree sum 1w:3d
solved by 5 
A Staggering Sequence 1w:6d
solved by 11