Practice question · Select all that apply
Select every procedure below that FAILS to be a genuine algorithm.
Hints
- Test each against finiteness, definiteness and effectiveness in turn.
- One never stops, one cannot be followed unambiguously, and one is not a procedure at all.
Show the answer
- B. Pick whichever move looks best and play it
- D. The answer is the smallest x satisfying the equation
- E. Start with x = 1 and repeatedly double it
Why
Doubling forever fails finiteness; 'looks best' fails definiteness; 'the smallest x satisfying the equation' is a specification with no procedure. The trial-division test and 'add 1 then stop' are both finite, definite and effective, so both are algorithms.
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.
- A recipe is a precise sequence of steps and is not an algorithm in the strict sense. Which requirement does…
- 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.