topic badge

14.01 Following Algorithms

Lesson

Are you ready?

Do you know how to follow an algorithm to solve a problem?

Examples

Example 1

We are going to add these two numbers together, using the addition algorithm below:

37+46

  1. Add the units.

  2. Is the result at least 10?

    • If no - GO TO step 3.

    • If yes - regroup into tens and units, then GO TO step 3.

  3. Add the tens.

  4. Is the result at least 100?

    • If no - GO TO step 5.

    • If yes - regroup into hundreds and tens, then GO TO step 5.

  5. Write the final answer by adding the hundreds, tens and units.

a

Which two numbers will be added in step 1?

Worked Solution
Create a strategy

Follow step 1.

Apply the idea

Step 1 tells us to add the units which are the numbers 7 and 6.

b

Complete step 1: Add the units.

Worked Solution
Create a strategy

Add the units found in part (a).

Apply the idea
\displaystyle 7+6\displaystyle =\displaystyle 13Add the units
c

What do we need to do at step 2?

Worked Solution
Create a strategy

Use the answer from part (b).

Apply the idea

Since the result from part (b) is at least 10, \, 13 \gt 10, step 2 tells us to regroup into tens and units, and then GO TO step 3.

d

Regroup 13 into tens and units:

13 = ⬚+⬚

Worked Solution
Create a strategy

Write the number in a place value table.

Apply the idea

Here is 13 in a place value table:

TensUnits
13

We have 1 tens which equals 10, and 3 units which equals 3.

13 = 10+3

e

Now complete step 3: Add the tens.

Worked Solution
Create a strategy

Find the tens in each number.

Apply the idea

37 has 3 tens which equals 30. 46 has 4 tens which equals 40. 13 has 1 ten which equals 10.

\displaystyle 30+40+10\displaystyle =\displaystyle 80Add the tens
f

What do we need to do at step 4?

Worked Solution
Create a strategy

Use the answer from part (e).

Apply the idea

Since 80 \lt 100 we need to GO TO step 5.

g

Complete step 5: Write the final answer by adding the hundreds, tens and units.

Worked Solution
Create a strategy

Add the tens from part (e) and the units digit of the number found in part (b).

Apply the idea

From part (b) we have 13 which has a units digit of 3.

We found from part (e) that the sum of the tens is 80. This includes the 10 from 13.

\displaystyle \text{Final answer}\displaystyle =\displaystyle 80+3Add the tens and units
\displaystyle =\displaystyle 83Evaluate
Idea summary

We can use algorithms to add or subtract numbers.

Follow algorithms to solve problems

Following algorithms allows us, or computers, to perform tasks. It's important that when you follow an algorithm you do each step.

Loading video...

Examples

Example 2

Follow this algorithm.

a
  • Start with the number 16.

  • Add 5 to 16.

Worked Solution
Create a strategy

Add the given numbers.

Apply the idea
\displaystyle 5+16\displaystyle =\displaystyle 21Add the numbers
b
  • Double your answer to part (a).

Worked Solution
Create a strategy

Multiply the sum from part (a) by 2.

Apply the idea
\displaystyle 21\times 2\displaystyle =\displaystyle 42Multiply the sum by 2
Idea summary

When writing out the steps in an algorithm, you need to make sure each step is clear and that you give the correct order.

What is Mathspace

About Mathspace