A baby stepgiant step roadmap algorithm for general algebraic sets
Abstract.
Let be a real closed field and an ordered domain. We give an algorithm that takes as input a polynomial , and computes a description of a roadmap of the set of zeros, , of in . The complexity of the algorithm, measured by the number of arithmetic operations in the ordered domain , is bounded by , where . As a consequence, there exist algorithms for computing the number of semialgebraically connected components of a real algebraic set, , whose complexity is also bounded by , where . The best previously known algorithm for constructing a roadmap of a real algebraic subset of defined by a polynomial of degree has complexity .
Key words and phrases:
Roadmaps, Real algebraic variety, Baby stepgiant step2010 Mathematics Subject Classification:
Primary 14Q20; Secondary 14P05, 68W05.1. Introduction
The problem of designing efficient algorithms for deciding whether two points belong to the same semialgebraically connected component of a semialgebraic set, as well as counting the number of semialgebraically connected components of a given semialgebraic set where is a real closed field (for example the field of real numbers), is a very important problem in algorithmic semialgebraic geometry.
The first algorithm for solving this problem [14] was based on the technique of cylindrical algebraic decomposition [6, 2], and consequently had doubly exponential complexity in .
Algorithms with singly exponential complexity in for solving this problem was first introduced by Canny in [5], and then successively completed and refined in [15, 11, 13, 12, 9, 10, 1]. They are all based on a geometric idea introduced by Canny, the construction of a onedimensional sa (i.e. semialgebraic) subset of the given sa set , called a roadmap of , which has the property that it is nonempty and sa connected inside every sa (i.e. semialgebraically) connected component of .
In the papers mentioned above, the construction of a roadmap of a sa set depends on recursive calls to itself on several (in fact, singly exponentially many) dimensional slices of , each obtained by fixing the first coordinate. For constructing the roadmap of a real algebraic variety defined by a polynomial with , this technique gave an algorithm with complexity . The exponent in the upper bound on the complexity, , is due to the fact that the depth of the recursion in these algorithms could be as large as . This exponent is not satisfactory since the total number of sa connected components is and so there is room for trying to improve it. However, this has turned out to be a rather difficult problem with no progress until very recently.
A new construction for computing roadmaps, with an improved recursive scheme of baby step  giant step type, has been proposed, and applied successfully in the case of smooth bounded real algebraic hypersurfaces in [8]. In this new recursive scheme, the dimension drops by in each recursive call. As a result, the depth of the recursive calls in this new algorithm is at most , and consequently the algorithm has a complexity of . The proof of correctness of the algorithm in [8] depends on certain results from commutative algebra and complex algebraic geometry, in order to prove smoothness of polar varieties corresponding to generic projections of a nonsingular hypersurface. Choosing generic coordinates in the algorithm is necessary since the nonsingularity of polar varieties does not hold for all projections, but only for a Zariskidense set of projections. This is an important restriction, since there is no known method for making such a choice of generic coordinates deterministically within this improved complexity bound. As a result, the authors obtain a randomized (rather than a deterministic) algorithm for computing roadmaps: there might be cases where the algorithm terminates and gives a wrong result.
In contrast to these techniques which depend on complex algebraic geometry, the algorithm for constructing roadmaps described in [2] depends mostly on arguments which are semialgebraic in nature. The greater flexibility of semialgebraic geometry (as opposed to complex geometry) makes it possible to avoid genericity requirements for coordinates. More precisely, we apply the technique used in [2] to make an infinitesimal deformation of the given variety so that the original coordinates are good. Since the infinitesimal deformation uses only one infinitesimal, it does not affect the asymptotic complexity class of the algorithm.
The goal of this paper is to obtain a deterministic algorithm for computing the roadmap of a general algebraic set, combining a baby step  giant step recursive scheme similar to that used in [8] and extending techniques coming from [2].
We start by recalling the precise definition of what is meant by a roadmap.
Definition 1.1.
Let be a sa set. A roadmap for is a sa set of dimension at most one contained in which satisfies the following roadmap conditions:

For every sa connected component of , is sa connected.

