 # 12.03 Following Algorithms

Lesson

## Ideas

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

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.

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

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
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:

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.

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.

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.

### Examples

#### Example 2

a

Worked Solution
Create a strategy

Apply the idea
b

Worked Solution
Create a strategy

Multiply the sum from part (a) by 2.

Apply the idea
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.

### Outcomes

#### VCMNA194

Follow a mathematical algorithm involving branching and repetition (iteration)