# degreeIP -- compute the degree of a monomial ideal using integer programming

## Synopsis

• Usage:
d = degreeIP(I)
d = degreeIP(I, KnownDim => k)
• Inputs:
• I, ,
• Optional inputs:
• KnownDim => an integer, default value -1, the dimension, k, of the ideal
• Outputs:
• d, an integer, the degree of I. That is, if k is the maximum dimension of a coordinate subspace in the variety of I, then degree(I) is the number of k-dimensional subspaces in the variety.

## Description

If a KnownDim is not provided, degreeIP will first call dimensionIP to compute the dimension. Additionally, before doing any computation, the cache of cokernel generators I is checked to see if the degree has been previously computed.

An integer programming formulation of the degree problem is written to a temporary file directory, then the SCIP Optimization Suite is used to solve the IP. Solving details are written to a second file in the temporary directory, before outputting the answer.

 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 : degreeIP(I, KnownDim => 3) Degree files saved in directory: /tmp/M2-8573-0/0 o3 = 5 i4 : degreeIP(I) Codim files saved in directory: /tmp/M2-8573-0/1 Degree files saved in directory: /tmp/M2-8573-0/2 o4 = 5

The location of the temporary directory is printed to the screen.

For more information about the SCIP warning messages, and related info on how SCIP counts solutions, see the very end of the ScipPrintLevel info page.

## Caveat

degreeIP does not verify that a provided KnownDim is correct. Providing the wrong dimension will result in an incorrect degree count (and possibly an infeasible program).

## Ways to use degreeIP :

• "degreeIP(MonomialIdeal)"

## For the programmer

The object degreeIP is .