Structures of precision losses in computing approximate Gröbner bases

Structures of precision losses in computing approximate Gröbner bases

Journal of Symbolic Computation 53 (2013) 81–95 Contents lists available at SciVerse ScienceDirect Journal of Symbolic Computation www.elsevier.com/...

261KB Sizes 0 Downloads 24 Views

Journal of Symbolic Computation 53 (2013) 81–95

Contents lists available at SciVerse ScienceDirect

Journal of Symbolic Computation www.elsevier.com/locate/jsc

Structures of precision losses in computing approximate Gröbner bases Ye Liang a,b,c a

LMIB, School of Mathematics and Systems Sciences, Beihang University, 37 Xueyuan Road, Haidian District, 100191 Beijing, China b INRIA, Paris-Rocquencourt Center, SALSA Project, UPMC, Univ Paris 06, LIP6, CNRS, UMR 7606, LIP6, UFR Ingénierie 919, LIP6, Case 169, 4, Place Jussieu, F-75252 Paris, France c KLMM, Institute of Systems Science, Academy of Mathematics and System Science, Chinese Academy of Sciences, 55 Zhongguancun East Road, Haidian District, 100190 Beijing, China

a r t i c l e

i n f o

Article history: Received 23 October 2012 Accepted 12 December 2012 Available online 20 December 2012 Keywords: Gröbner basis Approximate Floating-point Precision loss PL-space

a b s t r a c t In computing approximate Gröbner bases, it is not easy to trace precision losses of floating-point coefficients of intermediate approximate polynomials. The measured precision losses are usually much larger than their genuine values. One reason causing this phenomenon is that most existing methods for tracing precision losses do not consider the dependence of such precision losses in any polynomial (as an equation). In this paper, we define an algebraic structure called PL-space (precision loss space) for a polynomial (as an equation) and set up a theory for it. We prove that any PL-space has a finite weak basis and a strong basis and show how they effect on tracing precision losses by an example. Based on the study of minimal strong bases, we propose the concept of dependence number which reveals the complexity of the dependence of precision losses in a polynomial. © 2012 Elsevier B.V. All rights reserved.

1. Introduction

Tracing precision losses is a basic operation in the computation of approximate Gröbner bases. It not only gives precisions of the resulting polynomials but also plays an important role in recognizing zero coefficients and zero polynomials during the computation. However, existing methods usually lead to much larger measurements of precision losses than their genuine values. This implies that

E-mail address: [email protected]. 0747-7171/$ – see front matter © 2012 Elsevier B.V. All rights reserved. http://dx.doi.org/10.1016/j.jsc.2012.12.001

82

Y. Liang / Journal of Symbolic Computation 53 (2013) 81–95

these precision losses may behave in a manner that was still unclear, and thus motivates us to study the structure of them in this paper. There are two kinds of precision losses: For general systems, the precision losses mainly come from rounding errors, i.e., from the right sides (the sides of the last bits) of floating-point numbers. These errors accumulate slowly but occur almost in every arithmetic operation. Generally, the precision losses cannot prevent us from recognizing zero correctly. The other kind of precision losses can be very large and usually occur suddenly. They come from additions or subtractions between approximately equal floating-point numbers in absolute value, i.e., from the left sides (the sides of the first nonzero bits) of floating-point numbers. These precision losses are more dangerous than that caused by rounding errors, especially for systems near discontinuities (Faugère and Liang, 2011). Hence, we only focus our attention on the second kind of precision losses and ignore rounding errors (cf. Assumption 4.1). The main idea of this paper is as follows. We note that a polynomial f in an ideal I is an equation in fact, and thus all α f (α ∈ R \ {0}) are equivalent to each other. For an approximate polynomial ˜f of f with floating-point coefficients, we can view any of its coefficients to be exact and the others to be inexact. It means that the same ˜f can be viewed as an approximation of α f for different α ’s. In other words, the precision losses of the coefficients in ˜f are dependent. Studying this phenomenon can help trace precision losses. For this, we give a concept called τ -representation of a polynomial (cf. Definition 2.3). Each polynomial τ -representation carries certain precision loss information of the coefficients. For a polynomial f and its approximation ˜f , after simplifying the τ -representations as tuples, we give a notion called PL-space (precision loss space, cf. Definition 5.4) which combines all the precision loss information carried by the elements in it. By considering a weak basis (cf. Definition 5.6) of a PL-space, we can obtain better evaluations of precision losses of the coefficients than what can be read directly from the generators. Based on the above observation and analysis, we set up a theory for the structure of precision losses. After three sections’ preparation about zero recognition and τ -representations (forms of reals or polynomials with precision losses), we give the definition of “PL-space”. We prove that any PLspace has a finite weak basis which contains all the minimal elements (tuple version polynomial τ -representations) in the PL-space. From a weak basis, we can extract a minimal strong basis whose cardinality (called dependence number) reveals the complexity of the dependence of precision losses in a polynomial. There are several attempts to trace precision losses and recognize zeros. Shirayanagi, Sweedler and others (Alefeld and Herzberger, 1983; Shirayanagi and Sweedler, 1995; Shirayanagi and Sweedler, 1998; Shirayanagi and Sekigawa, 2009) utilized an interval method in their work on approximate algebraic computations including approximate Gröbner bases. In this method, an interval [˜c − e , c˜ + e ] (e  0) is used to represent any coefficient c of polynomials arising in the computation of approximate Gröbner bases such that c ∈ [˜c − e , c˜ + e ]. Besides, c is recognized as zero if and only if |˜c |  e. The advantage of this method is that the evaluations of the bounds of coefficients are exact. However, it does not distinguish between zero and unreliable results. Traverso and Zanoni (2002) provided the “double-float arithmetic”. They used two floating-point numbers with different lengths to approximate any coefficient of polynomials. Hence, each arithmetic operation must be performed twice – one for longer floats and the other for shorter floats. By comparing the two approximations of the same number, they could recognize the number as zero or determine its precision. This idea was also developed in Abbott (2012). Kako and Sasaki (1997, 2007, 2008) made some efforts on the study of precision losses in computing approximate Gröbner bases. They proposed the so-called “efloat” arithmetic to trace the accuracies of floating-point numbers. This idea is similar to the interval method. The difference is that in efloat arithmetic an approximation of the parameter e is used for each interval instead of its exact bound. Bodrato and Zanoni (2006) introduced a method to recognize zeros by using syzygies and interval arithmetic. To check whether a coefficient of a polynomial is zero or not, they had to solve “a quadratic optimization problem with quadratic restrictions” which could make the floating-point computation very time-consuming. The rest contents of this paper is structured as follows. In Section 2, we introduce the definitions of τ -representations for nonzero real numbers and nonzero polynomials with real coefficients. In

Y. Liang / Journal of Symbolic Computation 53 (2013) 81–95

83

Section 3, a strategy for recognizing zeros is stated as Assumption 3.1. Section 4 is devoted to giving reasonable arithmetic between two τ -representations of nonzero reals. We set up a theory of PL-space in Section 5, study dependence number in Section 6 and give an example to show the effectiveness of the PL-space theory in Section 7. Finally, we conclude this paper and state our future work in Section 8. 2.

τ -Representations

