Top
Back: D.2.5.1 genericid
Forward: D.2.5.3 randommat
FastBack: D. SINGULAR libraries
FastForward: E. Release Notes
Up: D.2.5 random_lib
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. Index
About: About This Document

D.2.5.2 randomid

Procedure from library random.lib (see random_lib).

Usage:

randomid(id,[k,b]); id ideal/module, b,k integers

Return:

ideal/module having k generators which are random linear combinations of generators of id with coefficients in the interval [-b,b] (default: b=30000, k=size(id))

Note:

For performance reasons try small bound b in characteristic 0

Example:

 
LIB "random.lib";
ring r=0,(x,y,z),dp;
randomid(maxideal(2),2,9);
→ _[1]=-5x2-9xy+6y2-8xz-8yz+4z2
→ _[2]=-9xy+2y2+xz+yz-z2
module m=[x,0,1],[0,y2,0],[y,0,z3];
show(randomid(m));
→ // module, 3 generator(s)
→ [1369x-11685y,-4481y2,-11685z3+1369]
→ [-642x-13756y,25342y2,-13756z3-642]
→ [2536x-6355y,8285y2,-6355z3+2536]

Top Back: D.2.5.1 genericid Forward: D.2.5.3 randommat FastBack: D. SINGULAR libraries FastForward: E. Release Notes Up: D.2.5 random_lib Top: Singular 2-0-4 Manual Contents: Table of Contents Index: F. Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.