Home Online Manual
Top
Back: randommat
Forward: sparsematrix
FastBack:
FastForward:
Up: random_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.2.9.4 sparseid

Procedure from library random.lib (see random_lib).

Usage:
sparseid(k,u[,o,p,b]); k,u,o,p,b integers

Return:
ideal having k generators, each of degree d, u<=d<=o, p percent of terms in degree d are 0, the remaining have random coefficients in the interval [1,b], (default: o=u, p=75, b=30000)

Example:
 
LIB "random.lib";
ring r = 0,(a,b,c,d),ds;
sparseid(2,3);"";
==> _[1]=12773a3+24263a2c+20030abc+17904b2c+26359c3
==> _[2]=24004a3+6204b2c+24170bc2+19505c2d+21962bd2
==> 
sparseid(3,0,4,90,9);
==> _[1]=1+4a2+8b2c+3c3+4a3b+4a2b2+5abc2+3ac3
==> _[2]=a+a2+7ab2+6a2c+3c3+5a3b+9ab3+2c4+3c3d+8ad3
==> _[3]=5a+ab+2ac2+2b3c+8abcd