A baby step-giant step roadmap algorithm

# A baby step-giant step roadmap algorithm for general algebraic sets

S. Basu Department of Mathematics, Purdue University, West Lafayette, IN 47907, USA M-F. Roy IRMAR (URA CNRS 305) Université de Rennes 1 Campus de Beaulieu 35042 Rennes, cedex France M. Safey El Din Sorbonne Universités, UPMC, Univ. Paris 06, UMR CNRS 7606, LIP6
INRIA Paris-Rocquencourt Center PolSys Project
Institut Universitaire de France, France
and  É. Schost Computer Science Department, The University of Western Ontario, London, ON, Canada
###### 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 semi-algebraically 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 step-giant step
###### 2010 Mathematics Subject Classification:
Primary 14Q20; Secondary 14P05, 68W05.
Communicated by Teresa Krick.
The first author was supported in part by NSF grants CCF-0915954, CCF-1319080 and DMS-1161629. The first and the second authors did part of the work during a research stay in Oberwolfach as part of the Research in Pairs Programme. The third author is member of Institut Universitaire de France and supported by the French National Research Agency EXACTA grant (ANR-09-BLAN-0371-01) and GeoLMI grant (ANR-2011-BS03-011-06). The fourth author was supported by an NSERC Discovery Grant and by the Canada Research Chairs program.

## 1. Introduction

The problem of designing efficient algorithms for deciding whether two points belong to the same semi-algebraically connected component of a semi-algebraic set, as well as counting the number of semi-algebraically connected components of a given semi-algebraic set where is a real closed field (for example the field of real numbers), is a very important problem in algorithmic semi-algebraic 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 one-dimensional s-a (i.e. semi-algebraic) subset of the given s-a set , called a roadmap of , which has the property that it is non-empty and s-a connected inside every s-a (i.e. semi-algebraically) connected component of .

In the papers mentioned above, the construction of a roadmap of a s-a 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 s-a 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 non-singular hypersurface. Choosing generic coordinates in the algorithm is necessary since the non-singularity of polar varieties does not hold for all projections, but only for a Zariski-dense 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 semi-algebraic in nature. The greater flexibility of semi-algebraic 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 s-a set. A roadmap for is a s-a set of dimension at most one contained in which satisfies the following roadmap conditions:

1. For every s-a connected component of , is s-a connected.

2. For every and for every s-a 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 s-a 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 .

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

2. 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 .

1. There exists an algorithm for counting the number of s-a connected components of which uses arithmetic operations in .

2. There exists an algorithm for deciding whether two given points, described by real univariate representations of degree at most , belong to the same s-a 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 non-archimedean 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 s-a connected component of . In the case of a bounded and non-singular 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 -pseudo-critical 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 pseudo-critical values.

We first construct the “silhouette” which is the set of -pseudo-critical points on along the -axis by following continuously, as varies on the -axis, the -pseudo-critical points on . Note that in case is a non-singular 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 non-singular hypersurface. This results in curves and their endpoints on . The curves are continuous s-a 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 -pseudo-critical points of , they meet every s-a 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 s-a connected in a s-a 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 -pseudo-critical 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 -pseudo-critical values. Above each interval we have constructed a collection of curves meeting every s-a 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 s-a connected component of  then is s-a 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 s-a 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 s-a set which is the union of and these fibers are s-a 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:

1. a roadmap of a certain s-a 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 ;

2. 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 low-dimensional 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).

Throughout the paper, we use as a basic reference [2]. We cite  [3] instead when the precise statements needed are not included in [2].

## 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

 (x1,…,xk)↦xp.

For , we denote by the projection

 (x1,…,xk)↦(xq,…,xp).

For any pair of s-a subsets , and , we denote by the s-a 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 non-constant 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

 Q(x)=∂Q∂X1(x)=…=∂Q∂Xk(x)=0.

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

 Q(x)=∂Q∂X2(x)=⋯=∂Q∂Xk(x)=0.

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 s-a connected components of a s-a set [2, Section 5.2]. Note that, in particular, a s-a connected component is always non-empty by definition (see [3, Theorem 5.21] and the definition of s-a connected components following it). In particular, the empty set has no s-a connected component.

