next | previous | forward | backward | up | top | index | toc | Macaulay2 website
MonomialIntegerPrograms :: codimensionIP

codimensionIP -- compute the codimension of a monomial ideal using integer programming

Synopsis

Description

The integer programming input and output files created are named "codim.zpl", "codim.errors", etc., and saved to a temporary directory. By default the location of the temporary directory is printed to the screen.

i1 : R = QQ[x,y,z,w,v];
i2 : I = monomialIdeal(x*y*w, x*z*v, y*x, y*z*v);

o2 : MonomialIdeal of R
i3 : codimensionIP(I)
Codim files saved in directory: /tmp/M2-8538-0/0

o3 = 2

The verbosity of every function in the MonomialIntegerPrograms package is controlled with ScipPrintLevel. For example, to suppress printing the name of the directory or any other information and simply return the answer, set ScipPrintLevel to 0.

i4 : ScipPrintLevel = 0;
i5 : J = monomialIdeal(x*y^3*z^7, y^4*w*v, z^2*v^8, x*w^3*v^3, y^10, z^10)

                     10     3 7   10   4        3 3   2 8
o5 = monomialIdeal (y  , x*y z , z  , y w*v, x*w v , z v )

o5 : MonomialIdeal of R
i6 : codimensionIP(J)

o6 = 3

The codimension of a monomial ideal is equal to the codimension of its radical. Therefore, when looking at the IP formulation written to the temporary file "codim.zpl", you will see that exponents are ignored.

See also

Ways to use codimensionIP :

For the programmer

The object codimensionIP is a method function.