Resources For Teachers For Tutors For Students & Parents Pricing
Year 3 Maths Patterns & Number Sequences

Follow & create algorithms to investigate numbers

20 practice questions 0 video lessons Theory + worked examples
Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

An algorithm is a clear set of steps you follow in order to investigate numbers. This Year 3 maths page explains how to follow a number machine and its rule, read a flowchart with a yes/no decision, find the rule from an in and out table, and create your own steps. Curriculum: VC2M3N09 / AC9M3N07.

An algorithm is a clear list of steps you follow in order, one after another, to work something out. It is like a recipe: do each step at a time, and you get the same answer every time.

A number machine has a rule, such as add 6 or double it. A number goes in, the rule changes it, and a new number comes out. To find the rule, check how each In turns into its Out, then test the same idea on every row.

A flowchart draws the steps as boxes joined by arrows. A diamond asks a yes/no question and splits the path in two. Following an algorithm means doing the steps; creating one means writing the steps yourself so anyone can follow them to investigate numbers.

A number machine that adds six An In box holding the number 7, an arrow into a rule box labelled add 6, another arrow, and an Out box holding the number 13. 7 In add 6 13 Out
A number machine. Put 7 in, apply the rule add 6, and 13 comes out.
A flowchart with a yes or no decision Start box, an arrow to a diamond asking is it even, a Yes path to a box that says halve it and a No path to a box that says add 3, both leading to an answer box. Start Is it even? Yes No Halve it Add 3 Answer
A flowchart. The diamond asks a yes/no question and splits the path.

Algorithms do not need formulas, but these facts help you follow and check them.

\[ \text{in} + 4 = \text{out} \quad \Rightarrow \quad \text{in} = \text{out} - 4 \]
in+4=out⇒in=out-4
\[ 5,\ 10,\ 20,\ 40,\ \ldots \quad (\text{double each time}) \]
5,10,20,40
\[ 7,\ 17,\ 27,\ 37,\ \ldots \quad (\text{add } 10 \text{ each time}) \]
7,17,27,37
Even or odd? Even numbers end in \(0, 2, 4, 6\) or \(8\); odd numbers end in \(1, 3, 5, 7\) or \(9\). With counters, share them into pairs: if none is left over, the number is even.
Run a machine backwards. To find what went in, start with what came out and do the opposite step: undo add with subtract, and undo double with halve.
Repeat until. Some algorithms say "keep going until ...". Write each number as you go, and stop as soon as the stop rule is true. Adding \(10\) again and again never changes the ones digit.

How to follow an algorithm

  1. Read all the steps first. See how many steps there are and what order they come in.
  2. Start with the given number. Write it down so you can see what goes in.
  3. Do one step at a time. Apply each rule in order, and write the new number after every step.
  4. Answer a diamond before you move on. In a flowchart, work out the yes/no question, then take the matching path.
  5. Check the result. The last number you write is the answer. Try another number to test that your steps work every time.
Example 1 β€” Follow a machine
A number machine uses the rule "add 6". The number \(7\) goes in. What number comes out?
Number machine adding six to seven An In box with 7, a rule box add 6, and an Out box with a question mark to be worked out. 7 In add 6 ? Out
Solution
\(7 + 6\)\(=\)\(13\)
7+6=13

Follow the rule once. The number \(13\) comes out.

Example 2 β€” Two steps in order
Follow these steps. Start with \(6\), double it, then subtract \(2\). What number do you finish with?
Solution
\(6 \times 2\)\(=\)\(12\)
\(12 - 2\)\(=\)\(10\)
6×2=12,12-2=10

Do the steps in order. You finish with \(10\).

Example 3 β€” Find the rule
A machine follows one rule. What is the rule, and what comes out when \(6\) goes in?
InOut
210
315
525
Solution
\(2 \times 5\)\(=\)\(10\)
\(3 \times 5\)\(=\)\(15\)
\(6 \times 5\)\(=\)\(30\)
6×5=30

The rule works for every row, so it is multiply by 5. Then \(6\) gives \(30\).

Example 4 β€” Follow a flowchart
Follow the flowchart for the number \(7\). If the number is even, halve it. If it is not, add \(3\).
Flowchart followed for the number seven Start with 7, ask is it even, seven is odd so take the No path and add 3 to reach the answer 10. Start with 7 Is it even? Yes No Halve it Add 3 Answer: 10
Solution
\(7\)\(\to\)\(\text{odd, take No path}\)
\(7 + 3\)\(=\)\(10\)
7+3=10

\(7\) is odd, so add \(3\). The answer is \(10\).

Example 5 β€” Repeat until
Start at \(3\) and keep adding \(5\) until you reach \(33\). How many times do you add \(5\)?
Solution
\(3,\ 8,\ 13,\ 18,\ 23,\ 28,\ 33\)
\(33 - 3\)\(=\)\(30\)
\(30 \div 5\)\(=\)\(6\)
33-3=30,30÷5=6

Count the jumps, not the numbers: there are \(7\) numbers but only \(6\) jumps, so you add \(5\) six times.

Example 6 β€” Work backwards
A number machine uses the rule "add \(4\)". The number \(15\) comes out. What number went in?
Solution
\(15 - 4\)\(=\)\(11\)
\(\text{check: } 11 + 4\)\(=\)\(15\)
15-4=11

Undo the rule: the opposite of add \(4\) is take away \(4\). The number \(11\) went in.

Common pitfalls

Keep the steps in order. Watch out for swapping steps. "Double, then add \(1\)" is not the same as "add \(1\), then double" and gives a different answer.
One rule must fit every row. A rule that only works for the first row of a table is the wrong rule. Test it on all the rows before you decide.
Read the decision exactly. "Bigger than \(30\)?" is No for \(30\) itself, because \(30\) is not bigger than \(30\).
Answer the diamond first. In a flowchart, work out the yes/no question, then follow the matching Yes or No arrow. Do not guess a path.

Frequently asked questions

What is an algorithm in maths?

An algorithm is a clear list of steps you follow in order to work something out. In maths it is like a recipe: you do each step one at a time, in the order it is written, and you get the same answer every time.

What is a number machine?

A number machine follows one rule, such as add \(6\) or double it. A number goes in, the rule changes it, and a new number comes out. If the rule is add \(6\) and \(7\) goes in, then \(13\) comes out.

How do you follow a flowchart?

Start at the top and follow the arrows down. When you reach a diamond, answer its yes or no question, then take the matching path. Keep going until you reach the answer box.

How do you find the rule of a number machine?

Look at how each In changes into its Out, then test the same idea on every row. The rule is right only if it works for all the rows. If \(2\) gives \(10\), \(3\) gives \(15\) and \(5\) gives \(25\), the rule is multiply by \(5\).

What does it mean to investigate numbers?

To investigate numbers means to explore them using clear steps, such as building a pattern, testing whether a number is even or odd, or growing a sequence by the same rule each time.

How do you create your own algorithm?

Decide what you want to do, then write short steps in the right order so anyone can follow them. Check your steps by trying them on a number to make sure they give the answer you expect.