Michela Ceria
email: michela.ceria@unitn.it

Bar code for monomial ideals

Keywords: (strongly) stable ideals, integer partitions, determinantal formulas, Pommaret basis

The aim of this paper is to count 0-dimensional stable and strongly stable ideals in 2 and 3 variables, given their (constant) affine Hilbert polynomial p, by means of a bijection between these ideals and some integer partitions of p, which can be counted via determinantal formulas. This will be achieved by the Bar Code, a bidimensional diagram that allows to represent any finite set of terms M and desume many properties of the corresponding monomial ideal I, if M is an order ideal.

Introduction

Strongly stable ideals play a special role in the study of Hilbert scheme, which was first introduced by ?. Indeed, their escalier allows to study the Hilbert function of any homogeneous ideal using the theory of Groebner bases, as shown by ? and ?. The notion of generic initial ideal was introduced by ? with the name of Grauert invariant. Galligo proved that the generic initial ideal of any homogeneous ideal is closed w.r.t the action of the Borel group. He then gave a combinatorial characterization of such ideals, provided that they are defined over a field of characteristic zero. ? and ? called these monomial ideals 0-Borel-fixed ideals; ?? renamed them strongly stable ideals. A combinatorial description of ideals that are closed w.r.t the action of the Borel group over a polynomial ring over a field of characteristic p > 0 has been provided by ?. And Galligo's result has been extended to that setting by ?. The notion of stable ideal has been introduced by ? as a generalization of 0-Borel-fixed ideals. In their work, they gave a minimal resolution for stable ideals, that was then used by ? and ? to extend Macaulay's result (?); they proved that the lex-segment ideal has maximal Betti numbers, among all ideals with the same Hilbert function. In connection with the study of Hilbert schemes (see ??????), it has been considered relevant to list all stable ideals (?) and strongly stable ideals (??) with a fixed Hilbert polynomial. The aim of this paper is to count zerodimensional stable and strongly stable ideals in 2 and 3 variables, given their (constant) affine Hilbert polynomial. To do so, we first introduce a bidimensional structure -the Bar Code -which allows, a priori, to represent any (finite 1 ) set of terms M and, if M is an order ideal, to desume many combinatorial properties of the corresponding monomial ideal I (???). For example, a Pommaret basis (??) of I can be easily desumed. The Bar Code is strictly connected to Felzeghy-Rath-Ronyay's Lex Trie (??), but our goal and methods are different. With the Bar Code, we provide a connection between zerodimensional (strongly) stable monomial ideals and integer partitions. In the two-variable case, there is a bijection between (strongly) stable ideals with affine Hilbert polynomial p and partitions of p with distinct parts. The case of three variables is more complicated and more technology is required. Thanks to the Bar Code, though, we can provide a bijection between (strongly) stable ideals and some special plane partitions of their constant affine Hilbert polynomial p. These partitions have been studied by ??, who proved determinantal formulas to find their norm generating functions and finally count them. As an example, we take the stable monomial ideal I 1 = (x [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] 1 , x 1 x 2 , x2 2 , x 2 1 x 3 , x 2 x 3 , x 2 3 ) k[x 1 , x 2 , x 3 ], whose Groebner escalier is N(I 1 ) = {1, x 1 , x [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 1 , x 2 , x 3 , x 1 x 3 }. We represent it by the Bar Code and the plane partition below

1 x 1 x 2 1 x 2 x 3 x 1 x 3 x 3 1 x 1 x 2 x 2 1 x 3 x 2 2 x 2 x 3 x 2 3 3 1 2
The correspondence can be seen observing the rows of the Bar Code above: since the bottom row is composed by two segments, the plane partition has exactly two rows. The number of entries in the i-th row of the partition, i = 1, 2 (i.e. 2 and 1 resp.), is given by the number of segments in the middle-row, lying over the i-th segment of the bottom row. Finally, the entries are represented by the number of segments in the top row, lying over the segments representing the corresponding entry. With this bijection and the determinantal formulas by Krattenthaler, we are able to count (strongly) stable ideals in three variables. A Bar Code can in principle represent finite sets of terms in any number of variables. Nevertheless, we do not generalize our results to the case of 4 or more variables because it would require the introduction of n-dimensional partitions. And -in my knowledge -the way to count them 2 .

Some algebraic notation

Throughout this paper we mainly follow the notation of ?, for what concerns monomial ideals. We denote by P := k[x 1 , ..., x n ] the graded ring of polynomials in n variables with coefficients in the field k.

The semigroup of terms, generated by {x 1 , ...,

x n } is T := {x γ := x γ 1 1 • • • x γ n n | γ := (γ 1 , ..., γ n ) ∈ N n }. If τ = x γ 1 1 • • • x γ n n , then deg(τ) = n i=1 γ i is
T ≤d = {x γ ∈ T | deg(x γ ) ≤ d}.
Similarly, P ≤d denotes the degree ≤ d part of P and given an ideal I of P, I ≤d is its degree ≤ d part, i.e. I ≤d = I ∩ P ≤d ; P ≤d is the vector space generated by T ≤d and I ≤d is a vector subspace of P ≤d .

A semigroup ordering < on T is a total ordering such that τ 1 < τ 2 ⇒ ττ 1 < ττ 2 , ∀τ, τ 1 , τ 2 ∈ T . For each semigroup ordering < on T , we can represent a polynomial f ∈ P as a linear combination of terms arranged w.r.t. <, with coefficients in the base field k:

f = τ∈T c( f, τ)τ = s i=1 c( f, τ i )τ i : c( f, τ i ) ∈ k * , τ i ∈ T , τ 1 > ... > τ s , with T( f ) := τ 1
the leading term of f . A term ordering is a semigroup ordering such that 1 is lower than every variable or, equivalently, it is a well ordering. Unless otherwise specified, we consider the lexicographical ordering induced by x 1 < ... < x n , i.e:

x γ 1 1 • • • x γ n n < Lex x δ 1 1 • • • x δ n n ⇔ ∃ j | γ j < δ j , γ i = δ i , ∀i > j,
which is a term ordering. Since we will consider the lexicographical ordering throughout this whole, there is no room for confusion. We will therefore drop the subscript and denote the lexicographical order by < instead of < Lex . For each term τ ∈ T and x j |τ, the only υ ∈ T such that τ = x j υ is called j-th predecessor of τ. Given a term τ ∈ T , min(τ) is the smallest variable dividing τ. For M ⊂ T , M is the list obtained by ordering the elements of M increasingly w.r.t. Lex. For example, if

M = {x 2 , x 2 1 } ⊂ k[x 1 , x 2 ], x 1 < x 2 , M = [x 2 1 , x 2 ]. A subset J ⊆ T is a semigroup ideal if τ ∈ J ⇒ στ ∈ J, ∀σ ∈ T ; a subset N ⊆ T is an order ideal if τ ∈ N ⇒ σ ∈ N ∀σ|τ.
We have that N ⊆ T is an order ideal if and only if T \ N = J is a semigroup ideal. Given a semigroup ideal J ⊂ T we define N(J) := T \ J. The minimal set of generators G(J) of J, called the monomial basis of J, satisfies the conditions below

G(J) := {τ ∈ J | each predecessor of τ ∈ N(J)} = {τ ∈ T | N(J) ∪ {τ} is an order ideal, τ N(J)}.
For all subsets G ⊂ P, we have T{G} := {T(g), g ∈ G} and T(G) := {τT(g), τ ∈ T , g ∈ G}. For d sufficiently large, the affine Hilbert function of I can be written as:

HF I (d) = l i=0 b i d l -i ,
where l is the Krull dimension of V(I), b i are integers and b 0 is positive. We give now a brief overview on the way the escalier N(I) of a zerodimensional monomial ideal I is represented in literature. First of all, we point out that, since T N n , a term

x γ = x γ 1 1 • • • x γ n n
can be regarded as the point (γ 1 , ..., γ n ) in the n-dimensional space. Using this convention, we can represent N(I) with a n-dimensional picture, called tower structure of I (for more details see ? (?, 33)). For a radical ideal

I, if |N(I)| < ∞ also |V(I)| < ∞ (|N(I)| = |V(I)|)
, so the associated variety consists of a finite set of points. It has been proved by ? that, in this case, any ordering on the points in V(I) gives a precise one-to-one correspondence between the terms in N(I) and the points in V(I). So it is also possible to label points in the tower structure with the corresponding point of the ordered V(I). This construction is kind of "inverse" with respect to the one by ? p.548, in which from a finite order ideal N, a finite set of point X and a Groebner basis of I(X) are produced so that the lexicographical Groebner escalier of I(X) is exactly N.

Unfortunately -as one can easily understand -the tower structure becomes rather complicated in the case of numerous terms in N(I) and/or of linearly independent variables 3 in P, i.e. when we deal with a large number of points and/or we have to draw the structure for high-dimensional spaces [START_REF]k i=1 i+α i -1 j=i[END_REF] . Moreover, from the tower structure it is impossible to understand the ring in which the Groebner escalier has been computed, since linearly dependent variables are discarded (see ?, ?). For these reasons, we now introduce the Bar Code diagram, namely a (rather compact) bidimensional picture that keeps track of all the information contained in the tower structure, making them easy to extract.

Bar Code associated to a finite set of terms

In this section we define Bar Codes and we discuss how to associate a Bar Code to an order ideal and vice versa (see ? for more details). • B (i) j the j-th bar (from left to right) of the i-th row (from top to bottom) 1 ≤ i ≤ n, i.e. the j-th i-bar;

• µ(i) the number of bars of the i-th row

• l 1 (B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j ) := 1, ∀ j ∈ {1, 2, ..., µ(1)} the (1-)length of the 1-bars;

• l i (B (k) j ), 2 ≤ k ≤ n, 1 ≤ i ≤ k -1, 1 ≤ j ≤ µ(k) the i-length of B (k) j , i.e. the number of i-bars lying over B (k) j a. ∀i, j, 1 ≤ i ≤ n -1, 1 ≤ j ≤ µ(i), ∃! j ∈ {1, ..., µ(i + 1)} s.t. B (i+1) j lies under B (i) j b. ∀i 1 , i 2 ∈ {1, ..., n}, µ(i 1 ) j 1 =1 l 1 (B (i 1 ) j 1 ) = µ(i 2 ) j 2 =1 l 1 (B (i 2 )
j 2 ); we will then say that all the rows have the same length.

We denote by B n the set of all Bar Codes composed by n rows. Note that if 1

≤ i 1 < i 2 ≤ n, 1 ≤ j 1 ≤ µ(i 1 ), 1 ≤ j 2 ≤ µ(i 2 ) and B (i 2 )
j 2 lies below B (i 1 ) j 1 , then l 1 (B (i 2 ) j 2 ) ≥ l 1 (B (i 1 ) j 1 ). Definition 4. We call bar list of a Bar Code B ∈ B n , the list L B := (µ(1), ..., µ(n)). [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] The zerodimensional radical ideals

I = (x 3 1 -3x 2 1 + 2x 1 , x 1 x 2 , x 2 2 -2x 2 ) k[x 1 , x 2 ] and I = (x 3 1 -x 1 , x 1 x 2 , x 2 2 - 2x 2 , x 3 + x 2 1 -x 1 ) k[x 1 , x 2 ,
x 3 ] have exactly the same tower structure, since x 3 N(I ), being leading term of x 3 + x 2 1x 1 . In general, the reason is that there is a polynomial (x 3 -τ∈N(I ) c τ τ) ∈ I . [START_REF]k i=1 i+α i -1 j=i[END_REF] Actually, in this context, "high-dimensional" means "of dimension greater than or equal to" 4.

