The idea, step by step
Make instructions precise
An algorithm is a set of steps that can be followed without guessing what you meant. To generate a pattern, state the starting number, the change, when to record a value and when to stop.
“Start at 1, write it, add 2, and repeat while the next value is at most 9” generates 1,3,5,7,9. The words “at most” include 9. A different stopping condition can change the final term.
Trace, then improve
A trace table records each value as you follow the steps. It helps you catch a missed step or an instruction that never stops. Check the first value and the final boundary, not only the middle of the list.
Algorithms can include a decision. For example, after writing a number, test whether it is even, then record E or O. The instructions should say what happens for both outcomes. You can test the steps by hand before using a digital tool.
| Step | Recorded number |
|---|---|
| 1 | 1 |
| 2 | 3 |
| 3 | 5 |
| 4 | 7 |
| 5 | 9 |
A common trap
Any instruction saying “repeat” automatically stops at the right place.
Instead: A repeated process needs a clear condition or a set number of steps. Test whether that condition can actually happen.
See the thinking
Worked example 1
Follow: start at 0.5; write the number; add 0.25; write again if the new number is at most 1.5; repeat.
- Record 0.5, then 0.75, 1.0, 1.25 and 1.5.
- The next value would be 1.75, which is greater than 1.5, so stop before recording it.
Worked example 2
An algorithm says “start at 2, add 3 and continue until the value equals 10”. Explain the problem and repair it.
- The values are 2,5,8,11,14,… . They never equal 10.
- A usable repair is “write values while they are at most 10”; then the output is 2,5,8.
Check your understanding
Start at 4. Record four terms, adding 3 each time. What is the output?
Show answer
4, 7, 10, 13.
The starting value counts as the first of the four recorded terms.
Your turn
6 questions · 14 marks · Work at your own pace.
Read the questions online
- Start at 3. Write five terms, adding 4 each time.2 marks
- Start at 2. Write terms by doubling until you have written five terms.2 marks
- Start at 0.2 and record it. Keep adding 0.2 and recording the new value while it is at most 1. Write the output.2 marks
- What changes if the preceding algorithm records only values less than 1?2 marks
- Write precise steps that generate 5,10,15,20 and then stop.3 marks
- An algorithm starts at 1 and adds 2 until it equals 8. Why will it not stop? Give a repair.3 marks
Read the worked solutions
Equivalent correct methods earn the corresponding marks. Include units where asked.
- Start at 3. Write five terms, adding 4 each time.2 marks
Record the start, then make four increases.
3,7,11,15,19. - Start at 2. Write terms by doubling until you have written five terms.2 marks
Each new term is twice the previous term.
2,4,8,16,32. - Start at 0.2 and record it. Keep adding 0.2 and recording the new value while it is at most 1. Write the output.2 marks
Include 1 because at most 1 allows equality.
0.2,0.4,0.6,0.8,1.0. - What changes if the preceding algorithm records only values less than 1?2 marks
Less than excludes equality.
The final 1.0 is omitted. - Write precise steps that generate 5,10,15,20 and then stop.3 marks
A correct algorithm specifies start, change, recording and a finite stop. Equivalent correct steps are acceptable.
For example: start at 5; record it; add 5; repeat recording and adding until four values have been recorded. - An algorithm starts at 1 and adds 2 until it equals 8. Why will it not stop? Give a repair.3 marks
Check the boundary values rather than assuming the target is reached.
It stays odd and never equals 8. Stop before the next value exceeds 8, giving 1,3,5,7.
Curriculum reference & lesson scope
Australian Curriculum v9 and SA Curriculum Mathematics
Growing rational patterns; rules; brackets/order of operations; unknowns; algorithms.
Official curriculum source ↗