Hilbert series of simple polyominoes

In the paper Hilbert series of Parallelogram Polyominoes by Ayesha Asloob Qureshi, Giancarlo Rinaldo and Francesco Romeo, (section 3), we present the following

Theorem

Let \(P\) be a simple polyomino with rank \(P \leq 11\) and let \(\widetilde{r}_{P}(t)\) be the polynomial defined in Definition 3.1 of the article. Then \(h(t)=\widetilde{r}_{P}(t)\).

We provide the implementation in Java of the algorithm computing the simple polyominoes of a given rank, Moreover we provide the scripst in Macaulay 2 for computing the 2 polynomials \(\widetilde{r}_{P}(t)\) and \(h(t)\) of the theorem downloadable from here.

We refer to the article for an in-depth description of the notation and results. In this page you will find an implementation with an example of computation.


Implementation and one example

In this section we give the results of our computation by the routines that we implemented in Java (version 8) and Macaulay 2 whose sources are downloadable from here.

Therefore to use the routines you need to install Java SDK and Macaulay 2. We tested the routines on Linux (Ubuntu 18.04) and Mac. To use it you have to download, and extract by

tar -xzvf hilbertsimple.tgz

move to the folder

cd hilbertsimple

and then compile the java program by

 javac Main.java

This Java program generates all the simple polyominoes of a given rank. Now we can test the conjecture for all the polyominoes of rank 7. From now on we show the input and the output in the console

./ConjectureRookPolynomial.sh 7

After few seconds we have that the conjecture holds for all the 107 simple polyominoes of rank 7. The file containing all the polyominoes computed is simple.m2.

.

If you want to show all the simple polyominoes of rank 7 use the following

 java Main --generateSimple --rank 7

In particular the polyomino in position 30 is

 
{(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (2, 1), (2, 2)}
+---+   +---+
|///|   |///|
+   +---+   +
|/// /// ///|
+       +---+
|/// ///|    
+---+---+    

whose Hilbert series is the one you find in the article. We describe how to do the computation to verify this case. First of all we need to start a Macaulay 2 session. Then we load the library we provide.

 
load "Polyominoes.m2"

Now we define the polyomino in the picture by the list of its the maximal inner interval through the following two commands

 
Q={{(1,1),(3,3)},{(1,1),(2,4)},{(1,2),(4,3)},{(3,2),(4,4)}}
P=PMaker Q

By this we can compute the rook polynomial, namely \(r(t)\),

 
rookPolynomial P

whose output is

 
        3      2
oo5 = 5T  + 12T  + 7T + 1

To compute \(h(t)\) we input

 
ht=htPol Q

The output is

 
        3      2
oo7 = 4T  + 11T  + 7T + 1

We observe that the polyomino is not thin, in fact \(h(t)\neq r(t)\). Hence we need to compute \(\widetilde{r}_{P}(t)\). That is

 
rt=EqRookPolynomial P

whose related output is

 
        3      2
oo6 = 4T  + 11T  + 7T + 1

And \(h(t)=\widetilde{r}_{P}(t)\), as expected.