For every and for every sa connected component of , , where we denote by the set for , with the projection map onto the first coordinate.
Let be a finite set of points. A roadmap for is a sa set such that is a roadmap of and .
We illustrate this definition by the picture of a torus in and a roadmap of it.
The main result of the paper is the following theorem. The notion of real univariate representations used in the following statements to represent finite sets of point in is explained in Section 4.
Theorem 1.2.
Let be an algebraic set defined as the set of zeros of a polynomial of degree at most in variables with coefficients in an ordered domain contained in a real closed field .

There exists an algorithm for constructing a roadmap for using arithmetic operations in .

Moreover, there exists an algorithm that given a finite set of points , with cardinality , and described by real univariate representations of degree at most , constructs a roadmap for using arithmetic operations in .
The following corollary is an immediate consequence of b).
Corollary 1.3.
Let be an algebraic set defined as the set of zeros of a polynomial of degree at most in variables with coefficients in an ordered domain contained in a real closed field .

There exists an algorithm for counting the number of sa connected components of which uses arithmetic operations in .

There exists an algorithm for deciding whether two given points, described by real univariate representations of degree at most , belong to the same sa connected component of which uses arithmetic operations in .
Remark 1.4.
We can always suppose without loss of generality that the zero set of a family of polynomials of degree at most is defined by one single polynomial of degree at most by replacing the input polynomials by their sum of squares.
Remark 1.5.
Even if the input is a polynomial with coefficients in the field of real numbers, the deformation techniques by infinitesimal elements we use make it necessary to perform computations on polynomials with coefficients in some nonarchimedean real closed field. This is the reason why general real closed fields provide a natural framework for our work.
2. Outline
We outline below the classical construction of a roadmap for a bounded algebraic set , defined as the zero set of a polynomial contained in . The geometric ideas yielding this construction are due to Canny. The description below is similar to the one in [2, Chapter 15, Section 15.2].
A key ingredient of the algorithm is the construction of a particular finite set of points intersecting every sa connected component of . In the case of a bounded and nonsingular real algebraic set in , these points are nothing but the set of critical points of the projection to the coordinate on . In more general situations, the points we consider are called pseudocritical points, since they are obtained as limits of the critical points of the projection to the coordinate of a bounded nonsingular algebraic hypersurface defined by a particular infinitesimal deformation of the polynomial . Their projections on the axis are called pseudocritical values.
We first construct the “silhouette” which is the set of pseudocritical points on along the axis by following continuously, as varies on the axis, the pseudocritical points on . Note that in case is a nonsingular hypersurface, then the “silhouette” described above is the set of critical points of the projection map to the coordinates and . However, we are not assuming here that is a nonsingular hypersurface. This results in curves and their endpoints on . The curves are continuous sa curves parametrized by open intervals on the axis and their endpoints are points of above the corresponding endpoints of the open intervals. Since these curves and their endpoints include for every the pseudocritical points of , they meet every sa connected component of . Thus, the set consisting of these curves and their endpoints, already satisfy However, it is clear that this set might not be sa connected in a sa connected component and so might not be satisfied.
In order to ensure property we need to add more curves to the roadmap. For this purpose, we define the set of distinguished values as the union of the pseudocritical values, and the first coordinates of the endpoints of the curves described in the previous paragraph. A distinguished hyperplane is a hyperplane defined by , where is a distinguished value. The input points, the endpoints of the curves, and the intersections of the curves with the distinguished hyperplanes define the set of distinguished points, .
Let the distinguished values be Note that amongst these are the pseudocritical values. Above each interval we have constructed a collection of curves meeting every sa connected component of for every . Above each distinguished value we have a set of distinguished points . Each curve in has an endpoint in , and another one in . Moreover, the union of the contains . We denote by the union of the .
The following key connectivity result is proved in [3, Lemma 15.9].
Proposition 2.1.
Let . If is a sa connected component of then is sa connected.
Thus, in order to construct a roadmap of it suffices to repeat the same construction in each distinguished hyperplane defined by with input and the distinguished points in by making recursive calls to the algorithm. The following proposition is proved in [2, Proposition 15.7].
Proposition 2.2.
The sa set obtained by this construction is a roadmap for containing .
To summarize, classical roadmap algorithms based on Canny’s construction proceed by first considering the “silhouette”, consisting of curves in the direction, and then making recursive calls to the same algorithm at certain hyperplane sections of , so that the dimension of the ambient space drops by at each recursive call.
The main difference between classical roadmap algorithms and the algorithms described in [8] and in the current paper is that instead of considering curves in the direction and making recursive calls to the same algorithm at certain hyperplane sections of corresponding to special values of , so that the dimension of the ambient space drops by 1, we consider a dimensional subset of where , and make recursive calls at certain dimensional fibers of , so that the dimension of the ambient space drops by .
The main topological result, analogous to Proposition 2.1, is that if the set satisfies certain conditions, such as having only isolated singular points, then the sa set which is the union of and these fibers are sa connected. This is proved in Section 3. It follows, though not immediately, that for a general real algebraic set, , in order to produce a roadmap of it suffices to compute:

