|
D.7.1.6 faststd
Procedure from library presolve.lib (see presolve_lib).
- Usage:
- faststd(id [,"hilb","sort","dec",o,"blocks"]);
id=ideal/module, o=string (allowed:"lp","dp","Dp","ls",
"ds","Ds"), "hilb","sort","dec","block" options for
Hilbert-driven std, and the procedure sortandmap
- Return:
- a ring R, in which an ideal STD_id is stored:
- the ring R differs from the active basering only in the choice
of monomial ordering and in the sorting of the variables.
- STD_id is a standard basis for the image (under imap) of the input
ideal/module id with respect to the new monomial ordering.
- Note:
- Using the optional input parameters, we may modify the computations
performed:
- "hilb" : use Hilbert-driven standard basis computation
- "sort" : use 'sortandmap' for a best sorting of the variables
- "dec" : order vars w.r.t. decreasing complexity (with "sort")
- "block" : create block ordering, each block having ordstr=o, s.t.
vars of same complexity are in one block (with "sort")
- o : defines the basic ordering of the resulting ring
[default: o=ordering of 1st block of basering (if allowed, else o="dp"],
"sort", if none of the optional parameters is given
This proc is only useful for hard problems where other methods fail.
"hilb" is useful for hard orderings (as "lp") or for characteristic 0,
it is correct for "lp","dp","Dp" (and for block orderings combining
these) but not for s-orderings or if the vars have different weights.
There seem to be only few cases in which "dec" is fast
Example:
| LIB "presolve.lib";
system("--ticks-per-sec",100); // show time in 1/100 sec
ring s = 0,(e,f,x,y,z,t,u,v,w,a,b,c,d),(c,lp);
ideal i = w2+f2-1, x2+t2+a2-1, y2+u2+b2-1, z2+v2+c2-1,
d2+e2-1, f4+2u, wa+tf, xy+tu+ab;
option(prot); timer=1;
int time = timer;
ideal j=std(i);
==> [15:2]2(7)s(6)s(5)sss(4)ss3(3)s(4)s(7)s4(8)s(9)s(13)-s---s(15)s5(14)----.\
-s(13)-.--6-..ss(18)-.-7-s(15)s(19)--.8-s(13)..s(16).9.s(18)s(22)ss(26)..\
..-s(28)--10-.-.-.s(22)---s-.-s(25)11---.-..-.---..-s(18)-12---.s(19)----\
--13-s(15)-s(18)s(22)..----14-s(20)--...-...-15.s(17)..s(18)s(22)-16.----\
---s(11)-.17..-----.[63:3]18.-19.s(8)-20..-.21-.s(9).22..-.23..s(12)24.s(\
14)-..-.25...s(12)--26--..27.ss(15).28---......29...30.-.31.....32---33--\
-34----35-
==> product criterion:303 chain criterion:363
timer-time;
==> 7
dim(j),mult(j);
==> 5 224
time = timer;
def R=faststd(i); // use "best" ordering of vars
==> // chosen options, hilb sort dec block: 0 1 0 0
==> v
==> (S:7)-------[15:2]2(7)s(6)s(5)ss(4)s3(3)s4(4)s-s5(2)s6-s7(4).8-s(3)s9(7)s\
(10)--s(11)-10-s(14)-.s.--s(16)11-s(19)s(23)-.-..s(21).s12(26)-..------..\
-----13-s(17)...-.-.14-----15------.-.16-17--
==> product criterion:119 chain criterion:52
==>
==> // 'faststd' created a ring, in which an object STD_id is stored.
==> // To access the object, type (if the name R was assigned to the return v\
alue):
==> setring R; STD_id;
timer-time;
==> 10
show(R);setring R;dim(STD_id),mult(STD_id);
==> // ring: (0),(u,e,z,v,c,d,f,x,y,b,a,t,w),(lp(13),C);
==> // minpoly = 0
==> // objects belonging to this ring:
==> // STD_id [0] ideal (SB), 21 generator(s)
==> 5 128
setring s;kill R;time = timer;
def R=faststd(i,"hilb"); // hilb-std only
==> // chosen options, hilb sort dec block: 1 0 0 0
==> [15:2]2(7)s(6)s(5)s(4)ssss3(3)ss(6)s4(10)s(12)--s(10)s(14)--s(17)s5------\
s(16)s(21)---s(22)s(27)---6-s(28)--s(29)-------------7---s(18)--s(21)--8-\
-s(20)s(26)s(32)s(38)s(44)s(47)-----s--9---s--s(51)s(55)s(61)-s(62)s(67)s\
(72)--s(75)s(80)s(84)----s(86)-s(90)s(94)----s(95)------------10---------\
------s(73)----s(74)-------------------------------------------------s(30\
)----------11-----s(20)--s(23)---s--s(24)----12--------------------
==> product criterion:290 chain criterion:750
==> [15:2]2(7)s(6)s(5)sss(4)ss3(3)s(4)s(7)s4(8)s(9)s(13)-s---s(15)s5(16)----s\
-shhhhh6(15)s(18)s(23)s(28)s(34)--shhhhhhh7(30)s(34)-s(42)-s(44)---s(46)-\
------s(45)---shhhh8(43)s(47)--s(51)s(56)-------------s(48)---------shhhh\
9(41)s(44)s(48)s(53)-s(57)-s(62)s(67)-----------s(60)s(64)-----shhhhhhhhh\
hh10(54)-s(57)-shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh11(17)s(22)--\
---shhhhhh12(16)s(19)s(23)shhhhhhhhh13(18)s(23)---shhhhhhhhhhhhhhhhhhhhhh\
15(2)s(6)shhhhhhhhh17(2)[63:3]sh18(7)shhhh19-s(11)shhhhhhhhhhhh21(3)shhhh\
hhh24shhhh
==> product criterion:414 chain criterion:1018
==> hilbert series criterion:149
==>
==> // 'faststd' created a ring, in which an object STD_id is stored.
==> // To access the object, type (if the name R was assigned to the return v\
alue):
==> setring R; STD_id;
timer-time;
==> 4
show(R);setring R;dim(STD_id),mult(STD_id);
==> // ring: (0),(e,f,x,y,z,t,u,v,w,a,b,c,d),(lp(13),C);
==> // minpoly = 0
==> // objects belonging to this ring:
==> // STD_id [0] ideal (SB), 59 generator(s)
==> 5 224
setring s;kill R;time = timer;
def R=faststd(i,"hilb","sort"); // hilb-std,"best" ordering
==> // chosen options, hilb sort dec block: 1 1 0 0
==> v
==> (S:7)-------[15:2]2(7)s(6)s(5)ssss(4)s3(3)s(4)s(6)s4(7)ss(9)---s(11)s(14)\
5--s(17)s(22)--s(23)-s(27)--6-s(28)s(33)s(38)--s(42)-s(48)--s(54)--------\
---7-------s(39)-----s----s(42)-----8--s(39)s(45)-s(50)s(53)--s(57)s(63)-\
-s(66)--------s(63)---9----s(60)--s(64)---s(67)-s(71)s(77)-s(81)---s(84)s\
(90)----s-s(94)s(98)-----ss(102)--(100)--s(102)s(108)-s(113)----------10-\
--(100)-------------------s(85)-s(88)--------------------s(73)-s(77)--s(8\
1)--------------s(73)-------------------------------11----------s(37)s(42\
)---------s(36)-s(40)----s---s(43)-------s(41)12-------s(38)----s(39)----\
-s(38)----s(39)----------------s(28)13--------s(24)---------s(19)--------\
-14----------
==> product criterion:452 chain criterion:1667
==> [15:2]2(7)s(6)sss(5)ss(4)s3(3)s(4)s(6)s4(8)s(7)ss(13)-shhh5(11)s(16)-----\
s(15)s(21)s6(27)shhhhhhhhhhhhhhhhhh7(11)s(16)s(22)s(27)---s(28)sh8(33)--s\
(37)s(43)-s(47)----s(48)-------s(46)-----shhhhhh9(41)--s(44)-s(48)-shhhhh\
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh11-shhhhh
==> product criterion:201 chain criterion:217
==> hilbert series criterion:84
==>
==> // 'faststd' created a ring, in which an object STD_id is stored.
==> // To access the object, type (if the name R was assigned to the return v\
alue):
==> setring R; STD_id;
timer-time;
==> 16
show(R);setring R;dim(STD_id),mult(STD_id);
==> // ring: (0),(e,z,v,c,d,f,x,y,b,t,u,a,w),(lp(13),C);
==> // minpoly = 0
==> // objects belonging to this ring:
==> // STD_id [0] ideal (SB), 34 generator(s)
==> 5 128
setring s;kill R;time = timer;
def R=faststd(i,"hilb","sort","block","dec"); // hilb-std,"best",blocks
==> // chosen options, hilb sort dec block: 1 1 1 1
==> v
==> (S:7)-------[15:2]2(7)s(6)s(5)s(4)ss(3)ss3s(5)s(8)s4(11)s-s(12)s(15)---s(\
16)s(17)s(20)s(25)s5(27)----s(29)--------s(24)---------6-s(18)s(25)-s(29)\
-s(34)------7-----s(29)----s(30)------8--s(27)s(32)-s(37)s(43)-s(47)s(53)\
--s(57)s(63)--s(67)----9------s(58)s(63)-s(67)-s(73)s(79)s(83)s(88)s(95)-\
-s(100)----------s(95)--s(97)s(102)-s(105)s(110)---s(114)--------s(112)--\
-----10-----(100)--------------------s(85)-s(89)----s(92)----------------\
---s(78)-s(82)------------------s(69)----s-----------------11------------\
---------------s(30)-------------------12-----------
==> product criterion:378 chain criterion:1033
==> [15:2]2(7)s(6)s(5)s(4)s(3)ss(4)s3s(7)s(8)s(10)s4(14)s(16)s(20)s(22)-s(23)\
s(26)-s(29)s(34)-----s5(36)s(43)s(48)-s(51)------s(50)---s(51)-shhhhhhhhh\
hh6(43)s(50)-s(55)-s(59)-s(63)-------s(61)shhhhhhhhhhhh7(55)s(58)s(64)s(7\
0)---s(72)-s(77)---s(81)--------s(78)shhhhhhhhhhhh8(71)s(77)s(81)--s(84)-\
--s(87)-s(90)--------s(88)shhhhhhhhhhhhhhhhhhhhhhhhhhhhhh9(64)s(69)-s(73)\
s(78)--s(83)s(88)s(94)s(100)--s(104)---s(106)s(112)--s(116)--------------\
--(100)shhhhhhh10(97)-s(100)-s(105)s(110)-----s(109)-----ss(114)---------\
-----(100)----s(102)--(100)shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh11(69)-s\
(73)-s(78)-s(82)s(87)---s(89)-s(94)---s(97)--shhhhhhhhhhhhhhhhhhhhhhhhhhh\
hhhhhhhhhhhhh12(61)---s(63)s(67)s(73)--s(76)-s(81)--shhhhhhhhhhhhhhhhhhhh\
hhhhhhhhhhhhhhhhhh13(47)-s(52)----s(53)---s(56)--------------shhhhhhhhhhh\
hh14(34)s(39)-s(43)-s(46)----s(47)-shhhhhhhhhhhhhhhhh15(33)-s(38)-----ssh\
hhhhhhhhhhhhhhhhhhh16(23)s[63:3](29)-----shhhhhhhhhhhhhhhhhhhhhhhhhhhh20s\
(5)shhhhhhhhhhh
==> product criterion:788 chain criterion:3233
==> hilbert series criterion:276
==>
==> // 'faststd' created a ring, in which an object STD_id is stored.
==> // To access the object, type (if the name R was assigned to the return v\
alue):
==> setring R; STD_id;
timer-time;
==> 19
show(R);setring R;dim(STD_id),mult(STD_id);
==> // ring: (0),(w,a,u,t,b,y,x,f,d,c,v,z,e),(lp(1),lp(3),lp(4),lp(5),C);
==> // minpoly = 0
==> // objects belonging to this ring:
==> // STD_id [0] ideal (SB), 96 generator(s)
==> 5 96
setring s;kill R;time = timer;
timer-time;time = timer;
==> 0
def R=faststd(i,"sort","block","Dp"); //"best",decreasing,Dp-blocks
==> // chosen options, hilb sort dec block: 0 1 0 1
==> v
==> (S:7)-------[15:5]2(7)s(6)s(5)ss(4)s3(3)s4(4)s-s5(2)-s6s7(4).8-s(3)s9(7)s\
(10)--s(11)-10-s(14)-s..--s(16)11-s(18)s(23)-...-s(21)s(26)12.-..--..----\
--.----13...-.-.--14.--15------16-
==> product criterion:109 chain criterion:47
==>
==> // 'faststd' created a ring, in which an object STD_id is stored.
==> // To access the object, type (if the name R was assigned to the return v\
alue):
==> setring R; STD_id;
timer-time;
==> 10
show(R);setring R;dim(STD_id),mult(STD_id);
==> // ring: (0),(u,e,z,v,c,d,f,x,y,b,a,t,w),(Dp(1),Dp(5),Dp(4),Dp(1),Dp(1),D\
p(1),C);
==> // minpoly = 0
==> // objects belonging to this ring:
==> // STD_id [0] ideal (SB), 20 generator(s)
==> 5 128
|
|