Polyocollection ideals and primary decomposition of polyomino ideals

In this article, we study the primary decomposition of some binomial ideals. In particular, we introduce the concept of polyocollection, a combinatorial object that generalizes the definitions of collection of cells and polyomino, that can be used to compute a primary decomposition of non-prime polyomino ideals. Furthermore, we give a description of the minimal primary decomposition of non-prime closed path polyominoes. In particular, for such a class of polyominoes, we characterize the set of all zig-zag walks and show that the minimal prime ideals have a very nice combinatorial description.


Introduction
A polyomino is a finite collection of unit squares with vertices at lattice points in the plane joined edge by edge.Qureshi [20] associated a finite type K-algebra K[P] (over a field K) to a polyomino P.An interesting question here is to relate the algebraic properties of the K-algebra K[P] with the combinatorial properties of the polyomino P. For certain classes of polyominoes, some algebraic properties of the associated algebra have been studied.For example, the graded minimal free resolution of K[P] for convex polyominoes has been studied in [7,9] and the Hilbert series of K[P] has been studied in [23,17,21,16,5].We say that a polyomino P is prime (resp.non-prime) if the defining ideal of K[P], denoted by I P , is prime (resp.non-prime).The ideal I P is called the polyomino ideal.It is known that simple polyominoes are prime [14,22].Hibi-Qureshi [15] and Shikama [24] proved that the non-simple polyominoes obtained by removing a convex polyomino from a rectangle are prime.Characterizing prime polyominoes is a difficult task; to do that Mascia et.al. [18] defined zig-zag walks (see Definition 4.2) for polyominoes.They proved [18,Corollary 3.6] that the existence of zig-zag walks determines the non-primality of the polyomino and conjectured that [18,Conjecture 4.6] this property characterizes non-prime polyominoes.This conjecture has been verified for certain classes of polyominoes, for example, for grid polyominoes [18], for closed path polyominoes [2] and for weakly closed path polyominoes [3].In [19], Mascia et.al. have determined some prime polyominoes using Gröbner basis.Concerning other algebraic properties, several mathematicians have studied the combinatorial description of the height of polyomino ideals.For some classes of polyominoes, it has been proved that the height of the polyomino ideal I P is the number of cells of P. For instance, Qureshi [20] proved this for convex polyominoes.Herzog-Madani [14] extended this to simple polyominoes.Extending this further, Herzog et.al. [12] recently proved this for the case when the polyomino ideal is unmixed.Dinu and the second author of this article [6] proved this for closed path polyominoes and conjectured that this holds for all polyomino ideals.In this regard, we show that if removing a cell makes the polyomino simple, then the above conjecture holds (Proposition 4.10).In this article, we provide some properties about primary decomposition of polyomino ideals and we study the minimal primary decomposition of non-prime closed path polyominoes.The primary decomposition have been studied for some classes of binomial ideals, for instance in [11] for binomial edge ideals and in [10] for ideals generated by adjacent 2-minors.The first results explained in this paper allows to consider something similar for polyomino ideals.In particular, supported by some examples obtained by using the software Macaulay2 ( [8]) and inspired by the concept of admissible set in [10], we find that for studying the primary decomposition of polyomino ideals one can consider a larger class of binomial ideals.This class is related to a combinatorial object that generalizes the concept of collection of cells and polyominoes.We call such a class of combinatorial objects polyocollections.For non-prime closed path polyominoes we provide, in our main result, a detailed description of the minimal primary decomposition.We show that the polyomino ideal is the intersection of two minimal prime ideals (Theorem 4. 19), and both minimal prime ideals have a very nice combinatorial description.One of the minimal primes is the toric ideal appeared in [18, Section 3] (see Theorem 4.16).We characterize zig-zag walks of non-prime closed path polyominoes and use that to define the other minimal prime which is generated by monomials and binomials.Finally, we also show that the height of these two ideals is equal to the number of the cells of the polyomino, and as a consequence the polyomino ideal is unmixed.The article is organised as follows.In Section 2, we recall some basic notions on combinatorics related to polyominoes.In Section 3, we define polyocollections and we associate a binomial ideal to it, generalizing the ideal associated to a collection of cells in [20].Moreover, we provide a characterization of the primality of that binomial ideal in terms of a lattice ideal attached to the polyocollection and we give a primary decomposition of the radical of the ideal associated to the polyocollection.Section 4 is devoted to study the minimal primary decomposition of closed path polyominoes having zig-zag walks, equivalently the polyomino is non-prime (see [2]).In the last section, we highlight some possible future directions and open questions about polyominoes and polyocollection ideals.

