You are on page 1of 10

GLOBAL OPTIMIZATION OF REAL ALGEBRAIC FUNCTIONS SUBJECT

TO ALGEBRAIC EQUATION AND INEQUALITY CONSTRAINTS

ADAM STRZEBOŃSKI

A BSTRACT. We present an algorithm for exact global optimization of real algebraic func-
tions on subsets of lRn described by systems of real algebraic equations and inequalities.
The algorithm is based on the Cylindrical Algebraic Decomposition (CAD) algorithm. We
also give a substantially simpler algorithm for the special case of optimization of rational
functions on subsets of lRn described by systems of strong polynomial inequalities. We
give some examples and present results of some experiments with our implementation of
the algorithms within Mathematica.

1. I NTRODUCTION
In order to state the main problem in precise terms let us define the notion of real alge-
braic function we use throughout the paper.
Definition 1.1. A basic algebraic function given by a polynomial p(x1 ; : : : ; xn ; y) and an
integer k is the function
Rooty;k p : lRn 3 x1 ; : : : ; xn ?! Rooty;k p(x1 ; : : : ; xn ) 2 lR
where Rooty;k p(x1 ; : : : ; xn ) is the k -th real root of p(x1 ; : : : ; xn ; y ) treated as a univari-
ate polynomial in y . The function is defined for those values of x1 ; : : : ; xn for which
p(x1 ; : : : ; xn ; y) has at least k real roots. The real roots are ordered by the increasing
value, counting multiplicities.
Example 1.2.
Rooty;1 (y ? x1 )(y ? x2 ) min(x1 ; x2 )
=
r x2
Rooty;2 (x1 y2 ? x2 ) =
x1
The first function is defined for all (x1 ; x2 ) 2 2 , the second for f(x1 ; x2 ) 2 lR2 : (x1 >
lR
0 ^ x2  0) _ (x1 < 0 ^ x2  0)g.

Definition 1.3. A real algebraic function is an arbitrary composition of polynomials, basic


algebraic functions, and rational powers. The domain of a real algebraic function f is
a set of those points in lRn , for which all basic algebraic functions in f are defined, all
negative powers in f have non-zero bases, and all non-integer rational powers in f have
non-negative real arguments.
A system S (x1 ; : : : ; xn ) of real algebraic equations and inequalities in variables x1 ; : : : ; xn
is an alternative S1 _ : : : _ St of conjunctions of
fk (x1 ; : : : ; xn )k gk (x1 ; : : : ; xn )
where each k is one of <; ; ; >; =; or 6=, and each fk and gk is a real algebraic function.
(If all fk and gk are real polynomials S is a system of real polynomial equations and

Date: July 16, 1999.


1
2 ADAM STRZEBOŃSKI

inequalities.) We say that S (a1 ; : : : ; an ) is true, for a point (a1 ; : : : ; an ) 2 lRn , if there
is 1  j  t such that the point belongs to the domain of all algebraic functions in Sj ,
and satisfies all the equations and inequalities in Sj . If S (a1 ; : : : ; an ) is true we call
(a1 ; : : : ; an ) a solution of S .

