Courses / Mathematics I
Programming Elements

Algorithms and Computational Thinking

Mathematics I 201 words Free to read

What is an Algorithm?

An algorithm is a finite, precise sequence of unambiguous steps that solves a problem. It must be finite (it terminates), definite (each step is clear), and effective (each step is doable).

Computational thinking is the mindset behind algorithm design. Its core habits:

HabitWhat it means
DecompositionBreak big problems into subproblems
Pattern recognitionSpot repeated structures
AbstractionHide irrelevant detail
Algorithm designExpress solution as steps

Before coding, use pseudocode (language-independent English) or flowcharts to plan logic.

A fuzzy question decomposes into three steps that a machine can run

How to Compute vs What It Is

A mathematical definition states what an answer is, but an algorithm gives a concrete procedure for computing it.

ConceptRoleExample
DefinitionWhat the answer is"Largest common divisor"
AlgorithmHow to compute itEuclid's GCD method
Common pitfall: Confusing a specification with an algorithm. Saying "prime factorisation is the unique product of primes" only specifies the answer; you still need a terminating procedure like trial division to produce it.

Practise this lesson

The explanation above is free to read. The graded practice for this lesson lives in the Tryals app.

11practice questions
2interactive scenes

Programming Elements