Singular
https://www.singular.uni-kl.de/forum/

Compute the generic initial ideal
https://www.singular.uni-kl.de/forum/viewtopic.php?f=10&t=1663
Page 1 of 1

Author:  Yeongseok Song [ Thu Feb 28, 2008 11:08 am ]
Post subject:  Compute the generic initial ideal

Hi!
I am a beginner of Singular
I want to compute the generic initial ideal. but I can't compute that in Singular!
How can I compute the generic initial ideal in Singular?

Thanks!

Author:  levandov [ Sun Jul 19, 2009 4:33 pm ]
Post subject:  Re: Compute the generic initial ideal

Hi, up to now there was no command in Singular to
compute the gin. But according to the tutorial paper of Mark Green and Michael Stillman (from the book "Groebner bases and Applications", Cambridge University Press, 1998), it can be coded in Singular as follows:

Code:
LIB "random.lib";
LIB "poly.lib";
proc gin(ideal I)
{
matrix M = randommat(1,nvars(basering), maxideal(1), 1000); // the random coeffs will be in range [-1000,1000]
ideal m = ideal(M); map F = basering, m;
ideal J = F(I);
J = groebner(J);
J = normalize(lead(J));
return(J);
}


For instance, try the examples from the tutorial:
Code:
// for revlex gin:
ring r = 0,(a,b,c,d),dp;
ideal I = a^3+c^2*d, b^3-a*d^2;
gin(I);


Code:
// for lex gin:
ring r = 0,(a,b,c,d),lp;
ideal I = a^3+c^2*d, b^3-a*d^2;
gin(I); // be patient, it takes some time


This agrees with the answers, computed e.g. with Macaulay2.

Regards,
Viktor Levandovskyy

Author:  bulygin [ Mon Jul 20, 2009 10:57 am ]
Post subject:  Re: Compute the generic initial ideal

You may use the function randomid from random.lib as follows:
Code:
LIB "random.lib";
ring r = 0,(a,b,c,d),dp;
ideal I = a^3+c^2*d, b^3-a*d^2;
ideal J=randomid(I,2,100);

This will give you an ideal with two random generators which are random linear combinations of generators of I with coefficients in [-100,100].
More info in http://www.singular.uni-kl.de/Manual/latest/sing_751.htm#SEC828

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/