/**************************************************** This program asks for 9 nonnegative integers, d, m_1, ..., m_8 from standard input. Given 8 general points p_1, ..., p_8 of P2, we define the homogeneous ideal I (over an algebraically closed field k) in the homogeneous coordinate ring R=k[P2] generated by all forms vanishing to order at least m_i at p_i. This program then returns the number v_d of generators in degree d in a minimal homogeneous set of generators for I. The output is to standard output. This is a slightly modified version (Mar 5, 2006) of the program http://www.math.unl.edu/~bharbourne1/8pt.c. The awk program that calls this program assumes m_i < 0, whereas 8pt.c assumes m_i > 0, so we need to change the sign of the input multiplicities. The program 8pt.c was originally written Sep 30, 1998 revised Aug 8, 1999 B. Harbourne bharbourne1@unl.edu ************************************************/ #include "time.h" #include "stdio.h" /* If you increase MAXMULT you may need to increase the MAXINDEX values. */ #define MAXMULT 300 #define MAXINDEX1 320 /* PICNMBR is 1 plus the number of points; it is the Picard number of the surface obtained by blowing up the points. The number of points should be 8. If you change PICNMBR, you must remove the "8 point specific code". Search for the string "8 point specific code" to find where the code which must be removed starts and stops. With that removed, the program should still work for values 1<=PICNMBR<=6. For 8<=PICNMBR with that code removed, the program will compute numbers of generators and syzygies ASSUMING max rank holds for H^0(X, F)\otimes H^0(X, L)\to H^0(X, F+L), where L is the class of a line and F is effective and numerically effective on the blow up X of P2 at the points. This assumption is however false in general. Moreover, for 10<=PICNMBR, the program's values for the hilbert function are based on the conjecture that H^1(X, F)=0 for a neff and effective F when X is a general blow up of P2, and that the only integral curves on X of negative self-intersection are exceptional curves. */ #define PICNMBR 9 void nuelimfcs( int class2[]); void numypermute( int class2[], int class3[]); void nuonestep( int class2[], int class3[]); void nugotofd( int class2[], int class3[]); long int nufindExpectedH( int class2[]); long int nucombin( int d); long int nufindH0( int class2[]); long int nufindH1( int class2[]); long int nulstar( int class2[]); long int nuqstar( int class2[]); long int numxrkcok( int class2[]); void numakemonotone( int class2[]); int nuesix( int class2[]); int nuefive( int class2[]); int nuefour( int class2[]); int nuethree( int class2[]); int nuetwo( int class2[]); int nueone( int class2[]); void nusix( int class2[]); void nufive( int class2[]); void nufour( int class2[]); void nuthree( int class2[]); void nutwo( int class2[]); void nuone( int class2[]); void nufreepart( int class2[]); int nuonesteptoample( int class2[]); int numinusdotK( int class2[]) ; int nuabs( int x) ; long int nucok( int class2[]); main() { int mult[PICNMBR], stopit, class4[PICNMBR], nisha, kira; int alpha, beta, tau, inputdegree, mydeg; long int h[MAXINDEX1], conds; long int sumL, newnu[MAXINDEX1], mxrkvalue; int q, i, j, k, ii; long int testflag, numsyzgen[MAXINDEX1+1], f1, f2; /* get the multiplicities */ for(i=0; i= alpha in which h1 is zero */ while(nufindH1(class4)>0) class4[0]++; tau=class4[0]; /* Find beta: least degree with no fixed components in that degree */ class4[0]=alpha; i=alpha; nufreepart(class4); j=class4[0]; while(j= alpha && inputdegree < tau+2) printf("%ld", newnu[inputdegree-alpha]); else printf("%ld", 0); } /* end if checking for exceeding of array bounds */ } /* end of main */ long int nucok( int class2[]) { int class3[PICNMBR]; int i, testflag, j, s, f; long int cok, ker; for(i=0; i=0) {i=i-8; j=j+1;} if((nuabs(class2[0]-j*8-3)+nuabs(class2[1]+j*3+1)+nuabs(class2[2]+j*3+1)+nuabs(class2[3]+j*3+1)+nuabs(class2[4]+j*3+1)+nuabs(class2[5]+j*3+1)+nuabs(class2[6]+j*3+1)+nuabs(class2[7]+j*3+1)+nuabs(class2[8]+j))==0) cok=cok+j+1-ker; else { if(numxrkcok(class2)<0) cok=cok-(numxrkcok(class2)+ker); } } return cok; } void nusix( int class2[]) { class2[0]=class2[0]-6; class2[1]=class2[1]+3; class2[2]=class2[2]+2; class2[3]=class2[3]+2; class2[4]=class2[4]+2; class2[5]=class2[5]+2; class2[6]=class2[6]+2; class2[7]=class2[7]+2; class2[8]=class2[8]+2; } void nufive( int class2[]) { class2[0]=class2[0]-5; class2[1]=class2[1]+2; class2[2]=class2[2]+2; class2[3]=class2[3]+2; class2[4]=class2[4]+2; class2[5]=class2[5]+2; class2[6]=class2[6]+2; class2[7]=class2[7]+1; class2[8]=class2[8]+1; } void nufour( int class2[]) { class2[0]=class2[0]-4; class2[1]=class2[1]+2; class2[2]=class2[2]+2; class2[3]=class2[3]+2; class2[4]=class2[4]+1; class2[5]=class2[5]+1; class2[6]=class2[6]+1; class2[7]=class2[7]+1; class2[8]=class2[8]+1; } void nuthree( int class2[]) { class2[0]=class2[0]-3; class2[1]=class2[1]+2; class2[2]=class2[2]+1; class2[3]=class2[3]+1; class2[4]=class2[4]+1; class2[5]=class2[5]+1; class2[6]=class2[6]+1; class2[7]=class2[7]+1; } void nutwo( int class2[]) { class2[0]=class2[0]-2; class2[1]=class2[1]+1; class2[2]=class2[2]+1; class2[3]=class2[3]+1; class2[4]=class2[4]+1; class2[5]=class2[5]+1; } void nuone( int class2[]) { class2[0]=class2[0]-1; class2[1]=class2[1]+1; class2[2]=class2[2]+1; } int nuesix( int class2[]) { return class2[0]*6+class2[1]*3+class2[2]*2+class2[3]*2+class2[4]*2+class2[5]*2+class2[6]*2+class2[7]*2+class2[8]*2; } int nuefive( int class2[]) { return class2[0]*5+class2[1]*2+class2[2]*2+class2[3]*2+class2[4]*2+class2[5]*2+class2[6]*2+class2[7]+class2[8]; } int nuefour( int class2[]) { return class2[0]*4+class2[1]*2+class2[2]*2+class2[3]*2+class2[4]+class2[5]+class2[6]+class2[7]+class2[8]; } int nuethree( int class2[]) { return class2[0]*3+class2[1]*2+class2[2]+class2[3]+class2[4]+class2[5]+class2[6]+class2[7]; } int nuetwo( int class2[]) { return class2[0]*2+class2[1]+class2[2]+class2[3]+class2[4]+class2[5]; } int nueone( int class2[]) { return class2[0]+class2[1]+class2[2]; } long int nucombin( int d) { long int x, y; y=d; if(d<2) x=0L; else x=y*(y-1L)/2L; return x; } void nuelimfcs(int class2[]) { int i; for(i=1;i0) class2[i]=0; } void numypermute(int class2[], int class3[]) { int max, max3, test, test3, i; max=class2[1]; max3=class3[1]; for(i=2; i0) class2[8]=0; else testflag=1;}}}}}}} } int nuonesteptoample( int class2[]) /* assumes class2 is nef, nontrivial */ {int x; x=0; numakemonotone(class2); if(nuesix(class2)==0) nusix(class2); else {if(nuefive(class2)==0) nufive(class2); else {if(nuefour(class2)==0) nufour(class2); else {if(nuethree(class2)==0) nuthree(class2); else {if(nuetwo(class2)==0) nutwo(class2); else x=1; }}}} return x;} int numinusdotK( int class2[]) {int x, i; x=0; for(i=0; i