description:[IsSohs,X,base,sohs,g,SDP_data,L] = NCsos(f,params) checks whether the polynomial f is 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 can make progress. params.obj set the objective function C for SDP solver. If it equals 0 C is square matrix of zeros (finding analytical center) and if it equals to 1 C is the identity matrix (minimizing rank). Default is 1. 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.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:IsSohs equals 1 if the polynomial f is 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 f g is the NCpoly representing sum_i m_i^*m_i 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:NCsos(f), NCsos(f,params) example:>> f=y*x^2*y-y*x*z+4*y*z^2*y-z*x*y+z^2; >> [IsSohs,X,base,sohs,g]=NCsos(f) *************** Polynomial is SOHS ************ IsSohs = 1 X = 1.0000 -0.0000 -1.0000 -0.0000 4.0000 0.0000 -1.0000 0.0000 1.0000 base = 'x*y' 'z*y' 'z' sohs = x*y-z 2*z*y 7.21e-006*z g = y*x^2*y-y*x*z+4*y*z^2*y-z*x*y+1*z^2 >> params.precision=1e-4; >> [IsSohs,X,base,sohs,g]=NCsos(f,params) *************** Polynomial is SOHS ************ IsSohs = 1 X = 1.0000 -0.0000 -1.0000 -0.0000 4.0000 0.0000 -1.0000 0.0000 1.0000 base = 'x*y' 'z*y' 'z' sohs = x*y-z 2*z*y g = y*x^2*y-y*x*z+4*y*z^2*y-z*x*y+1*z^2 |

Documentation >