topic badge

12.04 Solve problems using an algorithm

Lesson

Are you ready?

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$705,281,106

1. Order the numbers from the lowest to highest hundreds digit.
2. 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.
3. 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.
4. STOP
  1. List the hundreds digit of each number from smallest to largest:

    $\editable{},\editable{},\editable{}$,,

  2. Will the algorithm STOP at step 2?

    Yes

    A

    No

    B

    Yes

    A

    No

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

    $\editable{},\editable{},\editable{}$,,

Learn

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

Apply

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

$91-26$9126

1. 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.
2. Subtract the units of the second number from the units of the first number.
3. Subtract the tens of the second number from the remaining tens of the first number.
4. Write the final answer by adding the results of steps 2 and 3.
  1. Fill in the blanks below:

    The units digit of the first number is $\editable{}$.

    The units digit of the second number is $\editable{}$.

  2. What do we need to do at step 1?

    GO TO step 2.

    A

    Regroup the tens part of $91$91, then GO TO step 2.

    B

    GO TO step 2.

    A

    Regroup the tens part of $91$91, then GO TO step 2.

    B
  3. Fill in the blanks below:

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

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

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

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

 

Remember!

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. What would happen if we didn't follow the steps the way they were set out?

 

Outcomes

VCMNA164

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

What is Mathspace

About Mathspace