← IB Computer Science

B1.1 · Book pp. 282–293

Approaches to computational thinking

Your level

Before any code, you need to understand the problem. Computational thinking does not mean thinking like a computer. It means thinking like a computer scientist.

What you need to know

  • B1.1.1 Construct a problem specification.
  • B1.1.2 Describe the fundamental concepts of computational thinking.
  • B1.1.3 Explain how these concepts are used to solve problems.
  • B1.1.4 Trace flowcharts for a range of algorithms.

This work leads straight into your internal assessment, since its first criterion needs a problem specification.

Next: problem specification →

B1.1.1 Problem specification

A problem specification is a short, clear explanation of an issue, showing who the stakeholders are and why it matters.

Problem statementWhat the problem is, who it affects, and what must be solved
Constraints and limitationsTechnical, economic, legal, operational and schedule limits
Objectives and goalsWhat the solution should achieve, agreed with stakeholders
Inputs and outputsWhat goes in, what comes out, and in what form
Evaluation criteriaClear, specific, measurable tests of success

Inputs and outputs

  • Direct entry: barcode, OCR, OMR or MICR readers.
  • Manual entry: keyboard, touch screen or mouse. It is cheap but error-prone.
  • Automatic entry: sensors. It costs more but is faster and more accurate.
  • Output: temporary (screen), permanent (print), or electrical and mechanical (actuators).

🔬 Lab: build a specification

A canteen has long queues at lunch. Write one line for each part, then check that each criterion can be measured.

Discussion: building for the whole world

A global platform must consider languages, currencies, date formats, laws such as GDPR, right-to-left layouts, time zones and what colours mean in different cultures. Is a local market sometimes the better target?

Next: the four concepts →

B1.1.2 Fundamental concepts

  • Abstraction: keep essential information and ignore the rest, as in a metro map or a timetable. In code, it hides how a process works, so you can simply call it.
  • Algorithmic design: create an ordered, finite set of precise steps with predictable results.
  • Decomposition: break a complex problem into smaller parts, solve them, then combine the results. This supports modular teamwork.
  • Pattern recognition: identify similarities in problems, so that tested solutions can be reused.

⚠️ Common mistake

Decomposition breaks down the problem, not the program. When it happens, there may be no program yet.

🔬 Lab: name the concept

✏️ Book correction

The book says that setting sum to 0 before dividing “would produce an error”. In fact 0 ÷ 3 runs without a problem and prints 0. That is a logic error: a wrong result with no error message, which makes it harder to find.

Next: in practice →

B1.1.3 Using the concepts

AreaHow the concepts help
Software developmentUnderstand the problem, drop unneeded detail, find repeats and design efficient algorithms
LibrariesCall a function without knowing how it was written, which is abstraction
Data analysisSpot patterns such as frequent complaints, then automate the repetitive steps
Machine learningPattern recognition classifies data and predicts behaviour
Database designAbstraction picks the relevant data, and decomposition splits it into tables
NormalizationPattern recognition finds repeated groups of attributes
Network securityPatterns identify threats, and algorithms set out step-by-step responses

✏️ Book note

The book’s game example treats abstraction as players ignoring misleading clues. A clearer example is a game modelling the real world: a racing game keeps speed and grip, and drops most of the physics of a real engine.

Next: flowcharts →

B1.1.4 Flowcharts

SymbolMeaning
Terminator (rounded)Start or end
ParallelogramInput or output
RectangleProcess, such as a calculation or assignment
DiamondDecision with labelled yes and no branches
ArrowFlowline showing what happens next
CircleConnector to another part of the chart

✏️ Book note

The book says flowlines show the direction of “data flow”. More exactly, they show the flow of control, or the order in which steps run.

Trace the flowchart

rev ← 0 INPUT number number > 0? remainder ← number MOD 10 rev ← rev * 10 + remainder number ← number DIV 10 OUTPUT rev NoYes
Original flowchart. The current step lights up in the lab below.
rev ← 0
INPUT number
WHILE number > 0
    remainder ← number MOD 10
    rev ← rev * 10 + remainder
    number ← number DIV 10
END WHILE
OUTPUT rev

🔬 Lab: trace table

numberrevnumber > 0remainderoutput

What does it do, and what is the flaw? Try 1760.

It reverses the digits of a number. 1760 gives 671, not 0671: the leading zero disappears because rev is a number, not text. Zero itself never enters the loop, and outputs 0.

⚠️ Common mistake

Label both branches of every decision, and make sure that every flowline connects to a shape.

Next: review →

Quick quiz

1. A stakeholder is…
2. Which belongs in a problem specification?
3. A map that hides most of a city’s detail shows…
4. Decomposition breaks down…
5. Reusing a tested function for similar tasks follows from…
6. A decision in a flowchart is drawn as a…
7. INPUT and OUTPUT use which symbol?
8. 3452 MOD 10 is…
9. 3452 DIV 10 is…

Exam-style questions

These are written for this site in the style of Paper 2. Answer on paper first, then open the mark points.

  1. Define computational thinking and outline its role in problem solving. [3]

    Mark points
    • A toolkit of techniques for solving problems [1].
    • It includes abstraction, decomposition, algorithmic thinking and pattern recognition [1].
    • It helps to analyse and simplify a problem and to choose an efficient solution [1].
  2. Identify three items in a problem specification and define one. [4]

    Mark points
    • Problem statement [1].
    • Constraints and limitations [1].
    • Evaluation criteria [1].
    • For example, evaluation criteria are measurable tests of whether the solution succeeds [1].
  3. Outline how decomposition and abstraction help software development. [4]

    Mark points
    • Decomposition splits the problem into smaller, manageable parts [1].
    • Teams can then work on the parts at the same time [1].
    • Abstraction removes unnecessary detail [1].
    • The solution is simpler, and takes less time to build [1].
  4. Students report reading time in hours and minutes. Identify the input, process and output for an algorithm that gives minutes only. [3]

    Mark points
    • Input: hours and minutes [1].
    • Process: total ← hours × 60 + minutes [1].
    • Output: total minutes [1].
  5. A username joins the last two letters of a first name and the first three of a last name. State the username for Malee Tanaka, and explain one limitation. [3]

    Mark points
    • ee + Tan = eeTan [1].
    • Two students may produce the same username [1].
    • Adding a unique number would solve this [1].