Algorithms to Generate Sets
Follow the Algorithm
Follow each algorithm to generate the first 5 numbers.
Start at 3, add 4 each time: 3, ___, ___, ___, ___
Start at 100, subtract 7 each time: 100, ___, ___, ___, ___
Start at 2, multiply by 2 each time: 2, ___, ___, ___, ___
More Algorithms to Follow
Follow each algorithm to generate the first 5 numbers.
Start at 1, add 6 each time: 1, ___, ___, ___, ___
Start at 500, subtract 50 each time: 500, ___, ___, ___, ___
Start at 1, multiply by 3 each time: 1, ___, ___, ___, ___
Start at 1000, divide by 2 each time: 1000, ___, ___, ___, ___
Complete the Algorithm Output
Fill in the missing numbers generated by the algorithm.
More Algorithm Outputs
Fill in the missing numbers.
Which Algorithm?
Circle the algorithm that generates each set.
{5, 10, 15, 20, 25}
{2, 4, 8, 16, 32}
{100, 80, 60, 40, 20}
Match Algorithm to First 4 Numbers
Draw a line to match each algorithm to its output.
Match the Set to the Algorithm
Draw a line to match each set of numbers to the algorithm that generated it.
Write the Algorithm
Look at each set of numbers and write the algorithm (rule) used to generate them.
Set: {6, 12, 18, 24, 30} Algorithm: ___
Set: {1, 4, 13, 40, 121} Algorithm: ___
Set: {500, 450, 400, 350, 300} Algorithm: ___
Write More Algorithms
Identify the algorithm for each set.
Set: {3, 7, 15, 31, 63} Algorithm: ___
Set: {10, 25, 55, 115, 235} Algorithm: ___
Set: {256, 128, 64, 32, 16} Algorithm: ___
Two-Step Algorithm Check
Circle the correct next number for each two-step algorithm.
Double then add 1: 1, 3, 7, 15, ?
Triple then subtract 1: 1, 2, 5, 14, ?
Add 3 then multiply by 2: 1, 8, 22, ?
Flowchart Algorithm
Follow this flowchart algorithm: Start → Input a number → Multiply by 2 → Add 3 → Output. Complete the table.
Input 1 → Output ___
Input 4 → Output ___
Input 7 → Output ___
Input 10 → Output ___
Output is 25 → Input was ___
Create Your Own Algorithm
Design your own algorithm and generate the first 6 numbers.
Algorithm: Start at ___, then ___ each time. Numbers: ___, ___, ___, ___, ___, ___
Algorithm: Start at ___, then ___ each time. Numbers: ___, ___, ___, ___, ___, ___
Create a Two-Step Algorithm
Design a two-step algorithm and generate the first 5 numbers.
Algorithm: Start at ___, then ___ and then ___ each time. Numbers: ___, ___, ___, ___, ___
Give this algorithm to a partner. Can they find your rule?
Algorithm Comparison
Compare two algorithms and answer the questions.
Algorithm A: Start at 1, add 5. Algorithm B: Start at 2, add 3. Which algorithm reaches 20 first? Show the first 8 numbers of each.
Will Algorithm A and Algorithm B ever produce the same number? If so, when?
Home Activity: Algorithm Challenge
Create algorithms at home!
- 1Write an algorithm that generates your times tables (e.g. start at 0, add 7 each time for the 7s).
- 2Create a 'doubling' algorithm starting from 1. How quickly does it get past 1,000?
- 3Give a family member a set of numbers and challenge them to find the algorithm.
- 4Write an algorithm that uses two operations (e.g. multiply by 2 then subtract 1).
- 5Use a spreadsheet to test your algorithms and generate 20 numbers instantly.
Tracing an Algorithm
Trace each algorithm step-by-step for the given starting value.
Algorithm: Start at 5. While number < 100: multiply by 2. List all numbers: ___
Algorithm: Start at 1000. While number > 1: divide by 4. List all numbers: ___
Which Numbers Does the Algorithm Generate?
Circle the correct output.
Start at 7, add 6 each time (first 4 terms):
Start at 2, multiply by 3 (first 4 terms):
Start at 81, divide by 3 (first 5 terms):
Comparing Algorithm Outputs
Run both algorithms and compare their outputs.
Algo A: Start at 5, add 5. Algo B: Start at 2, multiply by 2. First 6 terms each. A: ___ B: ___
Which gives bigger numbers by the 10th term? ___
Inverse Algorithms
Work backwards through each algorithm to find the starting value.
Algorithm: Add 5 each time. 5th term is 35. Starting value: ___
Algorithm: Multiply by 2 each time. 4th term is 48. Starting value: ___
Algorithm: Subtract 8 each time. 6th term is -10. Starting value: ___
Match Starting Value to Sequence
Draw a line to match each algorithm + starting value to its output.
Conditional Algorithms
Follow these conditional algorithms.
Start at 1. If even, add 4. If odd, multiply by 3. Apply 5 times. Sequence: ___
Start at 50. If > 40, subtract 7. If ≤ 40, add 3. Apply until the number is between 35 and 45: ___
Sort Algorithm Steps
Put these algorithm steps in the correct order.
Generate Sets Using Formulas
Generate the first 6 terms of each set using the formula.
Set A: {n² + 1} for n = 1, 2, 3, 4, 5, 6. Set: ___
Set B: {2n − 1} for n = 1, 2, 3, 4, 5, 6. Set: ___
Set C: {3n} for n = 1, 2, 3, 4, 5, 6. Set: ___
Finding the Algorithm from Output
Study each output and write the algorithm that generates it.
{8, 11, 14, 17, 20}. Algorithm: ___
{1, 2, 4, 7, 11, 16}. Algorithm: ___
{3, 9, 81, 6561}. Algorithm: ___
Algorithm Debugging
An algorithm says 'start at 4, add 3'. A student got: 4, 7, 10, 14, 17. Spot the error.
The error is at which term?
The correct 4th term should be:
What might have caused the error?
Algorithm Output Comparison
Two algorithms ran for 5 steps. Each icon = 1 unit of output. Answer the questions.
| Algo A: +5 each step | |
| Algo B: ×2 each step | |
| Algo C: +3 then ×2 |
Which algorithm produces the largest 5th term?
At what step does B's output first exceed A's?
If Algo A starts at 10, list the first 5 outputs.
Even and Odd Algorithm Outputs
Run the algorithm 'start at 3, add 4' for 10 terms. Tally even and odd outputs.
| Item | Tally | Total |
|---|---|---|
Even numbers | ||
Odd numbers |
Real-World Algorithms
Write an algorithm for each real-world situation.
Algorithm for calculating 10% GST on a price: ___
Algorithm for converting km to m: ___
Algorithm for finding if a number is prime: ___
Algorithm Efficiency
Compare two ways to find the same result.
To find 12% of $250: Method A (use 1%×12) vs Method B (use 10%+2%). Show both: ___
Which method is more efficient? Why? ___
Spreadsheet Thinking
Imagine you are using a spreadsheet to run an algorithm. Describe the steps.
Write a formula that would calculate the 10th term of 'start at 1, multiply by 2': ___
What column headings would you use to display results? ___
How would you extend the algorithm to find the first term that exceeds 1,000? ___
Identifying Missing Steps
Each algorithm has a missing step. Identify and fill it in.
Algorithm: Start → ??? → Add 3 → Output. Produces: 5, 8, 11... Starting input was 2. Missing step: ___
Algorithm: Input → Multiply by 2 → ??? → Output. Produces: 3, 5, 7 (inputs 1, 2, 3). Missing step: ___
Algorithm Design Challenge
Design an algorithm that meets each requirement.
Design an algorithm where the 5th term is exactly 100: ___
Design an algorithm that generates only prime numbers (first 5): ___
Design an algorithm that generates a decreasing sequence never going below 0: ___