- Level 6
- Number and Algebra
- Patterns and algebra
- Design algorithms involving branching and iteration

###### Patterns and algebra • Level 6

# Design algorithms involving branching and iteration

VCMNA221

## Teaching Context

Show More

At this level students start to design algorithms for standard mathematical procedures they already know. They will use informal language to describe to a computer (robot) what to do to perform the operation. To do this they will need to break down the operation into tiny steps, look for decision points and use repetitions.

The teaching approach suggested allows this section to act as review of material already taught (and hopefully understood). Consideration of the steps and their sequence in the algorithms will help many students to develop greater understanding of the process. This may be viewed as a set of activities involving both problem solving and reasoning. It will incorporate some degree of problem solving using trial and error, as a result of planning, trialing, evaluating and refining the steps.

The teaching process for each of these might follow these steps:

- Give students a little practice of the operation being studied
- Get students engaged in the problem of breaking down the longer process into smaller steps and simple yes/no decisions

Initially provide all the components of the solution in random sequence so that students can make sense of the process. Students are then challenged to match the order of steps, etc with the way they perform the calculation.

Ensure you include the following components:

- Unnumbered steps
- Questions (for yes/no answers)
- The instructions to go back to a previous step
- Gradually reduce the amount of support

Please note, this content is part of a sequence spread over many levels. It is important to know what has preceded and what is to follow:

- In Level 4 (VCMNA164) students begin to learn that many apparently complex processes can be broken into simple steps that follow each other in a sequence determined by a series of decisions
- In Level 5 (VCMNA194) students use flow chart ideas to explore simple mathematical algorithms. These algorithms were written and just needed to be followed
- In Level 7 (VCMNA254) students develops the idea of ‘pseudo code’ in readiness for using particular codes of a programming language

### Victorian Curriculum

Design algorithms involving branching and iteration to solve specific classes of mathematical problems (VCMNA221)

VCAA Sample Program: A set of sample programs covering the Victorian Curriculum Mathematics.

VCAA Mathematics glossary: A glossary compiled from subject-specific terminology found within the content descriptions of the Victorian Curriculum Mathematics.

##### Achievement standards

Students recognise the properties of prime, composite, square and triangular numbers and determine sets of these numbers. They solve problems that involve all four operations with whole numbers and describe the use of integers in everyday contexts.

Students locate fractions and integers on a number line and connect fractions, decimals and percentages as different representations of the same number. They solve problems involving the addition and subtraction of related fractions.

Students calculate a simple fraction of a quantity and calculate common percentage discounts on sale items, with and without the use of digital technology. They make connections between the powers of 10 and the multiplication and division of decimals.

Students add, subtract and multiply decimals and divide decimals where the result is rational.

Students write number sentences using brackets and order of operations, and specify rules used to generate sequences involving whole numbers, fractions and decimals. They use ordered pairs of integers to represent coordinates of points and locate a point in any one of the four quadrants on the Cartesian plane.

## Online Resources

## Teaching ideas

- Teaching a robot to perform arithmetical operations
- Calculate expressions using "order of operations'
- Create a reflection image of a point in s mirror line

### Teaching a robot to perform arithmetical operations

Tab Content
Tab Content
Tab Content
Tab Content
Tab Content

The purpose of this activity is to require students to revisit what we actually do when we add two numbers. This basic idea easily gets lost when students memorise the results. They break down the process into small steps so a computer (or robot) will be able to follow.

Students start with teaching the robot to add two small numbers; place value will not be involved. This will take them back to thinking about what adding actually means.

There will need to be a ‘counter’ (the student) who counts out the first number and then counts on while the second number is added.

An alternative is to use a number line, moving right from 0 for the first number, and then moving right extra steps for the second number.

Students need to think out how to tell the robot what to do to get the sum of the two numbers. When they think they have an algorithm that works, students should test it for themselves with two numbers. After testing students can determine if their design was effective, or if they need to add or remove steps to their design.

Here is one possible algorithm; in line 4 the second number is used to make the count increase.

Example: 3 + 2

Lines 1, 2 and 3 will put 3 blocks onto the answer pile, and the count will be at 3.

Lines 1, 2 and 4 will put 2 more blocks onto the pile and the count will be at 5.

**Extensions:**

'Subtract two numbers'

The purpose of this activity is to require students to revisit what we actually do when we subtract one number from another. This basic idea easily gets lost when students memorise the results. They break down the process into small steps so a computer (or robot) will be able to follow.

This time we count out the larger number and then remove the smaller number of blocks from it. Again the counter is the student. Students should test their algorithm with two numbers. If using the number line alternative, there are steps to the right for the first (larger) number followed by steps to the left for the second (smaller) number. Here is one possible algorithm; in line 4 the second number is used to make the count decrease.

Example: 3 – 2

Lines 1, 2 and 3 will put 3 blocks onto the answer pile, and the count will be at 3.

Lines 4, 5 and 6 will take 2 blocks from the pile and the count will be at 1.

**Multiply one number by another**

The purpose of this activity is to require students to revisit what we actually do when we multiply two numbers. This basic idea easily gets lost when students memorise the results. They break down the process into small steps so a computer (or robot) will be able to follow. This is designed to remind students that multiplication is just repeated addition. The first number (the ‘multiplier’) tells how many times the second number (the amount) is added. The counter is the student. Students should test their algorithm with two numbers.

Example: 3 x 2 Line 6 will add 2 blocks to the answer pile, and continue to do this three times, when the counter is at 3 and the process stops.

**Divide one number by another**

The purpose of this activity is to require students to revisit what we actually do when we divide one number by another. This basic idea easily gets lost when students memorise the results. They break down the process into small steps so a computer (or robot) will be able to follow.

In a division question, we are splitting the first amount equally into the second number of ‘share piles’. If there is a remainder, we will say what it is. The counter is the student. Students should test their algorithm with two numbers.

Example: 13 ÷ 3. There are 3 ‘share piles’. Line 2 will move one of the 13 blocks to each of 3 piles and continue to do it 4 times, until there is only one block left (less than 3). The answer is 4 (blocks in each of 3 piles) and there is 1 over.

### Calculate expressions using "order of operations'

Tab Content

Having taught their robot all the operations, students now need to give instructions for evaluating expressions with more than one operation. They break down the process into small steps so a computer (or robot) will be able to follow.

The order of operations precedes this content at level 6 (VCMNA220) and this is a good time and method to get the order quite clear. The algorithm is a series of simple yes/no decisions. It can become more complicated if there are two sets of brackets; this has been ignored here.

### Create a reflection image of a point in s mirror line

Tab Content
Tab Content
Extension: Test a shape for line symmetry The test for line symmetry uses the same ideas backwards. In this case let us assume that the robot knows how to make midpoints and test for 90° angles

Students know that mathematics comprises more than number operations. To perform well in this activity, encourage students to think carefully about what makes a reflection image in a mirror line, and also what gives a shape the property we call line symmetry. Students can teach the robot to create a mirror reflection of a shape in a mirror line, point by point. If we do this for all the vertices of any shape, we could join the vertices with lines. In this case let us assume that the robot knows how to make lines equal in length and to draw 90° angles.

The challenge for students is to recognise that the equal distances and the right angle in this drawing is what constitutes creating a mirror image.