triangular decomposition of semi-algebraic systems

Upload: kingscribd

Post on 07-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/6/2019 Triangular Decomposition of Semi-Algebraic Systems

    1/8

    Triangular Decomposition of Semi-Algebraic Systems

    Changbo ChenUniversity of Western Ontario

    [email protected]

    James H. DavenportUniversity of Bath

    [email protected]

    John P. MayMaplesoft

    [email protected] Moreno Maza

    University of Western [email protected]

    Bican XiaPeking University

    [email protected]

    Rong XiaoUniversity of Western Ontario

    [email protected]

    ABSTRACT

    Regular chains and triangular decompositions are fundamen-tal and well-developed tools for describing the complex so-lutions of polynomial systems. This paper proposes adapta-tions of these tools focusing on solutions of the real analogue:semi-algebraic systems.

    We show that any such system can be decomposed intofinitely many regular semi-algebraic systems. We proposetwo specifications of such a decomposition and present cor-responding algorithms. Under some assumptions, one typeof decomposition can be computed in singly exponential timew.r.t. the number of variables. We implement our algorithmsand the experimental results illustrate their effectiveness.

    Categories and Subject Descriptors

    I.1.2 [Symbolic and Algebraic Manipulation]: Algo-rithmsAlgebraic algorithms, Analysis of algorithms

    General Terms

    Algorithms, Experimentation, Theory

    Keywordsregular semi-algebraic system, regular chain, triangular de-composition, border polynomial, fingerprint polynomial set

    1. INTRODUCTIONRegular chains, the output of triangular decompositions

    of systems of polynomial equations, enjoy remarkable prop-erties. Size estimates play in their favor [12] and permit thedesign of modular [13] and fast [17] methods for computingtriangular decompositions. These features stimulate the de-velopment of algorithms and software for solving polynomialsystems via triangular decompositions.

    For the fundamental case of semi-algebraic systems with

    rational number coefficients, to which this paper is devoted,we observe that several algorithms for studying the real so-lutions of such systems take advantage of the structure of a

    Permission to make digital or hard copies of all or part of this work forpersonal or classroom use is granted without fee provided that copies arenot made or distributed for profit or commercial advantage and that copiesbear this notice and the full citation on the first page. To copy otherwise, torepublish, to post on servers or to redistribute to lists, requires prior specificpermission and/or a fee.

    ISSAC 2010, 2528 July 2010, Munich, Germany.Copyright 2010 ACM 978-1-4503-0150-3/10/0007 ...$10.00.

    regular chain. Some are specialized to isolating the real solu-tions of systems with finitely many complex solutions [23, 10,3]. Other algorithms deal with parametric polynomial sys-tems via real root classification (RRC) [25] or with arbitrarysystems via cylindrical algebraic decompositions (CAD) [9].

    In this paper, we introduce the notion of a regular semi-algebraic system, which in broad terms is the real counter-part of the notion of a regular chain. Then we define two

    notions of a decomposition of a semi-algebraic system: onethat we call lazy triangular decomposition, where the ana-lysis of components of strictly smaller dimension is deferred,and one that we call full triangular decomposition where allcases are worked out. These decompositions are obtained bycombining triangular decompositions of algebraic sets overthe complex field with a special Quantifier Elimination (QE)method based on RRC techniques.

    Regular semi-algebraic system. Let T be a regular chain ofQ[x1, . . . , xn] for some ordering of the variables x = x1, . . . , xn.Let u = u1, . . . , ud and y = y1, . . . , ynd designate respec-tively the variables of x that are free and algebraic w.r.t. T.Let P Q[x] be finite such that each polynomial in P isregular w.r.t. the saturated ideal of T. Define P> := {p >

    0 | p P}. Let Q be a quantifier-free formula ofQ[x] in-volving only the variables of u. We say that R := [Q, T , P >]is a regular semi-algebraic system if:

    (i) Q defines a non-empty open semi-algebraic set S in Rd,(ii) the regular system [T, P] specializes well at every point

    u of S (see Section 2 for this notion),(iii) at each point u ofS, the specialized system [T(u), P(u)>]

    has at least one real zero.The zero set of R, denoted by ZR(R), is defined as the setof points (u, y) Rd Rnd such that Q(u) is true andt(u, y) = 0, p(u, y) > 0, for all t T and all p P.

    Triangular decomposition of a semi-algebraic system. InSection 3 we show that the zero set of any semi-algebraicsystem S can be decomposed as a finite union (possibly

    empty) of zero sets of regular semi-algebraic systems. Wecall such a decomposition a full triangular decomposition(orsimply triangular decompositionwhen clear from context) ofS, and denote by RealTriangularize an algorithm to computeit. The proof of our statement relies on triangular decompo-sitions in the sense of Lazard (see Section 2 for this notion)for which it is not known whether or not they can be com-puted in singly exponential time w.r.t. the number of vari-ables. Meanwhile, we are hoping to obtain an algorithm fordecomposing semi-algebraic systems (certainly under somegenericity assumptions) that would fit in that complexityclass. Moreover, we observe that, in practice, full triangular

    187

  • 8/6/2019 Triangular Decomposition of Semi-Algebraic Systems

    2/8

    decompositions are not always necessary and that providinginformation about the components of maximum dimensionis often sufficient. These theoretical and practical motiva-tions lead us to a weaker notion of a decomposition of asemi-algebraic system.

    Lazy triangular decomposition of a semi-algebraic sys-

    tem. Let S = [F, N, P>, H=] (see Section 3 for this nota-

    tion) be a semi-algebraic system ofQ

    [x

    ] and ZR

    (S

    ) Rn

    beits zero set. Denote by d the dimension of the constructibleset {x Cn | f(x) = 0, g(x) = 0, for all f F, g P H}.A finite set of regular semi-algebraic systems Ri, i = 1 tis called a lazy triangular decomposition ofS if

    ti=1ZR(Ri) ZR(S) holds, and there exists G Q[x] such that the real-zero set ZR(G)

    Rn contains ZR(S)\

    ti=1ZR(Ri)

    and the complex-zero set V(G) Cn either is empty or has dimensionless than d.

    We denote by LazyRealTriangularize an algorithm comput-ing such a decomposition. In the implementation presentedhereafter, LazyRealTriangularize outputs additional informa-tion in order to continue the computations and obtain a fulltriangular decomposition, if needed. This additional infor-

    mation appears in the form of unevaluated function calls,explaining the usage of the adjective lazy in this type of de-compositions.

    Complexity results for lazy triangular decomposition. InSection 4, we provide a running time estimate for computinga lazy triangular decomposition of the semi-algebraic sys-tem S when S has no inequations nor inequalities, (that is,when N = P> = H= = holds) and when F generatesa strongly equidimensional ideal of dimension d. We showthat one can compute such a decomposition in time singlyexponential w.r.t. n. Our estimates are not sharp and are just meant to reach a singly exponential bound. We relyon the work of J. Renagar [20] for QE. In Sections 5 and 6we turn our attention to algorithms that are more suitable

    for implementation even though they rely on sub-algorithmswith a doubly exponential running time w.r.t. d.

    A special case of quantifier elimination. By means of tri-angular decomposition of algebraic sets over C, triangulardecomposition of semi-algebraic systems (both full and lazy)reduces to a special case of QE. In Section 5, we implementthis latter step via the concept of a fingerprint polynomialset, which is inspired by that of a discrimination polynomialset used for RRC in [25, 24].

    Implementation and experimental results. In Section 6we describe the algorithms that we have implemented forcomputing triangular decompositions (both full and lazy) ofsemi-algebraic systems. Our Maple code is written on topof the RegularChains library. We provide experimental data

    for two groups of well-known problems. In the first group,each input semi-algebraic system consists of equations onlywhile the second group is a collection of QE problems. Toillustrate the difficulty of our test problems, and only for thispurpose, we provide timings obtained with other well-knownpolynomial system solvers which are based on algorithmswhose running time estimates are comparable to ours. Forthis first group we use the Maple command Groebner:-Basis for computing lexicographical Grobner bases. For thesecond group we use a general purpose QE software: qepcadb (in its non-interactive mode) [5]. Our experimental resultsshow that our LazyRealTriangularize code can solve most of

    our test problems and that it can solve more problems thanthe package it is compared to.

    We conclude this introduction by computing a triangulardecomposition of a particular semi-algebraic system takenfrom [6]. Consider the following question: when does p(z) =z3 + az + b have a non-real root x + iy satisfying xy < 1 ?This problem can be expressed as (x)(y)[f = g = 0 y =0 xy 1 < 0], where f = Re(p(x + iy)) = x3 3xy2 + ax +b

    and g = Im(p(x + iy))/y = 3x2 y2 + a.We call our LazyRealTriangularize command on the semi-

    algebraic system f = 0, g = 0, y = 0, xy 1 < 0 with thevariable order y > x > b > a. Its first step is to call theTriangularize command of the RegularChains library on thealgebraic system f = g = 0. We obtain one squarefree regu-lar chain T = [t1, t2], where t1 = g and t2 = 8x

    3 + 2ax b,satisfying V(f, g) = V(T). The second step of LazyRe-alTriangularize is to check whether the polynomials defin-ing inequalities and inequations are regular w.r.t. the sat-urated ideal of T, which is the case here. The third stepis to compute the so called border polynomial set (see Sec-tion 2) which is B = [h1, h2] with h1 = 4a

    3 + 27b2 andh2 = 4a

    3b227b4+16a4+512a2+4096. One can check thatthe regular system [T, {y,xy 1}] specializes well outside ofthe hypersurface h1h2 = 0. The fourth step is to computethe fingerprint polynomial set which yields the quantifier-free formula Q = h1 > 0 telling us that [Q, T, 1 xy > 0] isa regular semi-algebraic system. After performing these foursteps, (based on Algorithm 5, Section 6) the function call

    LazyRealTriangularize([f, g , y = 0, xy 1 < 0], [y,x,b,a])

    in our implementation returns the following:

    [{t1 = 0, t2 = 0, 1 xy > 0, h1 > 0}] h1h2 = 0

    %LazyRealTriangularize([t1 = 0, t2 = 0, f = 0 ,h1 = 0, 1 xy > 0, y = 0], [y, x , b, a]) h1 = 0

    %LazyRealTriangularize([t1 = 0, t2 = 0, f = 0 ,

    h2 = 0, 1 xy > 0, y = 0], [y, x , b, a]) h2 = 0

    The above output shows that {[Q, T, 1 xy > 0]} formsa lazy triangular decomposition of the input semi-algebraicsystem. Moreover, together with the output of the recursivecalls, one obtains a full triangular decomposition. Note thatthe cases of the two recursive calls correspond to h1 = 0 andh2 = 0. Since our LazyRealTriangularize uses the Maplepiecewise structure for formatting its output, one simplyneeds to evaluate the recursive calls with the value com-mand, yielding the same result as directly calling RealTrian-gularize

    [{t1 = 0 , t2 = 0, 1 xy > 0, h1 > 0}] h1h2 = 0

    [ ] h1 = 0

    ([{t3 = 0, t4 = 0,h2 = 0, 1 xy > 0}]) h3 = 0

    [ ] h3 = 0

    h2 = 0

    where t3 = xy + 1, t4 = 2a3x a2b + 32ax 48b + 18xb2,

    h3 = (a2 + 48)(a2 + 16)(a2 + 12).

    From this output, after some simplification, one could ob-tain the equivalent quantifier-free formula, 4a3 + 27b2 > 0,of the original QE problem.

    188

  • 8/6/2019 Triangular Decomposition of Semi-Algebraic Systems

    3/8

    2. TRIANGULAR DECOMPOSITION OF

    ALGEBRAIC SETSWe review in the section the basic notions related to reg-

    ular chains and triangular decompositions of algebraic sets.Throughout this paper, let k be a field of characteristic 0 andK be its algebraic closure. Let k[x] be the polynomial ringover k and with ordered variables x = x1 < < xn. Let

    p,q k[x] be polynomials. Assume that p / k. Then denoteby mvar(p), init(p), and mdeg(p) respectively the greatestvariable appearing in p (called the main variable of p), theleading coefficient ofp w.r.t. mvar(p) (called the initialofp),and the degree of p w.r.t. mvar(p) (called the main degreeof p); denote by der(p) the derivative of p w.r.t. mvar(p);denote by discrim(p) the discriminant of p w.r.t. mvar(p).

    Triangular sets. Let T k[x] be a triangular set, that is, aset of non-constant polynomials with pairwise distinct mainvariables. Denote by mvar(T) the set of main variables ofthe polynomials in T. A variable v in x is called algebraicw.r.t. T if v mvar(T), otherwise it is said free w.r.t. T.If no confusion is possible, we shall always denote by u =u1, . . . , ud and y = y1, . . . , ym respectively the free and themain variables of T. Let hT be the product of the initialsof the polynomials in T. We denote by sat(T) the saturatedideal of T: if T is the empty triangular set, then sat(T)is defined as the trivial ideal 0, otherwise it is the idealT : hT . The quasi-component W(T) of T is defined as

    V(T) \ V(hT). Denote W(T) = V(sat(T)) as the Zariskiclosure of W(T).

    Iterated resultant. Let p and q be two polynomials of k[x].Assume q is non-constant and let v = mvar(q). We de-fine res(p,q,v) as follows: if v does not appear in p, thenres(p,q,v) := p; otherwise res(p,q,v) is the resultant of pand q w.r.t. v. Let T be a triangular set of k[x]. We defineres(p,T) by induction: if T is empty, then res(p,T) = p;otherwise let v be the greatest variable appearing in T, thenres(p,T) = res(res(p,Tv, v), T 0, . . . , pr > 0}. Let H= denote the set of in-equations {h1 = 0, . . . , h = 0}. We will denote by [F, P>]the basic semi-algebraic system {f1 = 0, . . . , f s = 0, p1 >0, . . . , pr > 0}. We denote by S = [F, N, P>, H=] thesemi-algebraic system (SAS) which is the conjunction of thefollowing conditions: f1 = 0, . . . , f s = 0, n1 0, . . . , nt 0,p1 > 0, . . . , pr > 0 and h1 = 0, . . . , h = 0.

    Notations on zero sets. In this paper, we useZ to denote

    the zero set of a polynomial system, involving equations andinequations, in Cn andZR to denote the zero set of a semi-algebraic system in Rn.

    Pre-regular semi-algebraic system. Let [T, P] be a square-free regular system ofQ[u, y]. Let bp be the border polyno-mial of [T, P]. Let B Q[u] be a polynomial set such that bpdivides the product of polynomials in B. We call the triple[B=, T , P >] a pre-regular semi-algebraic system ofQ[x]. Itszero set, written as ZR(B=, T , P >), is the set (u, y) R

    n

    such that b(u) = 0, t(u, y) = 0, p(u, y) > 0, for all b B,t T, p P. Lemma 1 and Lemma 2 are fundamentalproperties of pre-regular semi-algebraic systems.

    Lemma 1. LetS be a semi-algebraic system ofQ[x]. Then

    there exists finitely many pre-regular semi-algebraic systems[Bi=, Ti, Pi>], i = 1 e, s.t. ZR(S) = ei=1ZR(Bi=, Ti, Pi>).

    Proof. The semi-algebraic system S decomposes intobasic semi-algebraic systems, by rewriting inequality of typen 0 as: n > 0 n = 0. Let [F, P>] be one of thosebasic semi-algebraic systems. If F is empty, then the triple[P,, P>], is a pre-regular semi-algebraic system. If F isnot empty, by Proposition 1 and the specifications of Tri-angularize and Regularize, one can compute finitely manysquarefree regular systems [Ti, H] such that V(F)Z(P=) =ei=1 (V(Ti) Z(Bi=)) holds and where Bi is the borderpolynomial set of the regular system [Ti, H]. Hence, we have

    189

  • 8/6/2019 Triangular Decomposition of Semi-Algebraic Systems

    4/8

    ZR(F, P>) = ei=1ZR(Bi=, Ti, P>), where each [Bi=, Ti, P>]

    is a pre-regular semi-algebraic system.

    Lemma 2. Let[B=, T , P >] be a pre-regular semi-algebraicsystem ofQ[u, y]. Let h be the product of polynomials in B.The complement of the hypersurface h = 0 in Rd consistsof finitely many open cells of dimension d. Let C be oneof them. Then for all C, the number of real zeros of

    [T(), P>()] is the same.

    Proof. From Proposition 1 and recursive use of Theorem1 in [11] on the delineability of a polynomial.

    Lemma 3. Let[B=, T , P >] be a pre-regular semi-algebraicsystem of Q[u, y]. One can decide whether its zero set isempty or not. If it is not empty, then one can compute aregular semi-algebraic system [Q, T , P >] whose zero set inRn is the same as that of [B=, T , P >].

    Proof. If T = , we can always test whether the zeroset of [B=, P>] is empty or not, for instance using CAD. Ifit is empty, we are done. Otherwise, defining Q = B= P>,the triple [Q, T , P >] is a regular semi-algebraic system. If

    T is not empty, we solve the quantifier elimination problemy(B(u) = 0, T(u, y) = 0, P(u, y) > 0) and let Q be theresulting formula. If Q is false, we are done. Otherwise, byLemma 2, above each connected component of B(u) = 0, thenumber of real zeros of the system [B=, T , P >] is constant.Then, the zero set defined by Q is the union of the connectedcomponents of B(u) = 0 above which [B=, T , P >] possessesat least one solution. Thus, Q defines a nonempty open setofRd and [Q, T , P >] is a regular semi-algebraic system.

    Theorem 1. Let S be a semi-algebraic system of Q[x].Then one can compute a (full) triangular decomposition ofS, that is, as defined in the introduction, finitely many reg-ular semi-algebraic systems such that the union of their zerosets is the zero set of S.

    Proof. It follows from Lemma 1 and 3.

    4. COMPLEXITY RESULTSWe start this section by stating complexity estimates for

    basic operations on multivariate polynomials.

    Complexity of basic polynomial operations. Let p, q Q[x] be polynomials with respective total degrees p, q, andlet x x. Let p, q, pq and r be the height (that is, thebit size of the maximum absolute value of the numerator ordenominator of a coefficient) of p, q, the product pq and theresultant res(p,q,x), respectively. In [14], it is proved thatgcd(p,q) can be computed within O(n2+13) bit operationswhere = max(p, q) and = max(p, q). It is easy to

    establish that pq and r are respectively upper bounded byp +q +n log(min(p, q)+1) and qp + pq +nq log(p +1) + np log(q + 1) + log ((p + q)!). Finally, let M be ak k matrix over Q[x]. Let (resp. ) be the maximumtotal degree (resp. height) of a polynomial coefficient of M.Then det(M) can be computed within O(k2n+5( + 1)2n2)bit operations, see [15].

    We turn now to the main subject of this section, that is,complexity estimates for a lazy triangular decomposition of apolynomial system under some genericity assumptions. LetF Q[x]. A lazy triangular decomposition (as defined in theIntroduction) of the semi-algebraic system S = [F, , , ],

    Algorithm 1: LazyRealTriangularize(S)

    Input: a semi-algebraic system S = [F, , , ]Output: a lazy triangular decomposition ofST := Triangularize(F)1for Ti T do2

    bpi := BorderPolynomial(Ti, )3solve y(bpi(u) = 0, Ti(u, y) = 0), and let Qi be the4

    resulting quantifier-free formulaif Qi = false then output [Qi, Ti, ]5

    which only involves equations, is obtained by the above al-gorithm.

    Proof of Algorithm 1. The termination of the algorithm isobvious. Let us prove its correctness. Let Ri = [Qi, Ti, ],for i = 1 t be the output of Algorithm 1 and let Tj forj = t + 1 s be the regular chains such that Qj = false.By Lemma 3, each Ri is a regular semi-algebraic system.For i = 1 s, define Fi = sat(Ti). Then we have V(F) =si=1V(Fi), where each Fi is equidimensional. For each i =1 s, by Proposition 1, we have

    V(Fi) \ V(bpi) = V(Ti) \ V(bpi).

    Moreover, we have

    V(Fi) = (V(Fi) \ V(bpi)) V(Fi {bpi}).

    Hence,

    ZR(Ri) = ZR(Ti) \ ZR(bpi) ZR(Fi) ZR(F)

    holds. In addition, since bpi is regular modulo Fi, we have

    ZR(F) \ ti=1ZR(Ri) =

    si=1ZR(Fi) \

    ti=1ZR(Ri)

    si=1ZR(Fi) \ (ZR(Ti) \ ZR(bpi)) si=1ZR(Fi {bpi}),

    and dim(si=1V(Fi {bpi})) < dim(V(F)). So the Ri, for

    i = 1 t, form a lazy triangular decomposition ofS. In this section, under some genericity assumptions for F,

    we establish running time estimates for Algorithm 1, seeProposition 3. This is achieved through:(1) Proposition 2 giving running time and output size es-

    timates for a Kalkbrener triangular decomposition ofan algebraic set, and

    (2) Theorem 2 giving running time and output size esti-mates for a border polynomial computation.

    Our assumptions for these results are the following:(H0) V(F) is equidimensional of dimension d,(H1) x1, . . . , xd are algebraically independent modulo each

    associated prime ideal of the ideal generated by F inQ[x],

    (H2

    ) F consists of m := n d polynomials, f1, . . . , f m.Hypotheses (H0) and (H1) are equivalent to the existence ofregular chains T1, . . . , T e ofQ[x1, . . . , xn] such that x1, . . . , xdare free w.r.t. each of T1, . . . , T e and such that we haveV(F) = W(T1) W(Te).

    Denote by , respectively the maximum total degree andheight of f1, . . . , f m. In her PhD Thesis [22], A. Szanto de-scribes an algorithm which computes a Kalkbrener triangu-lar decomposition, T1, . . . , T e, of V(F). Under Hypotheses

    (H0) to (H2), this algorithm runs in time mO(1)(O(n

    2))d+1

    counting operations in Q, while the total degrees of the poly-

    nomials in the output are bounded by nO(m2). In addition,

    190

  • 8/6/2019 Triangular Decomposition of Semi-Algebraic Systems

    5/8

    T1, . . . , T e are square free, strongly normalized [18] and re-duced [1].

    From T1, . . . , T e, we obtain regular chains E1, . . . , E e form-ing another Kalkbrener triangular decomposition of V(F),as follows. Let i = 1 e and j = (d + 1) n. Let ti,jbe the polynomial of Ti with xj as main variable. Let ei,jbe the primitive part of ti,j regarded as a polynomial inQ[x1, . . . , xd][xd+1, . . . , xn]. Define Ei = {ei,d+1, . . . , ei,n}.

    According to the complexity results for polynomial opera-tions stated at the beginning of this section, this transfor-

    mation can be done within O(m4)O(n) operations in Q.

    Dividing ei,j by its initial we obtain a monic polynomialdi,j ofQ(x1, . . . , xd)[xd+1, . . . , xn]. Denote by Di the regularchain {di,d+1, . . . , di,n}. Observe that Di is the reduced lex-icographic Grobner basis of the radical ideal it generates inQ(x1, . . . , xd)[xd+1, . . . , xn]. So Theorem 1 in [12] applies toeach regular chain Di. For each polynomial di,j, this theo-rem provides height and total degree estimates expressed asfunctions of the degree [7] and the height [19, 16] of the alge-

    braic set W(Di). Note that the degree and height of W(Di)are upper bounded by those of V(F). Write di,j =

    where each Q[xd+1, . . . , xn] is a monomial and ,

    are in Q[x1, . . . , xd] such that gcd(, ) = 1 holds. Let be the lcm of the s. Then for and each :

    the total degree is bounded by 22m and, the height by O(2m(m+ dm log() + nlog(n))).

    Multiplying di,j by brings ei,j back. We deduce the heightand total degree estimates for each ei,j below.

    Proposition 2. The Kalkbrener triangular decomposition

    E1, . . . , E e of V(F) can be computed in O(m4)O(n) opera-

    tions inQ. In addition, every polynomialei,j has total degreeupper bounded by 42m + m, and has height upper boundedby O(2m(m+ dmlog() + nlog(n))).

    Next we estimate the running time and output size for

    computing the border polynomial of a regular system.Theorem 2. Let R = [T, P] be a squarefree regular sys-

    tem ofQ[u, y], withm = #T and = #P. Letbp be the bor-der polynomial ofR. Denote byR, R respectively the max-imum total degree and height of a polynomial inR. Then thetotal degree of bp is upper bounded by ( + m)2m1R

    m, and

    bp can be computed within (n + nm)O(n)(2R)O(n)O(m)R

    3

    bit operations.

    Proof. Define G := P {der(t) | t T}. We need tocompute the +m iterated resultants res(g, T), for all g G.Let g G. Observe that the total degree and height of g arebounded by R and R+log(R) respectively. Define rm+1 :=g, . . . , ri := res(ti, ri+1, yi), . . . , r1 := res(t1, r2, y1). Let i {1, . . . , m}. Denote by i and i the total degree and heightof ri, respectively. Using the complexity estimates stated atthe beginning of this section, we have i 2

    mi+1Rmi+2

    and i 2i+1(i+1 + n log(i+1 + 1)). Therefore, we have

    i (2R)O(m2)nO(m)R. From these size estimates, one

    can deduce that each resultant ri (thus the iterated resul-

    tants) can be computed within (2R)O(mn)+O(m2)nO(m)R

    2

    bit operations, by the complexity of computing a determi-nant stated at the beginning of this section.

    Hence, the product of all iterated resultants has totaldegree and height bounded by ( + m)2m1R

    m and ( +

    m)(2R)O(m2)nO(m)R, respectively. Thus, the primitive

    and squarefree part of this product can be computed within(n+nm)O(n)(2R)

    O(n)O(m)R3 bit operations, based on the

    complexity of a polynomial gcd computation stated at thebeginning of this section.

    Proposition 3. From the Kalkbrener triangular decom-position E1, . . . , E e of Proposition 2, a lazy triangular de-composition of f1 = = fm = 0 can be computed in

    n2

    n4n

    O(n2

    ) O(1) bit operations. Thus, a lazy triangu-

    lar decomposition of this system is computed from the inputpolynomials in singly exponential time w.r.t. n, counting op-erations inQ.

    Proof. For each i {1 e}, let bpi be the border poly-nomial of [Ei, ] and let Ri (resp. Ri) be the height (resp.the total degree) bound of the polynomials in the pre-regularsemi-algebraic system Ri = [{bpi}=, Ei, ]. According to Al-gorithm 1, the remaining task is to solve the QE problemy(bpi(u) = 0, Ei(u, y) = 0) for each i {1 e}, which

    can be solved within ((m + 1)Ri)O(dm)

    O(1)Ri

    bit operations,based on the results of [20]. The conclusion follows from thesize estimates in Proposition 2 and Theorem 2.

    5. QUANTIFIER ELIMINATION BY RRCIn the last two sections, we saw that in order to compute

    a triangular decomposition of a semi-algebraic system, a keystep is to solve the following quantifier elimination problem:

    y(B(u) = 0, T(u, y) = 0, P(u, y) > 0), (1)

    where [B=, T , P >] is a pre-regular semi-algebraic system ofQ[u, y]. This problem is an instance of the so-called realroot classification (RRC) [27]. In this section, we show howto solve this problem when B is what we call a fingerprintpolynomial set.

    Fingerprint polynomial set. Let R := [B=, T , P >] be a pre-regular semi-algebraic system ofQ[u, y]. Let D Q[u]. Letdp be the product of all polynomials in D. We call D afingerprint polynomial set(FPS) of R if:

    (i) for all Rd, for all b B we have:dp() = 0 = b() = 0,

    (ii) for all , Rd with = and dp() = 0, dp() = 0,if the signs ofp() and p() are the same for all p D,then R() has real solutions if and only if R() does.

    Hereafter, we present a method to construct an FPS basedon projection operators of CAD.

    Open projection operator [21, 4]. Hereafter in this sec-tion, let u = u1 < < ud be ordered variables. Letp Q[u] be non-constant. Denote by factor(p) the set ofthe non-constant irreducible factors of p. For A Q[u],define factor(A) = pA factor(p). Let Cd (resp. C0) be

    the set of the polynomials in factor(p) with main variableequal to (resp. less than) ud. The open projection operator(oproj) w.r.t. variable ud maps p to a set of polynomials ofQ[u1, . . . , ud1] defined below:

    oproj(p,ud) := C0

    f,gCd, f=gfactor(res(f, g , ud))

    fCdfactor(init(f, ud) discrim(f, ud)).

    Then, we define oproj(A, ud) := oproj(pAp,ud).

    Augmentation. Let A Q[u] and x {u1, . . . , ud}. Denoteby der(A, x) the derivative closure of A w.r.t. x, that is,

    der(A, x) := pA {der(i)(p,x) | 0 i < deg(p,x)}. The

    191

  • 8/6/2019 Triangular Decomposition of Semi-Algebraic Systems

    6/8

    open augmented projected factors of A is denoted by oaf(A)and defined as follows. Let k be the smallest positive integersuch that A Q[u1, . . . , uk] holds. Denote by C the setfactor(der(A, uk)); we have

    if k = 1, then oaf(A) := C; if k > 1, then oaf(A) := C oaf(oproj(C, uk)).

    Theorem 3. Let A Q[u] be finite and let be a map

    fromoaf(A) to the set of signs {1, +1}. Then the setSd :=poaf(A) {u R

    d | p(u) (p) > 0} is either empty or a

    connected open set inRd.

    Proof. By induction on d. When d = 1, the conclusionfollows from Thoms Lemma [2]. Assume d > 1. Ifd is notthe smallest positive integer k such that A Q[u1, . . . , uk]holds, then Sd can be written Sd1R and the conclusion fol-lows by induction. Otherwise, write oaf(A) as C E, whereC = factor(der(A, ud)) and E = oaf(oproj(C, ud)). We have:E Q[u1, , ud1]. Denote by M the set pE {u Rd1 | p(u)(p) > 0}. If M is empty then so is Sd andthe conclusion is clear. From now on assume M not empty.Then, by induction hypothesis, M is a connected open setin Rd1. By the definition of the operator oproj, the prod-

    uct of the polynomials in C is delineable over M w.r.t. ud.Moreover, C is derivative closed (may be empty) w.r.t. ud.Therefore poaf(A) {u R

    d | p(u) (p) > 0} M R is ei-ther empty or a connected open set by Thoms Lemma.

    Theorem 4. LetR := [B=, T , P >] be a pre-regular semi-algebraic system ofQ[u, y]. The polynomial set oaf(B) is afingerprint polynomial set ofR.

    Proof. Recall that the border polynomial bp of [T, P] di-vides the product of the polynomials in B. We have factor(B) oaf(B). So oaf(B) satisfies (i) in the definition of FPS.Let us prove (ii). Let dp be the product of the polynomi-als in oaf(B). Let , Rd such that both dp() = 0,dp() = 0 hold and the signs of p() and p() are equal forall p oaf(B). Then, by Theorem 3, and belong tothe same connected component of dp(u) = 0, and thus tothe same connected component of B(u) = 0. Therefore thenumber of real solutions of R() and that of R() are thesame by Lemma 2.

    From now on, let us assume that the set B in the pre-regular semi-algebraic system R = [B=, T , P >] is an FPSof R. We solve the quantifier elimination problem (1) inthree steps: (s1) compute at least one sample point in eachconnected component of the semi-algebraic set defined byB(u) = 0; (s2) for each sample point such that the spe-cialized system R() possesses real solutions, compute thesign of b() for each b B; (s3) generate the correspondingquantifier-free formulas.

    In practice, when the set B is not anFPS

    , one adds somepolynomials from oaf(B), using a heuristic procedure (forinstance one by one) until Property (ii) of the definition of anFPS is satisfied. This strategy is implemented in Algorithm 3of Section 6.

    6. IMPLEMENTATIONIn this section, we present algorithms for LazyRealTrian-gularize and RealTriangularize that we have implemented ontop of the RegularChains library in Maple. We also provideexperimental results for test problems which are available atwww.orcca.on.ca/~cchen/issac10.txt.

    Algorithm 2: GeneratePreRegularSas(S)

    Input: a semi-algebraic system S = [F, N, P>, H=]Output: a set of pre-regular semi-algebraic systems[Bi=, Ti, Pi>], i = 1 . . . e, such that

    ZR(S) = ei=1ZR(Bi=, Ti, Pi>)

    ei=1ZR(sat(Ti) {bBib}, N, P>, H=).T := Triangularize(F); T := 1

    for p P H do2for T T do3

    for C Regularize(p,T) do4if p / sat(C) then T := T {C}5

    T := T; T := 6

    T := {[T, ] | T T}; T := 7for p N do8

    for [T, N] T do9for C Regularize(p,T) do10

    if p sat(C) then11T := T {[C, N]}12

    else13

    T := T {[C, N {p}]}14

    T := T; T := 15

    T := {[T, N, P , H ] | [T, N] T}16for [T, N, P , H ] T do17

    B := BorderPolynomialSet(T, N P H)18output [B , T , N P]19

    Algorithm 3: GenerateRegularSas(B , T , P )

    Input: S = [B=, T , P >], a pre-regular semi-algebraicsystem ofQ[u, y], where u = u1, . . . , ud andy = y1, . . . , ynd.

    Output: A pair (D, R) satisfying:(1) D Q[u] such that factor(B) D;(2) R is a finite set of regular semi-algebraic systems,s.t. RRZR(R) = ZR(D=, T , P >).D := factor(B \Q)1if d = 0 then2

    if RealRootCounting(T, P) = 0 then3return (D, )4

    else5

    return (D, {[true,T,P]})6

    while true do7S := SamplePoints(D, d); G0 := ; G1 := 8for s S do9

    if RealRootCounting(T(s), P(s)) = 0 then10G0 := G0 {GenerateFormula(D, s)}11

    else12

    G1 := G1 {GenerateFormula(D, s)}13

    if G0 G1 = then14Q := Disjunction(G1)15if Q = false then return (D, )16else return (D, {[Q, T , P ]})17

    else18

    select a subset D oaf(B) \ D by some19heuristic methodD := D D20

    192

  • 8/6/2019 Triangular Decomposition of Semi-Algebraic Systems

    7/8

    Basic subroutines. For a zero-dimensional squarefree regu-lar system [T, P], RealRootCounting(T, P) [23] returns thenumber of real zeros of [T, P>]. For A Q[u1, . . . , ud]and a point s of Qd such that p(s) = 0 for all p A,GenerateFormula(A, s) computes a formula pA (p p,s >0),where p,s is defined as +1 ifp(s) > 0 and 1 otherwise. Fora set of formulas G, Disjunction(G) computes a logic formula equivalent to the disjunction of the formulas in G.

    Proof of Algorithm 2. Its termination is obvious. Let usprove its correctness. By the specification of Triangularizeand Regularize, at line 16, we have

    Z(F, P= H=) = [T,N,P,H]TZ(sat(T), P= H=).

    Write [T,N,P,H]T as T. Then we deduce that

    ZR(F, N, P>, H=) = TZR(sat(T), N, P>, H=).

    For each [T, N, P , H ], at line 19, we generate a pre-regularsemi-algebraic system [B=, T , N

    > P>]. By Proposition 1,

    we have

    ZR(sat(T), N, P>, H=) =ZR(B=, T , N

    > P>) ZR(sat(T) {bBb}, N, P>, H=),

    which implies thatZR(S) = TZR(B=, T , N

    > P>)

    TZR(sat(T) {bB b}, N, P>, H=).

    So Algorithm 2 satisfies its specification.

    Algorithm 4: SamplePoints(A, k)

    Input: A Q[x1, . . . , xk] is a finite set of non-zeropolynomials

    Output: A finite subset ofQk contained in(pAp) = 0 and having a non-empty intersection witheach connected component of (pAp) = 0.if k = 1 then1

    return one rational point from each connected2

    component of pAp = 0else3

    Ak := {p A | mvar(p) = xk}; A := oproj(A, xk)4

    for s SamplePoints(A, k 1) do5Collect in a set S one rational point from each6connected component of pAkp(s, xk) = 0;for S do output (s, )7

    Algorithm 5: LazyRealTriangularize(S)

    Input: a semi-algebraic system S = [F, N, P>, H=]Output: a lazy triangular decomposition ofST := GeneratePreRegularSas(F,N,P,H)1for [B , T , P ] T do2

    (D, R) = GenerateRegularSas(B , T , P )3if R = then output R4

    Proof of Algorithms 3 and 4. By the definition of oproj,Algorithm 4 terminates and satisfies its specification. ByTheorem 4, oaf(B) is an FPS. Thus, by the definition of anFPS, Algorithm 3 terminates and satisfies its specification.

    Proof of Algorithm 5. Its termination is obvious. Let usprove the algorithm is correct. Let Ri, i = 1 t be the

    Algorithm 6: RealTriangularize(S)

    Input: a semi-algebraic system S = [F, N, P>, H=]Output: a triangular decomposition ofST := GeneratePreRegularSas(F,N,P,H)1for [B , T , P ] T do2

    (D, R) = GenerateRegularSas(B , T , P )3if R = then output R4

    for p D do5

    output RealTriangularize(F {p}, N , P , H )6

    output. By the specification of each sub-algorithm, each Riis a regular semi-algebraic system and we have:

    ti=1ZR(Ri) ZR(S).

    Next we show that there exists an ideal I Q[x], whosedimension is less than dim(Z(F, P= H=)) and such thatZR(S) \

    ti=1ZR(Ri) ZR(I) holds.

    At line 1, by the specification of Algorithm 2, we have

    ZR(S) = TZR(B=, T , P

    >)

    TZR(sat(T) {bB b}, N, P>, H=).At line 3, by the specification of Algorithm 3, for each B, wecompute a set D such that factor(B) D and

    TZR(D=, T , P

    >) = ti=1ZR(Ri)

    both hold. Combining the two relations together, we have

    ZR(S) = TZR(Ri)TZR(sat(T) {pD p}, N, P>, H=).

    Therefore, the following relations hold

    ZR(S) \ ti=1ZR(Ri)

    TZR(sat(T) {pD p}, N, P>, H=) ZR (T (sat(T) {pD p})) .

    DefineI = T (sat(T) {pD p}) .

    Since each p D is regular modulo sat(T), we have

    dim(I) < dim(Tsat(T)) dim(Z(F, P= H=)).

    So all Ri form a lazy triangular decomposition ofS.

    Proof of Algorithm 6. For its termination, it is sufficientto prove that there are only finitely many recursive callsto RealTriangularize . Indeed, if [F , N , P , H ] is the input of acall to RealTriangularize then each of the immediate recursivecalls takes [F {p}, N , P , H ] as input, where p belongs to theset D of some pre-regular semi-algebraic system [D=, T , P >].Since p is regular (and non-zero) modulo sat(T) we have:

    F F {p}.

    Therefore, the algorithm terminates by the ascending chaincondition on ideals ofQ[x]. The correctness of Algorithm 6follows from the specifications of the sub-algorithms.

    Table 1. Table 1 summarizes the notations used in Tables 2and 3. Tables 2 and 3 demonstrate benchmarks running inMaple 14 1, using an Intel Core 2 Quad CPU (2.40GHz)with 3.0GB memory. The timings are in seconds and thetime-out is 1 hour.

    Table 2. The systems in this group involve equations only.We report the running times for a triangular decomposition

    193

  • 8/6/2019 Triangular Decomposition of Semi-Algebraic Systems

    8/8

    Table 1 Notations for Tables 2 and 3

    symbol meaning#e number of equations in the input system#v number of variables in the input equationsd maximum total degree of an input equationG Groebner:-Basis (plex order) in MapleT Triangularize in RegularChains library of MapleLR LazyRealTriangularize implemented in MapleR RealTriangularize implemented in Maple

    Q Qepcad b> 1h computation does not complete within 1 hourFAIL Qepcad b failed due to prime list exhausted

    Table 2 Timings for varieties

    system #v/#e/d G T LRHairer-2-BGK 13/ 11/ 4 25 1.924 2.396Collins-jsc02 5/ 4/ 3 876 0.296 0.820

    Leykin-1 8/ 6/ 4 103 3.684 3.9248-3-config-Li 12/ 7/ 2 109 5.440 6.360

    Lichtblau 3/ 2/ 11 126 1.548 11Cinquin-3-3 4/ 3/ 4 64 0.744 2.016Cinquin-3-4 4/ 3/ 5 > 1h 10 22

    DonatiTraverso-rev 4/ 3/ 8 154 7.100 7.548Cheaters-homotopy-1 7/ 3/ 7 3527 174 > 1h

    hereman-8.8 8/ 6/ 6 > 1h 33 62

    L 12/ 4/ 3 > 1h 0.468 0.676dgp6 17/19/ 2 27 60 63

    dgp29 5/ 4/ 15 84 0.008 0.016

    of the input algebraic variety and a lazy triangular decom-position of the corresponding real variety. These illustratethe good performance of our tool.

    Table 3. The examples in this table are quantifier elimi-nation problems and most of them involve both equationsand inequalities. We provide the timings for computing alazy and a full triangular decomposition of the correspond-ing semi-algebraic system and the timings for solving thequantifier elimination problem via Qepcad b [5] (in non-interactive mode). Computations complete with our tool onmore examples than with Qepcad b.

    Remark. The output of our tools is a set of regular semi-algebraic systems, which is different than that of Qepcad b.We note also that our tool is more effective for systems withmore equations than inequalities.

    Acknowledgments. The authors would like to thank thereferees for their valuable remarks that helped to improvethe presentation of the work.

    Table 3 Timings for semi-algebraic systems

    system #v/#e/d T LR R QBM05-1 4/ 2/ 3 0.008 0.208 0.568 86BM05-2 4/ 2/ 4 0.040 2.284 > 1h FAIL

    Solotareff-4b 5/ 4/ 3 0.640 2.248 924 > 1hSolotareff-4a 5/ 4/ 3 0.424 1.228 8.216 FAIL

    putnam 6/ 4/ 2 0.044 0.108 0.948 > 1hMPV89 6/ 3/ 4 0.016 0.496 2.544 > 1h

    IBVP 8/ 5/ 2 0.272 0.560 12 > 1hLafferriere37 3/ 3/ 4 0.056 0.184 0.180 10

    Xia 6/ 3/ 4 0.164 191 739 > 1hSEIT 11/ 4/3 0.400 > 1h > 1h > 1h

    p3p-isosceles 7/ 3/ 3 1.348 > 1h > 1h > 1hp3p 8/ 3/ 3 210 > 1h > 1h FAIL

    Ellipse 6/ 1/ 3 0.012 > 1h > 1h > 1h

    7. REFERENCES[1] P. Aubry, D. Lazard, and M. Moreno Maza. On the theories

    of triangular sets. J. Symb. Comput., 28(1-2):105124, 1999.[2] S. Basu, R. Pollack, and M-F. Roy. Algorithms in real

    algebraic geometry. Springer-Verlag, 2006.

    [3] F. Boulier, C. Chen, F. Lemaire, and M. Moreno Maza.Real root isolation of regular chains. In Proc. ASCM09.

    [4] C. W. Brown. Improved projection for cylindrical algebraicdecomposition. J. Symb. Comput., 32(5):447465, 2001.

    [5] C. W. Brown. qepcad b: a program for computing withsemi-algebraic sets using cads. SIGSAM Bull.,37(4):97108, 2003.

    [6] C. W. Brown and S. McCallum. On using bi-equationalconstraints in cad construction. In ISSAC05, pages 7683,2005.

    [7] P. Burgisser, M. Clausen, and M. A. Shokrollahi. AlgebraicComplexity Theory. Springer, 1997.

    [8] C. Chen, O. Golubitsky, F. Lemaire, M. Moreno Maza, andW. Pan. Comprehensive triangular decomposition. InCASC07, pages 73101, 2007.

    [9] C. Chen, M. Moreno Maza, B. Xia, and L. Yang.Computing cylindrical algebraic decomposition viatriangular decomposition. In ISSAC09, pages 95102.

    [10] J.S. Cheng, X.S. Gao, and C.K. Yap. Complete numericalisolation of real zeros in zero-dimensional triangular

    systems. In ISSAC 07, pages 9299, 2007.[11] G. E. Collins. Quantifier elimination for real closed fields by

    cylindrical algebraic decomposition. Springer Lecture Notesin Computer Science, 33:515532, 1975.

    [12] X. Dahan, A. Kadri, and E. Schost. Bit-size estimates fortriangular sets in positive dimension. Technical report,University of Western Ontario, 2009.

    [13] X. Dahan, M. Moreno Maza, E. Schost, W. Wu, andY. Xie. Lifting techniques for triangular decompositions. InISSAC05, pages 108115, 2005.

    [14] J.H. Davenport, Y. Siret, and E. Tournier. ComputerAlgebra. Academic Press, 1988.

    [15] H. Hong and J. R. Sendra. Computation of variant results,B. Caviness and J. Johnson, eds, Quantifier Eliminationand Cylindrical Algebraic Decomposition, 1998.

    [16] T. Krick, L. M. Pardo, and M. Sombra. Sharp estimates for

    the arithmetic Nullstellensatz. Duke Math. J.,109(3):521598, 2001.

    [17] X. Li, M. Moreno Maza, and W. Pan. Computationsmodulo regular chains. In ISSAC09, pages 239246, 2009.

    [18] M. Moreno Maza. On triangular decompositions ofalgebraic varieties. MEGA-2000, Bath, UK.http://www.csd.uwo.ca/moreno/books-papers.html

    [19] P. Philippon. Sur des hauteurs alternatives III. J. Math.Pures Appl., 74(4):345365, 1995.

    [20] J. Renegar. On the computational complexity and geometryof the first-order theory of the reals. parts IIII. J. Symb.Comput., 13(3):255352, 1992.

    [21] A. Strzebonski. Solving systems of strict polynomialinequalities. J. Symb. Comput., 29(3):471480, 2000.

    [22] A. Szanto. Computation with polynomial systems. PhDthesis, Cornell University, 1999.

    [23] B. Xia and T. Zhang. Real solution isolation using intervalarithmetic. Comput. Math. Appl., 52(6-7):853860, 2006.[24] R. Xiao. Parametric Polynomial System Solving. PhD

    thesis, Peking University, Beijing, 2009.

    [25] L. Yang, X. Hou, and B. Xia. A complete algorithm forautomated discovering of a class of inequality-typetheorems. Science in China, Series F, 44(6):3349, 2001.

    [26] L. Yang and B. Xia. Automated proving and discoveringinequalities. Science Press, Beijing, 2008.

    [27] L. Yang and B. Xia. Real solution classifications of a classof parametric semi-algebraic systems. In A3L05, pages281289, 2005.

    194