510 likes | 528 Views
Algebraic numbers I. Based on Burnikel, Fleischer, Mehlhorn, Schirra article: A Strong and Easily Computable Separation Bound for Arithmetic Expressions Involving Radicals. Algorithmica 27: 87-99 (2000). Timeline. Introduction and Definitions. Theorems and it proofs. Applications.
E N D
Algebraic numbers I Based on Burnikel, Fleischer, Mehlhorn, Schirra article: A Strong and Easily Computable Separation Bound for Arithmetic Expressions Involving Radicals. Algorithmica 27: 87-99 (2000)
Timeline • Introduction and Definitions. • Theorems and it proofs. • Applications. • [Expressions involving divisions]. • [More tightresults]. • [Comparison to previous works].
Introduction – The Problem. The evaluation of a test in a computer program frequently amounts to determining the sign of an arithmetic expression, e.g., If p, q, and r are points in the plane, then Determines whether p is at least as close to r as q.
Introduction (cont.) While using finite data types, one is prone to get errors. In The Question: 'Is the expression's value bigger than 0, equal to 0 or less then 0 ?'. Because of precision problems with finite data types the above question may lead to wrong answers if the expression's value is very close to 0.
Definition – Separation bound. Definition: Sep(E) – separation bound of expression E: For an expression Ehaving value ξ = val(E), a separation bound sep(E) is a positive real number with the property that: ξ ≠ 0 → |ξ| ≥ sep(E). Thus, |ξ| < sep(E) →ξ = 0.
Introduction (cont.) A more robust way to ask and answer this question (about the sign of E) is: • Find sep(E). • Compute an approximation A of ξ, with | A - ξ| < sep(E)/2, by evaluating E with float with sufficient mantissa length. • If |A| ≥sep(E)/2 that ξ has the same sign as A. else ξ = 0.
Definitions • E – expression, with value ξ. We can look at E as a directed acyclic graph (dag) whose source nodes are labeled by integers and whose internal nodes are labeled by operators like +, -, *, / and . • E is division-free if it contains no /.
Recursive definition of U(E),L(E). E = U(E)/L(E); U(E),L(E) are division-free.
Definitions • u(E), l(E) – nonnegative real numbers. • The numbers u(E) and l (E) are bounds on the absolute values of U(E) and L(E) respectively, obtained by replacing every subtraction in E by an addition. • Note that u(U(E)) = u(E) and u(L(E)) = l (E) and l (E) = 1, for division-free expressions. • Note that U(E) and L(E) works on DAG, and u(E) and l (E) on integers.
Definition - Algebraic Number. Definition: The number ξ = val(E) is algebraic, i.e., there is a polynomial pєZ(X), such that p(ξ) = 0. Definition: Among the polynomials in Z(X) having root ξ there exists a unique irreducible polynomial mξ, called the minimal polynomial of ξ.
Algebraic Number (cont.) Definition: The degree of ξ, deg(ξ) is the degree of the minimal polynomial of ξ, mξ. Definition: If Einvolves r radical nodes of indices k1, …,kr. Than define: And D(E) ≥ deg(ξ).
Symmetric Functions. Definition: Let p be a polynomial in t1; ..tn; with coefficientsin R, R is a commutative ring with unity. p symmetric if for any permutation π, we have:
Elementary Symmetric functions. Definition: Let elementary symmetric functions (ESF)in t1,…,tn.
THEOREM 1 – Symmetric Function. Let R be a commutative ring with unity. Than for any p, symmetric polynomial in t1, ..tn. with coefficientsin R, there exist a unique polynomial q withcoefficients in R such that:
Proof. By induction on the number n of variables and on the total degree m of p. For n = 1, Suppose for n-1 variables, and prove it by induction on m = deg(ξ). Suppose m ≠ 0 and that for all degrees < m it performs.
Let define: Then by induction on n exist q’ such that: And σ1…σn-1are ESF in t1..tn-1. And deg(q) ≤ m. Define: The total degree of p1 is at most m. Since It follows that tn divides p1 .
Let p2 such that Since p1 is symmetric (by its definition) For all possible permutations. Therefore p1 is divisible by t1,…,tn. So it is divisible by their product (suppose that ti is algebraic independent). Then there exist p3 such that:
Note that deg(p3) = deg(p1) – n ≤ m-n < m. By induction on m exist q3 such that: And finally we get: And we can define q:
THEOREM 2. Let pa and pb, be polynomials with integral coefficients. Then for every operation in {+, - ,*}, the has integral coefficients as well.
Proof. We use the Theorem 1 on the polynomial: it is symmetric in α1,…αnand in β1,…,βm. (By definition of f ). Since f symmetric in β1,…,βm there is a polynomial g such that:
Proof (cont.) And since g is symmetric in α1,…αn, We can apply the theorem once more. We get h such that: We have, by definition of pa and pb and of ESF. By assumption, aiand bj all are integral, so h is a polynomial in X with integral coefficients. Hence f(X) = pAopB(X) has integral coefficients.
THEOREM 3. There exists a polynomial such that For all roots ei of pE(X).
Proof. We use induction on the structure of E. • If E is an integer constant a, then use polynomial pE(X) = X – a. • If E = A op B. op in {+,-.*} Then by induction exist pA(X) and pB(X).
And the roots is val(A) and val(B). Than we define pE(X) = pAopB(X). By Theorem 2, pAopB(X) has int. coefficients, and val(E) = val(A) op val(B) isroot of pAopB(X) by definition. By induction: |α| ≤ u(A) and |β| ≤ u(B). If op={+,-}, than the roots are bounded by: If op=*, Than:
If E = , than we set where ζkis a (complex) primitive k-th root of unity. In this case which concludes the induction step and thus finishes the proof.
THEOREM 4 – Separation Bound. If E is a division-free expression, whose value val(E) = ξ is nonzero, then
Proof. The upper bound is obvious. Let’s proof it for the lower bound. In the last theorem we constructed a polynomial with root val(E) = ξ . Since every integral polynomial having root ξ, is divided by the minimal polynomial Both polynomials have leading coefficient 1, and the roots of , are among the roots of .
And for some indices we have Since it is minimal polynomial all . And bounded by u(E). Without loss of generality . Since have integral coefficients, (And for all polynomials)
Weaker lower bound. Let E be a division-free expression with value ξ ≠ 0. Then: And this happens because D(E) > deg(ξ).
Expressions involving divisions Let E be an expression whose value ξ is nonzero. Than, To prove it, apply the bounds of Theorem 4 on U(E) and L(E). Each radical operation of index kiin Egenerates at most two radical operations of index ki, each of which may appear in U(E) as well as in L(E).
The reason is: And we have And val(E) = val(U(E))/val(L(E)), and u(U(E)) = u(E) and u(L(E)) = l(E).
Cont. And finally we have:
Applications – Find Sign of E. • As above, by finding approximation A. • An error bound ∆ is initialized to some positive value, ∆ = 1. And an find an approximation À of ξ, | ξ - À | ≤ ∆ using float point with arbitrary-length mantissa. if |À|> ∆, the sign of ξ is equal to sign of À else, |À| ≤ ∆ and hence | ξ | ≤ 2∆. if 2∆ ≤ sep(E), we have ξ = 0. else half ∆ and repeat.
Bit bound. The worst case complexity of the alg. is determined by the separation bound. We need log(1/sep(E)) iterations for computation of À. We call log(1/sep(E)) bit bound. If ξ≠0 we need only log(ξ) precisions. And hence “easy sign tests” are much faster than the worst case.
Find Sign of E – Other way. • Compute an interval Iε of length such that 0 < < sep(E) and Iε contains E. If 0 is inside Iε, the value of Eis smaller than sep(E) and hence Eis zero. Otherwise, the sign of Eis equal to the sign of the numbers in Iε .
Actual Computation of Separation Bounds. Theorem 4 cannot be applied directly, since it evolves quantities u(E) and l (E), that are in general nonrational algebraic numbers. In article they give two methods to compute slightly weaker separation bounds.
Actual Computation of Separation Bounds (cont.) • Computing with floating point numbers with rounding toward larger values. • Maintaining integral logarithms of u(E) and l(E).
Use of floating point. Use of IEEE standard 754, result exactly rounded according to the chosen rounding mode. But changing the rounding mode is expensive on some systems. As an alternative one can simply evaluate u(E) and l(E) in double precision floating point arithmetic and multiply each intermediate result by . Underflow does not occur here since we always have u(E) > 1 whenever u(E) is nonzero. In case of overflow, the resulting value of u(E) will be infinity, which is a correct (but meaningless) bound.
Integral logarithms. Recursively compute integers: As define in table:
Cont. The recursive rules for u’(E) and l’(E) do not evolve radical operations. Hence rounding errors are not an issue for computing u’(E) and l’(E).
More tight results. In 2001, the same authors published article and they improved their result. They reached new separation bound: The way they do it, is based on new definition of: u(E) and l(E).
The start point was to change transformation rules. Instead of use the last rule, use: For building division free expression of E1 and E2.
More tight results. In our case the alg. bit-bound is linear in D(E) for division free expressions. And quadratic for expressions that include divisions. Chee Yap and Chen Li in 2000 found a new separation bound, that is linear for expressions that include divisions too.
Comparison with Previous Work • In order to check the practical use of their separation bound. The authors implemented the algorithm that use Integral logarithms approach. • And compared it with bounds based on the previous results of Canny and Mignotte. • The authors proved that Canny’s polynomial system bounds are always weaker than their.
The Test. The check was based on next test: Let v be the Voronoi vertex having minimal distance to sites s1, s2, and s3 and let s be another site. Is s inside the Voronoi circle of v, i.e., is it nearer to v than the sites s1, s2, s3? In the implementation of the incircle test we need compare the squared distance of the sites s1, s2, and s3 to v with the squared distance of s to v.
Result of comparison separation bounds for incircle test. The sites si can be defined by points or by lines. For example ppl p – mean that v defined by 2 points and line and we test point.