a roadmap of a certain sa subset of an infinitesimal deformation of passing through a carefully chosen set of points, and taking the limit of the curves so obtained by letting the perturbarion variable go to ;

roadmaps of certain fibers in a dimensional ambient space, using recursive calls.
The fact that in the new algorithm we are fixing a whole block of variables at a time necessitates introducing a new kind of algebraic representation which we call “real block representation”. This notion is defined in Section 4, where we also explain how to represent curves over such blocks.
In Section 5, we consider the case when is lowdimensional and described by equations having a special structure. Adapting an algorithm from [2, Algorithm 15.3] we show how to compute a roadmap of in this case with complexity depending in a crucial way on the dimension of . The general case, requiring the use of a deformation technique and a limit process, is described in Section 6.
Finally, we obtain in Section 7 a baby step  giant step roadmap algorithm for a general algebraic set. We prove its correctness, as well as the improved complexity bound.
The algorithm for computing efficiently limits of curve segments is quite technical. Since this technicality can obscure the ideas behind the main algorithm, for the sake of readability we have postponed the details behind taking limits of curves to a separate section (Section 8).
3. Connectivity results
In this section we prove a topological result about connectivity which will be used in proving the correctness of our algorithm later. The statement of the result, as well as the main ideas of the proof, is influenced by [8, Theorem 14]. It is a direct generalization of Proposition 2.1 to the case of projection onto more than one variable.
We denote by a real closed field.
Notation 3.1.
For , we denote by the projection
For , we denote by the projection
For any pair of sa subsets , and , we denote by the sa set , and rather than , for . We also write and rather than and , for .
We denote as before by the algebraic set of zeros of a polynomial contained in . Note that for a nonconstant polynomial , the real dimension of is not necessarily equal to , and indeed might even be empty. In fact, over any real closed field, algebraic sets defined by one equation coincide with general algebraic sets since replacing several equations by their sum of squares does not modify the zero set. A singular point is a point such that
Note that this is an algebraic property related to the polynomial rather than a geometric property of the underlying set : two equations can define the same algebraic set but have different sets of singular points.
Similarly a critical point of is a point such that
To simplify notation, when there will be no ambiguity regarding , we will simply refer to singular/critical points.
In this paper, we will be using constantly the notion of sa connected components of a sa set [2, Section 5.2]. Note that, in particular, a sa connected component is always nonempty by definition (see [3, Theorem 5.21] and the definition of sa connected components following it). In particular, the empty set has no sa connected component.
Property 3.2.
We now consider for a tuple
with the following properties:

is the union of certain bounded sa connected components of an algebraic set , such that the critical points of the map on (which contains in particular the singular points contained in ) form the finite set ;

is a closed sa set of dimension , such that for each , (cf. Notation 3.1) is a finite set of points having nonempty intersection with every sa connected component of ;

is a finite subset such that the intersection of with every sa connected component of is nonempty, for . Moreover, for every interval and with , if is a sa connected component of , then is a sa connected component of .
A tuple
is said to satisfy Property 3.2 if it satisfies the above properties (1) to (3).
Now we state the main result of this section. It generalizes Proposition 2.1 as well as [8, Theorem 14], in the special case when Property 3.2 holds.
Proposition 3.3.
Let
satisfy Property 3.2,
and
For every sa connected component of , is nonempty and sa connected.
Remark 3.4.
In order to understand the situation, the following example of a tuple satisfying Property 3.2 can be useful:

