TAOCP Vol 2: Seminumerical Algorithms · Week 88
TAOCP 4.6.4 Evaluation of Polynomials
Updated
Summary
TAOCP 4.6.4 Evaluation of Polynomials: Evaluating polynomials efficiently: Horner's rule, evaluating at many points, preprocessing coefficients to save multiplications, and the related cost of matrix and polynomial operations, including the Fourier transform. Budget about 9 hours; do exercises 1, 2 and 3.
This week's steps
3 stepsRead §4.6.4 Evaluation of Polynomials
Implement Horner's rule and a rolling hash using it.
Start with Ex 1, Ex 2, Ex 3; log what you solve below.
Write down one thing you'd explain to someone
A few sentences in your own words in Your notes: the idea, why it works, an example. 30 words ticks this.
Sign in to track this: tick each step off and it counts toward your week.
Exercises
This section has 74 exercises, rated 15 to M50, and Knuth marks 21 of them with the triangle for recommended. The largest set in the volume. Do the Horner-style and FFT exercises; sample the lower-bound and tensor-rank exercises only if you enjoy them.
Worth your time
Exercise 2M20▶ Recommended
Shift a polynomial's origin with Horner-like steps or fast multiplication.
Exercise 14HM28▶ Recommended
Derive the fast Fourier transform from the text's general scheme.
Your log
Sign in to log the exercises you work: number, rating, how far you got.
Your notes
Only youSign in to keep private notes on this guide, in Markdown. They stay yours: never on your profile, and you can export them all.
Discussion
0 postsQuestions about the reading go here; each exercise has its own thread below. Hints over answers.
No posts yet. Ask a question or share a tip.
Sign in to postAnyone can read. Posting needs an account with a confirmed email.
Exercise threads
One thread per exercise. Open one to ask for a nudge or check your thinking.
Exercise 115No posts yet
Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler:
||like this||or a```spoilerblock.Sign in to postAnyone can read. Posting needs an account with a confirmed email.
Exercise 2M20No posts yet
Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler:
||like this||or a```spoilerblock.Sign in to postAnyone can read. Posting needs an account with a confirmed email.
Exercise 320No posts yet
Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler:
||like this||or a```spoilerblock.Sign in to postAnyone can read. Posting needs an account with a confirmed email.
Exercise 14HM28No posts yet
Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler:
||like this||or a```spoilerblock.Sign in to postAnyone can read. Posting needs an account with a confirmed email.
Exercise 19M24No posts yet
Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler:
||like this||or a```spoilerblock.Sign in to postAnyone can read. Posting needs an account with a confirmed email.
Exercise 4122No posts yet
Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler:
||like this||or a```spoilerblock.Sign in to postAnyone can read. Posting needs an account with a confirmed email.
Exercise 51M24No posts yet
Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler:
||like this||or a```spoilerblock.Sign in to postAnyone can read. Posting needs an account with a confirmed email.
Exercise 57M20No posts yet
Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler:
||like this||or a```spoilerblock.Sign in to postAnyone can read. Posting needs an account with a confirmed email.
Reference
Why it matters
Horner's rule is used in every math library and in hashing (polynomial rolling hashes). The FFT view connects to signal processing and fast multiplication.
Before you start
- 4.6.1 Division of Polynomials
- 4.3.3 How Fast Can We Multiply?
How to approach it
Implement Horner's rule and a rolling hash using it. Read the coefficient-preprocessing ideas lightly. Spend real time on the discrete Fourier transform discussion if FFT is new to you.
Common traps
- Numerical instability when evaluating with floats at large x.