ArticleslgStudy

computer science

Neville's algorithm

Neville's algorithm is a computer 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 Neville's algorithm rather than just read about it. In short: In mathematics, Neville's algorithm is an algorithm used for polynomial interpolation that was derived by the mathematician Eric Harold Neville in 1934. Given n + 1 points, there is a unique polynomial of degree ≤ n which goes through the given points.

Key takeaways

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

Reference excerpt

In mathematics, Neville's algorithm is an algorithm used for polynomial interpolation that was derived by the mathematician Eric Harold Neville in 1934. Given n + 1 points, there is a unique polynomial of degree ≤ n which goes through the given points. Neville's algorithm evaluates this polynomial. Neville's algorithm is based on the Newton form of the interpolating polynomial and the recursion relation for the divided differences. It is similar to Aitken's algorithm (named after Alexander Aitken), which is nowadays not used.

The algorithm Given a set of n+1 data points (xi, yi) where no two xi are the same, the interpolating polynomial is the polynomial p of degree at most n with the property

p(xi) = yi for all i = 0,...,n This polynomial exists and it is unique. Neville's algorithm evaluates the polynomial at some point x. Let pi,j denote the polynomial of degree j − i which goes through the points (xk, yk) for k = i, i + 1, ..., j. The pi,j satisfy the recurrence relation

This recurrence can calculate p0,n(x), which is the value being sought. This is Neville's algorithm. For instance, for n = 4, one can use the recurrence to fill the triangular tableau below from the left to the right.

This process yields p0,4(x), the value of the polynomial going through the n + 1 data points (xi, yi) at the point x. This algorithm needs O(n2) floating point operations to interpolate a single point, and O(n3) floating point operations to interpolate a polynomial of degree n. The derivative of the polynomial can be obtained in the same manner, i.e.:

Alternate notation easier for computer implementation In the above formulae, if we take the degree of the successive interpolating polynomials d = j − i and change the notation to pd,i,

The final value pn,0 (in this notation) is the required interpolated value. Since the number of computed items i.e. the range of i decreases with each successive d, a linear array can be used for memory efficiency with pi being overwritten and d being ignored. (For example: [1]) The derivative (using the product rule) can be computed likewise as:

As before, p′n,0 (in this notation) is the derivative. As this depends on the successive computed values of p also for each d, it may be computed within the same loop. If linear arrays for p and p′ are used for efficiency, the p′ values should be computed before the p values are overwritten.

Application to numerical differentiation Lyness and Moler showed in 1966 that using undetermined coefficients for the polynomials in Neville's algorithm, one can compute the Maclaurin expansion of the final interpolating polynomial, which yields numerical approximations for the derivatives of the function at the origin. While "this process requires more arithmetic operations than is required in finite difference methods", "the choice of points for function evaluation is not restricted in any way". They also show that their method can be applied directly to the solution of linear systems of the Vandermonde type.

References Press, William; Saul Teukolsky; William Vetterling; Brian Flannery (1992). "§3.1 Polynomial Interpolation and Extrapolation (encrypted)" (PDF). Numerical Recipes in C. The Art of Scientific Computing (2nd ed.). Cambridge University Press. ISBN 978-0-521-43108-8.{{cite book}}: CS1 maint: url-status (link) (link is bad) J. N. Lyness and C.B. Moler, Van Der Monde Systems and Numerical Differentiation, Numerische Mathematik 8 (1966) 458-464 (doi:10.1007/BF02166671) Neville, E.H.: Iterative interpolation. J. Indian Math. Soc.20, 87–120 (1934)

External links Weisstein, Eric W. "Neville's Algorithm". MathWorld.

Worked examples

Example 1 — a first encounter with Neville's algorithm

Start with the simplest possible case. Write down what Neville's algorithm claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer 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 Neville's algorithm 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 Neville's algorithm 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 Neville's algorithm

In research
Neville's algorithm appears in computer 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 Neville's algorithm 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
Neville's algorithm is common in secondary-school and first-year university syllabi. It links to neighbouring topics Interpolation, Polynomials, so understanding it makes those chapters shorter.
In everyday life
Look for Neville's algorithm 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.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Neville's algorithm in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Neville's algorithm 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 Neville's algorithm out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Neville's algorithm in simple terms?

In mathematics, Neville's algorithm is an algorithm used for polynomial interpolation that was derived by the mathematician Eric Harold Neville in 1934. Given n + 1 points, there is a unique polynomial of degree ≤ n which goes through the given points.

Why does Neville's algorithm matter?

Because it connects several computer 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 Neville's algorithm?

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 Neville's algorithm.

Tags

  • Interpolation
  • Polynomials

Keep exploring