Example 1.4. We do not require that a solution must belong to domains of all algebraic
functions in the entire system . For instance the set of solutions of
p p
x  0 ^ x < 1) _ (x < 0 ^ ?x < 1)
(

is ?1 < x < 1, even though only 0 belongs to domains of both radicals.


Notation 1.5. By infS (f ) we denote the infimum of values of a real algebraic function
f (x1 ; : : : ; xn )on the set of solutions of a system S (x1 ; : : : ; xn ) of real algebraic equations
and inequalities.
In this paper we present algorithms solving the following problem.
Problem 1.6. Given a system S (x1 ; : : : ; xn ) of real algebraic equations and inequalities
and a real algebraic function f (x1 ; : : : ; xn ) find infS (f ). Additionally, if possible, find a
point (a1 ; : : : ; an ) such that S (a1 ; : : : ; an ) is true, and f (a1 ; : : : ; an ) = infS (f ).
Example 1.7. Let S (x1 ; x2 ) = (x1 x2  1 ^ x1  0 ^ x2  0), and let f (x1 ; x2 ) = x1 .
Then infS (f ) = 0, however f (a1; a2 ) = a1 > 0 for all (a1; a2 ) such that S (a1; a2 ) is true,
even though S contains only weak inequalities.
In Section 3 we describe a general algorithm for solving the problem, based on the
Cylindrical Algebraic Decomposition (CAD) algorithm (see [1], [2]). We give a brief in-
troduction to the CAD algorithm in Section 2. In Section 4 we present a simpler algorithm
for the special case of minimization of rational functions on solution sets of systems of
strong polynomial inequalities. This algorithm runs much faster than the general algo-
rithm because it does not require computations with algebraic numbers. Finally, we give
some experimental results.

2. T HE CYLINDRICAL ALGEBRAIC DECOMPOSITION ALGORITHM

The purpose of this section is to describe the general idea of the CAD algorithm. For
details consult [1].
Definition 2.1. A cell is a subset of lRn defined recursively as follows
1. A cell in lR is a point or an open interval.
2. A cell in lRk+1 has one of the two forms
f(a1 ; : : : ; ak ; ak+1 ) a1 ; : : : ; ak ) 2 CLk ^ ak+1 = r(a1 ; : : : ; ak )g
: (
f(a1 ; : : : ; ak ; ak+1 )
: (a1 ; : : : ; ak ) 2 CLk ^ r1 (a1 ; : : : ; ak ) < ak+1 < r2 (a1 ; : : : ; ak )g

where CLk is a cell in lRk , r is a basic algebraic function defined and continuous on
CLk , and r1 and r2 are basic algebraic functions defined and continuous on CLk ,
?1, or 1.
Definition 2.2. For a finite set of polynomials F  lR[x1 ; : : : ; xn ], a cylindrical decom-
position of lRn consistent with F is a finite collection of disjoint cells such that their union
covers lRn and on each of the cells each polynomial of F has a constant sign.
Algorithm 2.3. (CAD) The input is a finite set of polynomials F  lR[x1 ; : : : ; xn ]. The
algorithm finds a cylindrical decomposition of lRn consistent with F , and gives a sample
point in each cell of the decomposition.
GLOBAL OPTIMIZATION OF REAL ALGEBRAIC FUNCTIONS 3

The algorithm consists of two phases. In the projection phase we find a sequence of finite
sets of polynomials (Fn ; : : : ; F1 ), such that
1. Fk  lR[x1 ; : : : ; xk ], for 1  k  n.
2. For 1  k  n ? 1, if all polynomials of Fk have constant signs on a cell CLk  lRk ,
then polynomials of Fk+1 are delineable on CLk , i.e. each polynomial f 2 Fk+1
has a constant number df of real roots on CLk (as a polynomial in xk+1 ), for each
1  i  df , Rootxk+1 ;i f is continuous on CLk , and for each g 2 Fk+1 and
1  j  dg , either

Rootxk+1 ;i f (a1 ; : : : ; ak ) = Rootxk+1 ;j g(a1 ; : : : ; ak )


for all (a1 ; : : : ; ak ) 2 CLk , or
Rootxk+1 ;i f (a1 ; : : : ; ak ) 6= Rootxk+1 ;j g(a1 ; : : : ; ak )
for all (a1 ; : : : ; ak ) 2 CLk .
3. If all polynomials of Fn have constant signs on a cell CLn  lRn , then all polyno-
mials of F have constant signs on CLn .
In the second phase of the CAD algorithm, for 1  k  n, we construct cylindrical decom-
positions of lRk consistent with Fk , with a sample point in each cell. This completes the
algorithm, since point 3. above implies that a cylindrical decomposition of lRn consistent
with Fn is also consistent with F .
For k = 1 , let r1 < : : : < rs be all the real roots of the univariate polynomials from
F1 . Then
D1 = f(?1; r1 ); fr1 g; (r1; r2 ); fr2 g; : : : ; frs g; (rs ; 1)g
is a cell decomposition of lR consistent with F1 , and we pick a sample point in each of the
elements of D1 .
Now suppose that, for some 1  k  n ? 1, we have constructed a cell decomposi-
tion Dk of lRk consistent with Fk , and a sample point in each cell of Dk . For each cell
CLk 2 Dk , let (a1 ; : : : ; ak ) 2 CLk be its sample point, and let r1 < : : : < rt be all the
real roots of the univariate polynomials we get by replacing variables (x1 ; : : : ; xk ) with
(a1 ; : : : ; ak ) in Fk+1 . For 1  i  t, choose Ri = Rootxk+1 ;j f , such that f 2 Fk+1 and
Ri (a1 ; : : : ; ak ) = ri . Put
D(CLk ) = f(?1; R1 ); graph(R1 jCLk ); (R1 ; R2 ); : : : ; graph(Rt jCLk ); (Rt ; 1)g
where
(R; S ) := f(b1; : : : ; bk ; bk+1 ) 2 CLk  lR : R(b1 ; : : : ; bk ) < xk+1 < S(b1 ; : : : ; bk )g
and select a sample point in each cell of D(CLk ) by extending (a1 ; : : : ; ak ). Then prop-
erty 2. of the projection implies that
Dk+1 =
[ D(CLk )
CLk 2Dk
is a cell decomposition of lRk+1 consistent with Fk+1 .
Note, that is very simple to compute the projection of a cell form Dn on x1 axis: it is
one of the elements of D1 . If we want to minimize the value of x1 on the set of solutions

_ ^
of a system of real polynomial equations and inequalities
fi;j (x1 ; : : : ; xn )i;j 0
1il 1jm
4 ADAM STRZEBOŃSKI

where fi;j 2 lR[x1 ; : : : ; xn ], and each i;j is one of <; ; ; >; =; or 6=, we can proceed
as follows. We compute a cylindrical decomposition of lRn consistent with F = ffi;j :
1  i  l; 1  j  mg. Each cell is either disjoint from the solution set of the system
or contained in the solution set of the system. To minimize the value of x1 on the solution
set we find a cell which is contained in the solution set and whose projection on x1 axis
contains the lowest values of x1 . The general idea of the minimization algorithm, we
describe in the following section, is to reduce the general minimization problem to the
problem we have just described and use the CAD algorithm. The second phase of the CAD
algorithm needs to use some information from the reduction phase, and we customize the
CAD algorithm to compute just the information we need.

3. T HE GENERAL MINIMIZATION ALGORITHM

Algorithm 3.1. The input is a system S (x1 ; : : : ; xn ) of real algebraic equations and in-
equalities and a real algebraic function f (x1 ; : : : ; xn ). The algorithm finds infS (f ), and,
if possible, a point (a1 ; : : : ; an ) such that S (a1 ; : : : ; an ) is true, and f (a1 ; : : : ; an ) =
infS (f ).
3.1. Reduction to minimization of a coordinate function. Let z be a new variable, let
S 0 (x1 ; : : : ; xn ; z ) = S (x1 ; : : : ; xn ) ^ z  f (x1 ; : : : ; xn ), and let zinf = infS0 (z ).
We write S 0 in the disjunctive normal form. It is easy to see that zinf = infS (f ).
Moreover, there is a one-to-one correspondence between points (a1 ; : : : ; an ) such that
S (a1 ; : : : ; an ) is true and f (a1 ; : : : ; an ) = infS (f ) and points (a1 ; : : : ; an ; zinf ) such
that S 0 (a1 ; : : : ; an ; zinf ) is true. Therefore it suffices to show an algorithm for finding
zinf and, if possible, a point (a1 ; : : : ; an ; zinf ) such that S 0 (a1 ; : : : ; an ; zinf ) is true.
3.2. Polynomialization.
Definition 3.2. A polynomial system with algebraic conditions
PC (x1 ; : : : ; xn ; y1 ; : : : ; ym; z )
is a pair of a system
P (x1 ; : : : ; xn ; y1 ; : : : ; ym ; z )
of real polynomial equations and inequalities, and a system C of conditions
y1 = g1 (x1 ; : : : ; xn ; z )
y2 = g2 (x1 ; : : : ; xn ; y1 ; z )
..
.
ym = gm (x1 ; : : : ; xn ; y1 ; : : : ; ym?1 ; z )
where
gi (x1 ; : : : ; xn ; y1 ; : : : ; yi?1 ; z ) = Rooty;k p(x1 ; : : : ; xn ; y1 ; : : : ; yi?1 ; z )
for some polynomial p, or
gi (x1 ; : : : ; xn ; y1 ; : : : ; yi?1 ; z ) = r(x1 ; : : : ; xn ; y1 ; : : : ; yi?1 ; z )k=l
for some rational function r and rational number k=l. Let P = P1 _ : : : _ Pt . We say that
PC (a1 ; : : : ; an ; b1 ; : : : ; bm ; c)
is true if there is 1  j  t such that
Pj (a1 ; : : : ; an ; b1; : : : ; bm; c)
GLOBAL OPTIMIZATION OF REAL ALGEBRAIC FUNCTIONS 5

is true, and for each 1  i  m either Pj does not depend on yi and any of yi 0 such that
gi0 depends on yi , or

bi = gi (a1 ; : : : ; an ; b1 ; : : : ; bi?1 ; c)
If PC (a1 ; : : : ; an ; b1 ; : : : ; bm ; c) is true we call (a1 ; : : : ; an ; b1 ; : : : ; bm ; c) a solution of
PC .
We will find a polynomial system with algebraic conditions
PC (x1 ; : : : ; xn ; y1 ; : : : ; ym; z )
such that the infimum of values of z on the set of solutions of PC is equal to zinf , and
S 0 (a1 ; : : : ; an ; zinf ) is true if and only if there is (b1 ; : : : ; bm ) such that
PC (a1 ; : : : ; an ; b1 ; : : : ; bm ; zinf )
is true. This will reduce the original problem to the problem of finding the infimum of
values of z on the set of solutions of PC , and a solution (a1 ; : : : ; an ; b1 ; : : : ; bm ; c) of PC
with c = zinf .
We start with the system P = S 0 and an empty system of conditions C . First we
successively replace algebraic functions in P with new variables (y1 ; : : : ; ym ), starting
with the innermost basic algebraic functions or radicals. When replacing
Rooty;k p(x1 ; : : : ; xn ; y1 ; : : : ; yi?1 ; z )
with a new variable yi , we add
yi = Rooty;k p(x1 ; : : : ; xn ; y1; : : : ; yi?1 ; z )
to the system C of conditions. We also add the equation
p(x1 ; : : : ; xn ; y1 ; : : : ; yi?1 ; z; yi) = 0
to all terms of the alternative P which contained the replaced basic algebraic function.
(This is not necessary for PC to have the properties stated above, but we will need it in the
next stage of the algorithm.) Similarly, we replace radicals
r(x1 ; : : : ; xn ; y1 ; : : : ; yi?1 ; z )k=l
with yik and add
yi = r(x1 ; : : : ; xn ; y1 ; : : : ; yi?1 ; z )k=l
to the system C of conditions. We also add the equation
yil = r(x1 ; : : : ; xn ; y1 ; : : : ; yi?1 ; z )
and the inequality
r(x1 ; : : : ; xn ; y1 ; : : : ; yi?1 ; z )  0
to all terms of the alternative P which contained the replaced radical. This makes P a
system of rational function equations and inequalities.
Next, we put all equations and inequalities in the form r < 0, r  0, r = 0, or r 6= 0,
put all rational functions in the “common denominator” form, and replace equations and
inequalities involving rational functions using equivalences
p=q < 0 , (p > 0 ^ q < 0) _ (p < 0 ^ q > 0)
p=q  0 , (p  0 ^ q < 0) _ (p  0 ^ q > 0)
p=q = 0 , p = 0 ^ q 6= 0
p=q 6= 0 , p 6= 0 ^ q 6= 0
6 ADAM STRZEBOŃSKI

Finally, we put the, now polynomial, equation and inequality system in the disjunctive
normal form. It is easy to see that so constructed polynomial equation and inequality
system P and system of conditions C have the required properties.
3.3. Minimization. Given a polynomial system with algebraic conditions
PC (x1 ; : : : ; xn ; y1 ; : : : ; ym; z )
we find the infimum zinf of values of z on the set of solutions of PC , and, if possible, a
solution (a1 ; : : : ; an ; b1 ; : : : ; bm ; c) of PC with c = zinf .
From now on the algorithm is a simple modification of the classical Cylindrical Alge-
braic Decomposition algorithm and its correctness directly follows from the correctness
of CAD. We use the standard terminology, and describe only our modifications. For the
details of the CAD algorithm see [2], [1].
We start with the projection phase of CAD. We use the improved projection operators
from [3], [6], [7], and [5] as appropriate (in this order of preference). The last projection
operator is used if during the sample point construction phase we detect that the system is
not well oriented (see [7]). First we project with respect to ym ; : : : ; y1 , in this order, then
with respect to x1 ; : : : ; xn , in any order. At the end we are left with univariate polynomials
in z .
Next, we start the sample point construction phase of CAD. We find
p0 < r 1 < p 1 < r 2 < : : : < r k < p k
where r1 ; : : : ; rk are all roots of the univariate polynomials in z and p0 ; : : : ; pk are rational
numbers. Starting with p0 we attempt to find a sample point in a cell on which PC is true,
using the depth-first strategy and early elimination of false cells as in [4]. The difference
with the classical CAD is in extending the sample points to yi variables, so let us describe
in more detail how we extend a sample point to yi .
Suppose we have constructed coordinates (a1 ; : : : ; an ; b1 ; : : : ; bi?1 ; c) of a sample
point representing a cell CL. In addition to numerical values we allow none as a value
for yl coordinate of a sample point. bl = none means that there was no value satisfying
the condition in the system C associated with yl . This does not imply yet that the cell
cannot be extended to a cell of solutions of PC , because there may be 1  j  t (where
P = P1 _ : : : _ Pt ) such that Pj does not depend on yl . If bl = none we define the yl
coordinate of CL to be unrestricted. Now, we attempt to extend the sample point to a point
(a1 ; : : : ; an ; b1 ; : : : ; bi?1 ; bi ; c).
The condition associated with yi is either
yi = Rooty;k p(x1 ; : : : ; xn ; y1; : : : ; yi?1 ; z )
or
yi = r(x1 ; : : : ; xn ; y1 ; : : : ; yi?1 ; z )k=l
If p or r depends on a yl such that bl = none then there is no bl which would satisfy
the condition, so we set bi = none. Otherwise, in the first case, we check whether
p(a1 ; : : : ; an ; b1 ; : : : ; bi?1 ; c; y) has at least k roots, multiplicities counted. If yes, we
set bi to be the k -th root of p (p is guaranteed to be delineable on CL, because p = 0
was one of the equations in P ), otherwise we set bi = none. In the second case if
r(a1 ; : : : ; an ; b1 ; : : : ; bi?1 ; c)  0 we put
bi = r(a1 ; : : : ; an ; b1 ; : : : ; bi?1 ; c)k=l
else we set bi = none. Since yil = r and r  0 were among the equations and inequalities
in P we are guaranteed that r has a constant sign CL and yil ? r is delineable on CL.
GLOBAL OPTIMIZATION OF REAL ALGEBRAIC FUNCTIONS 7

If for every 1  j  t, either Pj depends on yl with 1  l  i and bl = none or there is


an equation or inequality in Pj which contains only variables (x1 ; : : : ; xn ; y1 ; : : : ; yi ; z )
and is false at (a1 ; : : : ; an ; b1 ; : : : ; bi ; c), then we know that (a1 ; : : : ; an ; b1 ; : : : ; bi ; c)
cannot be extended to a solution of PC and we do not need to try extending it.
We stop the sample point construction phase as soon as we find the first sample point
(a1 ; : : : ; an ; b1 ; : : : ; bm ; c) on which PC is true. If we do not find a sample point on which
PC is true, PC has no solutions, and zinf = 1. Otherwise c is the smallest of
p0 < r 1 < p 1 < r 2 < : : : < r k < p k
which can be extended to a sample point on which PC is true. If c = p0 , then zinf = ?1.
If c = pi , for some 1  i  k , then zinf = ri and there is no solution of PC with the z
coordinate equal to zinf . Finally, if c = ri , then zinf = ri and to obtain a solution of PC
with the z coordinate equal to zinf we replace all none values among b1 ; : : : ; bm with 0
(or any other number).

4. T HE MINIMIZATION OVER STRONG POLYNOMIAL INEQUALITY CONSTRAINTS

An important special case of the global optimization problem for which we can signifi-
cantly simplify the algorithm is minimization of a rational function f (x1 ; : : : ; xn ) over the
set of solutions of a system S (x1 ; : : : ; xn ) of strong polynomial inequalities. In this case
we can use a simpler projection operator (see [10]), and we can eliminate computations
with algebraic numbers (see [8], [10]).
Algorithm 4.1. The input is a system S (x1 ; : : : ; xn ) of strong polynomial inequalities, a
rational function f (x1 ; : : : ; xn ), and a number  > 0. The algorithm finds infS (f ) and
a point (a1 ; : : : ; an ) with all coordinates rational such that S (a1 ; : : : ; an ) is true, and
f (a1 ; : : : ; an ) ? infS (f ) < .
4.1. Reduction to minimization of a coordinate function. Let f = p=q for polynomials
p = p(x1 ; : : : ; xn ) and q = q(x1 ; : : : ; xn ), let z be a new variable, and let
S 0 = S 0 (x1 ; : : : ; xn ; z ) := S ^ [(q > 0 ^ zq > p) _ (q < 0 ^ zq < p)]
We write S 0 in the disjunctive normal form. Let zinf = infS (z ). It is easy to see0

that zinf = infS (f ). Moreover, if S 0 (a1 ; : : : ; an ; c) is true and c ? zinf <  then
S (a1 ; : : : ; an ) is true and f (a1 ; : : : ; an ) ? infS (f ) < . Therefore we reduced the prob-
lem to finding zinf and a point (a1 ; : : : ; an ; c) such that S 0 (a1 ; : : : ; an ; c) is true and
c ? zinf < .
4.2. Minimization. In the following we use the standard CAD terminology, see [1], [2].
Notation 4.2. For a set of polynomials F , let SFRP (F ) denote a set of square-free and
relatively prime polynomials multiplicatively generating F . For a set of square-free and
relatively prime polynomials G, let PR(G; v ) denote the projection of G with respect to v
used in [10]. By definition, PR(G; v ) consists of the leading coefficients, discriminants,
and pairwise resultants of elements of G as polynomials in v .
Remark 4.3. SFRP (F ) is not uniquely determined. For the following discussion it does
not matter which set of square-free and relatively prime polynomials multiplicatively gen-
erating F we use, so we just assume that we have a procedure for computing one. In our
implementation for polynomials with rational number coefficients we use the set of irre-
ducible factors of F , and our experience is that polynomial factorization is not a significant
part of the execution time of the whole algorithm.
8 ADAM STRZEBOŃSKI

Let us prove a couple of facts used by our minimization algorithm.


Lemma 4.4. Let f 2 lR[x1 ; : : : ; xn ; y], and let X  lRn be a connected open set on which
the leading coefficient and the discriminant of f , as a polynomial in y , have constant non-
zero signs. Then there is a constant m, such that f has m real roots on X , and Rooty;k f
is a continuous function on X for all 1  k  m.
Proof. Let Ak be the set of elements of X for which f has at least k non-real roots, and
let Bl be the set of elements of X for which f has at least l real roots. Ak is open by the
implicit function theorem. Bl is open by the implicit function theorem and because f has
no multiple roots at any point of X . Let Ck be the set of elements of X for which f has
exactly k real roots. Then
Ck = Ad?k \ Bk
where d is the degree of f in y . Sets Ck for 0  k  d are disjoint, open, and they cover
X , so there is 0  m  d such that Cm = X . Then functions Rooty;k f , for 1  k  m,
are defined on X and they are continuous by the implicit function theorem.
Proposition 4.5. Let F be a set of polynomials in variables (x1 ; : : : ; xk ; xk+1 ), and let
G = PR(SFRP (F ); xk+1 ). If X  lRk is a connected open set on which all elements of
G have constant nonzero signs, then F is delineable on X .
Proof. The leading coefficients and discriminants of elements of SFRP (F ) (as polyno-
mials in xk+1 ) have constant non-zero signs, so, by Lemma, they have a constant number
of real roots each, and the real roots are continuous functions. The graphs of the roots do
not intersect, because the pairwise resultants of elements of SFRP (F ) have constant non-
zero signs. Since polynomials of SFRP (F ) multiplicatively generate F , F is delineable
on X .
Let us now describe our minimization algorithm.
4.2.1. The projection phase. Let Fn be the set of all polynomials of the system S 0 (differ-
ences of sides of inequalities of S 0 ). We recursively define Fk?1 = PR(SFRP (Fk ); xk ),
for 1  k  n. At the end we get a set F0 of univariate polynomials in z .
4.2.2. The sample point construction phase. We will need the following subalgorithm.
Algorithm 4.6. FindPoint
Input:
 S 0 and F0 ; : : : ; Fn as above.
 A tuple of rational numbers (a1 ; : : : ; ak ; c), k  0, which is a sample point in an
open cell CL  lRk+1 on which all elements of Fk have constant nonzero signs.
Output:
 Gives a solution (a1 ; : : : ; ak ; ak+1 ; : : : ; an ; c) of S 0 extending the tuple, or returns
failed if the tuple cannot be extended to a solution of S 0 .
We find
p0 < r1 < p1 < r2 < : : : < rm < pm
where r1 ; : : : ; rm are all roots of polynomials g (a1 ; : : : ; ak ; xk+1 ; c) for g 2 Fk+1 , and
p0 ; : : : ; pk are rational numbers. By the Proposition, elements of Fk+1 are delineable on
CL, therefore each of points (a1 ; : : : ; ak ; pj ; c) is a sample point in an open cell CLj 
lR
k+2 consisting of points between graphs of roots passing through rj and rj+1 (or of
GLOBAL OPTIMIZATION OF REAL ALGEBRAIC FUNCTIONS 9

points below the graph of r1 is j = 0, or above the graph of rm if j = m). All elements of
Fk+1 have constant nonzero signs on each of CLj , for 0  j  m.
For 0  j  m, we check whether we can prove that there is no solution of S 0 extending
(a1 ; : : : ; ak ; pj ; c) by looking at inequalities that depend only on (x1 ; : : : ; xk+1 ; z ). If yes
we go to the next j . Otherwise, if k + 1 = n then (a1 ; : : : ; ak ; pj ; c) is a solution of S 0 and
we return it. Else we call FindPoint recursively, and if it gives a solution of S 0 we return it,
else we go to the next j .
If after trying all 0  j  m we have not found a solution we return failed.
Remark 4.7. If FindPoint returns failed it has only proved that tuples (ak+1 ; : : : ; an ) for
which (a1 ; : : : ; ak ; ak+1 ; : : : ; an ; c) is not a solution of S 0 form an open and dense subset
of lRn?k . However, since the set of solutions of a system of strong inequalities is open, it
follows that there are no solutions extending (a1 ; : : : ; ak ; c).
A solution (a1 ; : : : ; ak ; ak+1 ; : : : ; an ; c) returned by FindPoint is a sample point in an
open cell CL0  lRn+1 such that the projection of CL0 on the subspace of coordinates
(x1 ; : : : ; xk ; z ) is equal to CL.

Let us now describe the remainder of the minimization algorithm. We find


?1 = r0 < p0 < r1 < p1 < r2 < : : : < rm < pm < rm+1 = 1
where r1 ; : : : ; rm are all roots of polynomials from F0 , and p0 ; : : : ; pk are rational num-
bers. For 0  j  m, we call FindPoint with (pj ) as a sample point in the cell rj < z <
rj+1 . If we get a solution of S 0 extending (pj ) then, by the last remark, zinf = rj . To get
a solution (a1 ; : : : ; an ; c) of S 0 , such that c ? zinf < , we pick a rational number c such
that c ? zinf <  and c < rj +1 , and call FindPoint with (c) as a sample point in the cell
rj < z < rj+1 . By the last remark, the FindPoint call must succeed. If after trying all
0  j  m we have not found a solution, then S 0 has no solutions and zinf = 1.

5. E XPERIMENTAL RESULTS
In this section show some experimental results obtained with our implementations of
the algorithms presented in this paper. The algorithms were implemented in the C kernel
of Mathematica. The examples were run on a Pentium II, 233 MHz computer with 64 MB
of RAM. We compare performances of the general minimization algorithm (GMA) from
Section 3 and the algorithm for strong inequality systems (SIMA) from Section 4.
1. A geometric problem from [9]. Find all values of k for which the inequality
a3 + b3 + c3  3abc + k(a ? b)(b ? c)(c ? a)
is true for all a, b, and c sides of a triangle. Since by permutation of a, b, and c we can
change the sign of the coefficient at k , we see that the allowable values for k form
an interval symmetric with respect to zero. Therefore it is enough to compute the
maximum of k for which the inequality is true for all a, b, and c, which is the same
as the infimum of k for which there are a, b, and c, such that the opposite inequality
is true. So we need to compute the infimum of k on
a > 0 ^ b > 0 ^ c > 0 ^ k > 0^
a < b + c ^ b < c + a ^ c < a + b^
a3 + b3 + c3 < 3abc + k(a ? b)(b ? c)(c ? a)
p p
We have strong inequalities only, so we can use SIMA, which returns Rooty;2 (y 4 ?
72y 2 ? 432) after 12.35 seconds. In radicals, the answer is 2 9 + 6 3. GMA did
not do this example in an hour.
10 ADAM STRZEBOŃSKI

p p 2 2
2. Maximize x + y on the ellipse x4 + y9 = 1. We can solve the problem directly
using GMA in 2.32 seconds, or we can notice that the maximum is equal to the
4 4
supremum of x + y on x4 + y9 < 1, which we can compute using SIMA in 0.12
seconds. The answer is Rooty;1 (y 12 ? 39y 8 ? 465y 4 ? 2197), with GMA we also
get a point at which the maximum is attained, with SIMA we get only its rational
approximation.
3. Find the minimal distance between the largest and the smallest root of the cubic
x3 + ax + b assuming the cubic has three real roots and its discriminant is ?1. We
need to use GMA here. We get the answer 22=3 for a = ?2?2=3 and b = 0, after
5.58 seconds.

R EFERENCES
[1] B. Caviness, J. Johnson (eds.), “Quantifier Elimination and Cylindrical Algebraic Decomposition”, Springer-
Verlag 1998.
[2] G. E. Collins, “Quantifier Elimination for the Elementary Theory of Real Closed Fields by Cylindrical Alge-
braic Decomposition”, Lect. Notes Comput. Sci., 33, 1975, 134-183.
[3] G. E. Collins, “Quantifier Elimination by Cylindrical Algebraic Decomposition - Twenty Years of Progress”,
", in B. Caviness, J. Johnson (eds.), Quantifier Elimination and Cylindrical Algebraic Decomposition, Springer-
Verlag 1998, 8-23.
[4] G. E. Collins, H. Hong, "Partial Cylindrical Algebraic Decomposition for Quantifier Elimination", J. Sym-
bolic Comp., 12 (1991), 299-328.
[5] H. Hong, "An Improvement of the Projection Operator in Cylindrical Algebraic Decomposition", Proceedings
of ISSAC 1990, 261-264.
[6] S. McCallum, "An Improved Projection for Cylindrical Algebraic Decomposition of Three Dimensional
Space", J. Symbolic Comp., 5 (1988), 141-161.
[7] S. McCallum, "An Improved Projection for Cylindrical Algebraic Decomposition", in B. Caviness, J. Johnson
(eds.), Quantifier Elimination and Cylindrical Algebraic Decomposition, Springer-Verlag 1998, 242-268.
[8] S. McCallum, “Solving Polynomial Strict Inequalities Using Cylindrical Algebraic Decomposition”, The
Computer Journal, Vol. 36, No. 5, 1993, 432-438.
[9] D. Mitrinovic, J. E. Pecaric, V. Volenec, “Recent Advances in Geometric Inequalities” Kluwer Academic
Publishers, 1989.
[10] A. Strzebonski, “An Algorithm for Systems of Strong Polynomial Inequalities”, The Mathematica Journal,
vol. 4, iss. 4 (1994), 74-77.

W OLFRAM R ESEARCH I NC . AND JAGIELLONIAN U NIVERSITY, 100 T RADE C ENTRE D RIVE , C HAM -
PAIGN , IL 61820, U.S.A.
E-mail address: adams@wolfram.com

You might also like