For the questions that don’t fit in a textbook. Find their starting point
Fahahu

Ages 16–18 · A Level · Growing

Partial correctness of a nonterminating path

Use the evidence in partial correctness of a nonterminating path to select and justify a valid solution.

Understand the idea

Correctness arguments connect invariants specifications and termination.

Your challenge

A routine is proved to return a sorted permutation whenever it returns, but can loop forever on repeated values. Which claim remains established?

  • Total correctness because returned outputs are sorted
  • Partial correctness only; total correctness still fails
  • No property at all can be proved

How to explore

  • Keep the output contract and termination obligation separate.
  • Compare each proposed response with the complete observation or trace, rather than with only one familiar word.
  • Check the selected response against the complete situation, including a case where a tempting alternative fails.

Open the activity to work with its controls and check your reasoning. Progress stays in this browser.

Keep exploring

DON’T LET THE QUESTION END HERE

Give that curiosity
somewhere to go.

Open the learning space

Discovery

Digital models simplify the real world. Explore with a grown-up and talk about what you notice.

Find something worth exploring

Explore free activities and printables, or learn about the separately paid Academy courses.