MadeByZack
Sign in
Back

2.1.1 Computational thinking · Paper 2

Computational thinking: breaking problems down

Each section has pictures and things to try, then its key points and key words. Exam practice is at the end of the page.

You need to know

  • Abstraction, decomposition and algorithmic thinking
  • How they are used to define and refine problems

You don't need to know

  • OCR doesn't rule anything out here.

The three principles

AbstractionRemoving details that don't matter, to focus on what does. A tube map leaves out real distances and streets, and just shows stations and lines.
DecompositionBreaking a big problem into smaller problems that are easier to solve. Making a game: menu, player movement, scoring, levels.
Algorithmic thinkingWorking out the steps needed to solve a problem, in the right order. A recipe is an algorithm.

Exam tip: For abstraction questions, say what has been removed and what has been kept.

Try it

Which principle is being used?

  • A sat nav shows the roads, but not every building
  • Splitting a school website into login, timetable and homework parts
  • Writing the steps to make toast, in the right order
  • A weather app just shows a rain cloud, not all the readings
  • A team shares out the levels of a game between programmers
  • Planning the order of the checks when someone logs in

Try it

Abstraction: a program plans bus journeys. Keep or remove each detail?

  • The names of the bus stops
  • The colour of each bus
  • The times buses leave each stop
  • The name of the driver
  • Which stops each bus route goes to
  • The adverts on the side of the bus

Try it

Decomposition: watch a big problem get broken down into a structure diagram.

Canteen appLog inOrder foodPayEnterdetailsCheckdetailsCheckbalanceTakemoney
  1. The whole problem: an app where students order and pay for school lunch. It is too big to solve in one go.
  2. Decompose it: break it into smaller parts. Log in, order food, and pay.
  3. Keep breaking parts down until each one is small enough to solve easily.
  4. Each small part can now be coded and tested on its own, and different programmers can work on different parts at the same time.

Try it

Algorithmic thinking: put the steps for getting cash in order.

  1. Put your card in the cash machine
  2. Type your PIN
  3. Choose how much money you want
  4. Take your card back
  5. Take your cash

Key points

Abstraction

  • Abstraction means removing detail that doesn't matter so you can focus on what does.
  • A map of the London Underground is an abstraction: it shows stations and lines, but not streets or real distances.
  • Programs use abstraction too. A football game stores the score and the time, not the colour of every blade of grass.
  • Abstraction makes a problem simpler to solve and quicker to program.

Decomposition

  • Decomposition means breaking a big problem into smaller parts that are easier to solve.
  • Each small part can be solved, coded and tested on its own.
  • Different people can work on different parts at the same time.
  • Parts can sometimes be reused in other programs.
  • A structure diagram is a picture of a problem after decomposition.

Algorithmic thinking

Before this: Decomposition

  • Algorithmic thinking means working out the steps needed to solve a problem, in the right order.
  • An algorithm is a set of instructions that solves a problem. A recipe is an everyday algorithm.
  • The order matters: brushing your teeth before putting toothpaste on the brush doesn't work.
  • Once you have a good algorithm, it can be reused for similar problems.

Key words

Say what each one means, then tap to check.

Exam practice

11 questions in the style of the OCR exam, 27 marks in total. Try each one, then check the mark scheme.

The three principles

Question 1[1 mark]
Define the term abstraction.
Hint

Think of the tube map. What has it left out, and why?

Define means give the exact meaning in one clear sentence.

1 mark: one answer is enough.

Show mark scheme
  • Removing / hiding unnecessary detail (to focus on the important parts of a problem).

Don't accept: "Breaking a problem into smaller parts". That is decomposition.

Question 2[3 marks]
A student is writing a program to simulate traffic lights at a crossroads.
Give two details they could remove using abstraction, and one detail they must keep.
Hint

What does the simulation need in order to work properly? Anything else can be removed.

Give means give a short, clear answer. You don't need to explain it.

3 marks: make 3 separate points.

Show mark scheme
  • Remove (max 2): the colour / make of the cars, the weather, the names of the drivers, the shape of the lights' casing, the sound of the engines.
  • Keep (1): the order of the light colours / how long each light stays on / the number of cars waiting.

Also accept: Keep: which roads the lights control / the timing pattern.

Don't accept: Removing the light colours or how long they stay on. The simulation needs these to work.

Accept any sensible details. 1 mark each for two things removed, 1 mark for one thing kept.

Question 3[2 marks]
Describe what is meant by decomposition.
Hint

To decompose something is to take it apart. What is broken into what?

Describe means say what it is like or what happens. Make each point a separate fact.

2 marks: make 2 separate points.

Show mark scheme
  • Breaking a problem down…
  • …into smaller, more manageable parts / sub-problems.

Don't accept: "Removing unnecessary detail". That is abstraction.

