Practice question · Multiple choice
A recipe is a precise sequence of steps and is not an algorithm in the strict sense. Which requirement does "season to taste" violate?
Hints
- Ask whether two different cooks following the instruction would do the same thing.
- The three requirements are finite, definite, effective. Which one is about ambiguity?
Show the answer
B. Definiteness, since 'to taste' leaves the executor to decide
Why
Two cooks execute it differently, so the step is not definite, and a procedure whose behaviour depends on who runs it cannot be reasoned about or reproduced. That is exactly why programming languages are unforgiving: definiteness is a requirement, and 'you know what I mean' is not available.
Practise Algorithms and Computational Thinking
The app has 6 more questions on this lesson, and keeps your place in the course. Mathematics I is free to start.
More questions on Algorithms and Computational Thinking
- Order the steps of the algorithm that finds the largest value in a list.
- Select every procedure below that FAILS to be a genuine algorithm.
- A specification says WHAT the answer must be; an algorithm says HOW to get it. Why is the distinction worth…
- An algorithm says HOW to compute; a specification says only WHAT the answer is. Sort each item.