## Computing Hilbert functions for Points in P2 with given matroid

Suppose you have a fat point scheme Z = m1p1+...+mrpr in P2 and you want to compute the Hilbert function of the ideal I(Z) defining Z and the graded Betti numbers of the minimal free resolution of I(Z). If you have information on which subsets of the points are collinear, you can at least get lower and upper bounds f and F on the Hilbert function, based on the results of a paper by Cooper, Harbourne and Teitler (CHT). The bounds are computed just knowing the matrix M which specifies whatever maximal collinearities are known and being given the multiplicities mi. The computation does not use Grobner bases, it instead computes the bounds using recursive formulas for the upper and lower bounds as given in CHT. When f=F, lower and upper bounds are also given for the graded Betti numbers.
The scripts provided here for computing these bounds are awk scripts, named reductionvectorscript10-17-10 and HFBoundsAndBettis10-17-2010. They are run as follows:
unix\$ awk -f reductionvectorscript10-17-10 File1 File2 | awk -f HFBoundsAndBettis10-17-2010
File1 contains the matrix M. For 4 points, where 3 are collinear and 1 is off that line, the matrix M (and hence the lines in the file File1) would be as follows if we assume point 1 is the point off the line and points 2, 3 and 4 are the collinear points:
```1 1 0 0
1 0 1 0
1 0 0 1
0 1 1 1
```
Row 1 indicates a line goes through points 1 and 2, row 2 specifies a line goes through points 1 and 3, row 3 says a line goes through points 1 and 4, and row 4 says points 2, 3 and 4 are collinear. These rows can be given in any order.
File2 specifies the multiplicities mi. Each row of File2 specifies a new fat point scheme. So if File2 has the following lines:
```2 3 4 5
3 4 5 2
3 3 3 3
```
we have three fat points schemes, Z = 2p1+3p2+4p3+5p4 for line 1, Z = 3p1+4p2+5p3+2p4 for line 2, and Z = 3p1+3p2+3p3+3p4 for line 3. (Note that the order of the entries in each line matters; note the difference between line 1 and line 2, for example. The order determines which point gets which multplicity. If you want to change the order in File2, you must permute the columns of M as given in File1 to be compatible.)
Here is the output you would get if you run
awk -f reductionvectorscript10-17-10 File1 File2 | awk -f HFBoundsAndBettis10-17-2010
using the files as above:
```unix\$ awk -f reductionvectorscript10-17-10 File1 File2 | awk -f HFBoundsAndBettis10-17-2010

*******************************

Input vector:  12 9 6 4 2 1
Upper and lower Hilbert functions ARE equal.
alpha lwrbnd= 6
lower bound on dim of I_t for t >= alpha-1: 0 3 8 15 23 33 44 57
alpha uppbnd= 6
upper bound on dim of I_t for t >= alpha-1: 0 3 8 15 23 33 44 57
Delta uprbnd=  1 2 3 4 5 6 4 3 2 2 1 1
Delta lwrbnd=  1 2 3 4 5 6 4 3 2 2 1 1
uprbnd=  1 3 6 10 15 21 25 28 30 32 33 34
lwrbnd=  1 3 6 10 15 21 25 28 30 32 33 34

The input is Bezout, so we now give upper and lower bounds on the Betti numbers.
Note: the upper and lower bounds coincide.

Upper bounds for the graded Betti numbers:
nmbr of gens = 0 0 0 0 0 0 3 1 1 0 1 0 1 0 0
nmbr of syzs = 0 0 0 0 0 0 0 2 1 1 0 1 0 1 0
Lower bounds for the graded Betti numbers:
nmbr of gens = 0 0 0 0 0 0 3 1 1 0 1 0 1 0 0
nmbr of syzs = 0 0 0 0 0 0 0 2 1 1 0 1 0 1 0

*******************************

Input vector:  11 8 6 4 3 2
Upper and lower Hilbert functions ARE equal.
alpha lwrbnd= 6
lower bound on dim of I_t for t >= alpha-1: 0 1 6 13 22 32 44
alpha uppbnd= 6
upper bound on dim of I_t for t >= alpha-1: 0 1 6 13 22 32 44
Delta uprbnd=  1 2 3 4 5 6 6 3 2 1 1
Delta lwrbnd=  1 2 3 4 5 6 6 3 2 1 1
uprbnd=  1 3 6 10 15 21 27 30 32 33 34
lwrbnd=  1 3 6 10 15 21 27 30 32 33 34

The input is Bezout, so we now give upper and lower bounds on the Betti numbers.
Note: the upper and lower bounds coincide.

Upper bounds for the graded Betti numbers:
nmbr of gens = 0 0 0 0 0 0 1 3 1 1 0 1 0 0
nmbr of syzs = 0 0 0 0 0 0 0 0 3 1 1 0 1 0
Lower bounds for the graded Betti numbers:
nmbr of gens = 0 0 0 0 0 0 1 3 1 1 0 1 0 0
nmbr of syzs = 0 0 0 0 0 0 0 0 3 1 1 0 1 0

*******************************

Input vector:  9 6 4 3 2
Upper and lower Hilbert functions ARE equal.
alpha lwrbnd= 5
lower bound on dim of I_t for t >= alpha-1: 0 1 6 13 21 31
alpha uppbnd= 5
upper bound on dim of I_t for t >= alpha-1: 0 1 6 13 21 31
Delta uprbnd=  1 2 3 4 5 5 2 1 1
Delta lwrbnd=  1 2 3 4 5 5 2 1 1
uprbnd=  1 3 6 10 15 20 22 23 24
lwrbnd=  1 3 6 10 15 20 22 23 24

The input is Bezout, so we now give upper and lower bounds on the Betti numbers.
Note: the upper and lower bounds coincide.

Upper bounds for the graded Betti numbers:
nmbr of gens = 0 0 0 0 0 1 3 1 0 1 0 0
nmbr of syzs = 0 0 0 0 0 0 0 3 1 0 1 0
Lower bounds for the graded Betti numbers:
nmbr of gens = 0 0 0 0 0 1 3 1 0 1 0 0
nmbr of syzs = 0 0 0 0 0 0 0 3 1 0 1 0
```