CopositivePolynomial
| CopositivePolynomial | |
| Creates a homogenous polynomial whose non-negativity is equivalent to copositivity of a given matrix | |
| Other toolboxes required | none |
|---|---|
| Related functions | PolynomialAsMatrix PolynomialOptimize PolynomialSOS |
| Function category | Polynomial optimization |
| Usable within CVX? | no |
CopositivePolynomial is a function that computes the standard quartic homogeneous polynomial that is associated with a copositive matrix (or any symmetric matrix, in an hopes of determineing whether or not the matrix is copositive). For example, the Horn matrix
\(C = \begin{bmatrix}1 & -1 & 1 & 1 & -1 \\ -1 & 1 & -1 & 1 & 1 \\ 1 & -1 & 1 & -1 & 1 \\ 1 & 1 & -1 & 1 & -1 \\ -1 & 1 & 1 & -1 & 1\end{bmatrix}\)
is associated with the quartic polynomial
\(\displaystyle p(x) = \begin{bmatrix}x_1^2 \\ x_2^2 \\ x_3^2 \\ x_4^2 \\ x_5^2\end{bmatrix}C\begin{bmatrix}x_1^2 & x_2^2 & x_3^2 & x_4^2 & x_5^2\end{bmatrix} = \sum_{i=1}^5 x_i^4 - 2\sum_{i=1}^5x_ix_{i+1} + 2\sum_{i=1}^5x_ix_{i+2},\)
where the sums in the subscripts are understood to be modulo 5. Copositivity of \(C\) is equivalent to non-negativity of the polynomial \(p\).
Syntax
- P = CopositivePolynomial(C)
Argument descriptions
- C: A matrix.
Examples
The Horn matrix
Let's compute the polynomial (as a vector) representation of the Horn matrix.
>> C = [1,-1,1,1,-1;-1,1,-1,1,1;1,-1,1,-1,1;1,1,-1,1,-1;-1,1,1,-1,1];% the Horn matrix
>> More coming soon.Source code
Click here to view this function's source code on github.
References
Coming soon.