Ages 16–18 · A Level · Growing
Choose a discriminating counterexample
Use the evidence in choose a discriminating counterexample to select and justify a valid solution.
Understand the idea
Correctness arguments connect invariants specifications and termination.
Your challenge
A deduplication routine removes only adjacent duplicates but claims to remove all duplicates from unsorted input. Which test directly refutes that claim?
- [A,B,A]
- [A,A,B]
- [A,B,C]
How to explore
- Construct a repeated value that bypasses the algorithm’s specific comparison pattern.
- 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 HEREGive that curiosity
Open the learning space