Representing polynomials
A polynomial in the variable x
over an algebraic field F represents a function A(x) as a formal sum:
, the values a0, a1,
. . . ,an-1 the coefficients of the polynomial.
A polynomial A(x) has degree
k if its highest nonzero coefficient is ak i.e, degree(A) =
k.
Any integer strictly greater than the degree of a polynomial is degree-bound
of that polynomial.
Polynomials can be represented using
- the coefficient and
- point-value
representations of polynomials.
, of degree bound
‘n’ is a vector of coefficients a = (a0, a1, . . . ,an-1).
Example: A(π₯) = 6π₯3+7π₯2−10π₯+9 coefficients of A(x) are (9,−10,7,6).
The
coefficient representation is convenient for certain operations on polynomials.
The operation
of evaluating the polynomial (π₯) at point π₯0 consists of computing the value of π΄(π₯0). Evaluation takes time ΞΈ(π) using Horner’s rule π΄(π₯0)=π0+π₯0(π1+π₯0(π2+⋯+π₯0(ππ−2+π₯0 (ππ−1 ))⋯)).
Adding two polynomials represented by the coefficient
vectors π=(π0,π1,…,ππ−1) and π=(π0,π1,…,ππ−1) takes time Ξ(π). Sum is the coefficient vector π=(π0,π1,…,ππ−1), where ππ=ππ+ππ for π=0,1,…,π−1.
Example:
π΄π₯= 6π₯3 + 7π₯2 − 10π₯ + 9
(9,−10,7,6)
π΅π₯=− 2π₯3 + 4π₯ − 5 (−5,4,0,−2)
----------------------------------------------------------
(π₯)= 4π₯3 + 7π₯2 − 6π₯ + 4 (4,−6,7,4)
2. Point-Value Representation: A point-value representation of a polynomial π΄(π₯) of degree-bound π is a set of π point-value pairs {(π₯0,π¦0),(π₯1,π¦1),…,(π₯π−1,π¦π−1)} such that all of the π₯π are distinct and π¦π=π΄(π₯π) for π=0,1,…,π−1.
Example: A(π₯) =π₯3−2π₯+1
Using Horner’s
method, π-point
evaluation takes time ΞΈ(π2).
The inverse of
evaluation—determining the coefficient form of a polynomial from a point-value
representation—is interpolation.
For any set {(π₯0,π¦0),(π₯1,π¦1),…,(π₯π−1,π¦π−1)} of π point-value pairs such that all the π₯π values are distinct, there is a unique polynomial π΄(π₯) of degree-bound π such that π¦π=π΄(π₯π) for π=0,1,…,π−1.
Using
Lagrange’s formula, interpolation takes time ΞΈ(π2).
Lagrange’s
formula
Example: Using
Lagrange’s formula, we interpolate the point-value representation
{(0,1),(1,0),(2,5),(3,22)}.
In point-value
form, addition πΆ(π₯)=π΄(π₯)+π΅(π₯) is given by πΆ(π₯π)=π΄(π₯π)+π΅(π₯π) for any point π₯π.
π΄ and π΅ are evaluated
for the same π points. The time to add two polynomials of degree-bound π in point-value form is ΞΈ(π).
Example: Add (π₯)=π΄(π₯)+π΅(π₯) in point-value form
In point-value
form, multiplication πΆ(π₯)=π΄(π₯)π΅(π₯) is given by
πΆ(π₯π)=π΄(π₯π)π΅(π₯π) for any point π₯π. If π΄ and π΅ are of
degree-bound π, then πΆ is of degree-bound 2π.
Need to start
with “extended” point-value forms for π΄ and π΅ consisting of
2π point-value pairs each.
The time to
multiply two polynomials of degree-bound π in point-value form is ΞΈ(π).
Example: Multiply πΆπ₯=π΄(π₯)π΅(π₯) in point-value form
Given two
input polynomials in extended point-value form, the time to multiply them to
obtain the point value form of the result is ΞΈ(n), which is much less than the time required to multiply polynomials in
coefficient form ΞΈ(n2).
A graphical
outline of an efficient polynomial-multiplication process is given below.
Representations on the top are in coefficient form, while those on the bottom
are in point-value form.
No comments:
Post a Comment