These days the word ‘algorithm’ pops up everywhere. What exactly is an algorithm? What does it have to do with mathematics?
Step-by-step solution
Idea: An algorithm is a recipe for solving a whole class of problems: a list of exact steps, built from basic steps we already know how to do, that anyone (or a computer) can follow to reach the answer.
- Meaning. An algorithm is a step-by-step procedure to arrive at an answer. Each step is written so precisely that a person, or a computer, can follow it without having to think about what to do next.1 mark
- Link with mathematics. Many methods we learnt in school are algorithms. The column method of adding is one: write the numbers one below the other with the rightmost digits aligned, add each column from right to left, and carry 1 to the next column whenever a column total is 10 or more.½ mark
- For example, 473 + 695: units 3 + 5 = 8; tens 7 + 9 = 16, write 6 and carry 1; hundreds 4 + 6 + 1 = 11, write 1 and carry 1; the last carry 1 goes in front. Answer: 1168. The same steps work for any two numbers, which is what makes it an algorithm.½ mark
- Other algorithms you know: long division, finding the hcf (gcd) or lcm of two numbers, and finding the square root by division. In each, a precise list of steps turns a problem into an answer.
Answer to write in the exam
Algorithm: a step-by-step procedure, written precisely, to arrive at the answer of a problem.
Built from basic steps that we can perform directly (e.g. adding two single digits).
Maths example: column addition, 473 + 695: 3 + 5 = 8; 7 + 9 = 16 (write 6, carry 1); 4 + 6 + 1 = 11 (write 1, carry 1)
∴ 473 + 695 = 1168. Long division and finding the gcd are also algorithms.
Common mistakes that cost marks
- Calling any single calculation (such as 3 + 5 = 8) an algorithm. An algorithm is the general list of steps that works for every input, not one answer.
- Writing vague steps such as “add the numbers”. The steps must be precise enough to follow without guessing.
- Thinking algorithms belong only to computers. Every written method in arithmetic is an algorithm.
How this can come in the exam
Which of the following best describes an algorithm?
- Any correct answer to a sum
- A step-by-step procedure that leads to the answer of a problem
- A guess that is checked later
- A formula with letters in it
Show answer
(B) A step-by-step procedure that leads to the answer of a problem
An algorithm is a precise, step-by-step procedure for arriving at an answer.
Assertion (A): The column method of adding two numbers is an algorithm.
Reason (R): It gives a fixed list of steps that works for any two numbers.
- Both A and R are true, and R is the correct explanation of A.
- Both A and R are true, but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Show answer
(A) Both A and R are true, and R is the correct explanation of A.
Both are true, and R is exactly why the column method counts as an algorithm.
Try one yourself
Use the column-addition algorithm to add 586 + 739. Show each carry.
Show answer
Units: 6 + 9 = 15, write 5, carry 1. Tens: 8 + 3 + 1 = 12, write 2, carry 1. Hundreds: 5 + 7 + 1 = 13, write 3, carry 1. Write the last carry in front: 1325.
More questions like this
- Add two 4-digit numbers using the steps we have written down. Make sure you follow the steps precisely; do not perform any action that is not explicitly mentioned. Are you able to obtain the correct result?
- What happens if you add a 5-digit number to a 3-digit number. Do our steps handle this situation correctly?
- Why is it important to align the columns from right to left?
- In Step 3, why cannot the value of carry be more than 1?
- What happens if we do not include the fifth step in the algorithm above? Give examples where the algorithm will work correctly and where it will fail to work.