1 mark for each point.

Question 4[2 marks]
Give two benefits of decomposing a problem.
Hint

Think about solving each part, testing it, and sharing out the work.

Give means give a short, clear answer. You don't need to explain it.

2 marks: make 2 separate points.

Show mark scheme
  • Each part is easier to solve / code.
  • Parts can be tested separately.
  • A team can work on different parts at once.
  • Parts can be reused.

1 mark each, max 2

Question 5[3 marks]
A teacher wants a program to run a times tables quiz. Decompose the problem into three smaller parts.
Hint

What does the quiz do at the start, during each question, and at the end?

Decompose means break the problem into smaller parts that could each be solved on their own.

3 marks: check every part before you finish.

Show mark scheme
  • Ask the user which times table / how many questions.
  • Generate and ask each question.
  • Check the answer.
  • Keep / update the score.
  • Show the final score.

Don't accept: Parts that are too vague, e.g. "make the program".

Don't accept: Three parts that are really the same, e.g. "ask question 1, ask question 2, ask question 3".

1 mark per sensible part, max 3

Question 6[1 mark]
State what is meant by an algorithm.
Hint

A recipe is one. What is it a set of?

State means give a short, clear answer. You don't need to explain it.

1 mark: one answer is enough.

Show mark scheme
  • A set of (step-by-step) instructions to solve a problem / complete a task.
Question 7[3 marks]
Put these steps for logging into a website into the correct order:
A: Check the password matches
B: Enter username and password
C: Show the home page
D: Open the login page
Hint

What must you do before you can type a password? What happens once it has been checked?

Put in order means arrange them from first to last.

3 marks: check every part before you finish.

Show mark scheme
  • D first.
  • B second, then A.
  • C last.

Don't accept: A before B. The password has to be entered before it can be checked.

Example answer

D, B, A, C

1 mark for D first, 1 for B before A, 1 for C last

Mixed questions on the whole page

Question 8[3 marks]
State which computational thinking principle is being used in each case.
  1. A game designer splits a new game into a menu, levels and scoring.
  2. A map of the school shows only rooms and corridors, not the furniture.
  3. A student writes out the steps to make a cup of tea, in order.
Hint

Splitting up, leaving out, or putting steps in order: which principle is which?

State means give a short, clear answer. You don't need to explain it.

3 marks: make 3 separate points.

Show mark scheme
  • a) Decomposition
  • b) Abstraction
  • c) Algorithmic thinking

Don't accept: a) "Abstraction". Splitting a problem into parts is decomposition.

1 mark for each.

Question 9[3 marks]
A sat nav shows a simplified map to plan a route. Identify two details that have been removed by abstraction, and one detail that has been kept.
Hint

What would a driver need to see to follow the route? What wouldn't they need?

Identify means pick out or name the right thing. A short answer is enough.

3 marks: make 3 separate points.

Show mark scheme
  • Removed (any two): buildings, trees, house colours, shop names, exact shape of land…
  • Kept (any one): roads, junctions, distances, speed limits, destination.

Also accept: Kept: road names, one-way streets, traffic.

Don't accept: Roads or junctions as removed. The driver needs these to follow the route.

2 marks for removed, 1 for kept

Question 10[4 marks]
A programmer is writing a program for a cinema to sell tickets online. Explain two benefits of decomposing this problem.
Hint

Name a few parts of a ticket website first. Then think: what is easier when the work is split up like that?

Explain means say what happens and why. Words like “because” and “so” help.

4 marks: aim for 4 things said, such as a point and then the reason for it.

Show mark scheme
  • Each part (e.g. choosing a film, picking seats, taking payment) is smaller, so it is easier to solve and code…
  • …and it can be tested on its own, so errors are easier to find.
  • Different programmers can work on different parts at the same time…
  • …so the program is finished sooner.
  • Parts can be reused, e.g. the payment part in another program…
  • …which saves time.

Don't accept: "It makes it easier" with no reason. Say why, e.g. each part is small enough to code and test on its own.

Don't accept: Benefits that are not about decomposing, e.g. "the program runs faster".

Example answer

The ticket program can be split into smaller parts, such as choosing a film, picking seats and taking payment. Each part is easier to code and can be tested on its own, so errors are easier to find. Different programmers can also work on different parts at the same time, so the program is finished sooner.

For each benefit: 1 mark for the benefit, 1 mark for explaining it. Max 4.

Question 11[2 marks]
Describe what is meant by algorithmic thinking.
Hint

Think of a recipe: the steps, and the order they go in.

Describe means say what it is like or what happens. Make each point a separate fact.

2 marks: make 2 separate points.

Show mark scheme
  • Working out the steps needed to solve a problem…
  • …in the correct order / so they can be followed to reach a solution.

1 mark for each point.