format: text

text:
# Minimizing Polynomial Functions

## 1. Introduction

This is an expository and experimental paper concerned with the following basic problem. Given a multivariate polynomial function $`f[x_1,\mathrm{},x_n]`$ which is bounded below on $`^n`$, find the global minimum $`f^{}`$ and a point $`p^{}`$ attaining it:

(1.1)
$$f^{}=f(p^{})=\mathrm{min}\{f(p):p^n\}.$$

Exact algebraic algorithms for this task find all the critical points and then identifying the smallest value of $`f`$ at any critical point. Such methods will be discussed in Section 2. The techniques include Gröbner bases, resultants, eigenvalues of companion matrices \[CLO98\], and numerical homotopy methods \[Li97\], \[Ver\].

An entirely different approach was introduced by N.Z. Shor (\[Sho87\], \[SS97\]) and further developed in the dissertation of the first author \[Par00\]. The idea is to compute the largest real number $`\lambda `$ such that $`f(x)\lambda `$ is a sum of squares in $`[x_1,\mathrm{},x_n]`$. Clearly, $`\lambda `$ is a lower bound for the optimal value $`f^{}`$. We show in Section 3 that, when the degree of $`f`$ is fixed, the lower bound $`\lambda `$ can be computed in polynomial time using semidefinite programming \[VB96\]. If $`\lambda =f^{}`$ holds then this is certified by semidefinite programming duality, and the certificate yields the optimal point $`p^{}`$. In our computational experiments, to be presented in Section 5, we found that $`\lambda =f^{}`$ almost always holds, and we solved problems up to $`n=15`$.

The objective of this article is to provide a bridge between mathematical programming and algebraic geometry, demonstrating that algorithms from the former have the potential to play a major role in future algorithms in the latter. This will be underlined in Section 6, where we present open problems, and in Section 7 where we show that semidefinite programming in conjunction with the Positivstellensatz is applicable to a wide range of computational problems in real algebraic geometry.

## 2. Computational Algebra

In this section we discuss the following approach to our problem (1.1). Form the partial derivatives of the given polynomial $`f`$ and consider the ideal they generate:

$$I=\frac{f}{x_1},\frac{f}{x_2},\mathrm{},\frac{f}{x_n}[x_1,\mathrm{},x_n]=:[𝐱]$$

The zeros of the ideal $`I`$ in complex $`n`$-space $`^n`$ are the critical points of $`f`$. Their number (counting multiplicity) is the dimension over $``$ of the residue ring:

