# NCcycSos

description:

[IsCycEq,X,base,sohs,g,SDP_data,L] = NCcycSos(f,params) checks whether the polynomial f 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, the program uses the flawed Newton Cyclic Chip Method to get the vector of possible monomials and if it equals 0, the program constructs all posible monomials from the Newton polytope using alpha degrees. Default value is the Newton polytope.

params.obj set the objective function C for the SDP solver. If it equals 0, C is a square matrix of zeros (finding the analytic center) and if it equals 1, C is the identity matrix (minimizing rank). Default is 1.

params.moment == 1 ... we keep all monomials in the base.

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:

IsCyceq equals 1 if the polynomial f is cycl. equiv. to a sum of hermitian squares, and 0 otherwise.

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

base is a list of monomials which appear in the SOHS decomposition.

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

g is the NCpoly representing sum_i m_i^*m_i to which the polynomial f is cyclically equivalent

SDP_data is a structure holding all the data for the SDP solver

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

possible usage:

NCcycSos(f), NCcycSos(f,params)

example:

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

>> params.precision=1e-5;

>> [IsCycEq,X,base,sohs,g] = NCcycSos(f,params)

IsCycEq = 1

X = 1.0000 -1.0000

-1.0000 1.0000

base = 'y'

'x*x'

sohs = -x^2+y

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