Category: Thinking
Type: Practice Habit
Origin: Euclid, Elements, Book VII, Proposition 2; the word comes from the Latinized name of al-Khwarizmi; Donald Knuth, The Art of Computer Programming, Volume 1 (Addison-Wesley, 1968)
Also known as: Writing a stopping procedure
Type: Practice Habit
Origin: Euclid, Elements, Book VII, Proposition 2; the word comes from the Latinized name of al-Khwarizmi; Donald Knuth, The Art of Computer Programming, Volume 1 (Addison-Wesley, 1968)
Also known as: Writing a stopping procedure
Quick Answer — Algorithmic Thinking is the habit of writing a repeated task as a finite procedure: each step is definite, the procedure stops, and another person can check the output. Euclid’s Elements, Book VII, Proposition 2, already has that shape, and Knuth’s 1968 list adds finiteness, definiteness, input, output, and effectiveness. The point is a procedure someone else can run, not a private knack and not a hidden model.
What is Algorithmic Thinking?
Algorithmic Thinking is the habit of turning a repeated task into a finite procedure that another person can run and check.Given two numbers not prime to one another, to find their greatest common measure.That sentence is the task in Thomas L. Heath’s English of Euclid’s Elements, Book VII, Proposition 2. The Elements does not use the word algorithm. “Not prime to one another” is Heath’s phrase for what later books call not relatively prime. The proposition still names an input, an order of moves, and a stop. The everyday picture is a recipe card on a shared fridge. “Cook until it looks right” asks the next person to guess. “Simmer twelve minutes, then stop” does not. Analytical Thinking states how the parts of a problem depend on each other. It does not, by itself, hand the next person a procedure that stops. Deductive Reasoning asks whether a conclusion must follow if the premises are true. The deductive page on this site uses the Elements for that kind of chain. A step inside a procedure can be a deduction. The habit here is the whole procedure, including the stop. Computational Thinking is the wider set. In 2011, ISTE and the Computer Science Teachers Association placed algorithmic thinking inside that set, as “a series of ordered steps.” This page is that series. Satisficing stops when an option clears a bar. That, too, is a stopping rule. It does not require the steps to be definite enough that a second person reaches the same option and can check it. A machine-learning model whose steps a person cannot inspect is a different object. Knuth’s effectiveness test is pencil and paper. If the next person cannot carry out the step, the procedure is not finished.
Algorithmic Thinking in 3 Depths
- Beginner: The cue is a task you repeat. Write the input, the steps in order, and the stop. If a second person has to ask what you meant, that step is not yet definite.
- Practitioner: Have someone else run the procedure on one ordinary case and one awkward case. Where the two runs diverge, rewrite the step. A code name on the card does not finish this check.
- Advanced: A step that never changes the output, on the cases you mean to cover, can be removed after you have checked. A procedure that might never stop is not an algorithm in Knuth’s sense. A high sensitivity on one population is not a license to reuse the steps on people the derivation left out.
Origin
The habit of writing a stopping procedure is older than the English word. The word, Knuth’s five features, and the school name arrived later. They do not all name the same scope. Euclid’s Elements, Book VII, Proposition 2, finds the greatest common measure of two numbers that are not relatively prime. If the smaller measures the larger, it is the greatest common measure. If it does not, you subtract the smaller from the larger, over and over, until a number is left that measures the one before it. Proposition 1 is the neighboring case. If that process leaves a unit, the two numbers are relatively prime. Britannica dates the Elements to about 300 BCE. That is the usual dating of the book, not a signed manuscript. The proposition uses repeated subtraction. Later teaching often replaces a run of subtractions with the remainder of one division. That shortcut is equivalent. It is not the wording of Book VII. Knuth’s name for the later form is the Euclidean algorithm. That name is his example of an algorithm. It is not a word in Euclid. The word algorithm comes from a name, not from Euclid. Muḥammad ibn Mūsā al-Khwārizmī worked in Baghdad in the ninth century, at the House of Wisdom, under the caliph al-Ma’mun. Britannica keeps two books apart. Al-Kitāb al-mukhtaṣar fī ḥisāb al-jabr waʾl-muqābala is the algebra book. The word algebra comes from its title. A separate arithmetic, on calculation with Hindu numerals, survives in Latin as Algoritmi de numero Indorum (“Al-Khwārizmī Concerning the Hindu Art of Reckoning”). The word algorithm comes from Algoritmi, the Latinized name in that title. The Arabic original of that arithmetic does not survive. The MacTutor history of mathematics notes that the Latin text is known to be much changed, and that the Arabic title is not known. This page does not treat him as the inventor of procedures. Book VII is older. He is the name-source of the word, and a writer of systematic calculation. Donald Knuth stated five features in The Art of Computer Programming, Volume 1, Fundamental Algorithms (Addison-Wesley, 1968), section 1.1. Finiteness: the procedure stops after a finite number of steps. Definiteness: each step specifies the action so that it is unambiguous in each case. Input: zero or more quantities, taken from stated sets. Output: one or more quantities, with a stated relation to the inputs. Effectiveness: each operation is basic enough that a person can do it exactly, in finite time, with pencil and paper. In that section, a procedure that may never stop is a computational method, not an algorithm. He is naming features. He is not reporting a trial of this habit. Gerald Futschek, at the Vienna University of Technology, wrote on the school name in 2006. The chapter is in Lecture Notes in Computer Science, volume 4226, pages 159–168. He says the term was already often used for a competence in informatics education. He does not present himself as the person who coined it. He describes a pool of abilities. Analyze the problem and specify it. Find basic actions that fit it, and build a correct algorithm from those actions. Think through the special cases and the usual ones, and then improve efficiency. He argues that these abilities can be developed without learning to program. The pictures in that pre-university course were meant to make correctness, termination, efficiency, determinism, and parallelism visible. Those are teaching aims in one course. They are not a measured gain. In 2011, the International Society for Technology in Education and the Computer Science Teachers Association published an operational definition of computational thinking for K–12 education. They report a survey of nearly 700 computer science teachers, researchers, and practitioners, and overwhelming support for the text. One line on their list is “Automating solutions through algorithmic thinking (a series of ordered steps).” The definition says computational thinking includes that list and is not limited to it. On this site, Computational Thinking is the wider set. Algorithmic Thinking is the ordered procedure.Key Points
Algorithmic Thinking pays when someone who was not there for the knack may have to repeat the task. It stalls when a step still requires your private judgment, or when the procedure has no stop.1
Name the input and the output before the steps
Write what the procedure accepts, and what it must hand back. Euclid’s proposition accepts two numbers that are not relatively prime, and it returns their greatest common measure. The Ottawa ankle rules, in the case below, accept an adult with an acute ankle injury inside a stated list, and they return one decision: radiograph, or no radiograph. “Handle the ankle” is not yet an output.
2
Make each step definite
A step is definite when a second person does not have to guess the action. “See if they can walk” is not definite. The ankle rules count four steps: the person transfers weight twice onto each leg, and a limp is allowed. The 1993 paper says to judge bone tenderness first, and not to push the person into the walk. In the 1995 trial, a common miss was to stop palpation short of the distal 6 cm along the posterior edge of the fibula. That shorter touch is not the rule.
3
Write the stop
Say what ends the procedure, and what the person should do then. In Book VII, the stop is a number that measures the one before it. In Knuth’s list, a procedure that might run without end is a computational method, not an algorithm. In the ankle rules, the stop is the radiograph decision. The 1995 authors add a closing line: tell the person to come back if pain, or the ability to bear weight, has not improved in five to seven days. A card that says “keep an eye on it” has not named a stop.
4
Run the awkward cases before you shorten the card
Futschek’s list includes the special cases, not only the usual ones. Run the procedure on a case near the boundary, and on a case the rule excludes. If a step never changes the output on the cases you mean to cover, you can remove it, and you should say that you checked. The 1993 refinement dropped an age line and a cuboid line for that reason, inside that refinement. A shorter card that was never checked is a different object.
Applications
Use Algorithmic Thinking when someone else may repeat the task and you need a result you can check. Write the input, the definite steps, and the stop. Then let a second person try the awkward case.Hand a classmate the worked order
Before a problem type you will meet again, write the input, the steps, and the stop. Give the card to a classmate who was not there when you learned it. Where they stall, or where their result diverges, rewrite that step. A private shortcut you cannot hand over is still a knack.
Fix the handoff two people run differently
For a recurring work handoff, name the input, the person who acts, the action, and the condition that stops the work and sends it upward. Have two people run the same case. If they stop in different places, the step is not definite yet. A shared folder does not supply the missing stop.
Leave a counted check, not a hunch
For a household task another adult will run, replace “make sure it is done” with a counted check and a stop. The pattern is a number, an order, and a line that says not to improvise the test. A note that only you can interpret does not cover the next morning.
Write who the rule is not for
When volunteers or a public desk repeat a decision, write the order of checks and the people the rule excludes. The 1993 ankle rules excluded anyone under 18, pregnancy, an injury older than ten days, and a return visit, among other lines. Copying the steps past those lines is a different procedure. Put the exclusion on the card.
Case Study
The Ottawa ankle rules are a written procedure for one emergency decision. Does this adult, with this acute ankle injury, need a radiograph? Ian Stiell and colleagues in Ottawa developed the rules and then tested what happened when other physicians were asked to use them. The trials measure that introduction in emergency departments. They do not measure the habit in a kitchen, a classroom, or one afternoon with a blank card. Stiell and colleagues reported the refined rules in JAMA on 3 March 1993 (volume 269, pages 1127–1132). An ankle series is indicated only if there is pain in the malleolar zone and any one of three findings. One is bone tenderness along the distal 6 cm of the posterior edge of the fibula, or at the tip of the lateral malleolus. Another is the same tenderness on the tibia, along that posterior edge or at the tip of the medial malleolus. The third is inability to bear weight for four steps, both immediately and in the emergency department. A foot series uses the midfoot zone instead. It is indicated if there is bone tenderness at the base of the fifth metatarsal, bone tenderness at the navicular, or the same four-step failure. Four steps means transferring weight twice onto each leg. A limp counts. The paper says to judge bone tenderness before the walk, and never to coerce it. That refinement excluded several groups. It left out anyone under 18, anyone pregnant, and isolated injuries of the skin. It also left out people sent in with radiographs already taken, injuries more than 10 days old, and return visits for the same injury. The paper says an earlier age criterion, and a cuboid tenderness criterion, were redundant. The clinically significant fractures in that refinement could be identified without them. The same paper has two stages, and they are not the same result. In the first stage, the original rules had a sensitivity of 1.0 for 121 malleolar-zone fractures, with a 95% interval from 0.97 to 1.0. For 49 midfoot-zone fractures the sensitivity was 0.98, with an interval from 0.88 to 1.0. Interpretation of the rules in 116 patients, still in that first stage, gave a kappa of 0.56 for the ankle series and 0.69 for the foot series. Two readers did not always mark the same result. That figure is not the agreement of the refined rules in the later hospitals. In the second stage, the refined rules had a sensitivity of 1.0 for 50 malleolar-zone fractures, with an interval from 0.93 to 1.0. For 19 midfoot-zone fractures the sensitivity was also 1.0, with an interval from 0.83 to 1.0. The paper’s conclusion calls the refined rules 100% sensitive. That word follows the point estimates of 1.0. The intervals are wider than a single point. The paper also estimates a potential reduction in radiography of 34% for the ankle series and 30% for the foot series. If the rule was negative, it estimates the probability of fracture at 0%. The interval runs from 0% to 0.8% for the ankle series, and from 0% to 0.4% for the foot series. Those 34% and 30% figures are potential reductions inside the validation. They are not the later trial results. A 1994 paper in JAMA (16 March, volume 271, pages 827–832) took the rules into two hospitals. The design was not randomized. It used before-and-after periods and a concurrent control hospital. It included 2,342 adults with acute ankle injuries, across five-month periods before and after. Ankle radiography showed a relative reduction of 28% at the intervention hospital and an increase of 2% at the control hospital. Foot radiography showed a relative reduction of 14% at the intervention hospital and an increase of 13% at the control hospital. Among patients without a fracture, in the after period at the intervention hospital, those sent home without radiography spent 80 minutes in the department, against 116 minutes for those who had radiography. The paper’s estimated total medical costs, for physician visits and radiography, were 173. Satisfaction with emergency physician care was 95% against 96%. Later radiography was 5% in both of those groups. Sensitivity was 1.0 for 74 malleolar fractures (interval 0.95 to 1.0) and 1.0 for 19 midfoot fractures (interval 0.82 to 1.0). Over the next 12 months, radiography use at the intervention hospital did not rise. The minute gap and the dollar gap compare two groups in the after period. They are not a before-and-after of the whole department. The paper does not name the currency of those dollar figures. The wider trial is Stiell, George Wells, Andreas Laupacis, and their colleagues, in BMJ on 2 September 1995 (volume 311, page 594). It is a multicentre before-and-after trial in eight Canadian teaching and community hospitals. The communities ranged from 10,000 to 3,000,000 people. All 12,777 adults with acute ankle injuries were included: 6,288 in the control period and 6,489 in the intervention period. The control period ran from 1 May 1991 to 30 April 1992. The intervention period ran from 1 January to 31 December 1993. The two periods are not one continuous pair of years. More than 200 physicians were taught the rules in a one-hour lecture, with handouts, pocket cards, and two posters in each department. The choice to order a radiograph stayed with the treating physician. The analysis kept every eligible patient, whether or not that physician completed a form or followed the rules. The paper defines a clinically important fracture as one greater than 3 mm in breadth. Ankle radiography was ordered for 82.8% of patients in the control period (5,207 of 6,288) and for 60.9% in the intervention period (3,955 of 6,489). The paper calls that change a relative reduction of 26.4%, with P under 0.001. The proportion fell at all eight hospitals, and in the subgroups set in advance: community hospitals, teaching hospitals, emergency physicians, family physicians, and house staff. Foot radiography did not move together. Three hospitals had a significant reduction. Five had no significant change. In the intervention period, more patients had no radiography at all (21.7% against 8.4%), and fewer had both an ankle series and a foot series (9.2% against 21.8%). The clock and the bill are comparisons inside the intervention period. They are not a before-and-after of the department. Patients without a fracture who had no radiography spent a mean of 54.0 minutes in the department. The standard deviation was 42.0. Those who had radiography spent 86.9 minutes, with a standard deviation of 46.9. For patients reached by telephone, mean total charges were 161.60 (standard deviation 71.2), in 1993 US dollars. Those charges cover emergency and follow-up visits and radiographic series for that followed subset. They are not a measured saving for a health system. The authors’ conclusion says the introduction led to shorter waits and lower costs. The printed comparison does not show the department’s average wait, or its budget, before and after. Missed fractures need the same care with denominators. The paper says it had no missed-fracture data for the control period. Inside the intervention follow-up, 10 of 2,033 patients had a fracture diagnosed after discharge, with no new injury. Three of 732 who had undergone radiography were in that ten (0.4%). Seven of 1,301 who had received no radiography were in that ten (0.5%). The abstract’s “0.5 versus 0.4” is this comparison. It is not a control-period rate against an intervention-period rate. The results say the rules had been applied correctly in only one of those seven. The discussion, citing the same table, says the misses without radiography came from the rules not being used or being misread, and in one case from gross swelling. All ten had healed without delay or long-term effects at six months. No litigation was started. A separate count, before discharge, found 6 of 1,090 important fractures in cases where the rules were read as negative. In those six, physicians ordered radiographs for other reasons, mainly gross swelling. A negative reading was not the last word in those six. The paper also prints two nearby counts that this page does not merge. It says 2,032 of 2,171 patients in the telephone sample were reached (93.6%). The fracture sentence uses 2,033 as its denominator. Both figures are the paper’s. They are not one rounded count. On the forms, physicians completed the study sheet for 77.1% of the 6,489 intervention patients (5,003). The paper then reports accurate interpretation in 97.1% of ankle cases and 97.6% of foot cases. It reports satisfactory compliance in 95.3% of ankle cases and 95.0% of foot cases. It does not restate the denominator in that sentence. Radiography that the rules judged unnecessary still happened in 4.9% of cases, and in 0.5% because the patient insisted. Physicians said they were uncomfortable applying the rules in 3.8% of cases. The discussion names the common reading errors: ignoring tenderness at the medial malleolus, or failing to palpate the whole distal 6 cm of the posterior fibula. Some fractures leave the bone 5 or 6 cm above the tip. Bachmann and colleagues reviewed the same rules in BMJ on 22 February 2003 (volume 326, page 417). They included 32 studies and used 27 studies, reporting on 15,581 patients, in the meta-analysis. Pooled negative likelihood ratios were 0.08 for the ankle (interval 0.03 to 0.18) and 0.08 for the midfoot (0.03 to 0.20). For both regions in children, the pooled ratio was 0.07 (0.03 to 0.18). The review says the sensitivity is almost 100%, with modest specificity, and that use should cut unnecessary radiographs by 30% to 40%. Inside the review, the reported sensitivities run from 99.6%, in studies that applied the rules within 48 hours of injury, to 96.4%, in studies of combined assessment. “Should cut” is the review’s conclusion about use. It is not the 26.4% relative reduction in the 1995 trial, and it is not the 28% relative reduction in the 1994 hospital. Statistical Thinking keeps a point estimate, an interval, a relative reduction, and a likelihood ratio from collapsing into one number. The lesson is narrow. A written procedure, with named sites, a counted walk, and a stop, was teachable to physicians who had not written it. In these trials, ankle radiography fell. The 1995 paper does not show a higher rate of later fractures among people sent home without films than among people who had films. The same record shows the limits of a procedure. Readers did not always agree in 1993. Foot films did not fall at five of the eight hospitals in 1995. Six important fractures appeared where the card was read as negative. One later fracture followed a correct “no radiograph” reading. Systems Thinking would also count what sat outside the card: the hour of teaching, the posters, and a physician who could still order a film. These trials do not supply an effect for the habit in general.Boundaries and Failure Modes
Algorithmic Thinking fails in three places. The task may have no checkable output. The steps may be reused outside the inputs they name. Or one study’s percentages may be treated as a property of the habit. The first boundary is a task that will not hold still. Book VII assumes two numbers and a measure. The ankle rules assume an acute injury inside a list. A first conversation, or a moral conflict, or a case that does not match the input, has no procedure yet. Writing steps so that a card exists does not create an output you can check. Computational Thinking may still help you take the mess apart. This habit starts when you can name the input and the stop. The second boundary is the person the rule left out. The 1993 refinement excluded children, pregnancy, isolated skin injuries, films taken elsewhere, injuries older than ten days, and return visits. The 1995 trial enrolled adults. Its discussion adds a different list, of situations where the authors say assessment may be unreliable: altered mentation, intoxication, other painful injuries, diminished sensation in the legs, or a language barrier. It also notes gross swelling that makes the posterior edge impossible to palpate. Bachmann’s review pools a children’s subgroup, with a negative likelihood ratio of 0.07. That line is about the rules in the studies that entered the pool. It is not a finding that the adult card can be copied onto every child without a separate check. A procedure is definite only inside the inputs it names. The common misuse is to treat the percentages as proof about the habit. Do not cite 26.4%, 28%, 34%, or 30% as the effect of Algorithmic Thinking, of a workshop, or of one household card. The 1993 figures are potential reductions in a validation sample. The 1994 figure is a relative change against a concurrent hospital, in a design that was not randomized. The 1995 figure is a relative change across two separated years, after a lecture and posters, with the physician still free to order a film. Do not cite 54 minutes against 87 minutes, or 161.60, as a before-and-after of a department. Those gaps are inside the intervention period, between patients without fracture who did or did not have radiographs. Do not cite the discussion’s rounded “about $90” gap, or its remark that a 25% cut at those eight hospitals would mean considerable savings, as a second measurement. Do not cite a sensitivity of 1.0 as a guarantee. The 1993 first stage was 0.98 for 49 midfoot fractures. The 1994 midfoot interval runs from 0.82 to 1.0 on 19 fractures. Bachmann’s combined-assessment figure is 96.4%. Do not cite the review’s 30% to 40% as the reduction those trials measured.Common Misconceptions
Three confusions travel with the name. The habit gets mistaken for coding, for the wider computational set, and for a proof that a sensitive rule will travel.The habit means learning to code
The habit means learning to code
Futschek’s 2006 chapter argues that the abilities can be developed without learning to program. Knuth’s effectiveness test is a person, a pencil, and paper. Code is one way to carry a procedure that is already definite. A program you cannot explain to a second person has not finished the habit. “Thinking like a computer” is not the requirement. A computer can run a loop that does not stop. This habit has to stop.
The habit is just computational thinking
The habit is just computational thinking
The 2011 ISTE and CSTA definition lists algorithmic thinking as one part of computational thinking: a series of ordered steps. The same definition includes formulating the problem, organizing data, abstraction, and transfer, and it says the list is not exhaustive. You can write an ordered procedure and still skip the rest. You can also do the rest and leave the steps too vague for a second person. On this site the two pages are nested. They are not two names for one habit.
A sensitivity of 1.0 means the steps are safe everywhere
A sensitivity of 1.0 means the steps are safe everywhere
A sensitivity of 1.0 in the 1993 second stage, and in the 1994 count, is a point estimate on the fractures those stages saw. The intervals widen when the count is small. The 1993 conclusion’s phrase “100% sensitive” follows those point estimates. Bachmann’s review says “almost 100%” and also reports 96.4% for combined assessment. In the 1995 trial, six important fractures were found where the rules were read as negative, and one later fracture followed a correct negative reading. A high sensitivity belongs to a tested rule on a stated population. It does not belong to the habit of writing procedures.
Related Concepts
Algorithmic Thinking sits next to habits that take a thing apart, draw a forced conclusion, or stop for a different reason. The links below are neighbors. They are not other names for this procedure.Computational Thinking
The wider set on this site: decomposition, patterns, abstraction, and algorithms. This habit is the ordered procedure inside that set.
Analytical Thinking
States how the parts depend on each other. A parts list does not, by itself, give the next person an order and a stop.
Deductive Reasoning
Draws a conclusion that must follow if the premises are true. A step can contain a deduction. The habit is the whole procedure.
Satisficing
Stops when an option clears a bar. That stop can be wise. It still may not be a procedure a second person can check.
Systems Thinking
Asks what sits outside the card. In the ankle trials, that includes the lecture, the posters, and the freedom to order a film anyway.
Statistical Thinking
Keeps a point estimate, an interval, a relative reduction, and a likelihood ratio from being treated as one number.