$$\mu =\mathrm{dim}_{}[𝐱]/I=\mathrm{\#}𝒱_{}(I).$$

We shall assume that $`\mu `$ is finite. (If $`\mu =+\mathrm{}`$ then one can apply perturbation techniques to reduce to the case $`\mu <+\mathrm{}`$). For instance, if $`f`$ is a dense polynomial of even degree $`2d`$ then it follows from Bézout’s Theorem that $`\mu =(2d1)^n`$.

Consider the subset of real critical points:

$$𝒱_{}(I)=\{p^{(1)},p^{(2)},\mathrm{},p^{(\nu )}\}^n.$$

This set is usually much smaller than the set of all complex critical points, i.e., typically we have $`\nu \mu `$. If we know the set $`𝒱_{}(I)`$, then our problem is solved.

###### Lemma 2.1.

The optimal value is attained at a critical point:

(2.1)
$$f^{}=\mathrm{min}\{f(p^{(1)}),f(p^{(2)}),\mathrm{},f(p^{(\nu )})\}$$

The three techniques to be described in this section all compute the set $`𝒱_{}(I)`$ of real critical points. We will illustrate then for the following example:

(2.2)
$$\mathrm{Minimize}f(x,y,z)=x^4+y^4+z^44xyz+x+y+z$$

The optimal value for this problem is $`f^{}=2.112913882`$, and, disregarding symmetry, there are three optimal points $`(x^{},y^{},z^{})`$ attaining this value:

$$(0.988,1.102,1.102),(1.102,0.988,1.102),(1.102,1.102,0.988).$$

### 2.1. Gröbner bases and eigenvalues

We review the method of solving polynomial equations by means of Gröbner bases and eigenvalues \[CLO98, §2.4\]. We are free to choose an arbitrary term order $``$ on the polynomial ring $`[x_1,\mathrm{},x_n]`$. Let $`𝒢`$ be a Gröbner basis for the critical ideal $`I`$ with respect to $``$. While computing Gröbner bases is a time-consuming task in general, this is not an issue in this paper, since in all our examples the $`n`$ given generators $`f/x_i`$ already form a Gröbner basis in the total degree order. In our example the Gröbner basis is

(2.3)
$$𝒢=\{\underset{¯}{x^3}yz+1/4,\underset{¯}{y^3}xz+1/4,\underset{¯}{z^3}xy+1/4\}$$

A monomial $`x_1^{u_1}\mathrm{}x_n^{u_n}`$ is standard if it is not divisible by the leading term of any element in the Gröbner basis $`𝒢`$. The set $``$ of standard monomials is an $``$-basis for the residue ring $`[𝐱]/I`$. The standard monomials for (2.3) are:

(2.4)
$$=\{x^iy^jz^k:i,j,k,i,j,k2\},\mu =\mathrm{\#}()=\mathrm{\hspace{0.17em}27}.$$

For any polynomial $`g[𝐱]`$ consider the $``$-linear endomorphism:

$$\mathrm{Times}_g:[𝐱]/I[𝐱]/I,hgh.$$

This endomorphism is represented in the basis $``$ by a real $`\mu \times \mu `$-matrix $`\mathrm{T}_g`$. The entry of $`\mathrm{T}_g`$ with row index $`𝐱^u`$ and column index $`𝐱^v`$ is the coefficient of $`𝐱^v`$ in the normal form of $`𝐱^ug(𝐱)`$ with respect to $`𝒢`$.

###### Proposition 2.2.

The optimal value $`f^{}`$ is the smallest real eigenvalue of the matrix $`\mathrm{T}_f`$. Any eigenvector of $`\mathrm{T}_f`$ with eigenvalue $`f^{}`$ defines an optimal point $`p^{}=(p_1^{},\mathrm{},p_n^{})`$ by the eigenvector identities $`\mathrm{T}_{x_i}v=p_iv`$ for $`i=1,\mathrm{},n`$.

###### Proof.

This follows from Lemma 2.1 and Theorem (4.5) in the book of Cox-Little-O’Shea \[CLO98\]; see also \[CLO98, Exercise 17, page 62\]. ∎

The resulting algorithm is to compute symbolically the matrices $`\mathrm{T}_f`$ and $`\mathrm{T}_{x_i}`$ for $`i=1,\mathrm{},n`$, then compute numerically its eigenvalues (and matching eigenvectors) of $`\mathrm{T}_f`$, and finally determine $`f^{}`$ and $`p^{}`$ as in the proposition.

In our example the matrix $`\mathrm{T}_f`$ has format $`27\times 27`$ with rows and columns indexed by (2.4). Of its $`729`$ entries only $`178`$ are nonzero. For instance, the column indexed by $`xyz`$ has four nonzero entries, namely, the coefficients of

$$\mathrm{normalform}_𝒢(xyzf)=\frac{3}{4}x^2yz+\frac{3}{4}xy^2z+\frac{3}{4}xyz^2x^2y^2z^2.$$

The matrix $`\mathrm{T}_f`$ has maximal rank $`27`$. Of its eigenvalues only three are real:

$$0.8692394998,0.8702981639,2.112913879$$

The three real eigenvalues have multiplicity $`3`$,$`1`$, and $`3`$ respectively.

### 2.2. Resultants and discriminants

One algebraic method for solving polynomial equations is to use resultants. Closely related to resultants are discriminants. They express the condition on a hypersurface to have a singularity, by means of a polynomial in the coefficients its defining equation. Let $`t`$ be a new indeterminate and form the discriminant of the polynomial $`f(x)t`$ with respect to $`x_1,\mathrm{},x_n`$:

$$\delta (t):=\mathrm{\Delta }_x\left(f(x_1,\mathrm{},x_n)t\right)$$

Here $`\mathrm{\Delta }_x`$ refers to the $`A`$-discriminant, defined in \[GKZ94, Chapter 9\], where $`A`$ is the support of $`f`$ together with the origin. From \[GKZ94, §10.1.H\] we conclude that the discriminant $`\delta (t)`$ equals the characteristic polynomial of the matrix $`\mathrm{T}_f`$.

###### Corollary 2.3.

The optimal value $`f^{}`$ is the smallest real root of $`\delta (t)`$.

In our example, $`\delta (t)`$ is $`256t^3512t^296t+473`$ times the third power of

$$65536t^6+393216t^5+1056768t^4+1011712t^3421376t^2437152t+166419.$$

The optimal value $`f^{}=2.11\mathrm{}`$ is a root of this sextic. This sextic has Galois group $`S_6`$, so $`f^{}`$ cannot be expressed in radicals over the rationals.

The suggested algorithm is to compute $`\delta (t)`$, and minimal polynomials for the coordinates $`x_i^{}`$ of the optimal point, by elimination of variables using matrix formulas for resultants and discriminants \[GKZ94, Chapter 13\]. The subsequent numerical computation is to find the roots of a univariate polynomial.

### 2.3. Homotopy methods

The critical equations form a square system: $`n`$ equations in $`n`$ variables having finitely many roots. Such a system is well-suited for numerical homotopy continuation methods. For an introduction to this subject see the papers of Li \[Li97\] and Verschelde \[Ver\]. The basic idea is to introduce a deformation parameter $`\tau `$ into the given system. For instance, we might replace (2.3) by the following system which depends on a complex parameter $`\tau `$:

(2.5)
$$H_\tau :x^3\tau yz+1/4=y^3\tau xz+1/4=z^3\tau xy+1/4=\mathrm{\hspace{0.17em}0}.$$

The solutions $`(x(\tau ),y(\tau ),z(\tau ))`$ are algebraic functions of $`\tau `$. Our goal is to find them for $`\tau =1`$. It is easy to find the solutions for $`\tau =0`$:

$$(x(0),y(0),z(0))=(\mathrm{\hspace{0.17em}4}^{1/3}\eta _1,\mathrm{\hspace{0.17em}4}^{1/3}\eta _2,\mathrm{\hspace{0.17em}4}^{1/3}\eta _3),\eta _i^3=1.$$

Homotopy methods trace the full set of solutions from $`\tau =0`$ to $`\tau =1`$ along a suitable path in the complex $`\tau `$-plane. We determine $`f^{}`$ by evaluating the objective function $`f(x,y,z)`$ at all the real solutions for $`\tau =1`$.

Homotopy methods are frequently set up so that the system at $`\tau =0`$ breaks up into several systems, each of which consists of binomials. If the input polynomials are sparse, then these are the polyhedral homotopies which take the Newton polytopes of the given equations into consideration. In the sparse case, the number $`\mu `$ will be the mixed volume of the Newton polytopes. For an introduction to these polyhedral methods see \[CLO98, Chapter 7\] and the references given there.

### 2.4. How large is the Bézout number ?

A common feature of all three algebraic algorithms in this section is that their running time is controlled by the number $`\mu `$ of complex critical points. In the eigenvalue method we must perform linear algebra on matrices of size $`\mu \times \mu `$, in the discriminant method we must find and solve a univariate polynomial of degree $`\mu `$, and in the homotopy method, we are forced to trace $`\mu `$ paths from $`\tau =0`$ to $`\tau =1`$. Each of these three methods becomes infeasible if the number $`\mu `$ is too big; for instance, $`\mu 10,000`$ might be too big.

Suppose that the given polynomial $`f`$ in $`[x_1,\mathrm{},x_n]`$ has even degree $`2d`$ and is dense. This will be the case in the family of examples studied in Section 5. Then $`\mu `$ coincides with the Bézout number $`(2d1)^n`$. Some small values for the Bézout number are listed in Table 1. Most entries in this table are bigger than $`10,000`$. We are led to believe that the algebraic methods will be infeasible for quartics if $`n8`$.

Each entry in the first row of Table 1 is a one. This means we can minimize quadratic polynomial functions by solving a system of linear equations (in polynomial time). The punchline of this paper is to reduce our problem to a semidefinite programming problem which can also be solved in polynomial time for fixed $`d`$.

## 3. Sums of Squares and Semidefinite Programming

We present the method introduced by N.Z. Shor (\[Sho87\], \[SS97\]), and further extended by the first author \[Par00\], for minimizing polynomial functions. This method is a relaxation: it always produces a lower bound for the value of $`f^{}`$. However, as we shall see in Section 5, this bound very frequently agrees with $`f^{}`$.

We may assume that the given polynomial $`f(x_1,\mathrm{},x_n)`$ has even degree $`2d`$. Let $`X`$ denote the column vector whose entries are all the monomials in $`x_1,\mathrm{},x_n`$ of degree at most $`d`$. The length of the vector $`X`$ equals the binomial coefficient

$$N=\left(\genfrac{}{}{0pt}{}{n+d}{d}\right).$$

Let $`_f`$ denote the set of all real symmetric $`N\times N`$-matrices $`A`$ such that $`f(𝐱)=X^TAX`$. This is an affine subspace in the space of real symmetric $`N\times N`$-matrices. Assume that the constant monomial $`1`$ is the first entry of $`X`$. Let $`E_{11}`$ denote the matrix unit whose only nonzero entry is a one in the upper left corner.

###### Lemma 3.1.

For any real number $`\lambda `$, the following two are equivalent:

* The polynomial $`f(𝐱)\lambda `$ is a sum of squares in $`[𝐱]`$.
* There is a matrix $`A_f`$ such that $`A\lambda E_{11}`$ is positive semidefinite, that is, all eigenvalues of this symmetric matrix are non-negative reals.

###### Proof.

The matrix $`A\lambda E_{11}`$ is positive semidefinite if and only if there exists a real Cholesky factorization $`A\lambda E_{11}=B^TB`$. If this holds then

$$f(𝐱)\lambda =X^TAX\lambda =X^T(A\lambda E_{11})X=X^TB^TBX=(BX)^T(BX)$$

is a sum of squares, and every sum of squares representation arises in this way. ∎

We write $`f^{sos}`$ for the largest real number $`\lambda `$ for which the two equivalent conditions are satisfied. We always have $`f^{}f^{sos}`$. This inequality may be strict. It is even possible that $`f^{sos}=\mathrm{}`$. An example of this form is Motzkin’s polynomial

(3.1)
$$m(x,y)=x^4y^2+x^2y^43x^2y^2.$$

It satisfies $`m(x,y)1`$, but $`m(x,y)\lambda `$ is not a sum of squares for *any* $`\lambda `$. We refer to \[Rez00\] for an excellent survey of the problem of representing a polynomial as a sum of squares, and the important role played by Motzkin’s example.

Sums of squares are crucial for us because of the following complexity result.

###### Theorem 3.2.

Fix $`\mathrm{deg}(f)=2d`$ and let the number of variables $`n`$ vary. Then there exists a polynomial-time algorithm, based on semidefinite programming, for computing $`f^{sos}`$ from $`f`$. The same statement holds if $`n`$ is fixed and $`d`$ varies.

Semidefinite programming (SDP) is the study of optimization problems over the cone of all positive semidefinite matrices. This branch of optimization has received a lot of attention in recent years, both for its theoretical elegance and its practical applications. Semidefinite programs can be solved in *polynomial time*, using interior point methods; see \[NN94\], \[WSV00\], \[VB96\]. This complexity result (together with Lemma 3.1) implies Theorem 3.2 because the quantity $`N=\left(\genfrac{}{}{0pt}{}{n+d}{d}\right)=\left(\genfrac{}{}{0pt}{}{n+d}{n}\right)`$ grows polynomially if either $`n`$ or $`d`$ is fixed. This result appears in \[Par00\].

Available implementations of interior-point methods for semidefinite programming perform extremely well in practice, say, for problems involving matrices up to $`500`$ rows and columns (provided there are not too many variables). This allows for the efficient computation of $`f^{sos}`$, and as we shall see in Section 4, SDP duality furnishes a polynomial-time test to check whether $`f^{}=f^{sos}`$ and for computing the optimal point $`p^{}`$ in the affirmative case. A comparison of Tables 1 and 2 suggests that SDP has the potential to compute much larger instances than algebraic methods. Section 5 will show that this is indeed the case.

Our example (2.2) has parameters $`d=2,n=3`$. The affine space $`_f`$ consists of all $`10\times 10`$-matrices $`A(\lambda ,𝐜)`$ with $`\lambda =0`$ and $`c_i`$ arbitrary in the family

$$\left[\begin{array}{cccccccccc}\lambda & 1/2& 1/2& 1/2& c_1& c_2& c_3& c_4& c_5& c_6\\ \multicolumn{10}{c}{}\\ 1/2& 2c_1& c_2& c_4& 0& c_7& c_8& c_9& c_{10}& c_{12}\\ \multicolumn{10}{c}{}\\ 1/2& c_2& 2c_3& c_5& c_7& c_8& 0& c_{13}& c_{14}& c_{15}\\ \multicolumn{10}{c}{}\\ 1/2& c_4& c_5& 2c_6& c_9& c_{10}c_{13}2& c_{14}& c_{12}& c_{15}& 0\\ \multicolumn{10}{c}{}\\ c_1& 0& c_7& c_9& 1& 0& c_{16}& 0& c_{17}& c_{18}\\ \multicolumn{10}{c}{}\\ c_2& c_7& c_8& c_{10}c_{13}2& 0& 2c_{16}& 0& c_{17}& c_{19}& c_{11}\\ \multicolumn{10}{c}{}\\ c_3& c_8& 0& c_{14}& c_{16}& 0& 1& c_{19}& 0& c_{20}\\ \multicolumn{10}{c}{}\\ c_4& c_9& c_{13}& c_{12}& 0& c_{17}& c_{19}& 2c_{18}& c_{11}& 0\\ \multicolumn{10}{c}{}\\ c_5& c_{10}& c_{14}& c_{15}& c_{17}& c_{19}& 0& c_{11}& 2c_{20}& 0\\ \multicolumn{10}{c}{}\\ c_6& c_{12}& c_{15}& 0& c_{18}& c_{11}& c_{20}& 0& 0& 1\end{array}\right]$$

The rows and columns of this matrix are indexed by the entries of the vector

$$X=\left[\begin{array}{cccccccccc}1& x& y& z& x^2& xy& y^2& xz& yz& z^2\end{array}\right]^T.$$

We invite the reader to check the identity

$$X^TA(\lambda ,𝐜)X=f(x,y,z)\lambda \text{for all}c_1,\mathrm{},c_{20}.$$

The lower bound $`f^{sos}`$ is the largest real number $`\lambda `$ such that, for some choice of $`c_1,\mathrm{},c_{20}`$, the matrix $`A(𝐜,\lambda )`$ has all eigenvalues nonnegative. We find that

$$f^{sos}=f^{}=2.112913882,$$

and the optimal matrix (to five digits) is given by:

$$\left[\begin{array}{cccccccccc}\hfill 2.1129& \hfill 0.5000& \hfill 0.5000& \hfill 0.5000& \hfill 0.4678& \hfill 0.0922& \hfill 0.4678& \hfill 0.0922& \hfill 0.0922& \hfill 0.4678\\ \hfill 0.5000& \hfill 0.9356& \hfill 0.0922& \hfill 0.0922& \hfill 0.0000& \hfill 0.0892& \hfill 0.0892& \hfill 0.0892& \hfill 0.6666& \hfill 0.0892\\ \hfill 0.5000& \hfill 0.0922& \hfill 0.9357& \hfill 0.0922& \hfill 0.0892& \hfill 0.0892& \hfill 0.0000& \hfill 0.6667& \hfill 0.0892& \hfill 0.0892\\ \hfill 0.5000& \hfill 0.0922& \hfill 0.0922& \hfill 0.9356& \hfill 0.0892& \hfill 0.6666& \hfill 0.0892& \hfill 0.0892& \hfill 0.0892& \hfill 0.0000\\ \hfill 0.4678& \hfill 0.0000& \hfill 0.0892& \hfill 0.0892& \hfill 1.0000& \hfill 0.0000& \hfill 0.3180& \hfill 0.0000& \hfill 0.0554& \hfill 0.3181\\ \hfill 0.0922& \hfill 0.0892& \hfill 0.0892& \hfill 0.6666& \hfill 0.0000& \hfill 0.6360& \hfill 0.0000& \hfill 0.0554& \hfill 0.0554& \hfill 0.0554\\ \hfill 0.4678& \hfill 0.0892& \hfill 0.0000& \hfill 0.0892& \hfill 0.3180& \hfill 0.0000& \hfill 1.0000& \hfill 0.0554& \hfill 0.0000& \hfill 0.3180\\ \hfill 0.0922& \hfill 0.0892& \hfill 0.6667& \hfill 0.0892& \hfill 0.0000& \hfill 0.0554& \hfill 0.0554& \hfill 0.6361& \hfill 0.0554& \hfill 0.0000\\ \hfill 0.0922& \hfill 0.6666& \hfill 0.0892& \hfill 0.0892& \hfill 0.0554& \hfill 0.0554& \hfill 0.0000& \hfill 0.0554& \hfill 0.6360& \hfill 0.0000\\ \hfill 0.4678& \hfill 0.0892& \hfill 0.0892& \hfill 0.0000& \hfill 0.3181& \hfill 0.0554& \hfill 0.3180& \hfill 0.0000& \hfill 0.0000& \hfill 1.0000\end{array}\right].$$

This matrix is positive semidefinite. By computing a factorization $`B^TB`$ as in the proof of Lemma 3.1, we can express $`ff^{sos}`$ as a sum of squares. In the next section we show how to recover the points at which the optimal value is achieved.

Note that the number $`20`$ of free parameters is the case “$`n=3,d=2`$” of:

###### Remark 3.3.

The dimension of $`_f`$ equals the number of linearly independent quadratic relations among the monomials of degree $`d`$ in $`n`$ variables. It equals

$$\text{dim }_f=\frac{1}{2}\left[\left(\genfrac{}{}{0pt}{}{n+d}{d}\right)^2+\left(\genfrac{}{}{0pt}{}{n+d}{d}\right)\right]\left(\genfrac{}{}{0pt}{}{n+2d}{2d}\right).$$

The codimension (with respect to the space of symmetric matrices) is equal to

$$\text{codim }_f=\left(\genfrac{}{}{0pt}{}{n+2d}{2d}\right).$$

## 4. Semidefinite Programming Duality

In Section 3 we demonstrated that computing $`f^{sos}`$ is equivalent to minimizing a linear functional over the intersection of the affine space $`_f`$ with the cone of positive semidefinite $`N\times N`$-matrices. In our discussion we have represented the space $`_f`$ by a spanning set of matrices. For numerical efficiency reasons it is usually preferable to represent $`_f`$ by its defining equations (unless $`n`$ and $`d`$ are very small).

Duality is a crucial feature of semidefinite programming. It plays an important role in designing the most efficient interior-point algorithms. In what follows we review the textbook formulation of SDP duality, in terms of matrices. Thereafter we present a reformulation in algebraic geometry language, and we then explain how to test the condition $`f^{sos}=f^{}`$ and how to recover the optimal point $`p^{}`$.

### 4.1. Matrix Formulation

Let $`𝒮^N`$ denote the real vector space of symmetric $`N\times N`$-matrices, with the inner product $`AB:=\text{trace }(AB)`$, and the Löwner partial order given by $`AB`$ if $`BA`$ is *positive semidefinite*. Recall that $`A𝒮^N`$ is positive semidefinite if $`x^TAx0`$, for all $`x^N`$. This condition is equivalent to nonnegativity of all eigenvalues of $`A`$, and to nonnegativity of all principal minors.

The general SDP problem (\[VB96\], \[WSV00\]) can be expressed in the form:

(4.1)
$$\begin{array}{cccc}\text{minimize }& FX& & \\ \text{subject to }& 𝒢X& =& b\\ & X& & 0\end{array}$$

where $`X,F𝒮^N`$, $`b^M`$, and $`𝒢:𝒮^N^M`$ is a linear operator. This is usually called the *primal* form, in analogy with the linear programming (LP) case.

Notice that (4.1) is a *convex* optimization problem, since the objective function is linear and the feasible set is convex. There is an associated *dual* problem:

(4.2)
$$\begin{array}{cccc}\text{maximize }& b^Ty& & \\ \text{subject to }& F𝒢^{}y0& & \end{array}$$

where $`y^M`$ and $`𝒢^{}:^M𝒮^N`$ is the operator adjoint to $`𝒢`$. Any feasible solution of the dual problem is a lower bound of the optimal value of the primal:

$$FXb^Ty=FXy^T𝒢X=(F𝒢^{}y)X0.$$

The last inequality holds since the inner product of two positive semidefinite matrices is nonnegative. The converse statement (primal feasible solutions give upper bounds on the optimal dual value) is obviously also true. The inequality above is called *weak duality*. Under certain conditions (notably, the existence of strictly feasible solutions), *strong duality* also holds: the optimal values of the primal and the dual problems coincide. If strong duality holds, then at optimality the matrix $`X(F𝒢^{}y)`$ is zero, since $`A,B0,\text{trace}(AB)=0`$ implies $`AB=0`$. This can be interpreted as a generalization of the usual *complementary slackness* LP conditions.

Practical implementations of SDP (we will use SeDuMi \[Stu99\]) simultaneously compute both the optimal matrix $`X`$ for (4.1) and the optimal vector $`y`$ for (4.2).

### 4.2. Polynomial Formulation

We set $`m=N1`$ and we identify $`𝒮^N`$ with the real vector space $`[x]_2=[x_0,x_1,\mathrm{},x_m]_2`$ of quadratic forms in $`m+1`$ variables. The vector space dual to $`𝒮^N`$ is now denoted $`[]_2=[_0,_1,\mathrm{},_m]_2`$. The dual pairing is given by differentiation and is denoted $``$. For any $`f[]_2`$ and any real vector $`p=(p_0,\mathrm{},p_m)^{m+1}`$, the following familiar identity holds:

(4.3)
$$f(_0,\mathrm{},_m)\frac{1}{2}(\underset{i=0}{\overset{m}{}}p_ix_i)^2=f(p_0,\mathrm{},p_m).$$

We consider the general quadratic programming problem:

(4.4)
$$\text{Minimize}f(p)\text{subject to}g_0(p)=1\text{and}g_1(p)=\mathrm{}=g_r(p)=0,$$

where $`f,g_0,\mathrm{},g_r[]_2`$ are given and we are looking for an optimal point $`p^{m+1}`$. This problem can be relaxed to the following primal SDP:

$`\text{Minimize}f()q(x)\text{subject to}q(x)0`$
$`\text{and}g_0()q(x)=1\text{and}g_1()q(x)=\mathrm{}=g_r()q(x)=0.`$
The inequality $`q(x)0`$ means that $`q`$ is non-negative on $`^{m+1}`$, i.e., $`q`$ is in the positive semidefinite cone in $`[x]_2`$. In view of (4.3), the optimal value of (4.4) is greater than or equal to the optimal value of the primal SDP, and equality holds if and only if there is an optimal solution of the form $`q(x)=\frac{1}{2}(_{i=0}^mp_ix_i)^2`$.

Every semidefinite programming problem comes with a dual problem, as in the previous subsection; see also \[VB96\]. In our case the dual SDP takes the form:

$`\text{Maximize the first coordinate }\lambda \text{of the vectors}(\lambda ,\mu _1,\mathrm{},\mu _r)^{r+1}`$
$`\text{subject to the conditions}f()+{\displaystyle \underset{i=1}{\overset{r}{}}}\mu _ig_i()\lambda g_0()\mathrm{\hspace{0.17em}0}`$
Assuming the existence of a strictly feasible primal solution, the maximum value in the dual SDP is always equal to the minimum value in the primal SDP. Under this regularity assumption, which is easy to satisfy in our application, we conclude:

###### Proposition 4.1.

If the primal SDP has an optimal solution of the form $`q(x)=\frac{1}{2}(_{i=0}^mp_ix_i)^2`$ then the vector $`(p_0,\mathrm{},p_m)`$ is an optimal solution for (4.4).

### 4.3. Minimizing Quadratic Functions over Toric Varieties

A toric variety is an algebraic variety, in affine space or projective space, which has a parametric representation by monomials. Equivalently, a toric variety is an irreducible variety which is cut out by binomial equations, that is, differences of monomials. Here we will be interested in those projective toric varieties which are defined by quadratic binomials. This class includes many examples from classical algebraic geometry, such as Veronese and Segre varieties. See \[Stu95\] for an introduction.

Let $`X`$ be a toric variety in projective $`m`$-space whose defining prime ideal is generated by quadratic binomials $`g_1,\mathrm{},g_r`$ in $`[_0,\mathrm{},_m]`$. Each generator has the form $`_i_j_k_l`$ for some $`i,j,k,l\{0,1,\mathrm{},m\}`$. We set $`g_0()=_0^2`$. Then the equation $`g_0()=1`$ on $`X`$ defines an affine toric variety $`\stackrel{~}{X}`$, such that $`X`$ is the projective closure of $`\stackrel{~}{X}`$. Every quadratic polynomial function on the affine variety $`\stackrel{~}{X}`$ is represented by a quadratic form $`f[]_2`$ as above. This representation is unique modulo the $``$-linear span of $`g_1,\mathrm{},g_r`$. Our problem (4.4) is hence equivalent to minimizing a quadratic function over an affine toric variety defined by quadrics:

(4.5)
$$\text{Minimize}f(p)\text{subject to}p\stackrel{~}{X}$$

The optimal value of the dual SDP relaxation in Subsection 4.2 is the largest real number $`\lambda `$ such that $`f\lambda `$ is a sum of squares in the coordinate ring of $`\stackrel{~}{X}`$.

Let us now return to our original problem (1.1) where the given polynomial is dense of degree $`2d`$ in $`n`$ variables. Here $`X`$ is the Veronese variety in projective $`N`$-dimensional space which is parameterized by all monomials of degree at most $`d`$. (If the polynomial in (1.1) is sparse then another toric variety can be used.) Writing our given polynomial as a quadratic form in homogeneous coordinates on $`X`$, our minimization problem (1.1) is precisely the quadratic toric problem (4.5).

We solve (4.5) by simultaneously solving the primal and dual SDP relaxation in Subsection 4.2. If the optimal value $`\lambda `$ of the dual SDP agrees with the true minimum of $`f`$ over $`\stackrel{~}{X}`$ then the primal SDP has an optimal solution $`q(x)=\frac{1}{2}(_{i=0}^mp_ix_i)^2`$ which exhibits an optimal point $`(p_0,\mathrm{},p_m)X`$ at which $`f`$ is minimized.

In our running example, we have $`m=9`$ and $`r=20`$, and $`X`$ is the quadratic Veronese three-fold in projective $`9`$-space which is given parametrically as

$$(x_0:x_1:\mathrm{}:x_9)=(1:r:s:t:r^2:rs:s^2:rt:st:t^2).$$

It is cut out by twenty quadratic binomials such as $`x_0x_5x_1x_2`$. These binomials correspond to the parameters $`c_i`$ in the $`10\times 10`$-matrix $`A(\lambda ,𝐜)`$ in Section 2.

## 5. Experimental Results

We now present our computational experience with Shor’s relaxation for global minimization of polynomial functions. As mentioned earlier, the computational advantages of our method are based on the following three independent facts:

* The dimension $`N`$ of the matrix required in the sum of squares formulation is much smaller than the Bézout number $`\mu `$, since it only scales polynomially with the number of variables. See Tables 1 and 2 above.
* Semidefinite programming provides an efficient algorithm for deciding whether a polynomial is a sum of squares, and to find such representations for polynomials whose coefficients may depend linearly on parameters.
* The lower bound $`f^{sos}`$ very often coincides with the exact solution $`f^{}`$ of our problem (1.1), at least for the class of problems analyzed here.

The experimental results in this section strongly support the validity of these facts.

### 5.1. The test problems

For our computations, we fix a positive integer $`K`$, and we sample from the following family of polynomials of degree $`2d`$ in $`n`$ variables:

(5.1)
$$f(x_1,\mathrm{},x_n)=x_1^{2d}+x_2^{2d}+\mathrm{}+x_n^{2d}+g(x_1,\mathrm{},x_n)$$

where $`g[x_1,\mathrm{},x_n]`$ is a random polynomial of total degree $`2d1`$ whose $`\left(\genfrac{}{}{0pt}{}{n+2d1}{n}\right)`$ coefficients are independently and uniformly distributed among integers between $`K`$ and $`K`$. Thus our family depends on three parameters: $`n`$, $`d`$ and $`K`$.

This family has been selected to ensure three important properties:

The highest order terms $`x_i^{2d}`$ ensure that $`f`$ is bounded below, and that the minimum value $`f^{}`$ is achieved at some point $`p^{}^n`$.

When solving polynomial systems, the calculation of a Gröbner basis is a time-consuming task. The structure of the polynomial (5.1) allows us to bypass this expensive step, since the set of $`n`$ scaled partial derivatives $`x_i^{2d1}+\frac{1}{2d}g/x_i`$ is already a Gröbner basis with respect to total degree; cf. \[CLO97, §2.9, Proposition 4\].

A main reason for this choice of model is its simplicity. While more sophisticated choices have other desirable mathematical properties (such as invariance under certain transformations), we preferred to analyze here, as a first step, a relatively easy to describe set of instances.

An important question is if the structure of the polynomials (5.1) is somehow “biased” towards the application of sum of squares methods. This is a relevant issue, since the performance of algorithms on “random instances” sometimes provides more information on the problem family, rather than on the algorithm itself. Concerning this question, we limit ourselves to notice that, for $`K`$ sufficiently large, the family (5.1) does include polynomials $`f`$ with $`f^{sos}<f^{}`$. A simple example is $`f(x,y)=x^8+y^8+2700m(x,y)`$, where $`m(x,y)`$ is the Motzkin polynomial (3.1).

The polynomials in our family have global minima that generally have large negative values, of the order of $`K^{2d}`$. This leads to ill-conditioning of the symmetric matrices described in Lemma 3.1, and hence to numerical problems for the interior-point algorithm. Our remedy is a simple homogeneous scaling of the form

$$f_s(x_1,\mathrm{},x_n)=\alpha ^{2d}f(\alpha x_1,\mathrm{},\alpha x_n),\text{for some }\alpha >0.$$

Obviously, this does not affect the properties of being a sum of squares, or whether $`f^{}=f^{sos}`$. However, as is generally the rule in numerical optimization, this scaling step greatly affects both the speed and the accuracy of the SDP solution.

### 5.2. Algorithms and software

Most of the test examples were run on a Pentium III 733Mhz with 256 MB, running Linux version 2.2.16-3, and using MATLAB version 5.3. Because of physical memory limitations, our largest examples (quartics in fifteen variables), were run on a Pentium III 650Mhz with 320 MB, under Windows 2000. The semidefinite programs were solved using the SDP solver SeDuMi \[Stu99\], written by Jos Sturm. It is currently one of the most efficient codes available, at least for the restricted class of problems relevant here. SeDuMi can be run from within MATLAB, and implements a self-dual embedding technique. The default parameters are used, and the solutions computed are typically exact to machine precision (SeDuMi provides an estimate of the quality of the solution).

The MATLAB Optimization toolbox was used for the implementation of a local search approach, to be described in Section 5.3. For the numerical homotopy method, we used the software PHCpack \[Ver99\], written by Jan Verschelde. The computation of the sparse matrix $`\mathrm{T}_f`$ was done using Macaulay 2 \[GS\], and its eigenvalues were numerically computed using MATLAB.

We do not make strong claims about the efficiency of our implementations: while reasonable fast, for large scale problems considerable speedups are possible at the expense of customized algorithms. Nevertheless, we believe that the issues raised regarding the applicability of algebra-based techniques to problems with large Bézout number remain valid, independently of the particular software employed.

### 5.3. Standard local optimization

An alternative approach to the problem is given by traditional (nonconvex) numerical optimization. There exist many variations, but arguably the most successful methods for relatively small problems such as the present ones are based on local gradient and Hessian information. Typical algorithms in this class employ an iterative scheme, combining the Newton search direction in combination with a line search \[NW99\]. These methods are reasonably fast in converging to a *local* minimum. For the larger problems in our family, they usually converge to a stationary point within 10 seconds. However, they often end up in the wrong solution, unless a very accurate starting point is given.

The drawbacks of local optimization methods are well-known: lacking convexity, there are no guarantees of global (or even local) optimality. Worse, even if in the course of the optimization we actually reach the global minimum, there is usually no computationally feasible way of verifying optimality.

Nevertheless, local optimization is an important tool for polynomial problems, as is the use of homotopy methods to trace the optimal value under small changes in the input data. It would interesting to investigate how these local numerical techniques can be best combined with the computations to be described next.

### 5.4. Experimental results using computational algebra

In Table 3 we present typical running times for the homotopy based approach, described in Section 2.3. These were obtained running PHCpack in “black-box” mode (phc -b), that requires no user-specified parameters. The software traces all solutions (not necessarily real), its number being equal to the Bézout number. Comparing with Table 1, we can notice the adverse effect of large Bézout numbers in the practical performance of the algorithm, in spite of Verschelde’s impressive implementation.

For the eigenvalue approach outlined in Section 2.1, we compute the matrix $`\mathrm{T}_f`$ using a straightforward implementation in Macaulay 2: the endomorphism $`\mathrm{Times}_f`$ is constructed, and applied to the elements of the monomial basis $``$. The resulting matrix, in a sparse floating point representation, is sent to a file for further processing. We found that the construction of the matrix $`\mathrm{T}_f`$ takes a surprisingly long time. for instance, it took Macaulay 2 over $`10`$ minutes to produce the $`125\times 125`$-matrix for $`2d=6`$, $`n=3`$. The eigenvalue problem itself is solved using MATLAB; it exploits the sparsity of the matrix, and runs reasonably fast. However, it appears that even a more efficient implementation of this method will not be able to compete with the timings in Table 3, let alone the timings in Table 5.

After several discouraging attempts for small examples, we did not pursue a full implementation for the resultant-based methods sketched in Section 2.2.

### 5.5. Experimental results using semidefinite programming

We ran several instances of polynomials in the family described above, for values of $`K`$ equal to 100, 1000, and 10000. In Table 5 the typical running times for the semidefinite programming based approach on a single instance are presented. These are fairly constant across instances, and no special structure is exploited (besides what SeDuMi does internally).

The number of random instances for each combination of the parameters is shown in Table 4. These values were chosen in order to keep the total computation time for a given category in the order of a few hours.

Regarding the accuracy of the relaxation, in *all cases tested* the condition $`f^{sos}=f^{}`$ was satisfied. As explained in the previous section, this can be numerically verified by checking if the solution of the corresponding SDP has rank one, from which a candidate global minimizer is obtained. Evaluating the polynomial at this point provides an upper bound on the optimal value, that can be compared with the lower bound $`f^{sos}`$. In all our instances, the difference between these two quantities was extremely small, and within the range of numerical error.

As an additional check, when we used different methods for solving the same instance, we have verified the solutions against each other. As expected, the solutions were numerically close, in many cases up to machine precision.

In particular, it is noted that the approach can handle in a reasonable time (less than 35 min.) the case of a quartic polynomial in thirteen variables. Our largest examples have the same degree ($`2d=4`$) and fifteen variables, correspond to an SDP with a matrix of dimensions $`136\times 136`$ with $`3876`$ auxiliary variables, and can be solved in a few hours. A quick glance at the corresponding Bézout number in Table 1 makes clear the advantages of the presented approach.

## 6. What Next ?

We have demonstrated that the sums of squares relaxation is a powerful and practical technique in polynomial optimization. There are many open questions, both algorithmic and mathematical, which are raised by our experimental results. One obvious question is how often does it occur that $`f^{sos}=f^{}`$ ? This can be studied for our simple model (5.1), or, perhaps better, for various natural probability measures on the space of polynomials of bounded degree. This question is closely related to understanding the inclusion of the convex cone of forms that are sums of squares inside the cone of positive semidefinite forms. For the three-dimensional family of symmetric sextics, this problem was studied in detail by Choi, Lam and Reznick \[CLR87\]. Their work is an inspiration, but it also provides a warning as to how difficult the general case will be, even for ternary sextics without symmetry.

We hope to pursue some of the following directions of inquiry in the near future.

### 6.1. Sparseness and Symmetry

Most polynomial systems one encounters are sparse in the sense that there are only few monomials with nonzero coefficients. Methods involving Newton polytopes, such as sparse resultants \[GKZ94\] and polyhedral homotopies \[Ver\], are designed to deal with such problems. Symmetry with respect to finite matrix groups is another feature of many polynomial problems arising in practise. The book of Gatermann \[Gat00\] is an excellent first reference.

We wish to adapt our semidefinite programming approach to input polynomials $`f`$ which are sparse or symmetric or both. For instance, our polynomial example (2.2) is both sparse and invariant under permutation of the variables $`x,y,z`$. Both Newton polytope techniques and representation theory can be used to reduce the size of the matrices and the number of free parameters in the semi-definite programs.

### 6.2. Higher degree relaxations

If we are unlucky, then the output produced by SeDuMi will not satisfy the hypothesis of Proposition 4.1, and we conclude that the bound $`f^{sos}`$ is probably strictly smaller than the optimal solution $`f^{}`$. In that event we redo our computation in higher degree, now with a larger SDP. The key idea is that even though $`f(x)\lambda `$ may not be a sum of squares, if there exists a positive polynomial $`g(x)`$ such that $`g(x)(f(x)\lambda )`$ is a sum of squares, then $`\lambda f^{}`$. The choice of $`g`$ can be either made *a priori* (for instance, $`g=_{i=1}^nx_i^{2k}`$), or as a result of an optimization step (see \[Par00\] for details). The Positivstellensatz (see Section 7) ensures that $`f^{}`$ will be found if the degree of $`g`$ is large enough.

### 6.3. Solving polynomial equations

A natural application of Shor’s relaxation, hinted at in \[Sho87\], is solving polynomial systems $`g_1(x)=\mathrm{}=g_r(x)=0`$. The polynomial $`f(x):=_{i=1}^rg_i^2(x)`$ satisfies $`f^{}f^{sos}0`$, and $`f^{}=0`$ holds if and only if the system has a real root. Clearly, $`f^{sos}>0`$ is a sufficient condition for the nonexistence of real roots. An important open problem, essentially raised in \[Sho87\], is to characterize inconsistent systems $`\{g_1,\mathrm{},g_r\}`$ with $`f^{sos}=0`$. On the other hand, if $`f^{}=f^{sos}=0`$ holds then it is possible, at least in principle, to obtain a numerical approximation of real roots using SDP. However, for a robust implementation, perturbation arguments are required and some important numerical issues arise, so the perspectives for practical applications are still unclear.

### 6.4. Minimizing polynomials over polytopes

Consider a compact set

$$P=\{x^n:\mathrm{}_1(x)0,\mathrm{},\mathrm{}_s(x)0\},$$

where $`\mathrm{}_i`$ is a linear form plus a constant, say, $`P`$ is a polytope with $`s`$ facets. Handelman’s Theorem \[Han88\] states that every polynomial which is strictly positive on $`P`$ can be expressed as a positive linear combination of products $`\mathrm{}_1(x)^{i_1}\mathrm{}\mathrm{}_s(x)^{i_s}`$. Suppose we wish to minimize a given polynomial function $`f(x)`$ over $`P`$. For $`D`$ we define the $`D`$-th Handelman bound $`f^{(D)}`$ to be the largest $`\lambda `$ such that

$$f(x)\lambda =\underset{i_1+\mathrm{}+i_sD}{}c_{i_1\mathrm{}i_s}\mathrm{}_1(x)^{i_1}\mathrm{}\mathrm{}_s(x)^{i_s}\text{for some}c_{i_1\mathrm{}i_s}0.$$

Handelman’s Theorem states that the increasing sequence $`f^{(D)},f^{(D+1)},f^{(D+2)},\mathrm{}`$ converges to the minimum of $`f`$ over $`P`$. Each bound $`f^{(D)}`$ can be computed using linear programming only. It would be interesting to study the quality of these bounds, and the running time of these linear programs, and to see how things improve as we augment the approach with semidefinite programming techniques.

### 6.5. Which semialgebraic sets are semidefinite ?

The feasible set of an SDP can be expressed by a linear matrix inequality, as in the dual formulation in Section 4.2. It would be interesting to study these feasible sets using techniques from real algebraic geometry, and to identify characteristic features of these sets. Here is a very concrete problem whose solution, to the best of our knowledge, is not known. Fix three real symmetric matrices $`A,B`$ and $`C`$ of size $`N\times N`$. Then

$$S=\{(x,y)^2:xA+yB+C\text{is positive semidefinite}\}$$

is a closed, convex, semialgebraic subset of the plane $`^2`$. The problem is to find a good characterization of those subsets $`S`$. Given a semialgebraic subset $`S^2`$ which is closed and convex, how to decide whether a “semidefinite representation” exists, and, in the affirmative case, how to find matrices $`A,B,C`$ of minimum size.

## 7. Numerical Real Algebraic Geometry and The Positivstellensatz

The first part of the above title refers to a paper by Sommese and Wampler \[SW96\]. This paper and other more recent ones suggest that numerical algorithms will play an increasingly important role in computational (complex) algebraic geometry, and that polynomial systems will become much more visible in the context of Scientific Computation. Along the same lines, the fastest software for computing Gröbner bases, due to Faugére \[Fau99\], no longer uses the Buchberger algorithm but replaces it by sophisticated numerical linear algebra. Faugére’s scheme

$$\text{Gröbner Bases}+\text{Numerical Linear Algebra}\text{Polynomial Problems over }$$

has the potential of entering the standard repertoire of Scientific Computation.

Following \[Par00\] we propose an analogous scheme for the field of real numbers:

$$\text{Positivstellensatz}+\text{Semidefinite Programming}\text{Polynomial Problems over }.$$

In what follows, we shall explain this relationship and why we see the Positivstellensatz as the main catalyst for a future role of real algebra in scientific computation.

The Positivstellensatz \[BCR98\] is a common generalization of Linear Programming Duality (for linear inequalities) and Hilbert’s Nullstellensatz (for an algebraically closed field). It states that, for a system of polynomial equations and inequalities, either there exists a solution in $`^n`$, or there exists a certain polynomial identity which bears witness to the fact that no solution exists. For instance, a single polynomial inequality $`f(x)<0`$ either has a solution $`x^n`$, or there exists an identity $`g(x)f(x)=h(x)`$ where $`g`$ and $`h`$ are sums of squares. See \[BS89\] for an exposition of the Positivstellensatz from the perspective of computational geometry. Finding a witness by linear programming is proposed in \[BS89, §7.3\].

Here is our punchline, first stated in the dissertation of the first author \[Par00\]: A Positivstellensatz witness of bounded degree can be computed by semidefinite programming. Here we can also optimize linear parameters in the coefficients. This suggests the following algorithm for deciding a system of polynomial equations and inequalities: decide whether there exists a witness for infeasibility of degree $`D`$, for some $`D0`$. If our system is feasible, then we might like to minimize a polynomial $`f(x)`$ over the solution set. The $`D`$-th SDP relaxation would be to ask for the largest real number $`\lambda `$ such that the given system together with the inequality $`f(x)\lambda <0`$ has an infeasibility witness of degree $`D`$. This generalizes what was proposed in Sections 6.2, 6.3 and 6.4.

It is possible, at least in principle, to use an a priori bound for the degree $`D`$ in the Positivestellensatz, however, the currently known bounds are still very large. Lombardi and Roy recently announced a bound which is triply-exponential in the number $`n`$ of variables. We hope that such bounds can be further improved, at least for some natural families of polynomial problems arising in optimization.

Here is a very simple example in the plane to illustrate our method:

(7.1)
$$f:=xy^2+3\mathrm{\hspace{0.17em}\hspace{0.17em}0},g:=y+x^2+2=\mathrm{\hspace{0.17em}0}.$$

By the Positivstellensatz, the system $`\{f0,g=0\}`$ has no solution $`(x,y)^2`$ if and only if there exist polynomials $`s_1,s_2,s_3[x,y]`$ that satisfy the following:

(7.2)
$$s_1+s_2f+1+s_3g\mathrm{\hspace{0.17em}0},\text{where }s_1\text{ and }s_2\text{ are sums of squares}.$$

The $`D`$-th SDP relaxation of the polynomial problem $`\{f0,g=0\}`$ asks whether there exists a solution $`(s_1,s_2,s_3)`$ to (7.2) where the polynomial $`s_1`$ has degree $`D`$ and the polynomials $`s_2,s_3`$ have degree $`D2`$. For each fixed integer $`D>0`$ this can be tested by semidefinite programming. For $`D=2`$ we find the solution

$$s_1=\frac{1}{3}+2\left(y+\frac{3}{2}\right)^2+6\left(x\frac{1}{6}\right)^2,s_2=2,s_3=6.$$

The resulting identity (7.2) proves the inconsistency of the system $`\{f0,g=0\}`$.