###### Property 3.2.

We now consider for a tuple

 (V,M,W(p),M(p),D(p))

with the following properties:

1. is the union of certain bounded s-a 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 ;

2. is a closed s-a set of dimension , such that for each , (cf. Notation 3.1) is a finite set of points having non-empty intersection with every s-a connected component of ;

3. is a finite subset such that the intersection of with every s-a connected component of is non-empty, for . Moreover, for every interval and with , if is a s-a connected component of , then is a s-a connected component of .

A tuple

 (V,M,W(p),M(p),D(p))

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

 (V,M,W(p),M(p),D(p))

satisfy Property 3.2,

 N=π[1,p](M),N(p)=π[1,p](M(p)),

and

 S=W(p)∪VN∪N(p).

For every s-a connected component of , is non-empty and s-a connected.

###### Remark 3.4.

In order to understand the situation, the following example of a tuple satisfying Property 3.2 can be useful:

1. the torus defined as the set of zeros of the equation

 Q=36(X21+(12X2+5X313)2)−(X21+X22+X23+8)2,

([4], page 40, figure 2.5), , the four critical points of the map restricted to ;

2. the silhouette defined by

 Q=∂Q∂X3=0;
3. the six critical values of the map restricted to the silhouette , and the intersection of the corresponding six fibers with the silhouette .

The tuple

 (V,M,W(1),M(1),D(1))

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 non-archimedean extensions of the base real closed field .

###### Remark 3.5.

A typical non-archimedean extension of is the field of algebraic Puiseux series with coefficients in , which coincide with the germs of s-a 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 non-negative 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 s-a set, defined by a boolean formula with coefficients in , we denote by the extension of to , i.e. the s-a 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 non-empty if and only if is non-empty; also is s-a connected if and only if is s-a connected [2, Proposition 5.24].

Moreover, if Property 3.2 (2) holds for , i.e. for every , is a finite set of points having non-empty intersection with every s-a connected component of , then Property 3.2 (2) holds for , i.e for each , is a finite set of points having non-empty intersection with every s-a connected component of . Indeed, by Hardt’s s-a triviality theorem [2, Theorem 5.45], one can find a finite partition of into s-a sets , , a finite partition of into s-a sets and an integer such that is s-a homeomorphic to for some , and for all , the s-a connected components of are and has points. By Tarski-Seidenberg’s transfer principle [2, Theorem 2.80], is s-a homeomorphic to , and for all , there exists such that , the sets are the s-a connected components of and the intersection of and has exactly points.

Let be the union of a subset of the bounded s-a 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 s-a path is a s-a continuous function from a closed interval to . Note that a s-a set is s-a connected if and only if it is s-a path connected [2, Theorem 5.23].

###### Lemma 3.6.

Let be a s-a connected component of such that is not empty.

1. If , is a point contained in .

2. If , is non-empty. Let be the s-a connected components of . Then,

1. for each , ;

2. if there exist such that , then ;

3. , and hence is s-a connected.

###### Proof.

Part 1 follows immediately from [3, Proposition 7.3]. We prove Part 2. Since is finite, there is a non-singular point which is non-critical for on . Let denote the tangent space to at . So is not orthogonal to the axis, and the s-a implicit function theorem [2, Theorem 3.25] implies that is non-empty.

Part 2) a) and 2 b) are immediate consequences of Proposition 7.3 in [3].

We prove 2) c). Clearly, . Moreover since is non-empty, is also non-empty. 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 s-a connected, and closed and non-empty, must be empty. ∎

###### Lemma 3.7.

Suppose that . Let be a s-a connected component of . If and is empty, then is a s-a connected component of .

###### Proof.

We first prove that is non-empty. Since is non-empty because it is a s-a connected component of , there must exist , with , such that is non-empty, but is empty for all . In this case, using Lemma 3.6, , since is empty, and is non-empty.