The goal of this section is to introduce basic notions and notations needed in this paper. Let X be a variable set {x1 , . . . , xn }, R the real number field, R[ X ] the polynomial ring over R, T X the set of terms (1 or products of variables) in X , and T( f ) ⊂ T X the set of terms with nonzero coefficients in f ∈ R[ X ]. Denote by FRl the set of floating-point real numbers whose significands have l binary bits. Then we can see that 0 ∈ / FRl and any a ∈ R \ {0} can be rewritten as v × 2m where 1  | v | < 2 and m = log2 (|a|) ∈ Z. Denote m by ilog2(a) (cf. function ilog2 in Maple15). Especially, ˆ . We define τ -representations of nonzero real set ilog2(∞) := ∞. Denote the set Z ∪ {−∞} by Z numbers and nonzero polynomials below. They are used to carry precision loss information during the computation of approximate Gröbner bases. Definition 2.1 (τ -Representations of reals). Given a ∈ R \ {0} and a˜ ∈ FRl , we say that a formal expression ˆ ∩ [l − ilog2(|a|/|a − a˜ |), +∞), and call τ A the τ -part a˜ τ A is a τ -representation of a if aa˜ > 0 and A ∈ Z of a˜ τ A and A the exponent of τ in a˜ τ A . In the above definition, τ is not a variable but a symbol; A is an upper bound of the precision loss ˆ by FTl . of a˜ w.r.t. a; τ A can be viewed as a representation of a/˜a. Denote the set {˜aτ A : a˜ ∈ FRl , A ∈ Z} Viewing FRl as {˜aτ −∞ : a˜ ∈ FRl }, we have that FRl ⊂ FTl . Note that when two nonzero real numbers a1 and a2 have the same τ -representation in FTl , a1 and a2 are not necessarily equal according to Definition 2.1. However, if the quality of zero recognition (cf. Assumption 3.1) is guaranteed, then we can still infer that a1 − a2 is zero when a1 and a2 share the same τ -representation in FTl . Example 2.2. (1) If a = a˜ = (0.110010010000111111)2 × 22 = 3.1415863037109375 ∈ FR18 ⊂ R then a˜ τ −∞ is a τ representation of a and means that a˜ and a have not only the same first 18 binary bits, but also infinitely many bits after that, though a˜ has only 18 bits. (2) If a = π = (0.110010010000111111 · · ·)2 × 22 and a˜ = (0.110010010000111010)2 × 22 ∈ FR18 then pick A := 18 − ilog2(|a|/|a − a˜ |) = 18 − 15 = 3. Hence, a˜ τ 3 is a τ -representation of π . Note that the last three bits of a˜ are not reliable. (3) If a = π = (0.110010010000111111 · · ·)2 × 22 and a˜ = (0.111111110000000000)2 × 25 ∈ FR18 , then we can pick A := 18 − ilog2(|a|/|a − a˜ |) = 18 − (−4) = 22. Thus, a˜ τ 22 is a τ -representation of π . In this case, no binary bits of a˜ are reliable. We define a

τ -representation of a nonzero polynomial below.

Definition 2.3 (τ -Representations of polynomials). Given a nonzero polynomial f := a1 t 1 + · · · + as t s ∈ R[ X ], if each ai = 0 (i = 1, . . . , s) and has a τ -representation a˜ i τ A i , then we say that f τ := a˜ 1 τ A 1 t 1 + · · · + a˜ s τ A s t s is a τ -representation of f w.r.t. ˜f := a˜ 1 t 1 + · · · + a˜ s t s . Especially, if A 1 = · · · = A s = −∞, then we can denote f τ also by f . Besides, we give a relation “” between two fixed approximation ˜f .

τ -representations of a nonzero polynomial f w.r.t. a

Definition 2.4. Suppose f τ 1 := a˜ 1 τ A 1,1 t 1 + · · · + a˜ s τ A 1,s t s and f τ 2 := a˜ 1 τ A 2,1 t 1 + · · · + a˜ s τ A 2,s t s are two τ -representations of a polynomial f ∈ R[ X ] \ {0}, where t 1 , . . . , t s are different terms in T X . If

84

Y. Liang / Journal of Symbolic Computation 53 (2013) 81–95

A 2,i  A 1,i for every i = 1, . . . , s then we say that f τ 2 is looser than f τ 1 and denote this relation by fτ 2  fτ 1. 3. Recognizing zeros The goal of this section is to give a strategy to recognize zero results of floating-point arithmetic operations. If all the coefficients of a polynomial are recognized as zeros, then this polynomial is recognized as a zero polynomial. As introduced in Section 1, zero recognition is an important issue. It is crucial in computing approximate Gröbner bases. When the leading coefficient of a polynomial is incorrectly recognized as zero or a nonzero number, the procedure will yield a totally wrong result (usually only {1} as the output Gröbner basis). Since multiplication or division of two nonzero reals cannot yield zero, even if the result is very small, we only need to focus our attention on additions and subtractions of floating-point numbers in FRl . Assumption 3.1 (Zero recognition). Let l be a positive integer indicating the chosen length of binary floating-point numbers, L < l be a positive integer as a relative threshold for detecting zero. Suppose a˜ 1 τ A 1 , a˜ 2 τ A 2 ∈ FTl ( A 1 , A 2 < l − 3) are two τ -representations of a1 , a2 ∈ R \ {0}, respectively. When we compute a˜ 1 τ A 1 + a˜ 2 τ A 2 with a˜ 1 a˜ 2 < 0 or a˜ 1 τ A 1 − a˜ 2 τ A 2 with a˜ 1 a˜ 2 > 0 (the other two cases are directly said to be nonzero), if

A∗ < l − 3 where A ∗ := max( A 1 + ilog2(|˜a1 |/|˜a1 ± a˜ 2 |), A 2 + ilog2(|˜a2 |/|˜a1 ± a˜ 2 |)), then a˜ 1 τ A 1 ± a˜ 2 τ A 2 is decided as being nonzero; else if

min( K 1 , K 2 ) > L where K 1 := l − max( A 1 , A 2 ) and K 2 := ilog2(max(|˜a1 |, |˜a2 |)/|˜a1 ± a˜ 2 |), then we assume that a˜ 1 τ A 1 ± a˜ 2 τ A 2 := 0; else a˜ 1 τ A 1 ± a˜ 2 τ A 2 is said to be undecidable. In Assumption 3.1, the integer l is the length of floating-point numbers. We have discussed how to select a suitable length of floats for a family of polynomial systems in Liang (2013). However, this does not mean that the selected length is suitable for all the arithmetic operations arising in computing approximate Gröbner basis of every system in the family, especially when the system is close to a certain discontinuity (Faugère and Liang, 2011). Hence, we must check step by step whether our computation is correct or not. Once a result is decided to be nonzero by Assumption 3.1, it should have a τ -representation. That is how A ∗ and −3 come to the condition for nonzero results (cf. the proof of Proposition 4.2). The positive integer L is a relative threshold to distinguish between zero results and undecidable cases. A large enough L can help guarantee the quality of zero recognition. Compared with Assumption 3.1, existing strategies such as that in Shirayanagi (1996) mix zero results and undecidable cases and assume that they all equal to zero. This is an important reason that leads to the failure of these strategies. The undecidability here is caused by an inadequate length l of floating-point numbers or an unnecessarily large L. If we find that the computation is undecidable, then we can increase l or change the process of computation. But decreasing L is not a good choice in general. If the computation is decidable and is decided as being nonzero, it is necessary to give a τ representation of the resulting nonzero real number. In the next section, we will give relevant arithmetic operations. At the end of this section, we give some examples. Example 3.2. Pick l := 10 and L := 4.

