Logarithmic and exponential complexity – OCR A Level Computer Science lesson (H446)
Students learn to explain logarithmic and exponential growth in terms of halving and doubling, and say why exponential algorithms do not scale.
Lesson 3 of 16 in unit 13.2 Big O and Project Design, taught in Year 13, Autumn 1. It answers one big question: Why does binary search barely notice a bigger catalogue?
By the end, students can explain logarithmic and exponential growth in terms of halving and doubling, and say why exponential algorithms do not scale.
- The Build (the main task)
- Explain why a binary search of Lumenfield Observatory's sorted catalogue of 1 000 000 stars needs at most 20 comparisons, and why checking every possible subset of 30 telescope booking requests to find the best timetable is not feasible (6 marks).
- Support version
- A halving ladder (1 000 000 → 500 000 → 250 000 …) to complete down to 1, and a doubling table for subsets of 1, 2, 3, 4 and 5 requests, with the first rows filled in.
- Challenge
- The observatory buys a computer that is twice as fast. Explain how many more booking requests the exhaustive timetable search can now handle in the same time, and what that shows about exponential complexity.
- Real-world link
- Lumenfield Observatory's catalogue look-ups, and its booking system that must fit astronomers' telescope requests into one night.
- Key words
- Logarithmic complexity, Exponential complexity and Scale, each with a definition, an icon and a common mix-up on the key vocabulary slide.
- Misconceptions it tackles
- “O(n²) is exponential, because it grows very fast”; “Saying 'O(log n), so it is fast' is enough to explain logarithmic complexity”.
- OCR H446 specification
- 2.3.1 (c).
Every lesson follows the same Code & Commerce structure: a Bell Task recall starter, key vocabulary with definitions and icons, short teaching chunks with a check before pupils move on, The Build (one main task), challenge questions that get harder, and an exit question. Answers reveal one at a time on the slides, and everything is editable PowerPoint and Word.
Students can do it all on paper.
Also sold in the Big O and Project Design unit bundle, which includes the medium term plan, and in the full-year and complete-course bundles.
An independent resource written for OCR A Level Computer Science (H446). It is not endorsed by OCR or Cambridge University Press & Assessment. Programming project (NEA) lessons teach general skills on a made-up example project and give supervised time, within JCQ's rules on the help a centre may give.
What's included
- Slide deck (PowerPoint)
- Lesson plan (Word)
- Worksheet (Word)
- Support worksheet with scaffolds (Word)
- Single-teacher licence: use and adapt it with your own classes
More for A Level Computer Science
See allStudents learn to explain why algorithms are compared by how their steps grow with n, and reduce a step-count formula to its Big O.
Free sample lessonStudents learn to identify O(1), O(n) and O(n²) code from its loops and explain each answer from how often the statements run.
Students learn to compare algorithms by their best-case and worst-case time and their space, applying the comparison to a given data set.
Written for the specifications named. Not endorsed by or affiliated with any exam board.