Exercise · Volume 1 · 1.1-5
Exercise 1.1-5
not stated yet in Lean solution written
| Rating | 12 |
|---|---|
| Markers | recommended |
| Kind | Informal: the exercise has no formal statement, so Lean does not state it from the written solution |
| Section | Section 1.1 of Volume 1. Companion chapter: Algorithms |
The task
Find which of the five properties of an algorithm the "Procedure for Reading This Set of Books" lacks, and how its form differs from the form of Algorithm E.
The exact wording is in your copy of the book.
Hints
Open one hint at a time. Try the exercise again after each.
Hint 1
Recall the five properties: finiteness, definiteness, input, output and effectiveness. Read the procedure step by step and test each of them.
Hint 2
Look at where the control goes at the last steps, and at the questions that a reader cannot answer by a fixed rule.
Solution
Show the solution
Three properties fail clearly.
Finiteness. The procedure does not stop. Its last step sends the reader back to step 3, and steps 14 and 15 send the reader back to step 7. No step leads to an end state, so only the reader's decision to stop ends the procedure.
Output. No step names a result. An algorithm has at least one output with a stated relation to the input, and the procedure has none. The congratulation of step 18 is not a quantity.
Definiteness. Several steps ask a question without an exact answer: step 5 asks whether the chapter interests the reader, step 9 asks about the reader's taste for mathematics, step 14 asks whether the reader is tired, and step 13 ends the exercises when the reader feels satisfied. Two readers can answer in different ways, so the next step is not fixed by the rules. Step 15 sends the reader to sleep and does not say for how long.
A fourth property, effectiveness, also fails in a weaker sense. Step 10 asks the reader to send error reports, and step 16 asks the reader to start volumes that may not exist yet. Such steps depend on things outside the reader's control, and a person cannot always do them with pencil and paper. The property of input does not fail, because an algorithm may have zero inputs.
The format differs from that of Algorithm E in several ways. The steps carry plain numbers, with no identifying letter such as E. No step has a short name in brackets that summarizes it. The procedure has no opening paragraph that names the algorithm and states its input and output. The text of the steps includes remarks in parentheses and in italics, and it has a closing quotation. No special mark ends it.
Remarks
The point of the exercise is the comparison: a list of instructions is an algorithm only if all five properties hold. Compare the list of the properties in Section 1.1 and the C1 chapter of that section.
This solution is checked, and a person has not reviewed it yet. The source.
In Lean
not stated yet The exercise is not stated in Lean yet.
The status is computed from the Lean build. The node of the map.
Something is wrong? Report it.