Y. Liang / Journal of Symbolic Computation 53 (2013) 81–95

85

(1) If a˜ 1 τ A 1 := (0.1011011100)2 τ 4 and a˜ 2 τ A 2 := (0.1001101110)2 τ 3 , then a˜ 1 τ A 1 − a˜ 2 τ A 2 is decidable and nonzero, since A ∗ = 6 < l − 3 = 7. (2) If a˜ 1 τ A 1 := (0.1011011100)2 τ 4 and a˜ 2 τ A 2 := (0.1011010110)2 τ 3 , then a˜ 1 τ A 1 − a˜ 2 τ A 2 is recognized as 0, since A ∗ = 10 > l − 3 = 7 and min( K 1 , K 2 ) = min(6, 6) = 6 > L. (3) If a˜ 1 τ A 1 := (0.1011011100)2 τ 6 and a˜ 2 τ A 2 := (0.1001101110)2 τ 3 , then a˜ 1 τ A 1 − a˜ 2 τ A 2 is undecidable, since A ∗ = 8 > l − 3 = 7 and min( K 1 , K 2 ) = min(4, 2) = 4  L. 4. Arithmetic operations of τ -representations of reals In this section, we study the arithmetic operations in FTl and conclude the results as Assumption 4.3. The values of basic arithmetic operations between two floating-point numbers a˜ 1 , a˜ 2 ∈ FRl are a˜ 1 + a˜ 2 , a˜ 1 − a˜ 2 , a˜ 1 a˜ 2 and a˜ 1 /˜a2 . However, these values may not belong to FRl any more. For several l’s, the IEEE754 standard provides some modes to deal with this problem and views neighbor floats in FRl of these values as the results of corresponding arithmetic operations. Thus, rounding errors arise. The precision losses caused by rounding errors are usually small compared with those caused by error transference or subtractions between two approximately equal floating-point numbers. In the rest sections of this paper, we ignore these rounding errors, i.e., view the neighbor floats mentioned above as the exact values of the four basic arithmetic operations and still denote them by a˜ 1 + a˜ 2 , a˜ 1 − a˜ 2 , a˜ 1 a˜ 2 and a˜ 1 /˜a2 . This assumption is explicitly stated as follows. Assumption 4.1. Each basic arithmetic operation in FRl is assumed to be exact. Note that exact computation does not mean that there is no precision loss. For example, given

(0.10111)2 , (0.10100)2 ∈ FR5 , we can see that (0.11000)2 × 2−3 = (0.10111)2 − (0.10100)2 loses 3 binary bits, though there is no rounding errors in this computation. With Assumption 4.1, we have the following claims.

Proposition 4.2. Suppose that a˜ 1 τ A 1 , a˜ 2 τ A 2 ∈ FTl represent a1 , a2 ∈ R \ {0}, respectively. If A 1 , A 2  l − 3, then the following statements hold. (1) Let A be the minimal integer or −∞ such that (˜a1 a˜ 2 )τ A (or (˜a1 /˜a2 )τ A ) represents a1 a2 (or a1 /a2 ). Then, A  max( A 1 , A 2 ) + 2. (2) Suppose a˜ 1 τ A 1 ± a˜ 2 τ A 2 is nonzero according to Assumption 3.1. Let A be the minimal integer or −∞ such that (˜a1 ± a˜ 2 )τ A represents a1 ± a2 . Then, A  A ∗ + 3, where











A ∗ = max A 1 + ilog2 |˜a1 |/|˜a1 ± a˜ 2 | , A 2 + ilog2 |˜a2 |/|˜a1 ± a˜ 2 | . Proof. For i ∈ {1, 2}, denote a˜ i /ai − 1 by θi . By Definition 2.1, we can deduce that A i  l − log2 (1/|θi |) = l + log2 (|θi |)  l + log2 (|θi |). Considering the hypothesis A 1 , A 2  l − 3, we have |θi |  2 A i −l  1/8. (1) It is easy to see that E := (˜a1 a˜ 2 )/(a1 a2 ) − 1 = θ1 + θ2 + θ1 θ2 . Then, we have

| E |  |θ1 | + |θ2 | + |θ1 | · |θ2 | < 3 × 2max( A 1 −l, A 2 −l) . Therefore, A = l − ilog2(1/| E |) = l + log2 | E |  max( A 1 , A 2 ) + 2. Similarly, note that P := (˜a1 /˜a2 )/(a1 /a2 ) − 1 = (θ1 − θ2 )/(1 + θ2 ). We can obtain that

|P | 

|θ1 | + |θ2 | 8  · 2 · 2max( A 1 −l, A 2 −l) < 3 · 2max( A 1 , A 2 )−l . 1 − 1 /8 7

Therefore, A = l − ilog2(1/| P |)  max( A 1 , A 2 ) + 2. (2) Without loss of generality, we only prove the case of “+”. Recall that |θi |  2 A i −l  1/8. Consequently, 1/|1 + θi |  1/(1 − 1/8) = 8/7. Since a˜ 1 τ A 1 + a˜ 2 τ A 2 is nonzero according to Assumption 3.1,

86

Y. Liang / Journal of Symbolic Computation 53 (2013) 81–95

we know that a˜ 1 + a˜ 2 = 0. Let T := (a1 + a2 )/(˜a1 + a˜ 2 ) − 1. We have

T=

θ1 θ2 a˜ 1 (1 − 1+θ ) + a˜ 2 (1 − 1+θ ) 1

2

a˜ 1 + a˜ 2

Therefore, writing





B := max A 1 − l + log2

−1=−

θ1 a˜ 1 1+θ

1

a˜ 1 + a˜ 2



θ2 a˜ 2 1+θ

2

a˜ 1 + a˜ 2

.

   |˜a1 | |˜a2 | , A 2 − l + log2 , |˜a1 + a˜ 2 | |˜a1 + a˜ 2 |

we get | T |  2 · 87 · 2 B . By Assumption 3.1, we see that B  −3. Hence, we get | T |  2/7. Now, let T := (˜a1 + a˜ 2 )/(a1 + a2 ) − 1. It is easy to see that T = − T /(1 + T ). Hence,

  T  

|T | 1 − 2 /7



7 5

·2·

8 7

· 2 B < 2 B +2 .

Therefore, ilog2(1/| T |) = − log2 (| T |)  −2 − B  = −2 − B  −3 + l − A ∗ , i.e., A  A ∗ + 3.

2