the torus defined as the set of zeros of the equation
([4], page 40, figure 2.5), , the four critical points of the map restricted to ;

the silhouette defined by

the six critical values of the map restricted to the silhouette , and the intersection of the corresponding six fibers with the silhouette .
The tuple
satisfies Property 3.2.
Finally, is the union of the silhouette and the intersection of the torus with the six curves which are the fibers of at the distinguished values .
The rest of this section is devoted to prove Proposition 3.3. We need preliminaries about nonarchimedean extensions of the base real closed field .
Remark 3.5.
A typical nonarchimedean extension of is the field of algebraic Puiseux series with coefficients in , which coincide with the germs of sa continuous functions (see [2, Chapter 2, Section 6 and Chapter 3, Section 3]). An element is bounded over if for some . The subring of elements of bounded over consists of the Puiseux series with nonnegative exponents. We denote by the ring homomorphism from to which maps to . So, the mapping simply replaces by in a bounded Puiseux series. Given , we denote by the image by of the elements of whose coordinates are bounded over .
More generally, let be a real closed field extension of . If is a sa set, defined by a boolean formula with coefficients in , we denote by the extension of to , i.e. the sa subset of defined by . The first property of is that it is well defined, i.e. independent of the formula describing [2, Proposition 2.87]. Many properties of can be transferred to : for example is nonempty if and only if is nonempty; also is sa connected if and only if is sa connected [2, Proposition 5.24].
Moreover, if Property 3.2 (2) holds for , i.e. for every , is a finite set of points having nonempty intersection with every sa connected component of , then Property 3.2 (2) holds for , i.e for each , is a finite set of points having nonempty intersection with every sa connected component of . Indeed, by Hardt’s sa triviality theorem [2, Theorem 5.45], one can find a finite partition of into sa sets , , a finite partition of into sa sets and an integer such that is sa homeomorphic to for some , and for all , the sa connected components of are and has points. By TarskiSeidenberg’s transfer principle [2, Theorem 2.80], is sa homeomorphic to , and for all , there exists such that , the sets are the sa connected components of and the intersection of and has exactly points.
Let be the union of a subset of the bounded sa connected components of an algebraic set . Suppose also that the set of points which are singular points of or critical points of on and which belong to is finite. We now prove two preliminary results (Lemma 3.6 and Lemma 3.7 below) about the pair which will be needed in the proof of Proposition 3.3.
In this paper a sa path is a sa continuous function from a closed interval to . Note that a sa set is sa connected if and only if it is sa path connected [2, Theorem 5.23].
Lemma 3.6.
Let be a sa connected component of such that is not empty.

If , is a point contained in .

If , is nonempty. Let be the sa connected components of . Then,

for each , ;

if there exist such that , then ;

, and hence is sa connected.