Intervals, cells and polyominoes
Let (i, j), (k, l) ∈ Z 2 .We say that (i, j) ≤ (k, l) if i ≤ k and j ≤ l.Consider a = (i, j We say that C and D are connected in S if there exists a path of cells in S from C to D. If P is a non-empty and finite collection of cells in Z 2 , then it is called a polyomino if any two cells of P are connected in P. For instance, see Figure 1.We say that a collection of cells P is simple if for any two cells C and D not in P there exists a path of cells not in P from C to D. A finite collection of cells H not in P is a hole of P if any two cells of H are connected in H and H is maximal with respect to set inclusion.For example, the polyomino in Figure 1 is not simple with an hole.Obviously, each hole of P is a simple polyomino and P is simple if and

Polyocollections and related ideals
Let C be a collection of intervals in Z 2 .We say that C is a polyocollection if for all I, J ∈ C with I = J, we have I J and one of the following holds: (1) I ∩ J is a common edge of I and J.
The collection An interval I of Z 2 is called an inner interval of C if there exists n ∈ N and I 1 , I 2 , . . ., I n ∈ C such that c(I) = n i=1 c(I i ).We denote by G(C) the set of inner intervals of C. By convention we consider that the empty set is a polyocollection whose set of inner interval is the empty set.For instance, referring to Example 3.1, the intervals [(1, 1), (2,3)] and [(1, 1), (5,3)] of C 1 are examples of inner intervals.In C 2 , [(1, 3), (7,5)] and [ (3,2), (5,7)] are examples of inner intervals, while [(3, 3), (5,5)] is not an inner interval.Proposition 3.2.Let C be a polyocollection and I be an interval of Z 2 .Suppose that c(I) = t i=1 c(I i ) with I i ∈ C for all i ∈ {1, . . ., t}.Then there exists {i 1 , . . ., i r } ⊆ {1, . . ., t} such that i=1 c(I i ) then there exists i 1 ∈ {1, . . ., t} such that (i, j) ∈ c(I i 1 ).By construction, (i, j) is the lower left corner of I i 1 .We denote by (a 1 , b 1 ) the right upper corner of I i 1 , where i < a 1 ≤ m and j < b 1 ≤ n.We  Case II) Assume that i < a 1 < m and j < b 1 < n.Since c(I) = t i=1 c(I i ), considering the vertices (a 1 , j) and (i, b 1 ) there exists i 2 , i 3 ∈ {1, . . ., r} such that (a 1 , j) ∈ I i 2 and (i, b 1 ) ∈ I i 3 .Arguing as done in the previous case, since I i 1 , I i 3 ∈ C, the only possibility is ] with a 2 ≤ m, and In particular, I i 1 , I i 2 and I i 3 are arranged as in Figure 3b.Moreover, int(I i 1 ) ∩ int(I i 2 ) = int(I i 1 ) ∩ int(I i 3 ) = int(I i 2 ) ∩ int(I i 3 ) = ∅.Also in this case, it is not difficult to see that we can continue with the same argument until we cover c(I).
Let C be a polyocollection.Define the polynomial ring Remark 3.3.Let P be a collection of cells.Observe that P is trivially a polyocollection.In such a case the definition of inner intervals reduces to the following: an interval I ∈ Z 2 is an inner interval of P if and only if each cell contained in I belongs P. Moreover the ideal I P as defined above for polyocollections coincides with the ideal associated to a collection of cells following the definition in [20].
If C is a polyocollection and P is a collection of cells, we say that C and P are algebraically  In the following discussion, we prove that there exists a polyocollection C which is not algebraically isomorphic to any collection of cells.Roughly speaking, that means the class of polyocollections is algebraically strictly bigger than the class of collections of cells.Discussion 3.4.Let C be the polyocollection as shown in Figure 5a.Then, Macaulay2 computations show that I C is a non-prime ideal of height 5 and the minimal primary decomposition of the ideal I C consists of two prime ideals p 1 and p 2 , that are the following: The height of both ideals in the primary decomposition is 5. So, I C is a unmixed ideal.
Suppose that, if possible, there exists a collection of cells P such that K[C] is isomorphic to K[P].Then, by [12,Theorem 3.1], P is a collection of 5 cells.Since I P is a non-prime ideal, P is a non-simple collection of cells by [3,Theorem 3.3].Therefore, up to rotations and reflections, the only possible collections of cells P are those in Figures 5b-5e.For P as in Figure 5c and 5d, Macaulay2 computations show that the dimension of the ring K[P] is 10 and 11 respectively.As the dimension of the ring K[C] is 9, we get that K[C] is not isomorphic to K[P] when P is as in Figure 5c and 5d.For P as in Figure 5e, K[P] is a domain (see [3,Remark 3.4]), so it is not isomorphic to K[C].When P is as in Figure 5b, the minimal primary decomposition of the ideal I P consists of two prime ideals q 1 and q 2 , that are the following:  We want to show that some concepts and results introduced for collection of cells in [20], can be extended in a natural way for polyocollections.Let L C be the lattice ideal of Λ C , that is the following binomial ideal in S C : In [20,Theorem 3.5] it is shown that if P is a collection of cells then L P is a prime ideal.Using the same argument, we can prove that the same holds considering also polyocollections.We provide the proof of this fact for completeness.
Denote by F (C) the set of elements in V (C) that are not lower left corner of an interval in C.
We refer to M as the matrix associated to C. Observe that the columns of M can be labelled with the set {I ∈ C} ∪ {a ∈ F (C)} and the rows can be labelled with the set V (C).In order to prove our result we show that det(M ) = 0, by induction on |C|.If |C| = 1 it is easy to check that det(M ) = ±1.Suppose |C| > 1 and let a ∈ V (C) be such that it is a minimal element under the natural partial order on Z 2 .Observe that in this case there exists an interval J = [a, b] in C such that a / ∈ I for all I ∈ C \ {J}.Denote by c, d the anti-diagonal corner of J.We distinguish three cases.Case 1 Either c ∈ F (C) or d ∈ F (C). Without loss of generality, we consider c ∈ F (C) and d / ∈ F (C).Let M ′ be the matrix obtained by removing the row labelled with a and the column labelled by J. Observe that the column removed contains all 0 except for 1 in the position of a, so det(M ) = ± det(M ′ ).Moreover, let M ′′ be the matrix obtained from M ′ by removing the row labelled with c and the column labelled by c.It is easy to verify that det(M ′ ) = ± det(M ′′ ), so det(M ) = ± det(M ′′ ).Furthermore, it is not difficult to verify that M ′′ is the matrix associated to the polyocollection C ′ = C \ {J}, so by induction det(M ′′ ) = 0, that is det(M ) = 0.
b ∈ Z.We define the following map: and by construction the coefficients α I of v I , for I ∈ C, does not contribute to the computation of ψ(x v ).Therefore ψ(x v ) = ψ(x w ).⊇) Let x v − x w be a minimal generator of ker ψ.In particular, supp( By the previous results, observe also that L C does not contain monomials.In fact, since it is a prime ideal, if it contains monomials then it contains a variable x a for a ∈ V (C).But all elements in L C have degree greater than 2.
Lemma 3.7.Let C be a polyocollection.Then there exists a monomial u ∈ S C such that Proof.The proof is exactly the same as that provided by [19, Lemma 2.1] for a collection of cells.
Theorem 3.8.Let C be a polyocollection.Then I C is a prime ideal if and only if then trivially I C is prime by Theorem 3.6.Suppose that I C is prime.By Lemma 3.7 we have that Remark 3.9.Let C be a polyocollection and I, J ∈ C. We say that I and J are connected if there exists a sequence I 1 , . . ., I m ∈ C with I 1 = I and I m = J such that I i ∩ I i+1 is a common vertex or a common edge for i ∈ {1, . . ., m}.We can consider in C the equivalence relation ≃, where I ≃ J if and only if I is connected with J. Observe that all equivalence classes of ≃ are polyocollection, that we call the connected components of C. If C 1 , . . ., C n are the connected components of C, it is not difficult to see that contains the boundary of an edge of I. Observe that ∅ and V (C) are admissible sets.
For an admissible set X of C, define the following set: Proposition 3.10.Let C be a polyocollection and X be an admissible set.Then there exists a polyocollection C (X) such that G (X) is the set of inner intervals of C (X) .
Proof.Let C (X) be the set of minimal intervals in G (X) with respect to set inclusion.We prove that C (X) is a polyocollection.Let I, J ∈ C (X) , by construction it is trivial that I J. Suppose I ∩J / ∈ E(I)∩E(J) and there exist F ∈ E(I) and G ∈ E(J) such that |F ∩G| > 1.Then I, J / ∈ C and we can assume, without loss of generality, that there exist such that {x, z} is the boundary of an edge of J (see for instance Figure 6).Since I, J ∈ G (X) and X is an admissible set, then a, x, z / ∈ X. Moreover a, x, z are the vertices of an inner interval K of C, otherwise there exist two intervals I 1 , J 1 ∈ C, with I 1 ⊆ I and J 1 ⊆ J, having no edges in common and two edges intersecting in two or more points, that contradicts C is a polyocollection.In particular K ⊆ J and |X ∩V (K)| ≤ 1. Considering that X is an admissible set, we have X ∩ V (K) = ∅, obtaining K ∈ G (X) that contradicts the minimality of J.So C (X) is a polyocollection.
Finally, if I ∈ G (X) we show that I is union of intervals in C (X) having pairwise disjoint common interior, that is G (X) is the set of inner intervals of the polyocollection C (X) .So, put that I ∈ C (X) , so suppose there exists e ∈ V (C) ∩ (I \ V (I)) such that e / ∈ X.Consider two possibilities: either e belongs to an edge of I or e ∈ int(I).
• Assume that e belongs to an edge of I, say [a, c] without loss of generality.Then it is not difficult to see that in such a case there exists ) and I i is an inner interval of C for i ∈ {1, 2, 3, 4}.For all i ∈ {1, 2, 3, 4}, observe that X ∩ V (I i ) does not contain the boundary of an edge of It follows that in every case I is union of intervals in R 2 belonging to G (X) and having pairwise disjoint common interior.If such intervals are not minimal, with respect to set inclusion, we can repeat the previous arguments to these intervals obtaining the desired conclusion.
Denote by C (X) the polyocollection having G (X) as set of inner intervals.We define the following ideal all admissible sets X.In fact, by the previous result, ({x a | a ∈ X}) it is easy to see that J X is a prime ideal for all X admissible sets of C. Remark 3.11.Let C be a polyocollection and suppose that I C is not a prime ideal.Then J ∅ = L C is a minimal prime ideal of I C ; otherwise let p be a prime ideal such that Proposition 3.12.Let C be a polyocollection and suppose that I C is not a prime ideal.Then for every minimal prime ideal p of I C , there exists an admissible set X such that p = J X Proof.Let p be a minimal prime ideal of We show that Y is an admissible set for C. In fact, if Y is not an admissible set, then there exists an inner interval Proof.We have I C ⊆ X J X where X moves overall the admissible sets of C, so √ I C ⊆ X J X .Moreover each minimal prime of I C is also a minimal prime of √ I C .Finally, since a radical ideal is the intersection of its minimal prime ideals, the assertion of the theorem will follow.Remark 3.14.If C is a polyocollection and I C is radical, then Theorem 3.13 provides a primary decomposition of it.Such decomposition is not minimal since the converse of Proposition 3.12 does not hold in general.We will provide an example of this fact in the last section.