Based on Proposition 4.2, we define the arithmetic operations in FTl as follows. Assumption 4.3 (Arithmetic in FTl ). Suppose that a˜ 1 τ A 1 , a˜ 2 τ A 2 ∈ FTl ( A 1 , A 2  l − 3) represent a1 , a2 ∈ R \ {0}, respectively. Then we define the arithmetic operations between a˜ 1 τ A 1 and a˜ 2 τ A 2 below. (1) a˜ 1 τ A 1 × a˜ 2 τ A 2 := (˜a1 a˜ 2 )τ A and (˜a1 τ A 1 )/(˜a2 τ A 2 ) := (˜a1 /˜a2 )τ A represent a1 a2 and a1 /a2 , respectively, where A = max( A 1 , A 2 ). A2 3.1, then a˜ 1 τ A 1 ± a˜√ := (˜a1 ± a˜ 2 )τ A (2) If a˜ 1 τ A 1 ± a˜ 2 τ A 2 is nonzero according to Assumption 2τ √ represents a1 ± a2 , where A = max( A 1 + ilog2( 2|˜a1 |/|˜a1 ± a˜ 2 |), A 2 + ilog2( 2|˜a2 |/|˜a1 ± a˜ 2 |)). In the proof of claim (1) in Proposition 4.2, when | A 1 − A 2 | is large enough, generally, we have that A = max( A 1 , A 2 ). That is why we give (1) in Assumption 4.3 as the simplification of (1) in Proposition 4.2. For the expression of A in (2) of the above assumption, we have paid special attention on the following cases which often arise in computing Gröbner bases: a1 + a2 with a1 a2 > 0 ∧ (|a1 |  |a2 | ∨ |a1 |  |a2 |) and a1 − a2 with a1 a2 < 0 ∧ (|a1 |  |a2 | ∨ |a1 |  |a2 |). Note that in each case the result a1 ± a2 is almost the larger one of the two summands in absolute value. Usually, the precision loss of the approximate result a˜ 1 ± a˜ 2 is also the same to the larger summand. However, the larger one of ilog2(|˜a1 |/|˜a1 ± a˜ 2 |) and ilog2(|˜a2 |/|˜a1 ± a˜ 2 |) is −1. So, we should make a modification of them such that the larger one of their modified versions equals zero. A simple way to realize this is to replace them by log2 (|˜a1 |/|˜a1 ± a˜ 2 |) + 1/2 and log2 (|˜a2 |/|˜a1 ± a˜ 2 |) + 1/2, respectively, where · is the floor function. For convenience, we can also deal with the “ilog2” parts in Assumption 3.1 in the same way. Example 4.4. If a˜ τ A represents a ∈ R \ {0}, then 1τ A represents both a/˜a and a˜ /a according to claim (1) of Assumption 4.3 by considering that a˜ τ −∞ represents a˜ . Then, for another b ∈ R \ {0} which is represented by b˜ τ B , we have that b˜ τ max( A , B ) represents (˜a/a)b. 5. Precision loss spaces In this section, we study how to evaluate precision losses of coefficients for polynomial equations. Based on the arithmetic operations in FTl in the last section, a natural idea to trace precision losses is to compute a τ -representation of the nonzero result of any algebraic computation of polynomials. Repeating this process, we can find a τ -representation of every polynomial in the final Gröbner basis at last. This idea does work for some systems, but sometimes, when we deal with near-singular systems, the precision losses measured by the τ -representations of polynomials in the Gröbner basis may become unnecessarily large.

Y. Liang / Journal of Symbolic Computation 53 (2013) 81–95

87

This is caused (at least partially) by the fact that a precision loss of one coefficient can transfer to another coefficient in the same approximate polynomial. We call this phenomenon “dependence of precision losses”. Note that a polynomial f (as an equation) in an ideal I is equivalent to any of its nonzero scalar multiple. Hence, for an approximation ˜f of f , the precision losses of its coefficients are dependent. Namely, we can always consider that one coefficient of ˜f is exact (without loss of precision); however, we must accept at the same time that other coefficients of this polynomial may lose more (sometimes less) precisions. That is to say, ˜f can be viewed as an approximation of different polynomials in the form of α f where α ∈ R \ {0}. Hence, in contrast to τ -representations of reals, a polynomial equation is related to many τ -representations which carry different “local” dependence information of precision losses of the polynomial. These τ -representations perform differently in algebraic computations. If we utilize only one τ -representation of a polynomial in tracing precision losses, other information of dependence of precision losses will be ignored, and therefore the evaluations of precision losses of the coefficients of polynomials in the final approximate Gröbner basis may become unnecessarily large. For a polynomial (as an equation) arising during the computation of approximate Gröbner bases, to make the evaluations of precision losses more precise, we should utilize the information of its τ representations as much as possible. Based on this basic idea, we provide the notion called “precision loss space” (cf. Definition 5.4). Before that, we need some simplification of notations. For a given polynomial f := a1 t 1 + · · · + as t s and a given approximation ˜f := a˜ 1 t 1 + · · · + a˜ s t s , we can simplify the notation of a τ -representation f τ := a˜ 1 τ A 1 t 1 + · · · + a˜ s τ A s t s of a certain α f (α ∈ R \ {0}) as an s-tuple ( A 1 , . . . , A s ) ∈ Zˆ s . Denote the i-th component of a tuple u ∈ Zˆ s by u [i ]. If two s-tuples ( A 1 , . . . , A s ) and ( A 1 , . . . , A s ) are associated to the same α f , then (min( A 1 , A 1 ), . . . , min( A s , A s )) also corresponds

ˆ s , the value of corresponding α to a τ -representation of α f . But in general, for an s-tuple u ∈ Z cannot be definitely known. However, if there exists a k ∈ {1, . . . , s} such that A k = −∞, then α can be fixed. Now, we produce such s-tuples from any s-tuple u: For an integer i ∈ {1, . . . , s}, we define ϑ(u , i ) := ( A 1 , . . . , A s ) where A i := −∞ and A j := max(u [i ], u [ j ]) ( j = i). Then ϑ(u , i ) corresponds to

a τ -representation of (˜ai /ai ) f (cf. Example 4.4) so that we can view the i-th coefficient a˜ i of ˜f as an exact coefficient of (˜ai /ai ) f .

ˆ s . If there exists a positive integer Definition 5.1 (Comparable set). Let H be a non-empty subset of Z 1  k  s such that for every h ∈ H , h[k] = −∞ then we say that H is k-comparable. If H is a k-comparable set, then all the s-tuples in H represent the same nonzero scalar multiple ˆ s , we denote by CPks (U ) the set of all k-comparable sets contained in U . When U is of f . For U ⊂ Z

ˆ s , we simply write CPks (U ) as CPks . It is easy to see that CPks (U ) = { V ∩ U : V ∈ CPks }. For a picked as Z k-comparable set H , we denote by inf ( H ) the s-tuple ( A ∗1 , . . . , A ∗s ), where A ∗i := inf{h[i ]: h ∈ H } for every i = 1, . . . , s. ˆ s . Then: Proposition 5.2. Let u, v and w be three arbitrary tuples in Z • • • • •

If u  v and v  w then u  w. There exists an integer i ∈ {1, . . . , s} such that u  ϑ(u , i ). If u  v then ϑ(u , i )  ϑ( v , i ) for any i = 1, . . . , s. ϑ(ϑ(u , i ), j )  ϑ(u , j ) for every i , j = 1, . . . , s. If u  v and v  u then u = v.

Proof. The first, the third and the fourth properties are obvious. By taking i such that u [i ] = min{u [k]: k = 1, . . . , s}, we can prove the second property. 2

ˆ s. Corollary 5.3. The relation  is a partial order on Z Now, we come to the kernel concept of this paper.

88

Y. Liang / Journal of Symbolic Computation 53 (2013) 81–95

ˆ s satisfies Definition 5.4 (Precision loss space). If a non-empty subset ℘ of Z (1) u ∈ ℘ , v  u ⇒ v ∈ ℘ ; (2) u ∈ ℘ ⇒ ϑ(u , i ) ∈ ℘, ∀i ∈ {1, . . . , s}; (3) i ∈ {1, . . . , s}, H ∈ CPis (℘) ⇒ inf ( H ) ∈ ℘ ,

