B1.1.2 · Approaches to computational thinking
Fundamental Concepts of Computational Thinking
Long before a problem specification turns into working code, a computer scientist leans on four specific habits of thought to actually get from "here's a mess of a problem" to "here's a solution." Those four habits have names, and IB Computer Science expects you to know all four.
Explainer
Computational thinking isn't a single skill, it's a small toolkit of four distinct techniques, each suited to a different part of turning a real-world problem into something a computer can actually help solve. They're used together, but they each do a genuinely different job.
Computational thinking is a set of problem-solving habits built from four fundamental concepts: abstraction, decomposition, pattern recognition and algorithmic design. None of the four is programming itself, all four happen before or alongside it, to make the eventual solution simpler, faster to build and easier to get right.
Worked example
Four concepts, one canteen app
A school wants to build an app that lets students pre-order their lunch so they can skip the queue. Click each concept to see exactly what it means and how it shows up in that one project.
Check your understanding
The canteen app's designers decide the ordering screen should only show an item's name, photo and price, and hide every other detail (supplier codes, storage temperature, allergen database IDs) that staff track internally. Which concept is this?
Common mistake
RecurringA common weak answer defines decomposition as splitting a finished PROGRAM into smaller sub-programs or files. That's too late: decomposition happens while the PROBLEM is still being understood, before a single line of code exists to split up. What actually gets broken into smaller pieces is the problem itself, the resulting pieces then each get their own function, method or module once coding starts.
Splits the code, not the problem: "Decomposition means splitting the canteen app's finished code into separate files for the menu, payment and kitchen dispatch." This describes organising a program that already exists, which is a design choice made afterwards, not decomposition itself.
Splits the problem, before any code exists: "Decomposition means splitting the problem 'build a canteen ordering system' into smaller parts, choosing items, taking payment, notifying the kitchen, confirming pickup, before deciding how any of it will be coded." Correctly places decomposition at the problem stage, ahead of any actual programming decision.
Revision questions
Past-paper style. Write an answer, then reveal the marking points and mark yourself.
[2]Define the term decomposition.
Marking points
评分要点
- Decomposition is breaking a large problem down into smaller sub-problems.
- Each sub-problem can then be understood and solved on its own, and the parts combined into a full solution.
- 分解是把一个大问题拆成更小的子问题。
- 然后每个子问题都可以单独理解和解决,再把各部分组合成完整的解决方案。
[3]Identify the four fundamental concepts of computational thinking and give one real-world example of each.
Marking points
评分要点
- Decomposition: breaking a problem into smaller parts, for example planning a trip as transport, accommodation and activities.
- Pattern recognition: spotting similarities or repetition, for example noticing every weekday commute follows the same three stages.
- Abstraction: ignoring irrelevant detail, for example a train timetable showing times and platforms but not the track layout.
- Algorithmic design: writing ordered steps, for example a recipe or a set of directions from A to B.
- 分解:把问题拆成更小的部分,例如把一次旅行规划为交通、住宿和活动。
- 模式识别:发现相似性或重复,例如注意到每个工作日的通勤都遵循相同的三个阶段。
- 抽象:忽略无关的细节,例如列车时刻表显示时间和站台,但不显示轨道布局。
- 算法设计:写出有序的步骤,例如一份食谱,或从 A 到 B 的一组路线指引。
[4]A school library wants an app to recommend books to students. Explain how pattern recognition and abstraction could each be applied when designing this system.
Marking points
评分要点
- Pattern recognition: look for students with similar reading histories or similar ratings, so the app can recommend a book that similar students enjoyed.
- Pattern recognition also covers spotting recurring features such as genre, author or reading level that group books together.
- Abstraction: represent each book by only the attributes that matter for recommendation (genre, level, topics, rating) and ignore details like cover design or page count.
- Abstraction also means modelling a student as a simple profile of preferences rather than a full record.
- Together they let the recommendation be computed by comparing simplified profiles for similarity.
- 模式识别:寻找阅读历史相似或评分相似的学生,使应用能推荐相似学生喜欢的书。
- 模式识别还包括发现把书归类到一起的反复出现的特征,如体裁、作者或阅读难度。
- 抽象:只用对推荐重要的属性(体裁、难度、主题、评分)来表示每本书,忽略封面设计或页数等细节。
- 抽象还意味着把学生建模为一个简单的偏好档案,而不是完整的记录。
- 两者结合,使推荐可以通过比较简化档案的相似度来计算。
Flashcards
Active recall for this statement’s key terms.
Keep this statement’s practice with you
Free account: unlock every revision question and flashcard for B1.1.2, and every other IB CS 2027 statement.