Skip to main content
Numerical algorithms
Lesson 70 of 75
Review

Evaluating algorithms

Objective. Compare correctness, stability and operation count.

  1. 1. Learn
  2. 2. Worked example
  3. 3. Practice
  4. 4. Feedback
  5. 5. Continue

Learn: the key idea

Evaluating algorithms compares different computational methods by their correctness (do they always give the right answer), stability (does the method avoid amplifying small errors, such as rounding), and operation count (how many arithmetic steps are needed, often expressed as a function of problem size n). For example, Gaussian elimination to solve an n×n system requires roughly n³/3 operations, while a poorly chosen method might require far more, or might be numerically unstable if it involves dividing by very small pivot values. Comparing algorithms on these criteria determines which is most suitable for a given practical problem.

Worked example

Explain why partial pivoting (swapping rows to avoid small pivot values) improves the stability of an algorithm such as Gaussian elimination, and state one criterion besides stability used to evaluate algorithms.

?
Illustrated card showing ?
  1. 1Dividing by a very small pivot value can massively amplify rounding errors already present in the data
  2. 2Partial pivoting swaps rows so that the largest available entry becomes the pivot, reducing this amplification
  3. 3This keeps the computed solution closer to the true solution, improving stability
  4. 4Besides stability, another key evaluation criterion is operation count (computational efficiency)

Answer: Partial pivoting avoids dividing by small numbers, improving stability; operation count is another criterion

Concept mastery

Based on your past attempts at this lesson — the question types to practise again come first.

Complete a practice set to see your concept breakdown here.

Practice

Practice happens on its own screen, one question at a time. Answers stay hidden until you submit yours, and you can stop and pick up at the same question later.

Start practising

Common mistake. Students judge an algorithm only by whether it produces a correct answer on one example, ignoring stability concerns such as division by near-zero pivots, which can cause large errors on other inputs. Always consider operation count and numerical stability, not just a single successful run.

Your progress

Tick each step as you finish it. Your exact reading position is saved automatically, so Continue drops you back on the same line.

0 of 5 steps complete

Your place saves automatically as you read.

My dashboard