Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The seven pieces are said to be different on the Wikipedia page, but you have defined P5 and P6 to be the same:

P5 = Polyomino([(0,0,0), (0,0,1), (1,0,1), (1,1,1)], color='red')
P6 = Polyomino([(0,0,0), (0,0,1), (1,0,1), (1,1,1)], color='red')

which I think is wrong. If you replace P6 by what follows:

P6 = Polyomino([(0,0,0), (1,0,0), (1,0,1), (1,1,1)], color='red')

Then, you get:

sage: T = TilingSolver([P1, P2, P3, P4, P5, P6, P7], box=(3,3,3))
sage: T.number_of_solutions()
11520

Each solution is counted 24 times because of the 24 orientation preserving isometries of the cube:

sage: from sage.combinat.tiling import ncube_isometry_group
sage: G = ncube_isometry_group(3, orientation_preserving=True)
sage: len(G)
24
sage: 11520 / 24
480

But, since the 7 pieces are globally closed under miror image (P5 and P6 get swaped), we can count solutions up to every isometries of the cube. There are 48 of them:

sage: G = ncube_isometry_group(3, orientation_preserving=False)
sage: len(G)
48

and thus we count

sage: 11520 / 48
240

non-isometric solutions.

click to hide/show revision 2
No.2 Revision

The seven pieces are said to be different on the Cube Soma Wikipedia page, page, but you have defined P5 and P6 to be the same:

P5 = Polyomino([(0,0,0), (0,0,1), (1,0,1), (1,1,1)], color='red')
P6 = Polyomino([(0,0,0), (0,0,1), (1,0,1), (1,1,1)], color='red')

which I think is wrong. If you replace P6 by what follows:

P6 = Polyomino([(0,0,0), (1,0,0), (1,0,1), (1,1,1)], color='red')

Then, you get:

sage: T = TilingSolver([P1, P2, P3, P4, P5, P6, P7], box=(3,3,3))
sage: T.number_of_solutions()
11520

Each solution is counted 24 times because of the 24 orientation preserving isometries of the cube:

sage: from sage.combinat.tiling import ncube_isometry_group
sage: G = ncube_isometry_group(3, orientation_preserving=True)
sage: len(G)
24
sage: 11520 / 24
480

But, since the 7 pieces are globally closed under miror image (P5 and P6 get swaped), we can count solutions up to every isometries of the cube. There are 48 of them:

sage: G = ncube_isometry_group(3, orientation_preserving=False)
sage: len(G)
48

and thus we count

sage: 11520 / 48
240

non-isometric solutions.

click to hide/show revision 3
No.3 Revision

The seven pieces are said to be different on the Cube Soma Wikipedia page, but you have defined P5 and P6 to be the same:

P5 = Polyomino([(0,0,0), (0,0,1), (1,0,1), (1,1,1)], color='red')
P6 = Polyomino([(0,0,0), (0,0,1), (1,0,1), (1,1,1)], color='red')

which I think is wrong. If you replace P6 by what follows:

P6 = Polyomino([(0,0,0), (1,0,0), (1,0,1), (1,1,1)], color='red')

Then, you get:

sage: T = TilingSolver([P1, P2, P3, P4, P5, P6, P7], box=(3,3,3))
sage: T.number_of_solutions()
11520

Each solution is counted 24 times because of the 24 orientation preserving isometries of the cube:

sage: from sage.combinat.tiling import ncube_isometry_group
sage: G = ncube_isometry_group(3, orientation_preserving=True)
sage: len(G)
24
sage: 11520 / 24
480

But, since the 7 pieces are globally closed under miror image (P5 and P6 get swaped), we can count solutions up to every isometries of the cube. There are 48 of them:

sage: G = ncube_isometry_group(3, orientation_preserving=False)
sage: len(G)
48

and thus we count

sage: 11520 / 48
240

non-isometric solutions.

When I computed the number of solutions to the Quantamino game, I avoided to compute many times the same isometric solutions by limiting the reflections for one fixed piece. That was needed because the computation took one month. I never added that part of the code inside SageMath.

click to hide/show revision 4
No.4 Revision

The seven pieces are said to be different on the Cube Soma Wikipedia page, but you have defined P5 and P6 to be the same:

P5 = Polyomino([(0,0,0), (0,0,1), (1,0,1), (1,1,1)], color='red')
P6 = Polyomino([(0,0,0), (0,0,1), (1,0,1), (1,1,1)], color='red')

which I think is wrong. If you replace P6 by what follows:

P6 = Polyomino([(0,0,0), (1,0,0), (1,0,1), (1,1,1)], color='red')

Then, you get:

sage: T = TilingSolver([P1, P2, P3, P4, P5, P6, P7], box=(3,3,3))
sage: T.number_of_solutions()
11520

Each solution is counted 24 times because of the 24 orientation preserving isometries of the cube:

sage: from sage.combinat.tiling import ncube_isometry_group
sage: G = ncube_isometry_group(3, orientation_preserving=True)
sage: len(G)
24
sage: 11520 / 24
480

But, since the 7 pieces are globally closed under miror image (P5 and P6 get swaped), we can count solutions up to every isometries of the cube. There are 48 of them:

sage: G = ncube_isometry_group(3, orientation_preserving=False)
sage: len(G)
48

and thus we count

sage: 11520 / 48
240

non-isometric solutions.

When I computed the number of solutions to the Quantamino game, I avoided to compute many times the same isometric solutions by limiting the reflections for one fixed piece. That was needed because the computation took one month. I never added that part of the code inside SageMath.

See the method T._rows_mod_box_isometries(0) which provide a smaller list of rows for the dancing links solver.