NCcycMin

description:

[opt,X,base,sohs,g,SDP_data,L] = NCcycMin(f,params) computes the maximal epsilon such that f-epsilon is cyclically equivalent to a sum of hermitian squares.

arguments:

f is an NCpoly representing a polynomial.

With params.precision we can set the smallest value that is considered to be nonzero in numerical calculations; if the command is called without it, we assume the precision set with the command NCsetPrecision or the value set in NCparam.m.

params.messages is used to optionally turn on (1) and off (0) verbose output; default value is 1 (on).

params.solver sets the solver to be used for SDP and overrides the value set in the global option file NCparam.m. (currently SeDuMi, SDPA-M or SDPT3 are supported) 

params.eps sets the desired accuracy iy you are using SeDuMi as SDP solver. Setting params.eps=0 lets SeDuMi run as long as it makes progress.

params.V is a column of monomials to be used as a basis in the SOHS decomposition. It is optional; if the command is called without it, it is constructed automatically.

params.Vmethod sets the method to get the vector of possible monomials. If it equals -1 then we create V by the flawed Newton Cyclic Chip Method: we take all cyclic permutations of monomials of even dergee and for each of those equivalents which are herm. squares we take all right chips. This is valid only if support of f is the same as support of SOHS, which is cyc. eq. to f. If it equals 0 we create V using alpha degree idea and the Newton polytope (this is the default value). If it equals 1 we create V checking whether the dual moment matrix allows flat extensions: we generate all possible monomials with degree <= d.

params.justSDP_data == 1 means that the program ends when the SDP_data is prepared and nothing else is computed. It is optional; the default value is 0.

params.decomposition == 0 means that no SOHS decomposition will actually be computed. It is optional; the default value is 1.

output:

opt is the maximal epsilon making f-epsilon cyclically equivalent to a sum of hermitian squares,

X is the Gram matrix solution of the corresponding SDP returned by the solver.

base is a vector of monomials appearing in the SOHS decomposition of the polynomial cyclically equivalent to the f-epsilon

sohs is the SOHS decomposition of the polynomial cyclically equivalent to the f-epsilon

g is the NCpoly representing SOHS decomposition of the polynomial cyclically equivalent to the f-epsilon

SDP_data is a structure holding all the data used in SDP solver

L is the operator representing the dual optimization problem (L ... the dual feasible SDP matrix)

possible usage:

NCcycMin(f), NCcycMin(f,params)

example:

>> f=x^4-4*x^2*y+8*y+4*y^2-4*x^2;

>> params.precision=1e-4;

>> [opt,X,base,sohs,g] = NCcycMin(f,params)

opt = -4.0000

X = 4.0000   4.0000   0.0000  -2.0000

    4.0000   4.0000   0.0000  -2.0000

    0.0000   0.0000   0.0000   0.0000

   -2.0000  -2.0000  -0.0000   1.0000

base = ''

       'y'

       'x'

       'x*x'

sohs = 2-x^2+2*y

g = 4-4*x^2+x^4-2*x^2*y+8*y-2*y*x^2+4*y^2