ˆ s , we call then we say that ℘ is a precision loss space (or PL-space for short). For any subset F ⊂ Z the smallest PL-space containing F the PL-space generated by F and denote it by  F . To trace precision losses, we need to trace PL-spaces of polynomials during the computation of approximate Gröbner bases. Note that each PL-space contains infinitely many elements. If we can find a finite subset of a PL-space such that it represents the whole PL-space in some reasonable way, then we can find the same kind of representation for the PL-space of the resulting polynomial after operations in finite steps. In the following, we discuss two kinds of bases of PL-spaces.

ˆ k and a set B ⊂ ℘ , if ℘ =  B s := {u ∈ Zˆ k : u  Definition 5.5 (Strong basis). For a PL-space ℘ in Z ϑ(b, i ), b ∈ B , i ∈ {1, . . . , k}}, then we say that B is a strong basis of ℘ or ℘ is strongly generated by B. A strong basis B of a PL-space ℘ can “generate” a “space” ℘ by conditions (1)–(2) in Definition 5.4. Indeed, we have ℘ ⊂ ℘ by Definition 5.4; on the other hand, ℘ =  B s ⊂ ℘ by Definition 5.5. Hence, ℘ = ℘ . In other words, we can imagine that B “generates” ℘ by conditions (1)–(2) in Definition 5.4. Since a strong basis represents the PL-space ℘ without condition (3) which is more complex than the other two conditions, it can reveal some intrinsic properties of ℘ . In the next section, we use it to give a notion called “dependence number” to measure the complexity of ℘ . If we only take the first condition in Definition 5.4, then we get the following notion.

ˆ s , if a subset B of ℘ satisfies that ℘ =  B  w := Definition 5.6 (Weak basis). Given a PL-space ℘ ⊂ Z {u ∈ Zˆ s : u  b, b ∈ B }, then we say that B is a weak basis of ℘ or ℘ is weakly generated by B. ˆ s ,  B  w and  B s do not need to be PL-spaces. Remark 5.7. For an arbitrary set B ⊂ Z ˆ s . Then Proposition 5.8. Let A and B be two non-empty subsets of Z • B ⊂  B  w ⊂  B s ⊂  B . •  B  w  w =  B  w ,  B s s =  B s and  B  =  B . • If A ⊂ B then  A  w ⊂  B  w ,  A s ⊂  B s and  A  ⊂  B . Proof. It is easy to see that B ⊂  B  w and  B s ⊂  B  in the first property. The relation  B  w ⊂  B s can be obtained by using the first and the second claims of Proposition 5.2. The third property can be seen easily from the definitions of  w , s and . For the second claim, we only prove  B s s ⊂  B s . For every u ∈  B s s , there exists a b1 ∈  B s and an i ∈ {1, . . . , s} such that u  ϑ(b1 , i ). In the same way, there exists a b2 ∈ B and a j ∈ {1, . . . , s} such that b1  ϑ(b2 , j ). Thus, u  ϑ(b1 , i )  ϑ(ϑ(b2 , j ), i )  ϑ(b2 , i ). Therefore, u ∈  B s . 2 The reason why we study a weak basis of a PL-space ℘ is that all the information of ℘ that affects the precision losses in the following algebraic computations is exhibited explicitly in its weak basis. To see this clearly, note that if two s-tuples u and v satisfy that u  v, then v can always behave better than u in tracing precision losses. Moreover, we have the following theorem. Theorem 5.9. Any PL-space has a finite weak basis.

Y. Liang / Journal of Symbolic Computation 53 (2013) 81–95

89

ˆ s , we pick a set F of generators of ℘ . (F always exists since it can be Proof. Given a PL-space ℘ ⊂ Z simply chosen as ℘ .) Then we can construct a finite set B ⊂ ℘ from F and prove that it is a weak basis of ℘ . First, we construct such a set B. For every u ∈ F and every i = 1, . . . , s, we have ϑ(u , i ) ∈ ℘ by the second condition of Definition 5.4. Denote {ϑ(u , i ): u ∈ F } by H i . Then H i is an i-comparable set (1) in ℘ . Consequently, u i := inf ( H i ) ∈ ℘ by the third condition of Definition 5.4. Now, we obtain a (1)

finite set F (1) := {u i : i = 1, . . . , s} which can be represented as an s × s matrix A (1) whose rows are (k+1)

inf ( H i ) (see Section 7). Then F ⊂  F (1)  w ⊂ ℘ . Repeat the process u i (k+1)

F (k) , e = 1, . . . , s} and denote by F (k+1) the set of all u i

(k) each F (k) , the corresponding matrix is denoted by A (k) . Note that A i ,i

(k+1)

A i, j

(k)

= −∞ and

  (k) (k)   (k) (k)   (k) (k)  = min max A 1,i , A 1, j , . . . , max A i ,i , A i , j , . . . , max A s,i , A s, j . (k+1)

Thus, we have that A i , j (k)

(k)

