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? 39<br />

p:=x+1;<br />

q:=p;<br />

r:=p*q;<br />

Figure 2.2: Code fragment A — a graph<br />

p:=x+1;<br />

q:=x+1;<br />

r:=p*q;<br />

Figure 2.3: Code fragment B — a tree<br />

We said earlier that the only known algorithms <strong>for</strong> computing greatest<br />

common divisors were recursive. This is essentialy true, and means that<br />

the computation <strong>of</strong> greatest common disivors <strong>of</strong> straight-line programs is<br />

not a straight-<strong>for</strong>ward process [Kal88].<br />

Additive Complexity This [Ris85, Ris88] is similar to a straight-line program,<br />

except that we only count the number <strong>of</strong> (binary) addition/subtraction<br />

nodes, i.e. multiplication and exponentiation are ‘free’. Hence the<br />

degree is unbounded in terms <strong>of</strong> the additive complexity, but <strong>for</strong> a given<br />

expression (tree/DAG) can be bounded by a tree-walk. A univariate polynomial<br />

<strong>of</strong> additive complexity a has at most C a2 real roots <strong>for</strong> some absolute<br />

constant C: conjecturally this can be reduced to 3 a . These bounds<br />

trivially translate to the straight-line program and expression tree cases.<br />

“Additive complexity” is more <strong>of</strong> a measure <strong>of</strong> the ‘difficulty’ <strong>of</strong> a polynomial<br />

than an actual representation. Of the others, the first was used in Macsyma <strong>for</strong><br />

its “general expression”, and the second is used in Maple 17 . In fact, Macsyma<br />

would 18 allow general DAGs, but would not <strong>for</strong>ce them. Consider the two code<br />

fragments in figures 2.2 and 2.3. In the case <strong>of</strong> figure 2.2, both systems would<br />

produce the structure in figure 2.4. For figure 2.3, Macsyma would produce the<br />

structure 19 in figure 2.5. Maple would still produce the structure <strong>of</strong> figure 2.4,<br />

since the hashing mechanism would recognise that the two x + 1 were identical.<br />

2.1.6 The Newton Representation<br />

For simplicity, in this subsection we will only consider the case <strong>of</strong> charateristic<br />

0: finite characteristic has some serious technical difficulties, and we refer the<br />

17 Until such time as operations such as expand are used!<br />

18 Not explicitly, but rather as a side-effect <strong>of</strong> the fact that Macsyma is implemented in Lisp,<br />

which cares little <strong>for</strong> the difference. The basic function EQUAL does not distinguish between<br />

acyclic and cyclic structures<br />

19 The x is shown as shared since the Lisp implementation will store symbols unqiuely.

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

Saved successfully!

Ooh no, something went wrong!