Definition 5. Given a Bar Code B, for each 1 ≤ l ≤ n, l ≤ i ≤ n, 1 ≤ j ≤ µ(i), an l-block associated to a bar B (i) j of B is the set containing B (i) j itself and all the bars of the (l -1) rows lying immediately above B (i) j . Example 6. An example of Bar Code B ∈ B 3 is displayed below. The 1-bars have length 1. As regards the other rows, l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 1 ) = 2, l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 2 ) = l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 3 )

= l 1 (B (2) 4 ) = 1, l 2 (B (3) 1 ) = 1, l 1 (B (3) 1 ) = 2 and l 2 (B (3) 2 ) = l 1 (B (3) 2 ) = 3, so µ(1) j 1 =1 l 1 (B (1) j 1 ) = µ(2) j 2 =1 l 1 (B (2) j 2 ) = µ(3) j 3 =1 l 1 (B (3) j 3 ) = 5.
The bar list is L B := (5, 4, 2). Consider the bar B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] 2 (so i = n = 3, j = 2 = µ(3)) and set l = 2. The 2-block associated to B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] 2 consists of B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] 2 itself and of the bars B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 2 , B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 3 , B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 4 , as shown by the thick blue lines in the picture. We can associate a Bar Code to any finite set of terms. We sketch the construction of ? and then we give an alternative construction, suggested by a referee, which applies the construction given by ?? for building the point trie. First of all, given a term τ

= x γ 1 1 • • • x γ n n ∈ T ⊂ k[x 1 , ...,
x n ], for each i ∈ {1, ..., n}, we take

P x i (τ) := x γ i i • • • x γ n n ∈ T . Taken a finite set of terms M ⊂ T , |M| = m < ∞, for each i ∈ {1, ..., n}, we define M [i] := P x i (M) := {P x i (τ)|τ ∈ M}.
Then we order M's elements increasingly w.r.t. Lex, getting the list M = [τ 1 , ..., τ m ], we construct the sets M [i] , and the corresponding lexicographically ordered lists M

[i] 5 , for i = 1, ..., n. We can now define the n × m matrix of terms M s.t. its i-th row is M [i] , i = 1, ..., n, i.e. 1. take the i-th row of M, i.e. M

M :=                  P x 1 (τ 1
[i]

2. consider all the sublists of repeated terms, i.e. [P x i (τ j 1 ), P x i (τ j 1 +1 ), ..., P x i (τ j 1 +h )] s.t. P x i (τ j 1 ) = P x i (τ j 1 +1 ) = ... = P x i (τ j 1 +h ), noticing that6 0 ≤ h < m 3. underline each sublist with a segment 4. delete the terms of M [i] , leaving only the segments (i.e. the i-bars).

We usually label each 1-bar B (1) j , j ∈ {1, ..., µ(1)} with the term τ j ∈ M. We sketch now, as a tool for our alternative construction, the Σ-algorithm and the point trie definition, deeply depending on ?. Let Ω be a set and = an equivalence relation on it; such a relation is extended to Ω n by setting A := (a 1 , ..., a n ),

B := (b 1 , .., , b n ) and A = B if and only if ∀1 ≤ i ≤ n, a i = b i . We call witness of A, B ∈ Ω n the least i such that a i b i . Let π : Ω n → Ω i be the projection map s.t. π i ((a 1 , ..., a n )) = (a 1 , ..., a i ). If {p 1 , ..., p N } ⊂ Ω n , we define Σ 0 = {{1, ..., N}} and Σ i , 1 ≤ i ≤ n the set of equivalence classes of π i (p 1 ), ..., π i (p N ). Notice that |Σ n | = N.
The point trie is a particular tree representation for the elements in Ω n , constructed using the Σ i 's: the vertices are labelled by the elements in the Σ i 's and there is an edge from a vertex labelled by Σ i,k ∈ Σ i to a vertex with label Σ i+1,h ∈ Σ i+1 exactly when Σ i+1,h ⊂ Σ i,k . Following the suggestion of the referee and applying the correlation between monomials and points introduced by ? p. 548, ?? we can now give an alternative construction of the Bar Code, deduced by the point trie.

Let Ω = N; then Ω n = N n T can be regarded as the set of the exponents' lists of each term in

n variables: if τ = x γ = x γ 1 1 • • • x γ n n
it can be identified by the list (γ n , ..., γ 1 ). This allows to build the Bar Code of a finite set M ⊂ T (or, equivalently, of the lex-ordered list M) as follows:

• let M = {(γ n , ..., γ 1 ) ∈ N n := x γ = x γ 1 1 • • • x γ n n ∈ M};
• compute the Σ i 's w.r.t. M and return them as

                 Σ n Σ n-1 . . . Σ 1                  ; • substitute each Σ i,k ∈ Σ i , 1 ≤ i ≤ n with a bar, whose length is |Σ i,k |.
The obtained diagram is a Bar Code in the sense of Definition 3.

Example 8. For M = {1, x 1 , x 2 , x 3 } ⊂ k[x 1 , x 2 , x 3 ], we have M = {p 1 = (0, 0, 0), p 2 = (0, 0, 1), p 3 = (0, 1, 0), p 4 = (1, 0, 0)}, so we have           Σ 3 = {{1}, {2}, {3}, {4}} Σ 2 = {{1, 2}, {3}, {4}} Σ 1 = {{1, 2, 3}, {4}}           {1, 2, 3, 4} {1, 2, 3} {4} {1, 2} {3} {4} {1} {2} {3} {4} 0 1 0 1 1 0 1 0 0 0 3 2 1 1 x 1 x 2 x 3
Remark 9. We can easily observe that Bar Codes associated to different sets of terms need not to be different. For example, if

M := {1, x 1 }, M := {x 1 , x 2 1 } ⊂ k[x 1 , x 2 ]
are associated to the same Bar Code. We will soon see that this cannot happen for order ideals. Now we explain how to associate a finite set of terms M B to a given Bar Code B. There are two ways to do that: the first one (explained in ? but omitted here since not relevant for this paper) allows to associate infinite sets of terms to each B. The second one allows to associate a unique set of terms to each B by means of the steps below:

B1 take the n-th row, composed by the bars

B (n) 1 , ..., B (n) µ(n) . Let l 1 (B (n) j ) = (n) j , for j ∈ {1, ..., µ(n)}. Label each bar B (n) j with (n) j copies of x j-1 n . B2 For each i = 1, ..., n -1, 1 ≤ j ≤ µ(n -i + 1) consider the bar B (n-i+1)
-i)-bars B (n-i) j , ..., B (n-i) j+h lying immediately above B (n-i+1) j ; note that h satisfies 0 ≤ h ≤ µ(n -i) -j. Denote the 1-lengths of B (n-i) j , ..., B (n-i) j+h by l 1 (B (n-i) j ) = (n-i) j ,..., l 1 (B (n-i) j+h ) = (n-i) j+h . For each 0 ≤ k ≤ h, label B (n-i) j+k with (n-i) j+k copies of τx k n-i .
Note that not all Bar Codes can be associated to order ideals (see ? for a detailed example); since we will deal with order ideals, we define admissible Bar Codes as follows:

Definition 10. A Bar Code B is admissible if the set M obtained by applying B1 and B2 to B is an order ideal.

Remark 11. By definition of order ideal, using B1 and B2 is the only way an order ideal can be associated to an admissible Bar Code. Indeed, if we label two consecutive bars with two terms τx a i i , τx a i +h i , h > 1, then also the terms σ with P x i (σ) = τx a i +1 i would belong to M and σ would have to label a bar between those labelled by τx a i i and τx a i +h i , giving a contradiction.

We now need an admissibility criterion for Bar Codes. In order to state it, we start with the following trivial lemma.

Lemma 12. Given a set M ⊂ T , the following conditions are equivalent

1. M is an order ideal. 2. ∀τ ∈ M, if σ | τ, then σ ∈ M. 3. ∀τ ∈ M each predecessor of τ belongs to M.
We give then the definition of e-list, associated to each 1-bar of a given Bar Code.

Definition 13. Given a Bar Code B, let us consider a 1-bar B (1) j 1 , with j 1 ∈ {1, ..., µ(1)}. The e-list associated to B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j 1 is the n-tuple e(B (1) j 1 ) := (b j 1 ,1 , ...., b j 1 ,n ), defined as follows:

• consider the n-bar B (n) j n , lying under B (1) j 1 . The number of n-bars on the left of B (n) j n is b j 1 ,n .

• for each i = 1, ..., n -1, let B (n-i+1) j n-i+1 and B (n-i) j n-i be the (ni + 1)-bar and the (ni)-bar lying under B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j 1 . Consider the (ni + 1)-block associated to B (n-i+1) j n-i+1 . The number of (ni)-bars of the block, which lie on the left of B (n-i)

j n-i is b j 1 ,n-i .
Example 14. For the Bar Code B of example 8 the e-lists are e(B (1) 1 ) := (0, 0, 0); e(B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] 2 ) := (1, 0, 0); e(B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] 3 ) := (0, 1, 0) and e(B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] 4 ) := (0, 0, 1).

Remark 15. Given a Bar Code B, fix a 1-bar B (1) j , with j ∈ {1, ..., µ(1)}. Comparing definition 13 and the steps B1 and B2 described above, we can observe that the values of the e-list e(B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j ) := (b j,1 , ...., b j,n ) are the exponents of the term labelling B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j , obtained applying B1 and B2 to B. Proposition 16 (Admissibility criterion). A Bar Code B is admissible if and only if, for each 1bar B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j , j ∈ {1, ..., µ(1)}, the e-list e(B (1)

j ) = (b j,1 , ...., b j,n ) satisfies the following condition: ∀k ∈ {1, ..., n} s.t. b j,k > 0, ∃ j ∈ {1, ..., µ(1)} \ { j} s.t. e(B (1) j ) = (b j,1 , ..., b j,k-1 , (b j,k ) -1, b j,k+1 , ..., b j,n ).
Proof. It is a trivial consequence of Lemma 12 and Remark 15. Take the sets A n := {B ∈ B n s.t. B admissible}, N n := {N ⊂ T , |N| < ∞ s.t. N order ideal}. We can define the map η : A n → N n ; B → N, where N is the order ideal obtained applying B1 and B2 to B. By B1 and B2, η is a function; it is trivially surjective. Moreover, it is injective since, if B, B ∈ A n , B B they have at least one pair of indices i, j s.t. l 1 (B (i) j ) l 1 (B (i) j ) and this changes the result of the application of B1/B2. From the arguments above, we can deduce that there is a bijection between admissible n-Bar Codes and finite order ideals of T ⊂ k[x 1 , ..., x n ]. In the Lemma below we state some properties of admissible Bar Codes related to lengths.

Lemma 17. If B is an admissible Bar Code, the following two conditions hold:

a) l n-1 (B (n) 1 ) ≥ ... ≥ l n-1 (B (n) µ(n) ) b) if for some 1 ≤ i ≤ n -2, 1 ≤ j ≤ µ(i + 2) we take the (i + 2)-bar B (i+2) j and B (i+1) j 1 , ..., B (i+1) j 1 +h
(where h satisfies h ∈ {0, ..., µ(i + 1)j 1 }) are the (i + 1)-bars over

B (i+2) j , then l i (B (i+1) j 1 ) ≥ ... ≥ l i (B (i+1) j 1 +h ).
Proof. Let us start proving a). If for some 1

