Humanist Discussion Group, Vol. 33, No. 699. Department of Digital Humanities, King's College London Hosted by King's Digital Lab www.dhhumanist.org Submit to: email@example.com  From: Tim Smithers
Subject: Re: [Humanist] 33.693: recipes and algorithms (136)  From: Peter Van Kranenburg Subject: Re: [Humanist] 33.688: recipes and algorithms: why not interactive? (33) -------------------------------------------------------------------------- Date: 2020-03-26 21:26:25+00:00 From: Tim Smithers Subject: Re: [Humanist] 33.693: recipes and algorithms Dear Willard, You ask, following your pseudocode and recipe examples, "Does the second example ... open the door to the third?" No, certainly not, I would say. After this message is an example of a recipe, like yours but a bit longer, that I have rescued from a lecture I used to give on computation and algorithms (as part of a Masters' level course on Knowledge Representation and Inference, back in the late 1980s). I used this example to show how recipes clearly differ from algorithms. They may belong in the Zoo of ways of doing things, but they are very different animals in that Zoo. No CPU (able to run binary coded algorithms composed of well defined operations on bytes of bits) that I've ever come across would understand instructions like "to serve 6," "very small onion," "lightly but firmly," "decorate," or "for half-an-hour or a little longer," just to pick a few examples of the many differences. Suggesting that algorithms are somehow like recipes is, I think, horribly misleading. I take your question to be rhetorical and your message to say the same as the above, and thank you for doing so. It needs saying, I think. I follow Donald Knuth in his insisting that computer programes should be written to be read by people, which makes computer programs a kind of literature, but, contrary to Knuth, this does not make the algorithms these programs implement things like recipes, which are also a kind of literature. What we might want to say -- and this is what I like to think Knuth really means to say -- is that computer programs are like recipes. But computer programs are not the same as the algorithms they implement. In a good program there is a lot else besides the instructions needed for a CPU to correctly execute the algorithm. As has already been remarked, and illustrate by you, there are instructions to do with interaction with things like thermometers and people. But, just as importantly, I think, there is all the code Comments and documentation needed to make the program readable by people. Computer programs are literature like recipes, perhaps. Algorithms are not. They are mathematical constructions. In the thinking of this AI researcher and engineer. (Which is why, for example, I think no algorithm can be specified that, when implemented well in a computer program, could give rise to something that understands recipes in the way we humans do, and which would write recipes for the same reasons.) Best regards, Tim A real recipe from Betty Falk, 1964, 1973: The Beginner's Cookery Book, Penguin Books Recipe: Egg and Bacon Pie (page 48) Ingredients (to serve 6) 6 oz streaky bacon 4 eggs 2 or 3 firm tomatoes 1 very small onion Salt Pepper White of egg (or milk) for glazing For Pastry 14 oz plain flower 2 oz ground rice (or semolina) 2 teaspoons baking powder 4 oz margarine 4 oz lard Pinch salt About 2 tablespoons cold water Utensils Deep flan tin Large basin Sieve or strainer Rolling pin Scissors Knife Pastry-brush Chopping knife and board Clean cloth Time required: About 1.5 hours Method 1 Set oven to Fairly Hot, Mark 6, 400 deg F 2 Make pastry. Sieve all dry ingredients into basin 3 Rub in fats with fingertips until mixture resembles fine breadcrumbs 4 Add 2 tablespoons cold water gradually, mixing with knife, until all flour is taken up. Form into ball of soft dough with fingertips 5 Roll out lightly on lightly floured surface to about one quarter inch thick. Stand tin on pastry and draw a line round outer edge with knife. Remove dish and cut pastry to line it, pressing pastry lightly but firmly down. Re-roll and cut slightly larger circle to form cover. 6 Cut rinds and RUST from bacon and cut rashers into about three pieces. 7 Peel and chop onion finely. Wash, dry, and slice tomatoes. 8 Line bottom of pie with bacon. Then add tomatoes and bacon, sprinkled with onion, in layers. 9 Break eggs over rest of ingredients, keeping them evenly spaced as fas as possible. It is of no importance if the yokes break. Sprinkle with salt and pepper. 10 Lay pastry-cover on top, and knock up edges with back of knife, or Flute them. Cut leaves of pastry (elongated diamond shapes) from the trimmings and decorate the centre of the pie with them. Make a small hole in the centre with the point of a knife. 11 Brush pie with white of egg to glaze it. 12 Bake for half-an-hour or a little longer, until golden brown and risen. The eggs should be set inside. Serve hot or cold, decorated with sprigs of parsley. -------------------------------------------------------------------------- Date: 2020-03-26 10:17:26+00:00 From: Peter Van Kranenburg Subject: Re: [Humanist] 33.688: recipes and algorithms: why not interactive? How can an algorithm be a "self-contained automatic machine"? From a technical point of view (in the context of a Von-Neumann architecture): An algorithm is a (abstract) series of instructions. It does nothing. It does not 'compute'. It does not 'interact'. It is not possible to 'keep' an algorithm from doing something. It is the machine (CPU with Memory) that 'does' something, namely executing the sequence of instructions. More precisely: a machine (CPU and Memory) executes an implementation of the algorithm suited for that particular machine. A user (a human or another process on the same machine) needs to start the execution of the algorithm (by loading the instructions in instruction memory and loading the input data at the appropriate place in data memory and pointing the machine to the first instruction of the algorithm). Strictly, the data (input, memory, output) is not part of the algorithm. The data (memory and output) changes by running the algorithm, but the algorithm itself does not change by running it. How to define 'interaction' in this context? In the analogy with the cookbook recipe, the cook has the role of the 'machine'. There, the analogy is problematic, because a human does not need exact and unambiguous instructions. A human does not have a finite instruction set. A human is not a Von Neumann machine with instructions and data memory strictly separated. A human is able to divert from the cookbook instructions. A machine (CPU) is not able to divert from the sequence of instructions that makes up the algorithm (or actually, its implementation). Peter _______________________________________________ Unsubscribe at: http://dhhumanist.org/Restricted List posts to: firstname.lastname@example.org List info and archives at at: http://dhhumanist.org Listmember interface at: http://dhhumanist.org/Restricted/ Subscribe at: http://dhhumanist.org/membership_form.php
Editor: Willard McCarty (King's College London, U.K.; Western Sydney University, Australia)
Software designer: Malgosia Askanas (Mind-Crafts)
This site is maintained under a service level agreement by King's Digital Lab.