Primary decomposition of closed path polyominoes
In this section, we consider a particular class of polyominoes, called closed paths, for which we provide the minimal primary decomposition of the polyomino ideal.We already observed that a collection of cells (or a polyomino in particular) is also a polyocollection, but with respect to the previous section we give a more detailed (and combinatorial) description of the primary decomposition, taking advantage of the structure of closed path.4.1.Closed paths and their zig-zag walks.In according to [2], we recall the definition of a closed path polyomino, and the configuration of cells characterizing its primality.Closed paths are polyominoes contained in the class of thin polyominoes, introduced in [19], that are polyominoes not containing the square tetromino as subpolyomino.Definition 4.1.We say that a polyomino P is a closed path if it is a sequence of cells A 1 , . . ., A n , A n+1 , n > 5, such that: (1) A 1 = A n+1 ; (2) A i ∩ A i+1 is a common edge, for all i = 1, . . ., n; (3) A i = A j , for all i = j and i, j ∈ {1, . . ., n}; (4) For all i ∈ {1, . . ., n} and for all j / ] for all i = 1, . . ., n − 2. For instance, in Figure 7 there is a closed path having an L-configuration and a ladder of three steps.A closed path has no zig-zag walks if and only if it contains an L-configuration or a ladder of at least three steps (see [2,Section 6]).Definition 4.2.A zig-zag walk of a collection of cells P is a sequence W : I 1 , . . ., I l of distinct inner intervals of P where, for all i = 1, . . ., l, the interval I i has diagonal corners v i , z i and anti-diagonal corners u i , v i+1 or anti-diagonal corners v i , z i and diagonal corners u i , v i+1 , such that (1) I 1 ∩ I l = {v 1 = v l+1 } and I i ∩ I i+1 = {v i+1 } for all i = 1, . . ., l − 1; (2) v i and v i+1 are on the same edge interval of P, for all i = 1, . . ., l; (3) for all i, j ∈ {1, . . ., l} with i = j, there exists no interval J of P such that z i and z j belongs to J.
By using the concept of zig-zag walk, in [2, Theorem 6.2] the authors characterize the primality of a closed path P proving that I P is prime if and only if P does not contain any zig-zag walk.
Let P be a collection of cells.Following the notations in [18], for a zig-zag walk W : I 1 , . . ., I l of P, let f W be the corresponding binomial of W, that is ] for 1 ≤ i ≤ l} and we call it the necklace of W. Furthermore, it is shown in [18, Proposition 3.5] that if a polyomino P has a zig-zag walk W, then: where f I i is the binomial related to the inner interval I i , for i ∈ {1, . . ., l} and the sign depends if v 1 is a diagonal or an anti-diagonal corner of I 1 .For i ∈ {2, . . ., l}, it is easy to obtain a similar expression also for x v i f W , by relabelling the indices 1, 2, . . ., l.In particular, for all zig-zag walk W then x v i f W ∈ I P for all 1 ≤ i ≤ l.Observing the previous formula, we can also extend the same claim also in the case P is a collection of cells.Lemma 4.3.Let P be a collection of cells with a zig-zag walk W and p be a minimal prime ideal of I P .Under the notations as above, if f W / ∈ p, then x v ∈ p for all v ∈ N (W).
Proof.Since f W / ∈ p, by above discussion, we get that x v i ∈ p for all 1 ≤ i ≤ l.Fix an i.We have x u i x v − x v i x bv ∈ I P for all v ∈]v i , v i+1 [, where b v ∈ V (P) such that the rectangle with the vertices u i , v, v i and b v is in P. Since Similarly, by repeating the above argument for x bv x v i+1 − x v x z i ∈ I P for all v ∈]v i , v i+1 [, where b v ∈ V (P) such that the rectangle with the vertices z i , v, v i+1 and b v is in P. We get that either From now onwards, we assume that P is a non-prime closed path polyomino.By [2, Theorem 6.2], P contains a zig-zag walk.As a consequence, by [2, Proposition 6.1] P does not contain any L-configuration, so any two maximal inner intervals of P intersect themselves in the cells displayed in Figure 8a or 8b (up to reflections or rotations).We wish to determine all zig-zag walks of P.
Discussion 4.4.Let W : I 1 , . . ., I l be a zig-zag walk of P. We show that from the labelled vertices of Figure 8a, only d ∈ {v 0 , . . ., v l }.By (3) of Definition 4.2, I i and I j are not contained in a maximal inner interval if i = j.By (1) of Definition 4.2, m, a, c, e and e 1 as in Figure 8a do not belong to {v 0 , . . ., v l }.
is a closed path of edge intervals, we get that d ∈ {v 0 , . . ., v l }.Now it suffice to show that d 1 , b / ∈ {v 0 , . . ., v l }.Assume that d 1 ∈ {v 0 , . . ., v l }.Then, there exists a j such that d, d 1 ∈ V (I j ).By Definition 4.2, I j = {X} or I j = {Z}.We may assume that I j−1 is the inner interval such that d 1 ∈ V (I j−1 ) and W ∈ I j−1 , and I j+1 is the inner interval such that d ∈ V (I j+1 ) and Y ∈ I j+1 .If I j = {X}, then b, d ∈ I j ∩ I j+1 and if I j = {Z}, then d 1 , e 1 ∈ I j ∩ I j−1 .Both of them contradict (1) of Definition 4.2; thus, d 1 / ∈ {v 0 , . . ., v l }.Similarly, b / ∈ {v 0 , . . ., v l }.Hence, from the labelled vertices of Figure 8a, only d ∈ {v 0 , . . ., v l }.We now show that from the labelled vertices of Figure 8b, exactly one of e and ℓ is in {v 0 , . . ., v l }.By (1) of Definition 4.2, a, b, c and d as in Figure 8b do not belong to {v 0 , . . ., v l }.Since v i is the vertex where the inner intervals I i−1 and I i intersects and, e and ℓ are the vertices belongs to two maximal inner intervals, either e ∈ {v 0 , . . ., v l } or ℓ ∈ {v 0 , . . ., v l }.Now, we show that exactly one of e and ℓ is in {v 0 , . . ., v l }.Suppose both e and ℓ are in {v 0 , . . ., v l }.Then there exists a j ∈ {1, . . ., l} such that I j = {X} or I j = {Y }.Let I j−1 (respectively I j+1 ) be the inner interval such that e ∈ V (I j−1 ) (respectively ℓ ∈ V (I j+1 )) and W ∈ I j−1 (respectively Z ∈ I j+1 ).If I j = {X}, then a, e ∈ I j−1 ∩ I j which is a contradiction.Similarly, if I j = {Y }, then b, ℓ ∈ I j ∩ I j+1 which is a contradiction.Hence, exactly one of e and ℓ is in {v 0 , . . ., v l }.Example 4.5.We illustrate the above discussion now.Let P be the polyomino as shown in the Figure 9.Note that P is a non-prime polyomino.Let W : I 1 , . . ., I l be a zig-zag walk of P. By Discussion 4.4, {d 1 , d 2 , d 3 , d 4 } ⊂ {v 1 , . . ., v l }.Also, by Discussion 4.4, exactly one of b 1 and b 2 is in {v 1 , . . ., v l } and exactly one of c 1 and c 2 is in {v 1 , . . ., v l }.So in conclusion, we get that l = 6 and {v Remark 4.6.Based on the Discussion 4.4, we make few remarks on the zig-zag walks of a non-prime closed path polyomino.
(1) The number of inner intervals in a zig-zag is equal to the number of maximal inner intervals in P with at least three cells.(2) Let W : I 1 , . . ., I l and W ′ : I ′ 1 , . . ., I ′ l be two zig-zag walks of P. Then N (W) = N (W ′ ).(3) Under the labelling of Figure 8a x b , x d 1 ∈ N (P) and if f W = l i=1 x z i − l i=1 x u i is any zig-zag walk then either x c ∈ supp( l i=1 x z i ) and x e ∈ supp( l i=1 x u i ) or x c ∈ supp( l i=1 x u i ) and x e ∈ supp( l i=1 x z i ).
Notation 4.7.Consider the following notation: • N (P) := N (W), for some zig-zag walk W of P. We observed that this set is unique and does not depend on the choice of the zig-zag walk W.
• M (P) := {m ∈ V (P) as shown in Figure 8a, up to reflections or rotations} • R(P) := {x a x b −x c x d : a, b, c, d are as shown in Figure 8b, up to reflections or rotations} Define the following ideals: Lemma 4.8.Let P be a non-prime closed path polyomino.Then I P ⊂ p 2 .
Proof.Let [p, q] be an inner interval of P, with r, s as anti-diagonal corners.We prove that f = x p x q − x r x s belongs to p 2 .Assume that, referring to Figure 8b, q ∈ {a, d, ℓ} or p ∈ {e, c, b}.If f ∈ R(P) then f ∈ p 2 trivially.Suppose that f / ∈ R(P) and q = d.Then s = ℓ, otherwise f ∈ R(P), and in particular p belongs to the edge interval of P containing e and ℓ.It follows that p, s ∈ N (P), so x p x q , x r x s ∈ p 2 , hence f ∈ p 2 .The other cases can be proved in a similar way.Now assume that, referring to Figure 8a, q ∈ {b, m, d 1 } or p ∈ {a, c, d, e, e 1 }.We may suppose that q = m, because one can prove all other cases with similar arguments.In such a case p ∈ {c, d, e 1 }.Suppose that p = c.Then r = a and s = d 1 .Since q = m ∈ M (P) and d 1 ∈ N (P), we get x p x q , x r x s ∈ p 2 , hence f ∈ p 2 .The other two cases p = d and p = e can be proved similarly.For the other situations, coming from reflections or rotations of Figures 8a  and 8b, the proofs are similar to the previous ones.The last case to discuss is when no corners of [p, q] is one of the vertices in Figures 8a and 8b.In such a case, we can have one of the following four situations: either r, q ∈ N (P), or p, s ∈ N (P), or p, r ∈ N (P), or q, s ∈ N (P), depending on the shape of P. In each case it follows that x p x q , x r x s ∈ p 2 , hence f ∈ p 2 .Proposition 4.9.Let P be a non-prime closed path polyomino.Then, under the notations of Notation 4.7, p 2 is a prime ideal and height(p 2 ) = |P|.
Proof.The minimal generating set of p 2 can be partitioned between disjoint set of variables.So that p 2 admits a tensor product decomposition, where one ideal is generated by variables and others are principal prime ideals.Hence, p 2 itself is a prime ideal.
Under the labelling of Figure 8a, the variables x m corresponds to the cell X.Under the labelling of Figure 8b, the generator x a x b − x c x d corresponds to the cell X.So it suffices to show that the number of remaining cells is equal to the cardinality of N (P).Let W : I 1 , . . ., I l be a zig-zag walk of P. For 1 ≤ i ≤ l, the number of cells in I i are equal to the number of vertices in ]v i , v i+1 ].Therefore, the number of remaining cells is equal to the cardinality of N (P ).Thus, height of p 2 is equal to number of cells of P In the following proposition, we show that if a polyomino P becomes simple after removing a cell, then height(I P ) = |P|.This gives a different proof of [6,Corollary 3.5].As a consequence the ideal p 2 is a minimal prime of I P .Proposition 4.10.Let P be a polyomino.If there exists a cell A in P such that P \ {A} is simple, then height(I P ) = |P|.In particular, it holds for closed path polyominoes.
Proof.It is known by [12,Theorem 3.1] that height(I P ) ≤ |P| for every collection of cells P. Let P ′ = P \ {A}.Since P ′ is simple, I P ′ is a prime ideal (see [22]).Also, by [14, Theorem 2.1] and [13, Corollary 2.3], we have that height(I P ′ ) = |P ′ | = |P| − 1.We show that height(I P ′ ) < height(I P ).We have that I P ′ I P and I P ′ is prime.Let p be a prime ideal such that I P ⊆ p.In particular I P ′ p.Let p 0 ⊆ • • • ⊆ p n = I P ′ be a chain of prime ideals contained in I P ′ of length n = height(I P ′ ).Then p 0 ⊆ • • • ⊆ p n = I P ′ p is a chain of prime ideals contained in p, in particular we have height(p) ≥ n + 1.Since height(I P ) := min{height(q) | q ⊇ I P and q is prime}, we obtain height(I P ) ≥ n + 1, so height(I P ′ ) < height(I P ) as claimed.Therefore |P| − 1 = height(I P ′ ) < height(I P ) ≤ |P|.So the only possibility is height(I P ) = |P|.For the particular case, from [2, Lemma 3.3] we know that every closed path polyomino P contains a block of rank at least three, so there exists a cell A in P such that P \ {A} is simple.4.2.Primality of p 1 and its height.Let P be a polyomino.A binomial f = f + − f − in a binomial ideal J ⊂ S P is called redundant if it can be expressed as a linear combination of binomials in J of lower degree.A binomial is called irredundant if it is not redundant.Moreover, we denote by V + f the set of the vertices v, such that x v appears in f + , and by V − f the set of the vertices v, such that x v appears in f − .Lemma 4.11.Let P be a polyomino and φ : S P → T a ring homomorphism with T an integral domain.Let J = ker φ and f = f + − f − be a binomial in J with deg f ≥ 3. Suppose that I P ⊆ J and φ(x v ) = 0 for all v ∈ V (P).
(1) If there exist three vertices p, q ∈ V + f and r ∈ V − f such that p, q are diagonal (respectively anti-diagonal) corners of an inner interval and r is one of the anti-diagonal (respectively diagonal) corners of the same inner interval, then f is redundant in J.The same claim also holds if p, q ∈ V − f and r ∈ V + f .(2) Suppose that P has a subpolyomino having a collection of cells as in Figure 10, and that a, e f ) for some i ∈ {2, . . ., n}.Then f is redundant.Proof.For the proof of (1) see [2, Lemma 2.2].We prove (2).Observe that: So f is redundant in J by Lemma 4.11 (1) and in particular also f is redundant in J.The same claim holds if we suppose a, e 1 ∈ V − f , d ∈ V + f and e i ∈ V + f , using the same argument.
Let P be a closed path having a zig-zag walk and consider a sub-polyomino of P having the shape as in Figure 8a, up to reflections and rotations.Let {V i } i∈I be the sets of the maximal vertical edge intervals of P and {H j } j∈J be the set of the maximal horizontal edge intervals of P. Let {v i } i∈I and {h j } j∈J be the set of the variables associated respectively to {V i } i∈I and {H j } j∈J .Let w be another variable different from v i and h j , for i ∈ I and j ∈ J.Under the notation of Figure 8a, we define the following map: , that is a toric ring.We consider the following surjective ring homomorphism Let us denote the kernel of ψ by J P .Observe that the ideal J P can be viewed as the toric ideal defined in [18,Section 3], in particular we can deduce that I P = (J P ) 2 .
Remark 4.12.Let f be an irredundant binomial in J P and a ∈ V + f (resp.V − f ).Denote by H a and V a respectively the maximal horizontal and vertical edge intervals of P containing a. Then there exist a 1 ∈ H a and a