≤ l ≤ µ(n) -1 it holds l n-1 (B (n) l ) < l n-1 (B (n) l+1
) the Bar Code would be not admissible. Indeed, let B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] k be the rightmost 1-bar over B (n) l+1 and e(B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF]

k ) = (b k,1 , ..., b k,n ) be its e-list. By construction (see Definition 13), b k,n-1 = l n-1 (B (n) l+1 ) -1. Now, this proves that there cannot exist a 1-bar labelling (b k,1 , ..., b k,n-1 , b k,n -1), since l n-1 (B (n) l ) < l n-1 (B (n) l+1
) and so the 1-bars B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF]

k over B (n) l have b k,n-1 ≤ l n-1 (B (n) l ) -1 < l n-1 (B (n) l+1 ) -1 = b k,n-1
, contradicting the assumption of admissibility (see Proposition 16). An analogous argument proves that if for some ∀1 ≤ i ≤ n -2, ∀1 ≤ j ≤ µ(i + 2) we take the (i + 2)-bar B (i+2) j and B (i+2) j 1 +h s.t. h satisfies h ∈ {0, ..., µ(i + 1)j 1 } is the (i + 1)-bars lying over B (i+2) j , it happens that for a fixed l ∈ {1, ..., µ(i

+ 1) -1 -j 1 } l i (B (i+1) j 1 +l ) < l i (B (i+1) j 1 +l+1
), B is not admissible and so also b) is true. In what follows, unless differently specified, we always consider admissible Bar Codes, so, in general, we will omit the word "admissible".

Remark 18. In principle, it is possible to represent with a Bar Code also infinite order ideals, by means of a simple modification, i.e. the introduction of the symbol "→" immediately after a l-bar for some 1 ≤ l ≤ n, meaning that there should actually be infinitely many l-blocks equal to that containing that bar. For example, the Bar Code of

I = (x 2 1 x 2 2 ) k[x 1 , x 2 ], whose lexicographical Groebner escalier is N(I) = {x h 1 1 x h 2 2 , x h 3 1 x h 4 2 , h 1 , h 4 ∈ N, h 2 , h 3 ∈ {0, 1}}, turns out to be 1 → x 2 → x 2 2 x 1 x 2 2 →
In particular, the arrow on the right of 1 represents the terms of the form x h 1 1 , h 1 ∈ N \ {0}, the one on the right of x 2 represents the terms of the form x h 1 1 x 2 , h 1 ∈ N \ {0}; finally the bottom arrow represents the terms of the form x h [START_REF]k i=1 i+α i -1 j=i[END_REF] 2 ,

x 1 x h 4 2 , h 4 ∈ N, h 4 > 2.
Since infinite Bar Codes are out of the topics of this paper, we will not treat them in detail.

The star set

Up to this point, we have discussed the link between Bar Codes and order ideals, i.e. we focused on the link between Bar Codes and Groebner escaliers of monomial ideals. In this section, we show that, given a Bar Code B and the order ideal N = η(B) it is possible to deduce a very specific generating set for the monomial ideal I s.t. N(I) = N.

Definition 19. The star set of an order ideal N and of its associated Bar Code B = η -1 (N) is a set F N constructed as follows: a) ∀1 ≤ i ≤ n, let τ i be a term which labels a 1-bar lying over B (i) µ(i) , then

x i P x i (τ i ) ∈ F N ; b) ∀1 ≤ i ≤ n -1, ∀1 ≤ j ≤ µ(i) -1 let B (i)
j and B (i) j+1 be two consecutive bars not lying over the same (i + 1)-bar and let τ (i) j be a term which labels a 1-bar lying over B (i) j , then x i P x i (τ (i) j ) ∈ F N . We usually represent F N within the associated Bar Code B, inserting each τ ∈ F N on the right of the bar from which it is deduced. Reading the terms from left to right and from top to bottom, F N is ordered w.r.t. Lex. As suggested by a referee, F N can be read also by the point trie or via the Σ-algorithm, due to the perfect correspondence between nodes of the trie, equivalence classes in the Σ-algorithm and bars.

Example 20.

For N = {1, x 1 , x 2 , x 3 } ⊂ k[x 1 , x 2 , x 3 ]
, associated to the Bar Code of example 14, we have

F N = {x 2 1 , x 1 x 2 , x 2 2 , x 1 x 3 , x 2 x 3 , x 2
3 }; looking at Definition 19, we can see that the terms x 1 x 3 , x 2 x 3 , x [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 3 come from a), whereas the terms x 2 1 , x 1 x 2 , x 2 2 come from b). In ?, given a monomial ideal I, the authors define the following set, calling it star set:

F (I) = x γ ∈ T \ N(I)
x γ min(x γ ) ∈ N(I) . We can prove the following proposition, which connects the definition above to our construction.

Proposition 21. With the above notation F N = F (I).

Proof. We start proving F N ⊆ F (I). Let σ ∈ F N ; by definition of F N there are two possibilities a) σ = x i P x i (τ i ), with 1 ≤ i ≤ n and τ i a term which labels a 1-bar lying over

B (i) µ(i) ; b) σ = x i P x i (τ (i) j ), with 1 ≤ i ≤ n -1, 1 ≤ j ≤ µ(i) -1
, where τ (i) j is a term labelling a 1-bar lying over B (i) j i.e. the rightmost bar over some B (i+1) u , while B (i) j+1 is the leftmost bar over

B (i+1)
u+1 . Note that we can choose one τ (i) j indifferently over B (i) j , since for each term over B (i) j the operator P x i gives the same result.

Let us examine a) and b) separately.

a) By definition, σ > τ i ; indeed deg h (σ) = deg h (τ i ) for i + 1 ≤ h ≤ n and deg i (σ) > deg i (τ i ).
Clearly, σ N, because if it was in N, applying the steps described in Definition 7, P x i (σ) = σ = x i P x i (τ i ) would be put in a list that is subsequent to that containing P x i (τ i ), but, in this case, there would be µ(i)

+ 1 i-bars instead of µ(i), contradicting the definition of µ(i). Since min(σ) = x i , σ min(σ) = P x i (τ i ) | τ i , so σ min(σ) ∈ N and σ ∈ F (I).
b) Analogously to case a), σ > τ (i) j . We prove that σ N. If σ ∈ N then σ would label a 1-bar over B (i) j+1 but, since

P x i+1 (σ) = P x i+1 (τ (i) j ), B (i) j B (i)
j+1 would lie over the same (i + 1)bar, contradicting the hypothesis. As above, since min(σ) = x i , σ min(σ) = P x i (τ (i) j ) | τ (i) j , so σ min(σ) ∈ N and σ ∈ F (I). We prove now that F N ⊇ F (I). Let σ ∈ F (I) and min(σ) = x i , 1 ≤ i ≤ n. By definition of F (I), σ N and σ := σ

x i ∈ N, so it labels a 1-bar lying over some i-bar B (i) j . Denote by B (1) j , ..., B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j+h (where h satisfies 0 ≤ h ≤ µ(i)j) the 1-bars lying over B (i) j . Two possibilities may occur:

a) j + h = µ(i): in this case x i P x i ( σ) = σ ∈ F N by definition 19.
b) otherwise consider the term τ j+h , which labels B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j+h , and the subsequent term τ j+h+1 , labelling B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j+h+1 . Notice that P x i (τ j+h ) = P x i ( σ). By definition 7, τ j+h < Lex τ j+h+1 . If P x i (τ j+h ) = P x i (τ j+h+1 ) this would contradict the maximality of h, so it must be P x i (τ j+h ) < Lex P x i (τ j+h+1 ). But, if P x i+1 (τ j+h ) = P x i+1 (τ j+h+1 ), then σ | τ j+h+1 and so σ ∈ N, that is impossible since σ ∈ F (I). This means then that P x i+1 (τ j+h ) < Lex P x i+1 (τ j+h+1 ), so we can deduce that B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j+h and B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j+h+1 lie over two consecutive i-bars not lying over the same (i + 1)-bar, so σ =

x i P x i ( σ) = x i P x i (τ j+h ) ∈ F N .
Remark 22. By Proposition 21, being F N = F (I), it holds G(I) ⊆ F N ⊆ B(I). In general, the inclusions may be strict; if F N = G(I), we say that B N := η -1 (N) is a full Bar Code.

The star set is strongly connected to Janet's theory (????) and to the notion of Pommaret basis (???), as explicitly pointed out in ?. Indeed, the star set of a zerodimensional monomial ideal coincides with its Pommaret basis. By Proposition 21, the Bar Code gives a simple way to deduce the star set from the Groebner escalier of a zerodimensional monomial ideal.

On the Integer Partitions

In this section, we give some definitions and theorems from the theory of integer partitions that we will use as a tool for our study, following ????. Definition 23 (?). An integer partition of p ∈ N is a k-tuple (λ 1 , ..., λ k ) ∈ N k such that k i=1 λ i = p and λ 1 ≥ ... ≥ λ k .

We regard two partitions as identical if they only differ in the number of terminal zeros. For example (3, 2, 1) = (3, 2, 1, 0, 0). The nonzero terms are called parts of λ and we say that λ has k parts if k = |{i, λ i > 0}|. We will mainly deal with the special case λ 1 > ... > λ k > 0 i.e. with integer partitions of p into k non-zero distinct parts, denoting by I (p,k) the set containing them, i.e. I (p,k) := {(λ 1 , ..., λ k ) ∈ N k , λ 1 > ... > λ k > 0 and k j=1 λ j = p}. The number Q(p, i) of integer partitions of p into i distinct parts is well known in literature. We can find in ? the formulas to compute it: ∀p, i ∈ N, i 1, Q(p, i) = P p -i 2 , i , Q(p, 1) = 1 where P(n, k) denotes the number of integer partitions of n with largest part equal to k: ∀n, k ∈ N, P(n, k)

= P(n -1, k -1) + P(n -k, k), with          P(n, k) = 0 for k > n P(n, n) = 1 P(n, 0) = 0
We define now the notion of plane partition, a generalization of Young Tableaux.

Definition 24 (?). A plane partition π of a positive integer p ∈ N, is a partition of p in which the parts have been arranged in a 2-dimensional array, weakly decreasing across rows and down columns. If the inequality is strict across rows (resp. columns), we say that the partition is rowstrict (resp column-strict). Different configurations are regarded as different plane partitions. The norm of π is the sum n(π) := i, j π i, j of all its parts, i.e. p.

Notice that an integer partition (definition 23) is a simple particular case of plane partition. Two different plane partitions of p = 6 are: In sections 6, 7, we will be interested in some particular plane partitions, defined below.

Definition 25 (?). Let D r denote the set of all r-tuples λ = (λ 1 , ..., λ r ) of integers with λ 1 ≥ ... ≥ λ r . For λ, µ ∈ D r , we write λ ≥ µ if λ i ≥ µ i for all i = 1, 2, ..., r. Let c, d arbitrary integers and λ, µ ∈ D r , with λ ≥ µ. We call an array ρ of integers of the form a (c, d)-plane partition of shape λ/µ if ρ i, j ≥ ρ i, j+1 + c for 1 ≤ i ≤ r, µ i < j < λ i , and ρ i, j ≥ ρ i+1, j + d for 1 ≤ i ≤ r -1, µ i < j ≤ λ i+1 . In the case µ = 0, we shortly say that ρ is of shape λ.

ρ 1,µ 1 +1 ρ 1,
We denote by P λ (c, d) the set of (c, d)-plane partitions of shape λ. A (1, 1)-plane partition containing only positive parts is a row and column-strict plane partition; these partitions will be useful while dealing with stable ideals (see section 6).

