19.07.2014 Views

Contents - Student subdomain for University of Bath

Contents - Student subdomain for University of Bath

Contents - Student subdomain for University of Bath

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2.1. WHAT ARE POLYNOMIALS? 35<br />

not necessarily 10 irreducible. Hence this representation is generally known as<br />

partially factored. In this <strong>for</strong>mat, the representation is not canonical, since the<br />

polynomial x 2 −1 could be stored either as that (with 2 terms), or as (x−1)(x+1)<br />

(with 4 terms): however, it is normal in the sense <strong>of</strong> definition 3. For equality<br />

testing, see excursus B.2<br />

Multiplication is relatively straight-<strong>for</strong>ward, we check (via g.c.d. computations<br />

11 ) <strong>for</strong> duplicated factors between the two multiplicands, and then combine<br />

the multiplicands. Addition can be extremely expensive, and the result <strong>of</strong> an<br />

addition can be exponentially larger than the inputs: consider<br />

(x + 1)(x 2 + 1) · · · (x 2k + 1) + (x + 2)(x 2 + 2) · · · (x 2k + 2),<br />

where the input has 4(k + 1) non-zero coefficients, and the output has 2 k+1<br />

(somewhat larger) ones.<br />

This representation is not much discussed in the general literature, but is<br />

used in Redlog [DS97] and Qepcad [CH91], both <strong>of</strong> which implement cylindrical<br />

algebraic decomposition (see section 3.5), where a great deal <strong>of</strong> use can be made<br />

<strong>of</strong> corollaries 17 and 18.<br />

2.1.4 Polynomials in several variables<br />

Here the first choice is between factored and expanded. The arguments <strong>for</strong>, and<br />

algorithms handling, factored polynomials are much the same 12 as in the case<br />

<strong>of</strong> one variable. The individual factors <strong>of</strong> a factored <strong>for</strong>m can be stored in any<br />

<strong>of</strong> the ways described below <strong>for</strong> expanded polynomials, but recursive is more<br />

common since it is more suited to g.c.d. computations (chapters 4 and 5), which<br />

as we saw above are crucial to manipulating factored representations.<br />

If we choose an expanded <strong>for</strong>m, we have one further choice to make, which<br />

we explain in the case <strong>of</strong> two variables, x and y, and illustrate the choices with<br />

x 2 y + x 2 + xy 2 − xy + x − y 2 .<br />

recursive — C[x][y]. We regard the polynomials as polynomials in y, whose<br />

coefficients are polynomials in x. Then the sample polynomial would be<br />

(x − 1)y 2 + (x 2 − x)y + (x 2 + x)y 0 . We have made the y 0 term explicit<br />

here: in practice detailed representations in different systems differ on this<br />

point.<br />

10 If we were to insist on irreducibility, we would need to store x p −1 as (x−1)(x p−1 +· · ·+1),<br />

with p + 2 terms rather than with 2. Furthermore, irreducibility can be expensive to prove<br />

[ASZ00].<br />

11 Again, these should be cheap if there is no factor to detect, and otherwise lead to reductions<br />

in size.<br />

12 In one variable, the space requirements <strong>for</strong> a typical dense polynomial and its factors are<br />

comparable, e.g. 11 terms <strong>for</strong> a polynomial <strong>of</strong> degree 10, and 6 each <strong>for</strong> two factors <strong>of</strong> degree<br />

5. For multivariates, this is no longer the case. Even <strong>for</strong> bivariates, we would have 121 terms<br />

<strong>for</strong> a dense polynomial <strong>of</strong> degree 10, and 36 each <strong>for</strong> two factors <strong>of</strong> degree 5. The gain is<br />

greater as the number <strong>of</strong> variables increases.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!