Suppose that c ∈ V +
f , e ∈ V − f .Then the following hold: (2) Exactly one of the following occurs: f in all previous occurrences.Proof.(1).Firstly, for i ∈ {2, . . ., n − 2} observe that e i ∈ V + f if and only if d i ∈ V − f .In particular, if e i ∈ V + f and d i ∈ V − f we obtain a contradiction with Lemma 4.11(1) considering e, e i , d i .So, e i / ∈ V + f and d i / ∈ V − f for all i ∈ {2, . . ., n − 2}.Moreover, if e 1 ∈ V + f then, considering its maximal vertical edge interval, we have d 1 ∈ V − f or m ∈ V − f , obtaining in each case a contradiction with Lemma 4.11 (1) considering respectively e, e 1 , d 1 and e, e 1 , m.So e 1 / ∈ V + f .Since e ∈ V − f , in its maximal horizontal edge interval there exists a vertex X ∈ V + f , and by the above arguments the only possibilities is X = e n−1 or X = e n .In both cases observe that, for i ∈ {2, . . ., n − 1}, e i ∈ V − f if and only if for all i ∈ {3, . . ., n − 1}, otherwise we have a contradiction with Lemma 4.11(1) considering X, e i , d i .Suppose e 1 ∈ V − f .Then we have necessarily e n−1 , e n ∈ V + f and, considering its vertical edge interval, the following two possibilities occur: either  f ∩ I| = 1, that is a contradiction.So, e n / ∈ V + f and we proved points (3) and the case a) of ( 2).If we assume e n ∈ V + f , with the same argument we can prove again points (3) and the case b) of (2).By our proof, it is also easy to argue that the same result holds exchanging V + f with V − f and V − f with V + f .Lemma 4.14.Let P be a closed path polyomino and f ∈ J P an irredundant binomial with deg f ≥ 3. Consider a subpolyomino having a configuration as in Figure 12.Suppose that b 1 , b 2 / ∈ V − f and that one of the following occurs: Then the following hold: (1) The same result holds exchanging V + f with V − f (and vice versa), in all occurrences above.
Proof.Suppose a1) holds.Observe that, for i ∈ {3, . . ., n − 2}, f , otherwise we have a contradiction of Lemma 4.11(1) considering a 1 , a 2 , c 1 .Therefore, considering the horizontal edge interval of a 1 , either a n−1 ∈ V + f or a n ∈ V + f .We assume that a n−1 ∈ V + f and we prove that we obtain our result with a) in point (2).Observe that, for i ∈ {3, . . ., n − 2}, In the first case we obtain the same contradiction as before, considering f ) and we have the same contradiction considering d 2 , d 1 , a n−1 .So we obtained our result with a) in point (2).With the same argument we obtain our result with b) in point (2) If we suppose at the beginning that condition a2) holds, we obtain our result with the same argument.By our proof, it is also easy to argue that the same result holds exchanging V + f with V − f and vice versa.Lemma 4.15.Let P be a closed path polyomino and f ∈ J P an irredundant binomial with deg f ≥ 3. Consider a subpolyomino having a configuration as in Figure 13.Suppose that b 1 , b 2 / ∈ V − f and that one of the following occurs:

Moreover, if P has a zig-zag walk and in addition
Proof.Suppose a1) holds.Observe that, for i ∈ {3, . . ., n − 1}, , that is a contradiction with Lemma 4.11(1) considering c 2 , b 2 , X. Therefore, at this point, we proved points (1) and (2). Suppose f we have the same contradiction with Lemma 4.11(1) considering h, ℓ, c 1 .It follows that the only possibility, for V + f in the horizontal edge interval of c 1 , is c n ∈ V + f .To avoid the same contradiction, in the vertical edge interval of c n we have to consider q ∈ V − f , and as consequence in the horizontal edge interval of q we have to consider t ∈ V + f .But in this case we contradict Lemma 4.11 (2), considering the vertices c n , t ∈ V + f and h, c 1 ∈ V − f .So, we obtain h / ∈ V − f .At this point, we proved also (3).
Suppose now g ∈ V − f and P has a zig-zag walk.By the above arguments, we showed that either In the first case we obtain a contradiction with Lemma 4.11(1) considering b n , c n , c 1 , in the second case we have either r ∈ V + f or t ∈ V + f , obtaining again the same contradiction considering respectively c n , q, r and q, t, g.So c n / ∈ V + f and ℓ ∈ V + f .Moreover also c n / ∈ V − f , otherwise either b n ∈ V + f or q ∈ V + f , obtaining in each case the same contradiction together with ℓ ∈ V + f .As consequence also b n / ∈ V + f , otherwise the only possibility is q ∈ V − f , obtaining the same contradiction considering b n , q, g.At this point we have c n , b n / ∈ V + f ∪ V − f , and considering their vertical edge interval we obtain also q / ∈ V + f ∪ V − f .Finally if we suppose the assumption r, t / ∈ V + f ∪ V − f is not true, at this point the only possibility is either r ∈ V − f and t ∈ V + f , or r ∈ V + f and t ∈ V − f .In the first case we obtain a contradiction with Lemma 4.11(1) considering r, t, g.In the second case, consider that there exists a vertex X belonging to the same vertical edge interval of t such that X ∈ V + f , and since P has a zig-zag walk then X, t, r are vertices of an inner 2-minor of P, obtaining again a contradiction with Lemma 4.11 (1).We have just proved our results in the case condition a1) holds.It is easy to understand that the same arguments hold also in case condition a2) is satisfied.By our proof, it is also easy to argue that the same result holds exchanging V + f with V − f and vice versa.
By the following result we can state that the ideal p 1 , defined in the previous section, is a prime ideal.
Theorem 4.16.Let P be a closed path polyomino having zig-zag walks and let Z P be the ideal generated by the binomials f W , for every zig-zag walk W in P. Then I P + Z P = J P .
Proof.⊇) Let f = f + − f − ∈ J P be an irredundant binomial.Since (J P ) 2 = I P , if deg f = 2 then f ∈ I P .So, suppose deg f ≥ 3. We prove that f ∈ Z P and in particular f = ±f W for some zig-zag walk W in P.
Consider the unique sub-polyomino of P having configuration as in Figure 8a and such that the points a, b, c, d, e involve the variable w in the toric ring that define J P .We first show that a, b, d, m / In the first case, there exists a vertex F ∈ V + f in the same vertical edge interval of a and since P has zig-zag walks then a, F, b are the corners of an inner 2-minor, that is a contradiction of Lemma 4.11 (1).In the second case, there exists a vertex F ∈ V + f in the same vertical edge interval of m such that m, F, b are the corners of an inner 2-minor, obtaining the same contradiction.So b / ∈ V + f and with the same argument we can prove b / ∈ f and in order to avoid contradictions the only possibility is e 1 ∈ V + f and c, e / ∈ V − f .It follows that there exists a vertex F ∈ V − f in the same horizontal edge interval of e (with F = e, e 1 ), and since P has zig-zag walks then d, e, F are the corners of an inner 2-minor.Moreover, considering a ∈ V + f , then w ∈ supp(ψ(f + )) = supp(ψ(f − )), and since b, c, e / ∈ V − f the only possibility is d ∈ V − f .So, we obtain a contradiction of Lemma 4.11 (2), considering the vertices a, d, e 1 , m, F .Therefore a / ∈ V + f and with the same argument we can prove a / ∈ V − f .Suppose f .Since P has zig-zag walks, in the first case there exist e vertex F ∈ V + f such that F belong in the same vertical edge interval of c and c, F, d are corners of the same inner 2-minor, while in the second case F belong in the same horizontal edge interval of e and F, e, d are corners of the same inner 2-minor.In both cases we obtain a contradiction of Lemma 4.11 (1).Therefore d / ∈ V + f and with the same argument we can prove d / ∈ It is verified that f ∈ ker ψ ′ and,by the results contained in [22], we have ker ψ ′ = I P ′ .So f is an irredundant binomial in I P ′ , but this means that deg f = 2, that contradicts our assumption.So, (V Then, the only possibility is either c ∈ V + f and e ∈ V − f or c ∈ V − f and e ∈ V + f .Without loss of generality we can suppose that the first possibility occurs.Now we continue our argument following the structure of P. Since P has zig-zag walks then (continuing on the "east" part) we can continue considering a subpolyomino having the same shape as one in Figure 14.Let V 1 be the set of vertices of such a subpolyomino.In particular, considering Figure 14a and Figure 14b, we set i varying on {1, . . ., n}, where b f .Therefore, by the same lemmas we can argue that . ., n}, and either j i = 1 or j i = 2}, . ., n}, and either j i = 1 or j i = 2}.
Observe that P can be built as union of the configurations in Figure 14.In particular we set P = t k=1 C k , where C k , for all k ∈ {1, . . ., t}, is a configuration as in Figure 14a or Figure 14b or Figure 14c.Let V k the set of the vertices of C k that are highlighted with a black point in the picture.Denote with c k , e k , a i,k , for j i ∈ {1, 2}, the vertices in C k corresponding to the vertices c 1 , e 1 , a in the picture, and let n k be the index such that a (1) n k ,k belong to the same horizontal edge interval of c k .Observe that, since P is a closed path, c t = c and e t = e.Moreover, starting from c 1 ∈ V + f and e 1 ∈ V − f , that we proved before, and considering the vertices in C 1 not belonging to V + f ∪ V − f (as also we have shown before), by Lemma 4.13, Lemma 4.14, Lemma 4.15 and using the same arguments we can obtain that, for all k ∈ {2, . . ., t}: . ., n k }, and either j i = 1 or j i = 2}.This means that: One can see that (following also the mentioned figures) that the variable involved in f allow to obtain a zig-zag walk W of P and that the structure of f corresponds exactly to f = f W or f = −f W (the symbol + or -depends on the convention on z i and u i , with reference to the definition of f W mentioned in the preliminaries of this paper).So, we can conclude f ∈ Z P .⊆) We know that I P ⊆ J P .Let W be a zig-zag walk and f W = ℓ i=1 x z i − ℓ i=1 x u i the related binomial.Set f + = ℓ i=1 x z i and f − = ℓ i=1 x u i , we prove that ψ(f + ) = ψ(f − ).Let j ∈ {1, . . ., ℓ}, x z j ∈ supp(f + ) and V j and H j be respectively the vertical and horizontal edge interval of z j , so v j , h j ∈ supp(ψ(f + )).We prove that v j , h j ∈ supp(ψ(f − )).Consider that P can be built as union of the configurations in Figure 14.Using the same construction of the previous part of the proof, we consider P = t k=1 C k where C k , for all k ∈ {1, . . ., t}, is a configuration as in Figure 14a, Figure 14b or Figure 14c, and denote with c k , e k , a n k ,k belong to the same horizontal edge interval of c k .It is easy to see that z j ∈ {c k , e k , a i,k } for some k ∈ {1, . . ., t}.In each case we obtain that v j , h j ∈ supp(ψ(f − )), as we explain in the following: • if z j = c k , we can consider a (j i ) n k ,k , e k+1 ∈ f − , for j i = 1 or j i = 2, with either a Finally , with reference to Figure 8a we easily obtain that either x c ∈ supp(f + ) and x e ∈ supp(f − ) or x c ∈ supp(f − ) and x e ∈ supp(f + ).So we can conclude that ψ(f So we have proved that the ideal p 1 , defined in the previous section, is prime.By the following general result we can also argue that height(p 1 ) = |P| Proposition 4.17.Let P be a collection of cells having zig-zag walks and let Z P be the ideal generated by the binomials f W , for every zig-zag walk W in P. Denoted J = I P + Z P , then height(J) ≤ |P|.Moreover if J is unmixed or height(I P ) = |P| then equality holds.
Proof.Let V J be the Q-vector space generated by the set {v − w ∈ Q n | x v − x w ∈ J}.By [12, Theorem 1.1] then height(J) ≤ dim Q V J , and if J is unmixed equality holds.We prove that dim Q V J = |P|.Observe that V J is a subspace of Q |V (P)| .For a ∈ V (P), we denote by v a the vector in Q |V (P)| whose a-th component is 1, while its other components are 0 (in particular, the set {v a | a ∈ V (P)} is the canonical basis of Q |V (P)| ).Moreover if I = [a, b] is an inner interval of P, with diagonal corners a, b and anti-diagonal corners c, d, we denote v ∈ p we obtain that x e , x c ∈ p, and consequently f W ∈ p by (3) of Remark 4.6, which is a contradiction.Therefore x m ∈ p.Under the assumption, by Lemma 4.3, x v ∈ p for all v ∈ N (P).Therefore, we have p 2 ⊆ p.Since p is a minimal prime of I P , p 2 is a prime ideal (see Lemma 4.9) and I P ⊆ p 2 by Lemma 4.8, we get p = p 2 .Hence the proof.
We are now ready to prove our main theorem.We recall that an ideal I of K[x 1 , . . ., x n ] is called unmixed if all associated prime ideals of I have the same height.Proof.First, note that p 1 and p 2 are prime ideals by Proposition 4.9 and Theorem 4.16.Clearly, I P ⊂ p 1 and by Lemma 4.8, I P ⊂ p 2 .Since height(p 1 ) = height(p 2 ) = height(I P ) by Propositions 4.10, 4.9 and 4.17, p 1 and p 2 are minimal prime ideals containing I P .Moreover, by [4] there exists a Gröbner basis of I P with square-free initial terms, so I P is radical (see the proof of [11,Corollary 2.2]).Therefore, every associated prime of I P is minimal.So it suffices to show that p 1 and p 2 are the only minimal prime ideals containing I P .Let p be a minimal prime of I P .By [2, Theorem 6.2], P contain zig-zag walks.If there exists a zig-zag walk W of P such that f W / ∈ p, then p = p 2 by Lemma 4.18.If for all zig-zag walk W of P, f W ∈ p, then p 1 ⊆ p.Since p 1 is a prime ideal, we get that p = p 1 .Hence the proof.

Insights and open questions
Let P be a closed path polyomino.Comparing Theorem 4.19 with Theorem 3.13 we can observe that p 1 = J ∅ = L P .Moreover Y = N (P) ∪ M (P) is an admissible set of P and p 2 = J Y .In such a particular case the polyocollection P (Y ) consists of the disjoint intervals related to the binomials in R(P).See for instance the closed path in Figure 15, where the vertices in the set Y are highlighted in green and P (Y ) consists of the red intervals.
Observe that not all admissible sets X of P are related to a minimal prime of I P .In fact, consider in Figure 16a the same polyomino with the highlighted vertices a and b.Then the set {a, b} is an admissible set of P, but J {a,b} is not a minimal prime of I P , since J ∅ J {a,b} .The related polyocollection P ({a,b}) is pictured in Figure 16b.Some questions arise from the results obtained in this work: (a) If P is a collection of cells it is well know that some properties of the ideal I P are related to the combinatorics of P. For instance it is well known that if P is simple then I P is a normal Cohen-Macaulay domain of dimension V (P) − |P| (see [14,22]).Also the Gorenstein property is known for some classes of polyominoes (see [1,5,20,21,23]).Moreover, referring to Figure 16, note that I P ({a,b}) is not prime.In fact, if W is a zig-zag walk of the polyomino in Figure 16a, it is not difficult to see that the binomial f W is a zero divisor of I P ({a,b}) (by the same arguments explained at the beginning of Section 4).Furthermore, I P ({a,b}) is radical, since the set of generators forms the reduced Gröbner basis with respect to a suitable order obtained as done in [4].In light of the previous considerations, we wonder if some results holding for polyominoes can be extended also for polyocollections.(b) For a collection of cells P, it is an open question whether the ideal I P is always radical.
If this is true, then Theorem 3.13 always provides a primary decomposition of it.Such a question can be extended naturally for the ideal I C related to a polyocollection.Another property that could be investigated is the unmixedness for the ideal related to a polyomino (and in general for a polyocollection), that we find for closed paths.(c) In order to have a better description of the primary decomposition provided in Theorem 3.13, we should have a better understanding of the ideal L C for a polyocollection C. For a closed path P we have proved that L P = I P + Z P , where Z P is the ideal generated by the binomials f W related to zig-zag walks.Anyway we know that this is not true for all polyominoes, as shown in [18,Example 3.8].In general, for a polyomino P, L P = I P + T P where T P is a binomial ideal and if W is a zig-zag walk then f W ∈ T P .It would be interesting to know the (combinatorial) structure of the generators of T P for other classes of polyominoes (or polyocollections) P. (d) For a closed path P, we find that the minimal prime ideal of I P , different to L P , is related to an admissible set containing the (unique) necklace of all zig-zag walks.Anyway, in general a polyomino with zig-zag walks has different necklaces related to different zigzag walks.The concept of zig-zag walk can be formulated also for polyocollections.In general, if C is a polyocollection, we ask if in the primary decomposition provided in Theorem 3.13, the minimal primes of I C different to L C are ideals of kind J X where X is related in some way to a necklace of a zig-zag walk.Examples with Macaulay2 suggest such a behavior for some polyomino ideals.
) and b = (k, l) in Z 2 with a ≤ b.The set [a, b] = {(m, n) ∈ Z 2 : i ≤ m ≤ k, j ≤ n ≤ l} is called an interval of Z 2 .In addition, if i < k and j < l then [a, b] is a proper interval.If j = l (or i = k) then a and b are in horizontal (or vertical) position.We also denote ]a, b[= {(m, n) ∈ Z 2 : i < m < k, j < n < l} and ]a, b] or [a, b[ with the usual meaning.We also need to consider intervals in R 2 , for which we use the notations c([a, b]) = {(m, n) ∈ R 2 : i ≤ m ≤ k, j ≤ n ≤ l}, that is the closure of [a, b] in R 2 , and int([a, b]) = {(r, s) ∈ R 2 : i < r < k, j < s < l}, that is the interior of [a, b] in R 2 .Suppose that [a, b]is a proper interval.In such a case we say a, b the diagonal corners of [a, b] and c = (i, l), d = (k, j) the anti-diagonal corners of [a, b].Moreover, the elements a, b, c and d are called respectively the lower left, upper right, upper left and lower right corners of [a, b].We also call V ([a, b]) = {a, b, c, d} the set of vertices of the interval, while the sets [a, c], [a, d], [b, d], [b, c] are the edges of the interval and we denote E([a, b]) = {[a, c], [a, d], [b, d], [b, c]}.If [a, c] is an edge of an interval, we call the set {a, c} the boundary of the edge.Let S be a non-empty collection of intervals in Z 2 .The set of the vertices and of the edges of S are respectively V (S) = I∈S V (I) and E(S) = I∈S E(I).We denote by |S| the number of intervals belonging to the collection S, called also the rank of S. A proper interval C = [a, b] with b = a + (1, 1) is called a cell of Z 2 .Consider now S be a collection of cells.If C and D are two distinct cells of S, then a walk from C to D in S is a sequence
a, b] is an inner interval of C, having anti-diagonal corners c, d, then we call the binomial f I = x a x b − x c x d ∈ S C an inner 2-minor of C. We define by I C the ideal generated by the binomials f I for all inner intervals I of C and we call it the polyocollection ideal of C. The quotient ring K[C] = S C /I C is said the coordinate ring of C. For a monomial u ∈ S C , we define the support of u, denoted by supp(u) to be the set of variables x r ∈ S C such that x r divides u in S C .
as K-algebras.With reference to Example 3.1, note that C 1 , C 2 and C 4 are algebraically isomorphic to the collections of cells shown in Figures 4a, 4b and 4c respectively.

Figure 4 .
Figure 4.The collections of cells which are algebraically isomorphic to the polyocollections of Figures 2a, 2b and 2d, respectively.

Figure 5 .
Figure 5.The polyocollection and collections of cells examined in Discussion 3.4.

3. 1 .
The lattice ideal related to a polyocollections.Let C be a polyocollection.For a ∈ V (C) denote with v a the vector in Z |V (C)| having 1 in the coordinate indexed by a and 0 in all other coordinates.If [a, b] ∈ C is an interval having a, b as diagonal corners, and c, d as anti-diagonal corners, we denote v [a,b] = v a +v b −v c −v d ∈ Z |V (C)| .We define Λ C the sub-lattice of Z |V (C)| generated by the vectors v I for all I ∈ C. Let n = |V (C)|, we recall some known notations.If v ∈ N n we denote as usual with x v the monomial in S C having v as exponent vector.If e ∈ Z n we denote with e + the vector obtained from e by replacing all negative components by zero, and e − = −(e − e + ).

Lemma 3 . 5 .
Let C be a polyocollection and B = {v I | I ∈ C} ∪ {v a | a ∈ F (C)}.Then B is a basis of the group Z |V (C)| .Proof.Let n = |V (C)| and M be the n × n matrix whose column vectors are B = {v

Case 2 Theorem 3 . 6 .
Both c ∈ F (C) and d ∈ F (C).In this case we can use the same argument, considering det(M ) = ± det(M ′′′ ), where M ′′′ is the matrix associated to C ′ = C \ {J} and it is obtained from M by removing the rows labelled with a, c, d and the columns labelled by J, c, d.Case 3 c and d are both the lower left corner of an interval in C. Also in this case we can use the same argument, considering det(M ) = ± det(M ′ ), where M ′ is the matrix associated to C ′ = C \ {J} and it is obtained from M by removing the row labelled with a and the column labelled by J. Let C be a polyocollection.Then L C is a prime ideal.Proof.Let n = |V (C)|.By Lemma 3.5, every v ∈ N n can be expressed in an unique way as Z-linear combination of the vectors in B = {v I | I ∈ C} ∪ {v a | a ∈ F (C)}.In particular, for all a ∈ V (C), we have v a = I∈C λ (a)

Figure 6 .
Figure 6.Two intervals I, J such that I ∩ J / ∈ E(I) ∩ E(J) and |F ∩ G| > 1 for some F ∈ E(I) and G ∈ E(J).
b} with a, b both diagonal (or anti-diagonal) corners of I. So, considering the binomial f I = x a x b − x c x d , we obtain that either x a x b ∈ p with a, b / ∈ Y or x c x d ∈ p with c, d / ∈ Y , that is a contradiction for the primality of p. Now, we can write ({x a | a ∈ Y }) + I C = ({x a | a ∈ Y }) + I C (Y ) and it is contained in p.If f ∈ L C (Y ) then by Lemma 3.7, there exists a monomial u ∈ S C (Y ) such that f u ∈ I C (Y ) ⊆ p, and in particular supp(u) ∩ {x a | a ∈ Y } = ∅.As consequence u / ∈ p, otherwise from the primality of p there exists a x a ∈ supp(u) such that x a ∈ p, obtaining a ∈ Y , that is a contradiction.Therefore f ∈ p, so ({x a | a ∈ Y }) + L C (Y ) ⊆ p and by the minimality of p we obtain ({x a | a ∈ Y }) + L C (Y ) = p.Theorem 3.13.Let C be a polyocollection.Then √ I C = X J X where X moves overall the admissible sets of C.

Figure 7 .
Figure 7.A closed path with an L-configuration and a ladder of three steps.

Figure 8 .
Figure 8. Possible changes of direction in a closed path having a zig-zag walk.

3 b 1 b 2 c 1 c 2 Figure 9 .
Figure 9.An example of a closed path having zig-zag walks.

Lemma 4 . 13 .
Let P be a closed path polyomino and f ∈ J P an irredundant binomial with deg f ≥ 3. Consider a subpolyomino having a configuration as inFigure 11.
cases lead to a contradiction by Lemma 4.11(1) considering respectively c, m, a and b, m, e 1 .For what concern the vertex d 1 , we obtain obtain a contradiction of Lemma 4.11(1) considering e n−1 , d n−1 , e.So d n−1 / ∈ V − f and considering the same vertical edge interval we obtain ℓ∈ V − f .If d n ∈ V − f then, considering its vertical edge interval, we have g ∈ V + f or e n ∈ V + f ,obtaining in each case a contradiction with Lemma 4.11(1) considering respectively g, ℓ, e n−1 and d n , e n , e.So d n / ∈ V − f .Moreover e n / ∈ V − f , otherwise we have the same contradiction considering the vertices e n , e n−1 , ℓ. Finally if e n ∈ V + f then, denoting with I the horizontal edge interval of e, we have |V + f ∩ I| = 2 and |V −
, b, c, d, e, m} = ∅.Then all variables of f are contained in S ′ = K[x v | v ∈ V (P) \ {a, b, c, d, e, m}].Consider ψ ′ the restriction of ψ on S ′ and P ′ the polyomino obtained by P removing the cells in [c, m] and [e, m].