Definition 26 (?). Let c, d be arbitrary integers and λ be a partition with λ r ≥ r. We call "shifted (c, d)-plane partition of shape λ" an array π of integers of the form

π 1,
i, j ≥ π i+1, j + d for 1 ≤ i ≤ r -1, i < j ≤ λ i+1 .
We point out that, according to definition 26, there are λ ii + 1 integers in the i-th row. We denote by S λ (c, d) the set of shifted (c, d)-plane partitions of shape λ. These partitions will be useful in section 7, where we will count strongly stable ideals.

Example 27. The plane partition on the top is a (1, 1)-plane partition with shape λ = (3, 2) and norm 17. On the other hand, the one on the bottom is a shifted (1, 0)-plane partition with λ = (3, 3) and norm 17. It contains λ 1 = 3 elements in the first row and λ 2 -1 = 2 elements in the second row.

We introduce now the notion of norm generating function, for counting plane partitions.

Definition 28 (?). The norm generating function for a class C of (c, d)-plane partitions is

π∈C x n(π) .
If x is an indeterminate, we introduce the x-notations (see ?):

[n] = 1-x n , [n]! = [1][2] • • • [n], [0]! = 1, n k = [n]! [k]![n-k]! , if n ≥ k 0. If k = 0, n k = 1;
if k 0 and n < k, then we set n k = 0. Theorems 29 and 31 give a way to compute the norm generating function for plane partitions of the forms introduced in Definitions 25 and 26, under some hypotheses on the size of their parts. Let us start with the plane partitions of Definition 25.

Theorem 29 (?). Let c, d be arbitrary integers, λ, µ ∈ D r and let a, b be r-tuples of integers satisfying a ic(µ i -

µ i+1 ) + (1 -d) ≥ a i+1 and b i + c(λ i -λ i+1 ) + (1 -d) ≥ b i+1 for i = 1, 2, ..., r -1. Then, denoting N 1 (s, t) = b s (λ s -s -µ t + t) + (1 -c -d) µ t +s-t 2 -µ t 2 + c λ s -s-µ t +t 2 , the polynomial det 1≤s,t≤r x N 1 (s,t) (1-c)(λ s -µ t )-d(s-t)+a t -b s +c λ s -s-µ t +t
, is the norm generating function for (c, d)plane partitions of shape λ/µ s.t. the first part in row i is at most a i and the last part in row i is at least b i .

Example 30. Let us consider the (1, 1)-plane partitions of shape λ = (2, 1) (so µ = 0), such that a = (4, 3) and b = (1, 1), i.e. row and column strict plane partitions of the form

ρ 1,1 ρ 1,2 ρ 2,1 0 , with ρ 1,1 ≤ 4, 1 ≤ ρ 2,1 ≤ 3, ρ 1,2 ≥ 1, With the notation introduced above, we have r = 2. Since 4 = a 1 -c(µ 1 -µ 2 ) + (1 -d) ≥ a 2 = 3 and 2 = b 1 + c(λ 1 -λ 2 ) + (1 -d) ≥ b 2 = 1,
we can apply the formula of Theorem 29, which, substituting our data, turns out to be significantly simplified:

det 1≤s,t≤2 x N 1 (s,t) -(s-t)+a t -b s +1 λ s -s+t
, where N 1 (s, t) = b s (λ s -s+t)+(-1) s-t 2 + λ s -s+t

2

. Now, we have

N(1, 1) = (2-1+1)+ 2 2 = 2; N(1, 2) = (2-1+2)+ 3 2 = 5; N(2, 1) = 0; N(2, 2) = (1-2+2) = 1, so we compute det        x 3 4 2 x 6 4 3 3 0 x 3 1        = det x 3 (1 + x 2 )(1 + x + x 2 ) x 5 (1 + x)(1 + x 2 ) 1 x(1 + x + x 2 )
= x 10 + 2x 9 + 3x 8 + 3x 7 + 3x 6 + x 5 + x 4 . For example, there are 3 partitions with norm 8, namely

4 1 3 0 , 4 2 2 0 , 4 3 1 0
We see now how to construct the norm generating function for the partitions of Definition 26.

Theorem 31 (Krattenthaler, ?). Let c, d be arbitrary integers, λ a partition with λ r ≥ r and let a, b be r-tuples of integers satisfying a

i -c -d ≥ a i+1 and b i + c(λ i -λ i+1 ) + (1 -d) ≥ b i+1 for i = 1, 2, ..., r -1. Then, denoting N 1 = r i=1 (b i (λ i -i) + a i + c λ i -i 2 ), the polynomial x N 1 det 1≤s,t≤r (λ s -s)(1 -c) + (1 -c -d)(s -t) + a t -b s λ s -s ,
is the norm generating function for shifted (c, d)-plane partitions of shape λ in which the first part in row i is equal to a i and the last part in row i is at least b i .

Example 32. Let us consider the shifted (1, 0)-plane partitions of shape λ = (3, 3, 3), such that a = (6, 3, 1) and b = (1, 1, 1). By definition, they are matrices

         π 1,1 π 1,2 π 1,3 0 π 2,2 π 2,3 0 0 π 3,3          , with π 1,1 = 6, π 2,2 = 3, π 3,3 = 1. Moreover, π 1,3 , π 2,3 ≥ 1.
We compute the norm generating function for these partitions, via Theorem 31. First of all N

1 = r i=1 (b i (λ i -i) + a i + c λ i -i 2 ) = 14. Then we have to compute each m s,t = (λ s -s)(1-c)+(1-c-d)(s-t)+a t -b s λ s -s , 1 ≤ s, t ≤ r and then the determinant of the matrix M = (m s,t ) 1≤s,t≤r . We have m 1,1 = 5 2 = 5 i=1 (1-x i ) 2 i=1 (1-x i )• 3 i=1 (1-x i ) = (x 2 + 1)(x 4 + x 3 + x 2 + x + 1), m 1,2 = 2 2 = 1, m 1,3 = 0 2 = 0, m 2,1 = 5 1 = 5 i=1 (1-x i ) 1 i=1 (1-x i )• 4 i=1 (1-x i ) = x 4 + x 3 + x 2 + x + 1, m 2,2 = 2 1 = 2 i=1 (1-x i ) 1 i=1 (1-x i )• 1 i=1 (1-x i ) = x + 1, m 2,3 = 0 1 = 0, m 3,1 = m 3,2 = m 3,3 = 1. This way M =          (x 2 + 1)(x 4 + x 3 + x 2 + x + 1) 1 0 x 4 + x 3 + x 2 + x + 1 x + 1 0 1 1 1        
 , so det(M) = x 7 + 2x 6 + 3x 5 + 3x 4 + 3x 3 + 2x 2 + x. The generating function is then x 14 det(M) = x 15 +2x 16 +3x 17 +3x 18 +3x 19 +2x 20 + x 21 . If we consider, for example, n(π) = 17, the coefficient of x 17 in the above polynomial is 3, so it tells us that there are exactly three shifted (1, 0)-plane partitions of shape λ = (3, 3, 3), such that a = (6, 3, 1) and b = (1, 1, 1). We can write them down for completeness' sake:

         6 5 1 0 3 1 0 0 1          ,          6 4 2 0 3 1 0 0 1          ,          6 3 2 0 3 2 0 0 1         

Counting stable ideals

In this section, we connect the Bar Code associated to the Groebner escalier of a zerodimensional stable monomial ideal to the theory of integer and plane partitions, in order to find the number of such ideals in two or three variables with constant affine Hilbert polynomial H (t) = p ∈ N. We start recalling some definitions and known facts about stable and strongly stable ideals.

Definition 33. ((?, pg.41), ?, c.f.(?, pg.673,679)) A monomial ideal J P

= k[x 1 , ..., x n ] is called stable (?) if it holds τ ∈ J, x j > min(τ) =⇒ x j τ min(τ) ∈ J.
Definition 34 (??????). A monomial ideal I P = k[x 1 , ..., x n ] is called strongly stable (??) if, for every term τ ∈ I and pair of variables x i , x j with x i |τ and x i < x j , then also τx j

x i ∈ I or, equivalently, for every σ ∈ N(I), and pair of variables x i , x j with x i |σ and x i > x j , then also

σx j x i ∈ N(I).
It is well known that, to verify the (strong) stability of a monomial ideal, we can verify the conditions above for the terms in G(I).

Example 35 (?).

In k[x 1 , x 2 , x 3 ], x 1 < x 2 < x 3 , I 1 = (x 3 1 , x 1 x 2 , x 2 2 , x 2 1 x 3 , x 2 x 3 , x 2
3 ) is stable, but it is not strongly stable, since x 1 x 2 ∈ I 1 , but (x 1 x 2 )x 3

x 2 = x 1 x 3 I 1 , while the ideal I 2 = (x [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 1 , x 1 x 2 , x 2 2 , x 3 ) is strongly stable.

From now on, with (strongly) stable ideal, we will always mean zerodimensional strongly stable ideal.

Proposition 36 (?). Let J be a monomial ideal. Then:

J is stable ⇔ F (J) = G(J)
A simple property, useful for what follows, and trivially following from Remark 22 and Proposition 36, is that Bar Codes of (strongly) stable ideals are full.

Example 37. In k[x 1 , x 2 , x 3 ] with x 1 < x 2 < x 3 , consider again the ideals I 1 = (x 3 1 , x 1 x 2 , x 2 2 , x 2 1 x 3 , x 2 x 3 , x 2 3 ), I 2 = (x 2 1 , x 1 x 2 , x 2
2 , x 3 ) of example 35. We display here their Bar Codes:

0 1 2 3 1 x 1 x 2 1 x 2 x 3 x 1 x 3 x 3 1 x 1 x 2 x 2 1 x 3 x 2 2 x 2 x 3 x 2 3 1 2 3 1 x 1 x 2 x 2 1 x 1 x 2 x 2 2 x 3
We have

F (I 1 ) = G(I 1 ) = {x 3 1 , x 1 x 2 , x 2 2 , x 2 1 x 3 , x 2 x 3 , x 2 3 } and F (I 2 ) = G(I 2 ) = {x 2 1 , x 1 x 2 , x 2
2 , x 3 }. We see that, as expected, both their Bar Codes are full.

Proposition 38. Let I k[x 1 , ..., x n ] be a stable zerodimensional monomial ideal and let B be its Bar Code. Then the following two conditions hold:

a) l n-1 (B (n) 1 ) > ... > l n-1 (B (n) µ(n) ) b) ∀1 ≤ i ≤ n -2, ∀1 ≤ j ≤ µ(i + 2) take the (i + 2)-bar B (i+2) j
and let B (i+1) j 1 , ..., B (i+1) j 1 +h , s.t. h satisfies h ∈ {0, ..., µ(i+1)j 1 } be the (i+1)-bars over B (i+2) j . Then l i (B (i+1) j 1 ) > ... > l i (B (i+1) j 1 +h ). Proof. By lemma 17 the case < cannot occur. Suppose that for some 1

≤ l ≤ µ(n) -1 it holds l n-1 (B (n) l ) = l n-1 (B (n) l+1 ), let B (1)
k be the rightmost 1-bar over B (n) l and call τ k the term labelling B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] k . By definition of F (I),

