Function Repository Resource:

Polyomino

Source Notebook

Give all the polyominoes of a specified rank

Contributed by: Aster Ctor

ResourceFunction["Polyomino"][rank]

gives all polynominos of specified rank.

Details and Options

The option ImageSize can be used to control the output size.

Examples

Basic Examples (1) 

Tetris consists of rank-4 polyominoes:

In[1]:=
ResourceFunction["Polyomino"][4]
Out[1]=

Scope (1) 

If there exists a rank-5 Tetris, it should look like this:

In[2]:=
Multicolumn[ResourceFunction["Polyomino"][5], 3]
Out[2]=

Neat Examples (3) 

Slow counting with calculating:

In[3]:=
Length[ResourceFunction["Polyomino"][9]] // AbsoluteTiming
Out[3]=

One can count these faster by giving an argument that is not an integer until evaluated:

In[4]:=
AbsoluteTiming[Length[ResourceFunction["Polyomino"][i /. i -> 9]]]
Out[4]=

Fast statistics:

In[5]:=
Table[Length[ResourceFunction["Polyomino"][i]], {i, 20}]
Out[5]=

Publisher

Aster Ctor (MoeNet)

Version History

  • 1.0.0 – 08 October 2019

Related Resources

License Information