Skip to content

9.1 Algorithmic Thinking

How to think step by step and turn mathematical ideas into clear procedures.

Algorithmic thinking means solving a problem by describing a clear sequence of steps that always leads from input to output. Instead of relying on intuition, we make the method explicit so that anyone can follow it and obtain the same result.

From answers to procedures

When you compute 27+4827 + 48, you do not guess. You follow a method. First add the ones: 7+8=157 + 8 = 15, write 55 and carry 11. Then add the tens: 2+4+1=72 + 4 + 1 = 7. The result is 7575.

What matters here is not only the answer, but the procedure. The same steps work for any pair of numbers. This repeatability is what makes it an algorithm.

Turning definitions into actions

Mathematics often begins with definitions, but algorithmic thinking asks how to use them.

Take the idea of an even number. A number is even if it can be written as 2×k2 \times k for some integer kk. To check if 4242 is even, divide by 22 and look at the remainder. Since the remainder is 00, the number is even. For 4343, the remainder is 11, so it is odd.

The definition gives meaning. The algorithm gives a method to test it.

Working through a concrete example

Consider the list

3, 7, 2, 9, 5. 3,\ 7,\ 2,\ 9,\ 5.

We want to find the largest number. One simple method is to scan the list from left to right while remembering the largest value seen so far.

Start with 33 as the current largest. Compare it with 77 and update to 77. Compare 77 with 22 and keep 77. Compare 77 with 99 and update to 99. Compare 99 with 55 and keep 99. At the end, the answer is 99.

This method does not depend on the size of the list. It works in exactly the same way for any number of elements.

Clarity and termination

A good algorithm must be precise. It should clearly state what the input is, what steps to follow, and when the process stops.

For example, “keep checking numbers” is not enough. We must say which numbers to check and when to stop. In the list example, we stop after the last element. Without a stopping rule, a process may never end.

Representation affects the method

The way we write mathematical objects influences the algorithm we use.

A number can be written in decimal or binary. A polynomial can be written as a list of coefficients or as a formula. A graph can be stored as a list of edges or as a table of connections. Each representation makes some operations easier and others harder.

Algorithmic thinking includes choosing a representation that fits the task.

Algorithms and proof

There is a close connection between algorithms and proofs. A proof may show that something exists, but an algorithm shows how to find it.

For example, it is one thing to know that two numbers have a greatest common divisor. It is more useful to have a method that computes it step by step. In this sense, algorithms make mathematics constructive.

A practical habit

The central habit is to replace vague instructions with exact steps. Instead of saying “solve this,” we ask:

What do we start with What operation comes next How do we know when we are done

By answering these questions, we turn ideas into procedures. This makes mathematical reasoning clearer, more reliable, and easier to apply in practice.