x n-1 P x n-1 (τ k ) ∈ F (I) ⊂ I; moreover, P x n-1 (τ k ) ∈ N(I). But if l n-1 (B (n) l ) = l n-1 (B (n) l+1 ), then x n P x n-1 (τ k ) = x n-1 P x n-1 (τ k ) x n-1
x n I, contradicting the stability of I. If for some 1 ≤ i ≤ n -2, ∀1 ≤ j ≤ µ(i + 2) we take the (i + 2)-bar B (i+2) j and B (i+1) j 1 , ... , B (i+i) j 1 +h (where h satisfies h ∈ {0, ..., µ(i + 1)j 1 }) are the (i + 1)-bars over B (i+2) j , then for a fixed l ∈ {1, ..., µ(i + 1) -1j 1 },

l i (B (i+1) j 1 +l ) = l i (B (i+1) j 1 +l+1
), a similar argument shows that I cannot be stable. Remark 39. Note that every zerodimensional monomial ideal I is quasi stable by definition, i.e. for each τ ∈ I, ∀x j > min(τ), ∃s ≥ 0 s.t.

x s j τ min(τ) . Counting quasi stable ideals would mean counting every admissible Bar Code, which is not in the aim of this paper.

In the example below, we show that there are also non-stable ideals satisfying conditions a), b).

Example 40. For the ideal I = (x 2 1 , x 1 x 2 , x 2 2 , x 1 x 3 , x 2 x 3 , x 2 3 , x 2 x 4 , x 3 x 4 , x 2 4 ) k[x 1 , x 2 , x 3 , x 4 ], we have N(I) = {1, x 1 , x 2 , x 3 , x 4 , x 1 x 4 } and the associated Bar Code B is 1 2 3 4 1 x 1 x 2 x 3 x 1 x 3 x 2 x 3 x 2 3 x 4 x 1 x 4 x 2 1 x 4 x 2 x 4 x 3 x 4 x 2 4 x 2 1 x 1 x 2 x 2 2
The star set is

F (I) = {x 2 1 , x 1 x 2 , x 2 2 , x 1 x 3 , x 2 x 3 , x 2 3 , x 2 1 x 4 , x 2 x 4 , x 3 x 4 , x 2
4 } and we have F (I) G(I), so I is not stable (note also that x [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 1 ∈ I but x 1 x 4 I). We can observe that B satisfies conditions a) b) of Proposition 38. Indeed: a) 2 = l 3 (B [START_REF]k i=1 i+α i -1 j=i[END_REF] 1 )

> 1 = l 3 (B (4) 2 ); b) 2 = l 1 (B (2) 1 ) > 1 = l 1 (B (2) 2 ); 2 = l 2 (B (3) 1 ) > 1 = l 2 (B (3)
2 ). In the following two examples, we show that the result of Proposition 38 is only local, even if we consider strongly stable ideals, then strengthening the hypothesis of Proposition 38. This means that in general, fixed a row 2 ≤ i < n of the Bar Code B associated to a (even strongly) stable monomial ideal I, it does not hold l (i-1) (B (i) 1 ) > ... > l (i-1) (B (i) µ(i) ), in particular, the (i -1)-length could even be completely unordered.

Example 41. Consider the (strongly) stable monomial ideals I = (x [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] 1 ,

x 1 x 2 , x 2 2 , x 1 x 3 , x 2 x 3 , x 2 3 , x 1 x 4 , x 2 x 4 , x 3 x 4 , x 2 4 ) k[x 1 , x 2 , x 3 , x 4 ], I = (x 3 1 , x 2 1 x 2 , x 1 x 2 2 , x 3 2 , x 2 1 x 3 , x 1 x 2 x 3 , x 2 2 x 3 , x 2 3 ) k[x 1 , x 2 ,
x 3 ] and their Bar Codes B, B :

1 2 3 4 x 2 4 x 2 3 x 3 x 4 x 2 2 x 2 x 3 x 2 x 4 x 3 1 x 1 x 2 x 1 x 3 x 1 x 4 1 x 1 x 2 1 x 2 x 3 x 4 1 2 3 x 2 3 x 3 2 x 2 2 x 3 x 3 1 x 2 1 x 2 x 1 x 2 2 x 2 1 x 3 x 1 x 2 x 3 1 x 1 x 2 1 x 2 x 1 x 2 x 2 2 x 3 x 1 x 3 x 2 x 3
For B, associated to I, we have 2 = l 2 (B (3) 1 ) > l 2 (B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] 2 ) = l 2 (B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] 3 ) = 1. Even if I is strongly stable, l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 1 ) = 3, l 1 (B (2) ) = 2, l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 3 ) = 1, l 1 (B (2) 4 ) = 2, l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 5 ) = 1, so the 1-lengths are unordered. The proposition below gives a way to count zerodimensional stable ideals in two variables, once known their affine Hilbert polynomial. of p with i distinct parts; if i(i+1) 2 = p, the i-tuple (α 1 , ..., α i ) ∈ N i is such a partition and if

i(i+1) 2
≤ p, it is possible to find a partition of p with i distinct parts starting from (α 1 , ..., α i ) ∈ N i , for example by increasing the value of α 1 , until i j=1 α j = p.Then, we have proved that the maximal number h of distinct parts in a partition of p is h := max i∈N i(i+1)

2 ≤ p . Since i(i+1) 2 ≤ p for -1- √ 1+8p 2 ≤ i ≤ -1+ √ 1+8p 2 , then h := -1+ √ 1+8p 2
Example 44. Applying proposition 43, we get that for p = 1, 2, we have h = 1, so the only (strongly) stable monomial ideals of k[x 1 , x 2 ], with constant affine Hilbert polynomial p = 1, 2 are the ideals I 1 = (x 1 , x 2 ) and I 2 = (x [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 1 , x 2 ) (see Remark 47). For the affine Hilbert polynomial p = 3 we have h = 2, so we have two (strongly) stable monomial ideals, J 1 = (x [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] 1 , x 2 ) and J

2 = (x 2 1 , x 1 x 2 , x 2
2 ). The Bar Codes B 1 , B 2 associated to J 1 , J 2 are respectively

1 2 1 x 1 x 2 1 x 3 1 x 2 1 2 1 x 1 x 2 x 2 1 x 1 x 2 x 2 2
Their bar lists are respectively L B 1 = (3, 1) and L B 2 = (3, 2).

To deal with stable ideals J k[x 1 , ..., x n ] for n > 2, the following corollary will be rather useful. .

Proof. It is a straightforward consequence of Propositions 42 and 43, noticing that, if µ(3) = ... = µ(n) = 1, x 3 , ..., x n do not appear in any term of M B with nonzero exponent.

The following proposition is a consequence of 42 and 43 and completely solves the problem of counting stable monomial ideals in two variables.

Proposition 46. The number of stable ideals J k[x 1 , x 2 ] with H (t, J) = p is h i=1 Q(p, i), where h := -1+ √ 1+8p 2 and Q(p, i) is the number of integer partitions of p into i distinct parts.

Remark 47. Let I k[x 1 , x 2 ] be a strongly stable monomial ideal with affine Hilbert polynomial H I (t) = p, B be the corresponding Bar Code and suppose that L B = (p, 1). In this case, we can easily deduce that I = (x p 1 , x 2 ) so I is a lex-segment ideal, i.e., for each degree i ∈ N, I is k-spanned by the first H I (i) terms w.r.t. Lex.

By Remark 47, for each p ∈ N, there exists a (strongly) stable monomial ideal I k[x 1 , x 2 ] with affine Hilbert polynomial H I (t) = p and s.t. the corresponding Bar Code B has L B = (p, 1), so the minimal value that h can assume is 1. The table below summarizes the possible bar lists for stable ideals corresponding to some small values of p, together with the corresponding ideals.

Take then a bar list (p, h, k) and let β ∈ I (h,k) , so β 1 > ... > β k and k i=1 β i = h. We can construct plane partitions ρ of the form

ρ = (ρ i, j ) =                 ρ 1,
                s.t. 1. ρ i, j > 0, 1 ≤ i ≤ k, 1 ≤ j ≤ β i ; 2. ρ i, j > ρ i, j+1 , 1 ≤ i ≤ k, 1 ≤ j ≤ β i -1; 3. ρ i, j > ρ i+1, j 1 ≤ i ≤ k -1, 1 ≤ j ≤ β i+1 ; 4. n(ρ) = k i=1 β i j=1 ρ i, j = p.
These plane partitions are of the form defined in 25, with shape β, c = 1 and d = 1, so they are row-strict and column-strict plane partitions of shape β.

(a) each row i represents a 3-bar B (3) i , 1 ≤ i ≤ k; (b) for each row i, 1 ≤ i ≤ k, l 2 (B (3) i ) = β i ; the β i nonzero entries represent the β i 2-bars over B (3)
i , i.e the j-th entry of row i, 1 ≤ j ≤ β i , represents the 2-bar B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] t , where t = ( i-1 l=1 β l ) + j;

(c) for each 1 ≤ i ≤ k, and each 1 ≤ j ≤ β i , the number ρ i, j represents the number of 1-bars over B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] t , t = ( i-1 l=1 β l ) + j, the j-th 2-bar lying over B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] i . In other words, l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] t ) = ρ i, j .

In conclusion, for each 1 ≤ i ≤ k, and each 1 ≤ j ≤ β i , the number ρ i, j means that in B there are 1-bars labelled by (0, j-1, i-1), (1, j-1, i-1), ..., (ρ i, j -1, j-1, i-1), but there is no 1-bar labelled by (ρ i, j , j -1, i -1), or equivalently, x 0 1 x j-1 2 x i-1 3 , x 1 x j-1 2 x i-1 3 , ..., x ρ i, j -1 1

x j-1 2 x i-1 3 belong to the set of terms associated to B via B1 and B2, but x ρ i, j 1 x j-1 2 x i-1 3 does not belong to the aforementioned set 7 . Example 51. Taken the plane partition below and its Bar Code

ρ =          4 3 2 1 3 2 1 0 1 0 0 0          . 1 2 3
Let us examine ρ 2,2 = 2 (in bold). We have t = β 1 + 2 = 6, so 2 = ρ 2,2 = l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 6 ) (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 6 is the red bar above). Applying B1 and B2 we can see, in agreement with the above comments, that x 2 x 3 , x 1 x 2 x 3 are in the set of terms associated to B, while x 2 1 x 2 x 3 does not. Remark 52. The Bar Code B, uniquely identified by ρ, has bar list L B = (p, h, k). The relation µ(3) = k comes from (a), µ(2) = h comes from (b), since β ∈ I (h,k) , so k i=1 β i = h, whereas µ(1) = p is an easy consequence of (c).

7 Actually, we will see that x

ρ i, j 1 x j-1 2 x i-1
derived by a) and there cannot be terms derived by b), since each term σ coming from b) has min(σ) ≤ x 2 . We can conclude that the only pure power of x 3 in F (J) is τ = x k 3 , which is also in A. Let now be min(τ) = x 2 , so τ = x h 2 2 x h 3 3 , for some h 2 , h 3 ∈ N. This term may be derived either from a) or from b) of definition 19; we have to prove that, in any case, it belongs to A. a) In this case, τ = x 2 P x 2 (τ 2 ), where τ 2 is a term labelling a 1-bar over B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] µ(2) . But µ(2) = h; since

B (2) µ(2) = B (2)
h is the rightmost 2-bar, it lies over B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] k , where k = µ(3) and, in particular it is the β k -th bar over B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] k . Now, by B1 and B2, we can desume that h

3 = k -1 and h 2 = β k -1, so τ 2 = x β k -1 2 x k-1 3 and so τ = x β k 2 x k-1 3 ∈ A. b) In this case, for 1 ≤ l ≤ h -1, we consider two consecutive 2-bars B (2)
l , B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] l+1 not lying over the same 3-bar, i.e. lying over two consecutive 3-bars