Proof.
Part 1 follows immediately from [3, Proposition 7.3]. We prove Part 2. Since is finite, there is a nonsingular point which is noncritical for on . Let denote the tangent space to at . So is not orthogonal to the axis, and the sa implicit function theorem [2, Theorem 3.25] implies that is nonempty.
Part 2) a) and 2 b) are immediate consequences of Proposition 7.3 in [3].
We prove 2) c). Clearly, . Moreover since is nonempty, is also nonempty. Suppose that . For sufficiently small, (where is the dimensional open ball of center and radius ). Note that , since otherwise belongs to , and thus to one of the ’s.
Applying [3, Proposition 7.3], we deduce from the fact that that is either a singular point, or a critical point of on . In other words . But since by assumption is finite, this implies that is a finite set and is closed. Since is sa connected, and closed and nonempty, must be empty. ∎
Lemma 3.7.
Suppose that . Let be a sa connected component of . If and is empty, then is a sa connected component of .
Proof.
We first prove that is nonempty. Since is nonempty because it is a sa connected component of , there must exist , with , such that is nonempty, but is empty for all . In this case, using Lemma 3.6, , since is empty, and is nonempty.
We now show that is sa connected. This together with the fact shown above implies that a sa connected component of . Let and be two points of and be a sa path connecting to inside . We want to prove that there is a sa path connecting to inside .
If , there is nothing to prove.
If , then there exists such that for all such that , .
Let be a positive infinitesimal. Then
using [2, Proposition 3.17] . Since
and
are sa subsets of , there exists by [2, Corollary 2.79] a finite partition of such that for each open interval of , is either contained in the set , or in the set , with and in .
If is contained in , we can replace by a sa path connecting to inside . Note that there is no critical point of in and contains no singular point by [2, Proposition 3.17] while by [2, Proposition 2.87] .
By [3, Proposition 15.1 b], if is a sa connected component of , is a sa connected component of .
Construct a sa path from to inside , obtained by concatenating pieces of inside and the paths connecting to for such that
Note that such a sa connected path is closed and bounded. Applying [2, Proposition 12.43], is sa connected, contains and and is contained in . This proves the lemma. ∎
Notation 3.8.
If is sa set and , then we denote by the sa connected component of containing .
We are now ready to prove Proposition 3.3.
Proof of Proposition 3.3.
For every , we say that property holds if: for any sa connected component of , is sa connected.
We prove that for all in , the property holds. Since is bounded, the proposition follows from the property for any .
Let .
The proof uses two intermediate results:
Step 1: For every , property implies property if with .
Step 2: For every , if property holds for all , then property holds.
Since for , the property holds vacuously, and the combination of these two results gives by an easy induction the property for all in .
We now prove the two steps.
Step 1. We suppose that , and that the property holds. Take , with and prove that the property holds. Let be a sa connected component of . We have to prove that is nonempty and sa connected.
Since , it follows that , and is a sa connected component of using Lemma 3.7. So, using property , we see that is nonempty and sa connected.
If , there is nothing to prove. Otherwise, let such that . We prove that can be sa connected to a point in by a sa path in , which is enough to prove that is sa connected.
Since and , we deduce that and . So, from , we get . We note that . By Property 3.2 (3) applied to (noting that ) we have that and is nonempty. Hence there exists a sa path connecting to a point in inside . Since and , it follows that and we are done.
Step 2. We suppose that , and that the property holds for all . We prove that the property holds.
Let be a sa connected component of . If , there is nothing to prove. Suppose that is nonempty; we have to prove that is sa connected.
If , is a point, belonging to by Lemma 3.6. So is sa connected.
Hence, we can assume that , so that is nonempty by Lemma 3.6.
Our aim is to prove that is sa connected. We do this in two steps. We prove the following statements:

If is a sa connected component of , then is sa connected,

and, using (a),

is nonempty and sa connected.
Proof of (a) We prove that if is a sa connected component of , then is sa connected.
Since contains a point of it follows that is not empty.
Note that if , then there exists with
with and sa connected using Lemma 3.7. So is sa connected since the property holds.
We now suppose that is nonempty. Taking , we are going to show that can be connected to a point in by a sa path inside . Notice that .
We first prove that we can assume without loss of generality that . Otherwise, since and , we must have that with , and . Let . We now prove that . Using the Curve Selection Lemma [4, Theorem 2.5.5] choose a sa path such that , and . Let and
Note that .
By Remark 3.5, is a sa connected component of which implies that is a sa connected component of . By Property 3.2 (2) and Remark 3.5, . Then, since is bounded over , we deduce that
is a nonempty subset of .
Now connect to a point by a sa path whose image is contained in . Thus, replacing by if necessary we can assume that as claimed.
There are four cases, namely

;

and ;

, and ;

, and ;
that we consider now.

:
Define , and note that . Since , and is bounded, . Now let be an infinitesimal. By applying the Curve Selection Lemma [4, Theorem 2.5.5] to the set and , and then projecting to using we obtain that there exists infinitesimally close to with , and . Let be such that . Moreover, by Property 3.2 (2) and Remark 3.5 we have that is nonempty and meets every sa connected component of . Note thatLet
and . Since and is sa connected,
Now choose a sa path connecting to inside (and hence inside since ). Since has coordinates which are algebraic Puiseux series in , there exists a positive element , and a sa curve defined over , such that , and (see [2, Theorem 3.14]).
The concatenation of gives a sa path having the required property, after replacing by a sufficiently small positive element of .

and :
There exists , and a sa path , with . Since , it follows that for