We now show that is s-a connected. This together with the fact shown above implies that a s-a connected component of . Let and be two points of and be a s-a path connecting to inside . We want to prove that there is a s-a 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

 Ext(γ([0,1]),R⟨ε⟩)∩Zer(Q,R⟨ε⟩k)a+ε≠∅

using [2, Proposition 3.17] . Since

 {u∈[0,1]⊂R⟨ε⟩∣Ext(γ,R⟨ε⟩)(u)∈Zer(Q,R⟨ε⟩k)

and

 {u∈[0,1]⊂R⟨ε⟩∣Ext(γ,R⟨ε⟩)(u)∈Zer(Q,R⟨ε⟩k)[a+ε,b]}

are s-a 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 s-a 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 s-a connected component of , is a s-a connected component of .

Construct a s-a path from to inside , obtained by concatenating pieces of inside and the paths connecting to for such that

 Ext(γ,R⟨ε⟩)(u,v)⊂Ext(V,R⟨ε⟩)[a+ε,b].

Note that such a s-a connected path is closed and bounded. Applying [2, Proposition 12.43], is s-a connected, contains and and is contained in . This proves the lemma. ∎

###### Notation 3.8.

If is s-a set and , then we denote by the s-a 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 s-a connected component of , is s-a 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 s-a connected component of . We have to prove that is non-empty and s-a connected.

Since , it follows that , and is a s-a connected component of using Lemma 3.7. So, using property , we see that is non-empty and s-a connected.

If , there is nothing to prove. Otherwise, let such that . We prove that can be s-a connected to a point in by a s-a path in , which is enough to prove that is s-a 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 non-empty. Hence there exists a s-a 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 s-a connected component of . If , there is nothing to prove. Suppose that is non-empty; we have to prove that is s-a connected.

If , is a point, belonging to by Lemma 3.6. So is s-a connected.

Hence, we can assume that , so that is non-empty by Lemma 3.6.

Our aim is to prove that is s-a connected. We do this in two steps. We prove the following statements:

1. If is a s-a connected component of , then is s-a connected,

2. and, using (a),

3. is non-empty and s-a connected.

Proof of (a) We prove that if is a s-a connected component of , then is s-a connected.

Since contains a point of it follows that is not empty.

Note that if , then there exists with

 max({π1(x)∣x∈B∩S})

with and s-a connected using Lemma 3.7. So is s-a connected since the property holds.

We now suppose that is non-empty. Taking , we are going to show that can be connected to a point in by a s-a 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 s-a path such that , and . Let and

 A(ε)=C(Ext(B,R⟨ε⟩)y(ε),γ(ε)).

Note that .

By Remark 3.5, is a s-a connected component of which implies that is a s-a connected component of . By Property 3.2 (2) and Remark 3.5, . Then, since is bounded over , we deduce that

 limε(Ext(W(p),R⟨ε⟩)y(ε)∩A(ε))

is a non-empty subset of .

Now connect to a point by a s-a path whose image is contained in . Thus, replacing by if necessary we can assume that as claimed.

There are four cases, namely

1. ;

2. and ;

3. , and ;

4. , and ;

that we consider now.

1. :
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 non-empty and meets every s-a connected component of . Note that

 Ext(V,R⟨ε⟩)y(ε)=Ext(V≤b,R⟨ε⟩)y(ε)=Ext(V

Let

 x′(ε)∈Ext(W(p),R⟨ε⟩)y(ε)∩C(Ext(B,R⟨ε⟩)y(ε),x(ε)),

and . Since and is s-a connected,

 limεC(Ext(B,R⟨ε⟩)y(ε),x(ε))⊂C(¯¯¯¯By,x).

Now choose a s-a path connecting to inside (and hence inside since ). Since has coordinates which are algebraic Puiseux series in , there exists a positive element , and a s-a curve defined over , such that , and (see [2, Theorem 3.14]).

The concatenation of gives a s-a path having the required property, after replacing by a sufficiently small positive element of .

2. and :
There exists , and a s-a path , with . Since , it follows that for