Figure 14 .
Figure 14.Possible configurations of C k , up to reflections or rotations.By Lemma 4.13, Lemma 4.14 and Lemma 4.15 observe that, in the horizontal edge interval of c, all vertices different from c and e 1 does not belong toV + ∪ V − .So, since c ∈ V + f , it is verified that e 1 ∈ V −f .Therefore, by the same lemmas we can argue that by the proof of[12, Theorem 3.1]  we know that the vectors in B are linearly independent and if I is an inner interval ofP then v I ∈ B .Moreover, if f W = l i=1 x z i − l i=1x u i is the binomial associated to a zig-zag walk W :I 1 , . . ., I l , it is not difficult to check that r i=1 v z i − r i=1 v u i = r i=1 (−1) i+1 v I i ∈ B .So V J = B and in particular dim Q V J = |P|.Finally, if |P| = height(I P ), then |P| = height(I P ) ≤ height(J) ≤ |P|.Therefore height(J) = |P|.4.3.Final result.Lemma 4.18.Let P be a non-prime closed path polyomino and let p be a minimal prime of I P .If f W /∈ p for some zig-zag walk W of P, then p = p 2 , where p 2 is as defined in Notation 4.7.Proof.Suppose f W = l i=1 x z i − l i=1 x u i / ∈ p for some W. First we show that under the labelling of Figure8a, xm ∈ p.Note that x m x e − x b x e 1 , x m x c − x a x d 1 ∈ p. Since, by Lemma 4.3 and Remark 4.6, x b , x d 1 ∈ p, we get x m x e , x m x c ∈ p.If x m /

Theorem 4 . 19 .
Let P be a non-prime closed path polyomino.Then I P = p 1 ∩ p 2 , where p 1 and p 2 are as defined in Notation 4.7.In particular, I P is unmixed.
x 12 x 25 x 31 x 43 − x 13 x 21 x 35 x 42 , x 12 x 24 x 31 x 43 − x 13 x 21 x 34 x 42 ) q 2 =(x 33 , x 32 , x 23 , x 22 , x 24 x 35 − x 25 x 34 ) One can immediately see that there is a monomial ideal generated by variables in the primary decomposition of I C but none of the ideals in the primary decomposition of I P is generated by monomials.Hence K[C] is not isomorphic to K[P].