B (3) l 1 , B (3) l 1 +1 , 1 ≤ l 1 < k; let τ (2)
l a term labelling a 1-bar over B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] l . Since τ [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] l labels a 2-bar lying over

B (3) l 1 , 1 ≤ l 1 < k, it holds x l 1 -1 3 | τ (2)
l and x l 1 3 τ (2) l . Now, over B (3) l 1 there are β l 1 2-bars and since B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] l+1 lies over B (3) l 1 +1 , then B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] l lies over the β l 1 -th 2-bar over B (3) l 1 , so x

β l 1 -1 2 | τ (2) l and x β l 1 2 τ (2) l . This implies that τ = x 2 P x 2 (τ (2) l ) = x β l 1 2 x l 1 -1 3 ∈ A, 1 ≤ l 1 < k.
Finally, let min(τ) = x 1 ; as for the above case, we have to examine a) and b) separately: a) In this case, τ = x 1 P x 1 (τ 1 ), where τ 1 labels B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] µ(1) = B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] p . Now, B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] p is the rightmost 1-bar, so it lies over B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] h , which, in turn, lies over B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] k . By B1 and B2, x k-1

3 | τ 1 , x k 3 τ 1 , x β k -1 2 | τ 1 , x β k 2 τ 1 From l 1 (B (2) h ) = ρ k,β k we desume that τ = x 1 P x 1 (τ 1 ) = x ρ k,β k 1 x β k -1 2 x k-1 3 ∈ A. b) In this case, for 1 ≤ l 1 ≤ µ(1) -1 = p -1 we consider two consecutive 1-bars B (1)
l 1 and B (1) l 1 +1 , lying over two consecutive 2-bars B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] l 2 , B (2) l 2 +1 , 1 ≤ l 2 < h and we denote B (3) l 3 , 1 ≤ l 3 ≤ k, the 3-bar underlying 10 B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] l 2 . Let τ (1) l 1 be the term labelling B (1) l 1 ; by B1 and B2 x l 3 -1

3 | τ (1) l 1 , x l 3 3 τ (1) l 1 , x u-1 2 | τ (1) l 1 , x u 2 τ (1) l 1 , u = l 2 -l 3 -1 r=1 β r ≤ β l 3 and x ρ l 3 ,u -1 1 | τ (1) l 1 , x ρ l 3 ,u 1
τ (1) l 1 , so we have τ = x 1 P x 1 (τ [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] l 1 ) = x

ρ l 3 ,u 1 x u-1 2 x l 3 -1 3 ∈ A.
Theorem 55. There is a bijection between P (p,h,k) and the set with k rows and l 2 (B (3) 1 ) = β 1 columns. Chosen 1 ≤ i ≤ k as row index and 1 ≤ j ≤ β 1 as column index and set β i = l 2 (B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] i ), we define

B (S ) (p,h,k) = {B ∈ A 3 s.t. L B = (p, h, k), η(B) = N(J), J stable}. Proof. Let B ∈ B (S ) (p,h,k) ; we construct a plane partition ρ = (ρ i, j ) =               ρ 1,
ρ i, j = l 1 (B (2) t ) with t = ( i-1 l=1 β l ) + j, for 1 ≤ i ≤ k, 1 ≤ j ≤ β i , 0 if 1 ≤ i ≤ k, β i < j ≤ β 1 ,
so β is the shape of ρ. We notice that ρ is uniquely determined by B and that β ∈ I (h,k) ; indeed 10 We remark that B (2) l 2 +1 may lie over B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] l 3

or -if it exists -to its consecutive 2-bar, but we do not care about it, since it has no influence on τ. Remember also that, by construction, l 2 = l 3 -1 r=1 β r + j with 1 ≤ j ≤ β l 3 .

meets the required inequalities of theorem 29, remembering that µ = 0 and λ i > λ i+1 for each i = 1, ..., k -1. Indeed, a i = a i+1 + 1 so a i ≥ a i+1 and b i + (λ i -λ i+1 ) = 1 + (λ i -λ i+1 ) ≥ 1 = b i+1 .

Remark 56. We conjecture that, with some cumbersome computation, Theorem 55 can be generalized to the case of n ≥ 4 variables, by introducing a suitable notion of strict (n-1)-dimensional partitions.

Counting strongly stable ideals

In this section, we extensively deal with strongly stable ideals (see Definition 34).An asymptotical estimation of the number of strongly stable ideals with a fixed constant Hilbert polynomial has been given by Onn-Sturmfels in ?; in the aforementioned paper, N 2 n stair denotes the size-n subsets of N 2 that are also staircases.

Proposition 57. The number of Borel-fixed staircases in N 2 n stair is 2 Ω( √ n) .

The works of ??? develop three different algorithms to list all saturated strongly stable ideals with Hilbert polynomial p(z), considering any Hilbert polynomial p(z), so non-necessarily in the zerodimensional case. Moreover, ? give a bound on the number of those ideals, depending on the coefficients of p(z), and a comparison of its algorithm with those in ??. Their approach is somehow different to that of the present paper. Indeed, we restrict to the zerodimensional case in two or three variables, with the aim of giving the exact number of stable and strongly stable zerodimensional ideals in two or three variables, given their affine Hilbert polynomial by means of determinantal formulas, without listing them. The following Lemma is enough to deal with the case of two variables.

Lemma 58. An ideal I k[x 1 , x 2 ] is stable if and only if it is strongly stable.

Proof. A strongly stable ideal is trivially stable, so we only need to prove the converse, namely, given a stable ideal I, we have to show that for each for every term τ ∈ I and pair of variables x i , x j such that x i |τ and x i < x j , then also τx j

x i ∈ I. The only pair of variables of the above type is x 1 < x 2 and x 1 is the smallest variable in k[x 1 , x 2 ] so, if x 1 | τ ∈ I, then x 1 = min(τ) and τx 2

x 1 ∈ I by definition of stable ideal, whereas if x 1 τ there is nothing to do. This proves the claim.

By the above lemma and by proposition 46, we can conclude that the number of strongly stable ideals J k[x 1 , x 2 ] with H (t, J) = p is h i=1 Q(p, i), where h := -1+ √ 1+8p 2 and Q(p, i) is the number of integer partitions of p into i distinct parts. Let us examine now the case of strongly ideals in k[x 1 , x 2 , x 3 ]. Strongly stable ideals are also stable, so all the propositions proved for stable ideals also hold here; then the computation of the bar lists is the same as done for stable ideals. Fixed a bar list (p, h, k), we first compute the integer partitions of h in k distinct parts. Each partition (α 1 , ..., α k ) ∈ N k , α 1 > ... > α k , k i=1 α i = h represents a precise structure for the 2-bars and the 3-bars: for each 1 ≤ i ≤ k there are exactly α i 2-bars over B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] i . Now, fix a partition α ∈ I (h,k) , α = (α 1 , ..., α k ) ∈ N k , α 1 > ... > α k , k i=1 α i = h. We can construct the plane partitions π of the form

π = (π i, j ) =               π 1,

  the degree of τ and, for each h ∈ {1, ..., n} deg h (τ) := γ h is the h-degree of τ. For each d ∈ N, T d is the d-degree part of T , i.e. T d := {x γ ∈ T | deg(x γ ) = d}. For each subset M ⊆ T we set M d = M ∩ T d . The symbol T ≤d denotes the degree ≤ d part of T , namely

Definition 1 .

 1 Fixed a term order <, for any ideal I P the monomial basis of the semigroup ideal T(I) = T{I} is called monomial basis of I and denoted again by G(I), whereas the ideal In(I) := (T(I)) is called initial ideal and the order ideal N(I) := T \ T(I) is called Groebner escalier of I. The border set of I is defined as B(I) := {x h τ, 1 ≤ h ≤ n, τ ∈ N(I)} \ N(I) = T(I) ∩ ({1} ∪ {x h τ, 1 ≤ h ≤ n, τ ∈ N(I)}). If I P is an ideal, we define its associated variety as V(I) = {P ∈ k n , f (P) = 0, ∀ f ∈ I}, where k is the algebraic closure of k. Let I P be an ideal. The affine Hilbert function of I is the function HF I : N → N d → dim(P ≤d /I ≤d ).

Definition 2 .

 2 The polynomial which is equal to HF I (d), for d sufficiently large, is called the affine Hilbert polynomial of I and denoted H I (d).

Definition 3 .

 3 A Bar Code B is a picture composed by segments, called bars, superimposed in horizontal rows, which satisfies conditions a., b. below. Denote by

j

  and suppose that it has been labelled by (n-i+1) j copies of a term τ. Construct the 2-block associated to B (n-i+1) j which, by definition, is composed by B (n-i+1) j and by all the (n

k i=1 β i = h = µ( 2 )

 2 and, by proposition 38 a), β 1 > ... > β n .

  ) ... P x 1 (τ m ) P x 2 (τ 1 ) ... P x 2 (τ m )

		
	. . . P x n (τ 1 ) ... P x n (τ m ) . . .	               
	Definition 7. The Bar Code diagram B associated to M (or, equivalently, to M) is a n × m
	diagram, made by segments s.t. the i-th row of B, 1 ≤ i ≤ n is constructed as follows:

  Corollary 45. The number of Bar Codes associated to stable ideals in k[x 1 , ...,x n ], n > 2, whose bar list is (p, h, 1, ..., 1 3,...,n), p, h ∈ N, p ≥ h equals the number of integer partitions of p in h distinct parts, namely p = α 1 + ... + α h , α 1 > ... > α h > 0. Moreover, the maximal value that h can assume in the bar list (p, h, 1, ..., 1) is h :=

	√
	-1+	1+8p
	2

  1 ρ 1,2 ... ... ...

	ρ 2,1 ...	... ...	... ... ... ... ... ...	... ... ...	... ρ 2,β 2 ...	... ρ 1,β 1 0 ... ... ...
	ρ k,1	...	... ... ... ρ k,β k	0	...	...

  Fixed β ∈ I (h,k) , we denote by P (p,h,k),β the set of all partitions defined as above and P (p,h,k) = β∈I (h,k) P (p,h,k),β . In other words, P (p,h,k),β = {ρ ∈ P β (1, 1) s.t n(ρ) = p} and P (p,h,k) = {ρ ∈ P

β (1, 1) for some β ∈ I (h,k) and s.t. n(ρ) = p}. Each plane partition ρ ∈ P (p,h,k) uniquely identifies a Bar Code B:

  1 ρ 1,2 ... ... ...

	ρ 2,1 ... ρ k,1	... ... ...	... ... ... ... ... ... ρ k,β k ... ... ... ... ... ...	... ρ 2,β 2 ... 0...	... ρ 1,β 1 0 ... ... ... ... ...	             

  Proof. Let B ∈ B (p,h,k) . We construct a plane partition π = (π i, j ) =

	s.t.              	1 0... 0... 0... π 1,1 0... 0... 0...	π 1,2 ... π 2,2 ... ... ... ... ... π k,k ... ... ... π 1,2 ... ... π 2,2 ... ... ... ... ... ... ... π k,k	... ... ... ... ... ... ... ... π k,k+α k -1 ... ... ... ... ... ... ... ... ... ... ... ... ... ... π k,k+α k -1	... π 2,2+α 2 -1 ... 0... ... π 2,2+α 2 -1 ... 0...	π 1,α 1 0... ... ... π 1,α 1 0... ... ...	             

In ?, Chapter 11, the author observes that " Surprisingly, there is much of interest when the dimension is 1 or 2, and very little when the dimension exceeds 2."

