ArticleslgStudy

science

Estrin's scheme

Estrin's scheme is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Estrin's scheme rather than just read about it. In short: In numerical analysis, Estrin's scheme (after Gerald Estrin), also known as Estrin's method, is an algorithm for numerical evaluation of polynomials. Horner's method for evaluation of polynomials is one of the most commonly used algorithms for this purpose, and unlike Estrin's scheme it is optimal in the sense that it minimizes the number of multiplications and additions required to evaluate an arbitrary polynomial.

Key takeaways

  • Estrin's scheme belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Estrin's scheme to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Estrin's scheme from memory before moving on to harder problems.

Reference excerpt

In numerical analysis, Estrin's scheme (after Gerald Estrin), also known as Estrin's method, is an algorithm for numerical evaluation of polynomials. Horner's method for evaluation of polynomials is one of the most commonly used algorithms for this purpose, and unlike Estrin's scheme it is optimal in the sense that it minimizes the number of multiplications and additions required to evaluate an arbitrary polynomial. However, each operation depends on the previous one, so it cannot take advantage of modern processors' ability to perform multiple independent operations in parallel. Estrin's scheme is one method which attempts to overcome this serialization while still being reasonably close to optimal.

Description of the algorithm Estrin's scheme operates recursively, converting a degree-n polynomial in x (for n≥2) to a degree-⌊n/2⌋ polynomial in x2 using ⌈n/2⌉ independent operations (plus one to compute x2). Given an arbitrary polynomial P(x) = C0 + C1x + C2x2 + C3x3 + ⋯ + Cnxn, one can group adjacent terms into sub-expressions of the form (A + Bx) and rewrite it as a polynomial in x2: P(x) = (C0 + C1x) + (C2 + C3x)x2 + (C4 + C5x)x4 + ⋯ = Q(x2). Each of these sub-expressions, and x2, may be computed in parallel. They may also be evaluated using a native multiply–accumulate instruction on some architectures, an advantage that is shared with Horner's method. This grouping can then be repeated to get a polynomial in x4: P(x) = Q(x2) = ((C0 + C1x) + (C2 + C3x)x2) + ((C4 + C5x) + (C6 + C7x)x2)x4 + ⋯ = R(x4). Repeating this ⌊log2n⌋+1 times, one arrives at Estrin's scheme for parallel evaluation of a polynomial:

Compute Di = C2i + C2i+1x for all 0 ≤ i ≤ ⌊n/2⌋. (If n is even, then Cn+1 = 0 and Dn/2 = Cn.) If n ≤ 1, the computation is complete and D0 is the final answer. Otherwise, compute y = x2 (in parallel with the computation of Di). Evaluate Q(y) = D0 + D1y + D2y2 + ⋯ + D⌊n/2⌋y⌊n/2⌋ using Estrin's scheme. This performs a total of n multiply-accumulate operations (the same as Horner's method) in line 1, and an additional ⌊log2n⌋ squarings in line 3. In exchange for those extra squarings, all of the operations in each level of the scheme are independent and may be computed in parallel; the longest dependency path is ⌊log2n⌋+1 operations long. A similar idea enables a fast matrix multiplication algorithm to evaluate a polynomial at a series of points.

Examples Take Pn(x) to mean the nth order polynomial of the form: Pn(x) = C0 + C1x + C2x2 + C3x3 + ⋯ + Cnxn Written with Estrin's scheme we have:

P3(x) = (C0 + C1x) + (C2 + C3x) x2 P4(x) = (C0 + C1x) + (C2 + C3x) x2 + C4x4 P5(x) = (C0 + C1x) + (C2 + C3x) x2 + (C4 + C5x) x4 P6(x) = (C0 + C1x) + (C2 + C3x) x2 + ((C4 + C5x) + C6x2)x4 P7(x) = (C0 + C1x) + (C2 + C3x) x2 + ((C4 + C5x) + (C6 + C7x) x2)x4 P8(x) = (C0 + C1x) + (C2 + C3x) x2 + ((C4 + C5x) + (C6 + C7x) x2)x4 + C8x8 P9(x) = (C0 + C1x) + (C2 + C3x) x2 + ((C4 + C5x) + (C6 + C7x) x2)x4 + (C8 + C9x) x8 … In full detail, consider the evaluation of P15(x):

