Optimization and Moments 

 

TruncatedTMomentMatrix(type,n,d) 

returns the matrix of moments up to degree d of n-variate polynomials in the basis of Chebyshev polynomials 

-type: simple Lie type 

-n, d: posint 

> TMomentMatrix(G,2,1);
 

Matrix(%id = 36893490365076312900) (5.1)
 

 

THermiteMatrix(type,n) 

returns the Hermite matrix polynomial HermiteMatrix(type,n) in the basis of generalized Chebyshev polynomials of the first kind 

-type: simple Lie type 

-n: posint 

> THermiteMatrix(G,2);
 

Matrix(%id = 36893490365073529060) (5.2)
 

 

TLocalizedPMI(type,n,d) 

returns the localized moment matrix at HermiteMatrix(type,n) for the moment relaxation up to degree d 

Warning: This takes a while! 

-type: simple Lie type 

-n, d: posint 

> TLocalizedMomentMatrix(G,2,2);
 

Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
Matrix(%id = 36893490364992106356)
(5.3)
 

 

ChebyshevSDPdata(type,n,d,name,c) 

creates a csv file "name.csv" containing the SDP data [A_0, (A_1, ..., A_m), c] for the primal-dual moment relaxation up to degree d. 

m + 1 = binomial(n+2*d,n) is the number of variables of the relaxation 

 

(P)  min Trace(A_0 * X)                       (D)  max  c^t * y 

      s.t. X symm. p.s.d.                               s.t. y in R^m 

      Trace(A_i * X) = c_i                             A_0 +y_1 A_1 + ... + y_m A_m  is  p.s.d. 

 

Remark: This takes a while so maybe start with n=3, d=3! And remove the "#".
Warning: This creates a file in the folder of this worksheet!
 

Please read the Maple worksheet "generating_SDP_data" available under https://github.com/TobiasMetzlaff/GeneralizedChebyshev/blob/main/Maple%20Worksheets/generating_SDP_data.mw for instructions on how to produce and use the files in general. 

-type: simple Lie type 

-n, d: posint, d>=n 

-name: string 

-c: list 

> Type:=B: n:=3: d:=3:
#SDPMatrices(Type,n,d,"B3Deg3.csv");