Lesson

Do you know how to use an algorithm to describe a set of steps? Try this one.

We want to order these three digit numbers from smallest to largest by following the algorithm below:

705, \,281, \,106

Order the numbers from the lowest to highest hundreds digit.

Is there more than one number with the same hundreds digit?

If no - STOP

If yes - Order them from the lowest to highest tens digit.

Is there more than one number with the same hundreds and tens digits?

If no - STOP

If yes - Order them from the lowest to highest units digit.

STOP

a

List the hundreds digit of each number from smallest to largest.

Worked Solution

b

Will the algorithm STOP at step 2?

Worked Solution

c

Using your answers above, put the numbers 705,281, and 106 in order from smallest to largest.

Worked Solution

Idea summary

It's important when following algorithms to do each step one at a time and in order, this is the same as how computers read code.

This video explores an example of an algorithm that is used to both setup and solve a problem.

We are going to subtract these two numbers, using the subtraction algorithm below:

91-26

Is the units digit of the first number less than the units digit of the second number?

If no - GO TO step 2.

If yes - regroup the tens from the first number to give a ten to the units, then GO TO step 2.

Subtract the units of the second number from the units of the first number.

Subtract the tens of the second number from the remaining tens of the first number.

Write the final answer by adding the results of steps 2 and 3.

a

Fill in the blanks below:

The units digit of the first number is ⬚.

The units digit of the second number is ⬚.

Worked Solution

b

What do we need to do at step 1?

Worked Solution

c

Fill in the blanks below:

We can regroup the tens part of 91 as 90=⬚+10, in order to give 10 to the units part, which will become 1+10=⬚.

Worked Solution

d

Complete step 2: Subtract the units of the second number from the units of the first number.

Worked Solution

e

Complete step 3: Subtract the tens of the second number from the remaining tens of the first number.

Worked Solution

f

Complete step 4: Write the final answer by adding the results of steps 2 and 3.

Worked Solution

Idea summary

We can use algorithms to add or subtract numbers.

Define a simple class of problems and solve them using an effective algorithm that involves a short sequence of steps and decisions