M cannot contain repeated terms, while the M[i] , for 1 < i ≤ n, can. In case some repeated terms occur in M[i] ,1 < i ≤ n, they clearly have to be adjacent in the list, due to the lexicographical ordering.

If a term P x i (τ j ) is not repeated in M[i] , the sublist containing it will be only [P x i (τ j )], i.e. h = 0.

will belong to the star set associated to the Bar Code B, after proving that it is admissible.

By B1, x k-1 3 labels the first 1-bar over B[START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] k .

By B1, xβ i -1 2 x i-13 labels the first 1-bar over B[START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] t .

Proposition 42. The number of Bar Codes B ∈ B 2 with bar list (p, h) and such that η(B) = N ⊂ k[x 1 , x 2 ] is the Groebner escalier of a stable ideal J k[x 1 , x 2 ] equals the number of integer partitions of p into h distinct parts.

Proof. Take the set B (p,h) := {B ∈ A 2 , s.t. L B = (p, h) and η(B) = N(J), J stable} and the set of integer partitions of p in h distinct parts, i.e. I (p,h) = (α 1 , ..., α h ) ∈ N h , α 1 > ... > α h and h j=1 α j = p . We define Ξ : B (p,h) -→ N h , B → (l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 1 ), ..., l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] h )) and we prove that Ξ defines a bijection between B (p,h) and I (p,h) ⊂ N h . Let B ∈ B p,h . We have η(B) = N(J), J k[x 1 , x 2 ] stable. For each 1 ≤ j ≤ h set α j = l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] j ). By Proposition 38 a), we have α 1 > ... > α h and by definition of Bar Code (definition 3) p = p i=1 l 1 (B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] i ) = h j=1 l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] j ) = h j=1 α j , so we can desume that (l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 1 ), ..., l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] h )) = (α 1 , ..., α h ) ∈ I (p,h) , so Ξ(B (p,h) ) ⊆ I (p,h) . The map is injective by definition of 1-length of a bar. Now, let us consider (α 1 , ..., α h ) ∈ I (p,h) and construct a Bar Code B ∈ B 2 with h 2-bars B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 1 , ..., B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] h and s.t. for each 1 ≤ j ≤ h there are α j 1-bars lying over B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] j .

2 1

B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] α 1

B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] α h

Clearly B is univocally determined by (α 1 , ..., α h ) ∈ I (p,h) and for each 1 ≤ j ≤ h, l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] j ) = α j . We prove that B ∈ A 2 . Let B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] i be a 1-bar, 1 ≤ i ≤ p and let e(B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] i ) = (b i,1 , b i,2 ) be its e-list. If b i,1 = b i,2 = 0 there is nothing to prove. If b i,1 > 0, there is a 1-bar with e-list (b i,1 -1, b i,2 ); if b i,2 > 0, the assumption α 1 > ... > α h proves that there is a 1-bar with e-list (b i,1 , b i,2 -1). Finally, we prove that the order ideal N = η(B) is the Groebner escalier N = N(J) of a stable ideal J. Let us take σ ∈ F (J); it can be constructed from a) or b) of Definition 19. If σ comes from a), σ = x i P x i (τ i ), i = 1, 2. For i = 2, there is nothing to prove. We prove then the case i = 1, so we write σ = x 1 P x 1 (τ 1 ), where τ 1 labels B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] µ (1) , and we prove that σx 2 x 1 = x 2 P x 1 (τ 1 ) belongs to J. Since P x 2 (τ 1 ) | P x 1 (τ 1 ), x 2 P x 2 (τ 1 ) | x 2 P x 1 (τ 1 ). Now, τ 1 labels a 1-bar over B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] µ(2) , so x 2 P x 2 (τ 1 ) ∈ F (J) and so we are done. Suppose now σ coming from b), so σ = x 1 P x 1 (τ [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j ), where τ [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j is the term labelling a bar B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j , 1 ≤ j ≤ µ(1) -1, and B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j and B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j+1 are two consecutive 1-bars not lying over the same 2-bar; in particular, we say that B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j lies over B (2) j 1 and B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j+1 lies over B (2) j 1 +1 . We have to prove that x 2 P x 1 (τ [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j ) belongs to J. Denoted τ [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] j the term labelling the rightmost 1-bar over B (2) j 1 +1 , we have deg 2 (τ [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF]

j

) | x 2 P x 1 (τ (1) j ) and since x 1 P x 1 (τ [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF]

j

) ∈ J we are done.

With the proposition below, we prove which is the maximal value that h can assume. Proof. By Proposition 42, the Bar Codes associated to stable ideals s.t. the associated bar list is (p, i) are in bijection with the integer partitions of p with i distinct parts, i.e. of the form (α 1 , ..., α i ) ∈ N i , α 1 > ... > α i , i j=1 α j = p. Since the minimal value we can give to α j , 1 ≤ j ≤ i, so that α 1 > ... > α i , is α j = ij + 1 and i j=1 (ij + 1) = i(i+1) 2 , we have that i(i+1) 2 is the minimal sum of i positive distinct integer numbers. If i(i+1) 2 > p, there cannot exist any partition

2 ) 5

(5, 1), (5, 2), (5, 2)

2 ) 6 (6, 1), (6, 2), (6, 2), (6, 3

We notice that the above ideals are also strongly stable.

Example 48. For the polynomial ring k[x 1 , x 2 ], consider H (t) = p = 10. In this case, we have h = 4, so we have to compute the sum Q(10, 1) + Q(10, 2) + Q(10, 3) + Q(10, 4). We have: Q(10, 1) = 1, Q(10, 2) = P(9, 2) = P(8, 1) + P(7, 2) = 1 + P(7, 2) = 1 + P(6, 1) + P(5, 2) = 2 + P(5, 2) = 2 + P(4, 1) + P(3, 2) = 3 + P(2, 1) = 4, Q(10, 3) = P(7, 3) = P(6, 2)

Then, we have exactly 10 strongly stable monomial ideals with H (t) = 10. More precisely, they are

2 ). Example 49. With the same formula (using Singular (?)), we get that the strongly stable monomial ideals with H (t) = 100 are 444793.

We now start studying the case of three variables, so we need to consider the bar lists of the form (p, h, k). By Corollary 45, we can use the formulas for two variables in order to count the stable monomial ideals in three variables, associated to bar lists of the form (p, h, 1). This means that we only have to deal with the bar lists of the form (p, h, k), such that k > 1.

Lemma 50. With the previous notation, it holds:

1. k ∈ {1, ..., l}, where l := max i∈N {i 3 + 3i 2 + 2i ≤ 6p}; 2. h ∈ { k(k+1) 2 , ..., m}, where m = max

is the minimal sum of λ.

Proof. By Corollary 45, k ≥ 1. Now, in order to build a Bar Code B associated to a stable ideal, we should at least meet the requirements of proposition 38, so, given k, for each 3-bar B (3) j there should be at least (kj + 1) 2-bars over it, so that h ≥ k(k+1) 2 . Now, select a 3-bar

j

. With a similar argument w.r.t.

that for 2-bars, we can say that for B (2) j 1 + j-1 , 1 ≤ j ≤ t, we must have at least tj + 1 1-bars, so that their total number will be Sm(

3 ≤ p, so k 3 + 3k 2 + 2k ≤ 6p and we are done. As regards the maximal for h, from similar arguments, to meet the requirements of proposition 38, it is enough to be able to find a partition λ ∈ I (h,k) with Sm(λ) ≤ p.

Thanks to the lemma 50, we know which are the bar lists we have to take into account in order to count the stable ideals with affine Hilbert polynomial H (t) = p. Next step then, is to find out how many stable ideals exist s.t. H (t) = p and their Bar Code B has bar list (p, h, k) are there.

In the following lemma, we prove that a Bar Code B, defined as above, is admissible.

Lemma 53. Fixed (p, h, k) and β ∈ I (h,k) , let ρ be a partition in P (p,h,k),β . The Bar Code B, uniquely identified by ρ, is admissible.

Proof. By remark 52, L B = (p, h, k), so take a 1-bar B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] l , 1 ≤ l ≤ p and its e-list that we denote e(B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] l

) is an e-list labelling a 1-bar of B. For B being admissible, we also need that:

Let us prove a.,b.:

we are done again and B is admissible.

Lemma 54. Let ρ ∈ P (p,h,k) be a strict plane partition and B be the Bar Code uniquely determined by ρ. Denoted by J the monomial ideal s.t. η(B) = N(J) and by A the set A :

3 are in N(J) by the definition of η and by the construction of B from ρ. Consider x k 3 ; being k > 0, min(x k 3 ) = x 3 , so we prove that x k-1 3 ∈ N(J). Since k = µ(3), there are exactly k 3-bars. By B1, the k-th 3-bar of B is labelled by l 1 (B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] k ) copies of x k-1 3 , so the 1-bars over B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] k are labelled by terms which are multiple of x k-1

3 . The Bar Code B is admissible, then also x k-1

3

∈ N(J) 8 . As regards

3 ) = x 2 , so we have to prove that x β i -1

∈ N(J). We take the i-th 3-bar B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] i ; it is labelled by l 1 (B (3) i ) copies of x i-1 3 . Now, over B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] i there are exactly β i 2-bars and, by B2, the β i -th 2-bar over B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] i (i.e. B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF]

3 , so the 1-bars over B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] i are labelled by terms which are multiple of x β i -1 2

x i-1 3 ; by the admissibility of B, we get x β i -1

3 ) = x 1 and so we have to prove that x

for some h 3 ∈ N; we show that necessarily h 3 = k and so τ = x k 3 ∈ A. By the construction of B from ρ we have µ(3) = k, i.e. B has exactly k 3-bars; by Definition 19 a), with i = n = 3, x 3 P x 3 (τ 3 ) ∈ F (J), where τ 3 is a term labelling a 1-bar over B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] k . Now, by B1, each τ 3 ∈ T labelling a 1-bar over B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] k is s.t. P x 3 (τ 3 ) = x k-1 3 , so

No other pure powers of x 3 can occur in F (J) by Definition 19, indeed, x k 3 is the only term with minimal variable x 3

Now, we prove that ρ ∈ P (p,h,k) . The nonzero parts of ρ are positive by definition of length of a bar. Clearly ρ i, j > ρ i, j+1 , 1

t and B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] t+1 lying over the same 3-bar B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] i . This statement follows from Proposition 38 b). Moreover,

x j-1 2 x i 3 should belong to the stable ideal J. But this implies ρ i, j > ρ i+1, j since ρ i, j ≤ ρ i+1, j implies σ := x ρ i+1, j -1 1

x j-1 2 x i 3 ∈ N(J) and σx 3 x 1 | σ, contradicting the stability of J. Finally, n(ρ) = p by definition of 1-length. Then, we can define a map Ξ : B (S ) (p,h,k) → P (p,h,k) ; B → ρ, where ρ is constructed from B as described above. We prove that Ξ is a bijection. It is clearly an injection by definition of length of a bar: two different Bar Codes have at least one bar with different length. Now, we have to prove the surjectivity of Ξ, so let us take ρ ∈ P (p,h,k) . We know that it uniquely identifies a Bar Code B and by lemma 53 that B is admissible, so we only have to prove that L B = (p, h, k) and that η(B) = N(J), J stable. Obviously L B = (p, h, k):

, so we only have to prove that A ⊂ G(J), i.e. that, for each element in the star set, all the predecessors belong to the Groebner escalier. We have already proved that x k-1

3 ∈ N(J), so we only have to prove that