Inputs: x, C0, C1, C2, C3, C4, C5 C6, C7, C8, C9 C10, C11, C12, C13 C14, C15 Step 1: x2, C0+C1x, C2+C3x, C4+C5x, C6+C7x, C8+C9x, C10+C11x, C12+C13x, C14+C15x Step 2: x4, (C0+C1x) + (C2+C3x)x2, (C4+C5x) + (C6+C7x)x2, (C8+C9x) + (C10+C11x)x2, (C12+C13x) + (C14+C15x)x2 Step 3: x8, ((C0+C1x) + (C2+C3x)x2) + ((C4+C5x) + (C6+C7x)x2)x4, ((C8+C9x) + (C10+C11x)x2) + ((C12+C13x) + (C14+C15x)x2)x4 Step 4: (((C0+C1x) + (C2+C3x)x2) + ((C4+C5x) + (C6+C7x)x2)x4) + (((C8+C9x) + (C10+C11x)x2) + ((C12+C13x) + (C14+C15x)x2)x4)x8

In combination with Horner's method Estrin's full scheme uses a very large number of multiply–accumulate operations in the first step. While this is useful to fully exploit modern superscalar processors, it will eventually exceed the available computing resources, at which point it may be useful to use Estrin's scheme to a limited depth, and then Horner's method on the residual. For example, if a computer can perform four multiply-accumulate operations before the result of the first operation is available, then two levels of Estrin's scheme will keep its instruction pipeline full. Each iteration, it can perform the following operations in parallel:

Level 1: (Estrin) Compute D2i = C4i + C4i+1x and D2i+1 = C4i+2 + C4i+3x Level 2: (Estrin) Compute Ei+1 = D2i+2 + D2i+3x2 Level 3: (Horner) Compute Fi+2 = Ei+2 + Fi+3x4 The final result is F0. A more capable processor may be able to have four 4-operand SIMD operations in progress at once, in which case four levels of Estrin's scheme could be used to evaluate a sufficiently high-degree polynomial.

References

Estrin, Gerald (May 1960). "Organization of computer systems: The fixed plus variable structure computer" (PDF). IRE-AIEE-ACM '60 (Western): Papers presented at the May 3-5, 1960, western joint IRE-AIEE-ACM computer conference. San Francisco. pp. 33–40. doi:10.1145/1460361.1460365. S2CID 16384320. Muller, Jean-Michel (2005). Elementary Functions: Algorithms and Implementation (2nd ed.). Birkhäuser. p. 58. ISBN 0-8176-4372-9.

Further reading Moroz, Guillaume (July 2013). Fast polynomial evaluation and composition (Technical report). v3. INRIA. arXiv:1307.5655. RT-0453. The scheme described is implemented for SageMath at package for fast polynomial evaluation at the Wayback Machine (archived 2023-02-07).

Worked examples

Example 1 — a first encounter with Estrin's scheme

Start with the simplest possible case. Write down what Estrin's scheme claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Estrin's scheme before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Estrin's scheme ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Estrin's scheme

In research
Estrin's scheme appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Estrin's scheme in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Estrin's scheme is common in secondary-school and first-year university syllabi. It links to neighbouring topics Numerical analysis, so understanding it makes those chapters shorter.
In everyday life
Look for Estrin's scheme outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Estrin's scheme” →

How to study Estrin's scheme in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Estrin's scheme means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Estrin's scheme out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Estrin's scheme in simple terms?

In numerical analysis, Estrin's scheme (after Gerald Estrin), also known as Estrin's method, is an algorithm for numerical evaluation of polynomials. Horner's method for evaluation of polynomials is one of the most commonly used algorithms for this purpose, and unlike Estrin's scheme it is optimal…

Why does Estrin's scheme matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Estrin's scheme?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Estrin's scheme.

Tags

  • Numerical analysis

Keep exploring