:= inf {ϑ(u e , i ): u e ∈ for every i = 1, . . . , s and k ∈ Z+ . For

(k)

(k)

(k)

(k+1)

 A i , j for every i , j = 1, . . . , s and k ∈ Z+ . Moreover, every A i , j (k)



(1)

{ A 1,i , . . . , A s,i , A 1, j , . . . , A s, j } ⊂ · · · ⊂ { A d,e : d, e = 1, . . . , s} and hence has only finitely many possible values. Define an order  between two such matrices U and V such that U  V if and only if U i , j  V i , j for every i , j = 1, . . . , s. Then we can see that the matrix sequence { A (k) }k∞=1 is decreasing ∗ ∗ and has only finitely many possible values. Hence, there exists a k∗ ∈ Z+ such that A (k ) = A (k +1) . ∗ ∗ Pick B as F (k ) , i.e., the set of rows of A (k ) . Then F ⊂  F (1)  w ⊂  F (2)  w ⊂ · · · ⊂  B  w ⊂ ℘ . Next, we prove that  B  w is a PL-space. Conditions (1) and (2) in Definition 5.4 are obviously satisfied. We only check the third one. Note that CPrs ( B  w ) is non-empty for every r ∈ {1, . . . , s} since { B [r ]} ∈ CPrs ( B  w ). For every H ∈ CPrs ( B  w ) and every h ∈ H (⊂  B  w ), we have that h[r ] = −∞ and there exists an s-tuple bh ∈ B such that h  bh . Consequently, bh [r ] = −∞. Thus, {bh : h ∈ H } is an r-comparable set in B. Considering the termination condition in constructing B, we know that there exists a tuple b ∈ B such that inf {bh : h ∈ H }  b. Hence, inf ( H )  inf {bh : h ∈ H }  b, i.e., inf ( H ) ∈  B  w . Namely, the third condition in Definition 5.4 holds. Therefore,  B  w is a PL-space. Finally, we prove that B is a weak basis of ℘ , i.e., ℘ =  B  w . In the construction of B, we have obtained that F ⊂  B  w ⊂ ℘ . It remains to prove ℘ ⊂  B  w . Since  B  w is a PL-space, we have  B  w  =  B  w . Thus, ℘ =  F  ⊂  B  w  =  B  w . Therefore,  B  w = ℘ and B is a weak basis of ℘ . 2 Remark 5.10. For the weak basis B constructed in the proof of Theorem 5.9, we have bl = ∗ ∗ ∗ inf {ϑ(br , l), r = 1, . . . , s} where bl is the l-th row of A (k ) since A (k ) = A (k +1) . Then, b i [ j ] = inf {ϑ(br , i )[ j ], r = 1, . . . , s} = min{max(br [i ], br [ j ]), r = 1, . . . , s} = b j [i ] for every i , j ∈ {1, . . . , s} ∗ with i = j. It means that the matrix A (k ) is symmetric.

ˆ s , the PL-space u  has a finite weak basis consisting of ϑ(u , 1), . . . , ϑ(u , s). Corollary 5.11. For a tuple u ∈ Z Proof. It is easy to see that F (1) = {ϑ(u , i ): i = 1, . . . , s} (cf. Theorem 5.9 for the notations). We only (1) (1) (2) (1) need to prove F (1) = F (2) . Note that A i ,i = −∞, A i , j = max{u [i ], u [ j ]} with i = j and A i , j  A i , j (2)

 u (i 1) where u (i 2) := inf {ϑ(uk(1) , i ): uk(1) ∈ (1) F (1) , k = 1, . . . , s}. Indeed, the i-th component of every ϑ(uk , i ) is −∞ and the j-th ( j = i) com(1) (1) (2) (1) ponent is max{ A k,i , A k, j } = max{u [i ], u [ j ], u [k]}. Hence, A i , j  A i , j for every i = 1, . . . , s and every j = 1, . . . , s. Therefore, F (1) = F (2) . 2

for every i = 1, . . . , s and every j = 1, . . . , s. Besides, u i

Remark 5.12. Corollary 5.11 will be useful to construct the PL-space of every polynomial at the beginning of the approximate computation of Gröbner bases, no matter whether the coefficients of the input polynomials are exact or not. Selecting only one τ -representation to generate a PL-space means that we assume the precision losses of the coefficients of ˜f come independently. Without this

90

Y. Liang / Journal of Symbolic Computation 53 (2013) 81–95

independency assumption, when the coefficients of f can be known exactly, we can construct a PLspace of f as follows: Pick a real number αi := a˜ i /ai such that αi f and ˜f have the same coefficient a˜ i of a term t i ∈ T( f ). Consider αi f as an exact polynomial corresponding to ˜f and compute each A i , j ( j = 1, . . . , s) by Definition 2.1. In this way, we can get a set F consisting of s s-tuples. In fact, F is almost a weak basis of  F . At last, the proof of Theorem 5.9 can help work out a weak basis of the PL-space generated by F . Corollary 5.13. Any PL-space has a finite strong basis. Proof. Note that each weak basis is also a strong basis of the same PL-space.

2

Usually, a strong basis contains much less elements than a weak basis for the s is large. For example, in Corollary 5.11, there exists a k ∈ {1, . . . , s} (given by of Proposition 5.2 and its proof) such that {ϑ(u , k)} forms a strong basis of the a natural question may be asked: Does there always exist a strong basis that element for every PL-space? The answer is “NO”. We give an example below.

same PL-space when the second property PL-space u . Hence, consists of only one

Example 5.14. Specify four s-tuples b1 := (−∞, 5, 9, 9), b2 := (5, −∞, 9, 9), b3 := (9, 9, −∞, 7) and b4 := (9, 9, 7, −∞). It is easy to see that {b1 , b3 }, {b1 , b4 }, {b2 , b3 } and {b2 , b4 } are all strong bases of the PL-space ℘ generated by {b1 , b2 , b3 , b4 }. We claim without proof that there exists no strong basis of ℘ consisting of only one element. The reason of this phenomenon is that the precision losses of the polynomial are locally dependent. Let f := a1 t 1 + a2 t 2 + a3 t 3 + a4 t 4 with a1 = ub1 , a2 = ub2 , where u is a nonzero real number. If b˜ 1 and b˜ 2 lose 5 bits, a˜ 3 and a˜ 4 lose 7 bits and u˜ loses 9 bits, then we get a case for Example 5.14. 6. Dependence numbers In this section, we study the dependence properties in a PL-space ℘ . The kernel concept is “dependence number” (cf. Definition 6.1) which is defined by using strong bases introduced in the last section. We use it to measure the complexity of the dependence of precision losses in ℘ . The notion “minimal strong basis” (cf. Definition 6.3) and Theorem 6.4 give a clear exhibition of the structure of dependence in ℘ . Definition 6.1 (Dependence number). Let ℘ be a PL-space. We define the dependence number of ℘ as

Dpn(℘) :=

min{#B:  B s = ℘}, 0,

ˆ s; when ℘ = Z

ˆ s. when ℘ = Z

ˆ s if and only if the s-tuple (−∞, . . . , −∞) belongs to ℘ . In CorolIn the above definition, ℘ = Z lary 5.11, the corresponding dependence number is 1. In Example 5.14, Dpn(℘) = 2. The following proposition comes naturally. Proposition 6.2. For any PL-space ℘ , Dpn(℘) is finite. Proof. It is obvious by Corollary 5.13.

2

Generally, we can find an upper bound of dependence number for every PL-space (cf. Theorem 6.6). To prove this fact, we introduce the concept “minimal strong basis” and its properties. Definition 6.3 (Minimal strong basis). Specify a PL-space ℘ and a strong basis B of ℘ . If no proper subset of B forms a strong basis of ℘ , then we say that B is a minimal strong basis of ℘ .

Y. Liang / Journal of Symbolic Computation 53 (2013) 81–95

91

Example 5.14 shows that the minimal strong basis is generally not unique for a given PL-space. However, we can use the following theorem to find Dpn(℘).

ˆ s be a PL-space. Then a strong basis B of ℘ is minimal iff #B = 1 when ℘ = Zˆ s or Theorem 6.4. Let ℘ ⊂ Z #B = Dpn(℘) otherwise. ˆ s is trivial. Hence, suppose that ℘ = Zˆ s . Proof. The case ℘ = Z “⇐” Otherwise, there exists a proper subset B ⊂ B such that B is a strong basis of ℘ . Then Dpn(℘)  #B < #B by Definition 6.1, which is a contradiction. “⇒” By Definition 6.1, there exists a strong basis B

such that #B

= Dpn(℘). Hence, B

is also minimal. For every b1 ∈ B, there exists a b

1 ∈ B

such that b1  ϑ(b

1 , l1 ) for some l1 ∈ {1, . . . , s}. For every b

2 ∈ B

, there also exists a b2 such that b

2  ϑ(b2 , l2 ) for some l2 ∈ {1, . . . , s}. Picking b

2 as b

1 , we know that there exists a b∗1 ∈ B such that b

1  ϑ(b∗1 , l∗1 ) for some l∗1 ∈ {1, . . . , s}. Then, b1  ϑ(b

1 , l1 )  ϑ(ϑ(b∗1 , l∗1 ), l1 )  ϑ(b∗1 , l1 ) by Proposition 5.2. Hence, b1 = b∗1 , since otherwise B \ {b1 } is also a strong basis of ℘ . If we construct two functions α : B → B

, b1 → b

1 and β : B

→ B, b

2 → b2 , then β α = 1 B . For similar reason, we have α β = 1 B

. Therefore, β = α −1 and #B = #B

= Dpn(℘). 2 Corollary 6.5. All minimal strong bases of a PL-space have the same number of elements.

ˆ s , the minimal component of b may not be −∞. However, by For any element b in a set C 1 ⊂ Z Proposition 5.2, there always exists an integer i ∈ {1, . . . , s} such that b  ϑ(b, i ). Replace b by ϑ(b, i ) in C 1 to get another set C 2 . Then C 1 s = C 2 s . Now, consider the proof of Theorem 6.4. If both b1 and b

1 have −∞ as their components, then we have the following observation. Reorder the components of b1 as −∞ = b1 [k1 ]  b1 [k2 ] = · · · = b1 [kd ] < · · ·  b1 [k s ] where (k1 , . . . , k s ) is a permutation of (1, . . . , s). Then b

1 should be in the form of ϑ(b1 , k p ), where p ∈ {1, . . . , d}. Hence, roughly speaking, there is a unique minimal strong basis of a PL-space ℘ , since all the minimal strong bases are equivalent to each other in this sense. With the structure of the dependence of precision losses known, we now give an upper bound of dependence number as follows. ˆ s , we have that Dpn(℘)  s/2, where · is the floor funcTheorem 6.6. Given a PL-space ℘ :=  F  ⊂ Z tion. Proof. When s = 1, we have Dpn(℘) = 0  s/2. For s  2, suppose that B w is a weak basis of ℘ constructed as in the proof of Theorem 5.9 and hence a strong basis by Corollary 5.13. Select a minimal strong basis B s ⊂ B w of ℘ . Let b i := ( A i ,1 , . . . , A i ,s ) be an element of B w such that A i ,i = −∞ for every i = 1, . . . , s. Then B w = {b i : i = 1, . . . , s} (it is possible that b i 1 = b i 2 for some i 1 = i 2 ). For every i = 1, . . . , s, if b i ∈ B s , then there exists a j = i such that A i , j = min{ A i ,k : k = i }. It is easy to see that ϑ(ϑ(b i , j ), i ) = b i . We claim that b i = ϑ(b j , i ). Indeed, bl = inf {ϑ(bk , l): k = 1, . . . , s} for every l = 1, . . . , s by the construction of B w . Thus, ϑ(b j , i )  b i and ϑ(b i , j )  b j . Consequently, / B s or b j = bi . Nevertheless, j is not a b i = ϑ(ϑ(b i , j ), i )  ϑ(b j , i ). Therefore, b i = ϑ(b j , i ). Hence, b j ∈ subscript of any element in B s . Note that all these j’s are different from each other. Otherwise, B s is not minimal (i.e., if b i 1 = ϑ(b j , i 1 ) and b i 2 = ϑ(b j , i 2 ) then ( B s \ {b i 1 , b i 2 }) ∪ {b j } is a strong basis of ℘ ). Therefore, Dpn(℘)  s/2. 2 Remark 6.7. In the proof of Theorem 6.6, we proved b i = ϑ(b j , i ). In fact, we also have b j = ϑ(b i , j ). Indeed, since B s is a minimal strong basis of ℘ , there exist m ∈ {1, . . . , s} and b ∈ B s such that b j  ϑ(b , m). If m = j, then −∞ = b j [ j ]  max(b [m], b [ j ]). Hence, b [m] = b [ j ] = −∞. So, no matter whether m = j or not, we have b j  ϑ(b , j ). Now, we prove b i = b . Recall in the proof of Theorem 6.6 that ϑ(b i , j )  b j and ϑ(ϑ(b i , j ), i ) = b i . Then, b i = ϑ(ϑ(b i , j ), i )  ϑ(ϑ(b , j ), i )  ϑ(b , i ). Since B s is a minimal strong basis of ℘ and b i , b ∈ B s , we have b i = b . Therefore, b j = ϑ(b i , j ). Thus, by exchanging the i-th and j-th components of b i or b j , we can obtain the other.

92

Y. Liang / Journal of Symbolic Computation 53 (2013) 81–95

7. Example To see how the PL-space theory works, we give a simple example. In this example, we use decimal floating-point numbers rather than binary ones as the coefficients of the approximate polynomials. There is no trouble except that we cannot see how the binary bits of coefficients get lost explicitly. Example 7.1. Take the length l of binary floating-point numbers as 30 and the threshold L for recognizing zero in Assumption 3.1 as 10. Specify two polynomials (exact) in R[x].

f := 0.3846166866x4 + 0.3980527045 × 10−5 x3 + 0.5057970851 × 10−5 x2

− 0.2702521049x − 0.1878632362, h := 0.7775256622x4 + 0.3526114762x3 − 0.304075900x2

− 0.3179317660 × 10−5 x − 0.364133629 × 10−5 and q := lc(h) f − lc( f )h. Pick

f τ := 0.3846100000τ 15 x4 + 0.3980527058 × 10−5 τ 2 x3

+ 0.5057954000 × 10−5 τ 12 x2 − 0.2702521165τ 6 x − 0.1878632353τ 3 , hτ := 0.7775256000τ 7 x4 + 0.3526114000τ 8 x3 − 0.304075452τ 11 x2

− 0.3179325460 × 10−5 τ 12 x − 0.3641785422 × 10−5 τ 18 . Replacing all τ -parts by 1 in the coefficients of f τ and hτ , we get the approximate polynomials ˜f ˜ respectively. and h, Weak basis: According to Corollary 5.11, we construct weak bases in matrix forms (each line gives a τ -representation)



−∞

15

−∞

⎜ 15 ⎜ B f w := ⎜ 15 ⎝ 15 15

12 6 3

15 12

−∞ 12 12

15 6 12

−∞ 6

15 3 12 6

−∞



⎟ ⎟ ⎟, ⎠



−∞

⎜ 8 ⎜ B hw := ⎜ 11 ⎝ 12 18

8

−∞ 11 12 18

11 11

−∞ 12 18

12 12 12

−∞ 18

18 18 18 18

⎞ ⎟ ⎟ ⎟ ⎠

−∞

of ℘ f and ℘h , respectively. Then we can get a set of τ -representations of polynomials in Y q := {αq: α ∈ R \ {0}} through all pairs of τ -representations in B f w and B hw . Let M be a matrix each line of which represents a τ -representation of a polynomial in Y q . The pair consisting of the i-th line of B f w and j-th line of B hw corresponds to the (5(i − 1) + j )-th line of M. The entries of M can be assigned by formula (1) in the following context. Thus, the transpose of M is easily computed as



8

0

11 12 18 15 15 15 15 18 15 15

⎜ 11 11 0 12 18 15 15 15 15 18 15 15 M := ⎜ ⎝ 15 15 15 15 18 6 8 11 12 18 12 12 T

15 15 15 15 18 15 15 12 12

15 15 12 12

18 15 18 15 18 −2 18 6

3

8

11 12 18 12 12

15 15 15 18 15 15 15 15 15 15 15 18 15 15 15 15 8 11 12 18 6 8 11 12 8 11 12 18 1 8 11 12



18 18 ⎟ ⎟. 18 ⎠ 18

Now, we explain how to compute M. For instance, the first lines of B f w and B hw corresponds to



f 1τ := ϑ f τ , x4



= 0.3846100000τ −∞ x4 + 0.3980527058 × 10−5 τ 15 x3 + 0.5057954000 × 10−5 τ 15 x2 − 0.2702521165τ 15 x − 0.1878632353τ 15

Y. Liang / Journal of Symbolic Computation 53 (2013) 81–95

93

and



h1τ := ϑ hτ , x4



= 0.7775256000τ −∞ x4 + 0.3526114000τ 8 x3 − 0.304075452τ 11 x2 − 0.3179325460 × 10−5 τ 12 x − 0.3641785422 × 10−5 τ 18 , respectively. Then

q1τ := lc(h1τ ) f 1τ − lc( f 1τ )h1τ

  = 0.3094961689 × 10−5 τ 15 − 0.1356178706τ 8 x3   + 0.3932688719 × 10−5 τ 15 + 0.1169504596τ 11 x2   − 0.2101279390τ 15 − 0.1222800365 × 10−5 τ 12 x   − 0.1460684747τ 15 − 0.1400667091 × 10−5 τ 18

= −0.1356147756τ max{15+k1,1 ,8+k1,2 } x3 + 0.1169543923τ max{15+k2,1 ,11+k2,2 } x2 − 0.2101267162τ max{15+k3,1 ,12+k3,2 } x − 0.1460670740τ max{15+k4,1 ,18+k4,2 } = −0.1356147756τ 8 x3 + 0.1169543923τ 10 x2 − 0.2101267162τ 15 x − 0.1460670740τ 15 , where ku , v (u = 1, 2, 3, 4 and v = 1, 2) are the corresponding “ilog2” parts in Assumption 4.3. These ku , v can be viewed as entries of a matrix K where

 T

K :=

−15 −15 0

0

0 0 −17 −17

 .

Thus, M can be constructed by assigning M 5(i −1)+ j , p −1 as











max max B hw [ j , 1], B f w [i , p ] + k p −1,1 , max B f w [i , 1], B hw [ j , p ] + k p −1,2



(1)

for every i , j = 1, . . . , 5 and p = 2, . . . , 5. The process to compute the matrix representing the weak basis of q according to the proof of Theorem 5.9 is as follows.



−∞

⎜ 11

Q (1) := ⎝

15 15

11

−∞ 15 15

15 15

−∞ 6



15 15 ⎟ ⎠ 6

−∞

and Q (2) = Q (1) . Hence, Q (1) is a weak basis of ℘q , i.e., B qw = Q (1) . If we write this weak basis as a set of τ -representations, it is just the set {˜c 1 τ B qw [i ,1] x3 + c˜ 2 τ B qw [i ,2] x2 + c˜ 3 τ B qw [i ,3] x + c˜ 4 τ B qw [i ,4] : i = 1, . . . , 4}, where c˜ i are floating-point numbers as approximate coefficients of q and can be easily computed by the arithmetic operations between f τ and hτ (e.g. by setting every τ -part to be 1 in q1τ above). To make this process clearer, we take the computation of the first line of Q (1) for an example. View the coefficient of x3 as the exact one in every τ -representation that the lines of M represent. Then we obtain a matrix M ∈ R25×5 with M [i , 1] = −∞ and M [i , j ] = max{ M [i , 1], M [i , j ]} (i = j). Thus, the entry Q (1) [1, j ] is just min{ M [i , j ]: i = 1, . . . , 25} (i.e., the minimum of each column of M ). To show the effectiveness of B qw in tracing precision losses, we compute the matrix Q of pre-

cision losses in binary bits of the coefficients of lc(h˜ ) ˜f − lc( ˜f )h˜ w.r.t. lc(h) f − lc( f )h directly (cf. Remark 5.12 for the details) and show it below.

94

Y. Liang / Journal of Symbolic Computation 53 (2013) 81–95



−∞

⎜ 11

Q := ⎝

15 15

11

−∞ 15 15



15 15

−∞ 6

15 15 ⎟ ⎠. 6

−∞

We can see that B qw and Q are equal (in general, to be approximately equal is enough). Hence, our theory works in tracing precision losses. Strong basis: By deleting the fourth and the second lines of B qw , we get a minimal strong basis of ℘q as follows.



B qs =

−∞ 11 15

15

15 15 −∞ 6



.

Dependence number: Dpn(℘q ) = 2, since there are 2 rows in B qs . 8. Conclusion and future work In this paper, we have presented a theory for the structure of precision losses in computing approximate Gröbner bases. This theory is based on the observation that the precision losses of the coefficients in one approximate polynomial (as an equation) are dependent. Our kernel concept is PL-space. We proved that any PL-space of a polynomial has a finite weak basis which contains the minimal forms of precision losses. We showed by an example that weak bases behave well in tracing precision losses. Besides, we also provided a concept called dependence number to measure the complexity of a PL-space. For the future work, we plan to design effective and efficient algorithms based on PL-space theory to trace precision losses in computing approximate Gröbner bases as well as other algebraic objects. Acknowledgements I would like to thank my co-supervisors Prof. Jean-Charles Faugère and Prof. Dongming Wang and the anonymous referees for their suggestions. Many thanks to my friend Prof. Na Lei in Jilin University for her invitation, hospitality and exciting discussions on lots of things including this study. Especially, I am much obliged and want to show my great respect to one of the two anonymous referees for his many very helpful comments and suggestions on improving the rigor and readability of this paper. At last, I want to thank Miss Jing Yang for careful corrections. This work has been supported partially by the ANR-NSFC Project ANR-09-BLAN-0371-01/ 60911130369 (EXACTA), the SKLSDE Open Fund BUAA-SKLSDE-09KF-01, an NKBRPC 2011CB302400 and the Chinese National Natural Science Foundation under Grants 91118001, 60821002/F02, 60911130369 and 10871194. References Abbott, J., 2012. Twin-float arithmetic. Journal of Symbolic Computation 47 (5), 536–551. Alefeld, G., Herzberger, J., 1983. Introduction to Interval Computations. Computer Science and Applied Mathematics. Academic Press. Bodrato, M., Zanoni, A., 2006. Intervals, syzygies, numerical Gröbner bases: A mixed study. In: Proceedings of CASC 2006. Chisinau, pp. 64–76. Faugère, J.-C., Liang, Y., 2011. Artificial discontinuities of single-parametric Gröbner bases. Journal of Symbolic Computation 46 (4), 459–466. Kako, F., Sasaki, T., 1997. Proposal of “effective” floating-point number. Preprint of Univ. Tsukuba (unpubished). Liang, Y., 2013. Selecting lengths of floats for the computation of approximate Gröbner bases. Journal of Symbolic Computation 53, 40–52. Sasaki, T., Kako, F., 2007. Computing floating-point Gröbner bases stably. In: Proceedings of SNC 2007. ACM Press, New York, pp. 180–189. Sasaki, T., Kako, F., 2008. Floating-point Gröbner basis computation with ill-conditionedness estimation. In: Kapur, D. (Ed.), Proceedings of ASCM 2007. Springer, pp. 278–292. Shirayanagi, K., 1996. Floating point Gröbner bases. In: Selected Papers Presented at the International IMACS Symposium on Symbolic Computation, New Trends and Developments. Elsevier, Amsterdam, pp. 509–528.

Y. Liang / Journal of Symbolic Computation 53 (2013) 81–95

95

Shirayanagi, K., Sekigawa, H., 2009. Reducing exact computations to obtain exact results based on stabilization techniques. In: Proceedings of SNC 2009. ACM Press, Kyoto, pp. 191–197. Shirayanagi, K., Sweedler, M., 1995. A theory of stabilizing algebraic algorithms. Tech. Rep., Mathematical Sciences Institute, Cornell University. Shirayanagi, K., Sweedler, M., 1998. Remarks on automatic algorithm stabilization. Journal of Symbolic Computation 26 (6), 761–765. Traverso, C., Zanoni, A., 2002. Numerical stability and stabilization of Groebner basis computation. In: Proceedings of ISSAC 2002. ACM Press, New York, pp. 262–269.