i-1 is labelled by x i-2 3 and, over B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] i-1 , there are β i-1 > β i 2-bars. The (β i + 1)-th 2-bar over B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] i-1 , i.e. B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] t , t = i-2 l=1 β l + (β i + 1), is labelled by x β i 2 x i-2 3 , so all the terms labelling the 1-bars over B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] t are multiples of x β i 2 x i-2 3 and since the Bar Code is admissible, we can desume that x β i 2 x i-2 3 ∈ N(J). Let us finally take x

we need to prove that x ρ i, j 1 x j-2 2 x i-1 3 and x ρ i, j 1 x j-1 2 x i-2 3 , when they are defined, belong to N(J).

• x ρ i, j 1 x j-2 2 x i-1 3 ∈ N(J): we take B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] t , t = i-1 l=1 β l + ( j -1), i.e. the ( j -1)-th 2-bar over B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] i ; since ρ i, j-1 > ρ i, j the (ρ i, j + 1)-th 1-bar over B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] t is labelled by x ρ i, j 1 x j-2 2 x i-1 3 , so belonging to N(J);

3 ∈ N(J): analogously as above, it comes from the inequality ρ i-1, j > ρ i, j . This proves the stability of J, concluding our proof.

By theorem 55, counting stable ideals in three variables becomes an application of theorem 29 (see ?). Fix a constant Hilbert polynomial p. Lemma 50 allows to enumerate all bar lists. Fix then a bar list (p, h, k) and construct the plane partitions ρ as explained above, denoting by (β 1 , ..., β k ) their shape. Finally, denote by b = (1, ..., 1) and a = (a 1 , ..., a k ) such that

the vectors of theorem 29. We can compute the number of stable ideals by exploiting the formula in the aforementioned theorem (see Appendix A.1). We remark that our choice for a and b π i, j = p.

These plane partitions are of the form of definition 26, with

In Remark 59, we will highlight the relation between these partitions and the ones defined in the previous section 6. We denote by S (p,h,k),α the set of all partitions defined above and

Remark 59. The set of the shifted plane partitions defined here for strongly stable ideals can be easily viewed as a subset of the strict plane partitions defined in the previous section for counting stable ideals. With the notation above, let us take a shifted plane partition π := (π i, j ), 1

There are exactly α i elements in the i-th row and the entries in row i are shifted to the right by i -1 positions. We define then a non-shifted plane partition ρ := (ρ i,m ) of shape α = (α 1 , ..., α k ), by

We prove that ρ ∈ P (p,h,k),α :

On the other hand, we have to point out that there are some strict plane partitions that cannot be brought back to any shifted plane partition. For example, shifting ρ = 4 2 1 3 0 0 we get π = 4 2 1 0 3 0 , which cannot be associated to any strongly stable ideal.

Each plane partition π ∈ S (p,h,k) uniquely identifies a Bar Code B:

i , i.e B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] t , where t = ( i-1 l=1 α l ) + ji + 1, i ≤ j ≤ i + α i -1; (c) for each 1 ≤ i ≤ k, and each i ≤ j ≤ i + α i -1, the number π i, j represents the number of 1-bars over B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] t , t = ( i-1 l=1 α l ) + ji + 1, namely the ji + 1-th 2-bar lying over B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] i . In other words, l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] t ) = π i, j . In conclusion, for each 1 ≤ i ≤ k, and each i ≤ j ≤ i + α i -1, the number π i, j means that in B there are 1-bars labelled by (0, ji, i -1), (1, ji, i -1), ..., (π i, j -1, ji, i -1), but there is no 1-bar labelled by (π i, j , ji, i -1), or, equivalently,

belong to the set of terms associated to B via B1 and B2, but x π i, j 1 x j-i 2 x i-1 3 does not belong to the aforementioned set 11 .

11 Again, as for stable ideals, we will see that B is admissible and that x

3 belongs to the star set associated to B.

Example 60. Let us take the bar list (p, h, k) = (6, 3, 2), α 1 = 2 > α 2 = 1, α 1 + α 2 = 3 = h. We have, for example π = 3 2 0 1 and it holds

With the notation of ?, λ 1 = λ 2 = 2. The associated Bar Code B is:

1 and B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 2 lie over B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] 1 , whereas B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 3 lie over B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] 2 . As regards 1-lengths, we have l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 1 ) = π 1,1 = 3, l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 2 ) = π 1,2 = 2 and l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] 3 ) = π 2,2 = 1. The associated set of terms, via B1 and

x 3 } and it is an order ideal.

Remark 61. The Bar Code B, uniquely identified by π, has bar list

let π be a partition in S (p,h,k),α . The Bar Code B, uniquely identified by π, is admissible.

Proof. By Remark 61, L B = (p, h, k). Consider a 1-bar B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] l , 1 ≤ l ≤ p and let its e-list be e(B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] l )

) is a bar list labelling a 1-bar of B. For B being admissible, we also need two other conditions:

Let us prove them:

we are done again and B turns out to be admissible.

Example 63. The set of terms associated to the Bar Code constructed in example 60 is an order ideal, so the Bar Code is admissible.

Theorem 64. There is a bijection between S (p,h,k) and the set

1 ) and π i, j = l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] t ) with t = ( i-1 l=1 α l ) + ji + 1 otherwise, where α i = l 2 (B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] i ), 1 ≤ i ≤ k. We observe that π is uniquely determined by B and that, by proposition 38, α ∈ I (h,k) ; we have to prove that π ∈ S (p,h,k) . The nonzero parts of π are positive by definition of length of a bar. Clearly π i, j > π i, j+1 , 1 ≤ i ≤ k, i ≤ j < i + α i -1, indeed, this can be stated as l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] t ) > l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] t+1 ) with B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] t and B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] t+1 lying over the same 3-bar B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] i . This statement follows from proposition 38 b) with i = 1. Moreover, π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 . Indeed, if π i, j < π i+1, j then it would happen that x π i+1, j -1 1

x j-i-1

3 N(J), contradicting the strongly stable property of J. By construction, the shape of π is λ = (λ 1 , ..., λ k ) with λ i = i + α i -1, 1 ≤ i ≤ k, so π ∈ S λ (1, 0). Moreover, n(π) = p by definitions of bar list and 1-length. Then, we can define a map Ξ : B (p,h,k) → S (p,h,k) ; B → π, where π is constructed from B as described above. We prove that Ξ is a bijection. It is clearly an injection by definition of length of a bar: two different Bar Codes have at least one bar with different length. Now, we have to prove the surjectivity of Ξ, so let us take π ∈ S (p,h,k) . We know that it uniquely identifies a Bar Code B and by Lemma 62 that B is admissible, so we only have to prove that B ∈ B (p,h,k) . More precisely, we have to prove that L B = (p, h, k) and that η(B) = N(J), J strongly stable. Since there are k 3-bars, for each row i, 1 ≤ i ≤ k, l 2 (B [START_REF]π i, j ≥ π i+1, j 1 ≤ i ≤ k -1, i + 1 ≤ j ≤ i + α i+1 -1[END_REF] i ) = α i and α i = h, and for each 1 ≤ i ≤ k, and each i ≤ j ≤ i + α i -1, l 1 (B [START_REF]≤ i ≤ k, i ≤ j < i + α i -1[END_REF] t ) = π i, j , t = ( i-1 l=1 α l ) + ji + 1 and n(π) = p, then L B = (p, h, k). Now, let B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] l l ∈ {1, ..., p} be a 1-bar labelled by e(B [START_REF]i ≤ k, i ≤ j ≤ i + α i -1[END_REF] l ) = (b l,1 , b l,2 , b l,3 ), so π b l,3 +1,b l,2 +b l 3 +1 ≥ b l,1 + 1. To prove that J is strongly stable, we have to prove that This concludes our proof. Now, by theorem 64, counting strongly stable ideals in three variables becomes an application of theorem 31 (?). Fix a constant Hilbert polynomial p. Lemma 50 allows to compute all bar lists.

Fix then a bar list (p, h, k) and their shape λ. Finally, denote by b = (1, ..., 1) and a = (a 1 , ..., a r ) such that a r = λ rr + 1, ..., Mr + 1

, c 1 = λ 1 -1 and c j = λ jj + 1, j = 2, ..., r, the vectors of theorem 31. We can compute the number of strongly stable ideals by exploiting the formula in the aforementioned theorem (see appendix Appendix A.2). There is a simple case of shifted (1, 0)-plane partition for which a closed formula can be easily computed.

Proposition 65. Let p ∈ N\{0}. Then there is a bijection between the sets S λ (1, 0) with λ = (2, 2) and P 3,p-1 := {λ partition of p -1 in 3 non necessarily distinct parts }.

then π is a partition of p -1 in three non necessarily distinct parts. Conversely, let us consider a partition π = (π 1 , π 2 , π 3 ) ∈ P 3,p-1 of p -1 in three non necessarily distinct parts. Then

, we get a shifted (1, 0)-plane partition of shape (2, 2) of p.

The closed formula for the partitions of proposition 65 is well known in literature.

Proposition 66 (??). The partitions in P 3,p-1 are (p-1) 2 +6 12 .

In general, finding closed formulas for plane partitions is difficult and most of them are still unknown.

Remark 67. We conjecture that, with some cumbersome computation, Theorem 64 can be generalized to the case of n ≥ 4 variables, by introducing a suitable notion of shifted (n -1)dimensional partitions.

Appendix A. Some explicit computation

In example 48 we have counted the (strongly) stable ideals in k[x 1 , x 2 ]; in the next sections, we will count the stable (section Appendix A.1) and strongly stable ideals (section Appendix A.2) in k[x 1 , x 2 , x 3 ] with constant affine Hilbert polynomial p = 10. Appendix A.1. Stable ideals Let us count the stable ideals in k[x 1 , x 2 , x 3 ] with constant affine Hilbert polynomial p = 10. By corollary 45 and lemma 50, there are 8 possible bar lists of the form (p = 10, h, k). In particular, for k = 1, 1 ≤ h ≤ 4, for k = 2, 3 ≤ h ≤ 5, and for k = 3, h = 6. For k = 1 we have (see Corollary 45) Q(10, 1) + Q(10, 2) + Q(10, 3) + Q(10, 4) = 10. Take now (10, 3, 2); the only possible shape 12 is β = (2, 1), so we have ρ 1,1 ρ 1,2 ρ 2,1 0

. We need to take a = (8, 7) (see (1) of section 6) and 12 It is the only possible partition of 3 in two distinct parts.

Appendix A.2. Strongly stable ideals Let us count the strongly stable ideals in k[x 1 , x 2 , x 3 ] with constant affine Hilbert polynomial p = 10. By Corollary 45 and Lemma 50, the possible bar lists are the same as for the case of stable ideals. For k = 1 we proceed as for stable ideals, thanks to the equivalence of Lemma 58, getting Q(10, 1)+ Q(10, 2)+ Q(10, 3)+ Q(10, 4) = 10. Consider now (10, 3, 2), for which we have the partition below a 1,1 a 1,2 0 a 2,2 , so λ = (2, 2), r = 2, M = 8, a 2 = 1, ..., 7 and a 1 = a 2 + 1, ..., 8 (see (2) in section 7). For example, if a = (5, 1), N 1 = 7 and M = x 3 + x 2 + x + 1 0 1 1 , so that x N 1 det(M) = x 7 (x 3 + x 2 + x + 1). Therefore there is one such plane partition. With analogous computations we see that there are 24 strongly stable ideals in 3 variables with constant affine Hilbert polynomial H (t) = 10. Note that a tedious computation could allow us to list all 24 plane partitions and the corresponding strongly stable ideals.