Learning Math: Patterns, Functions, and Algebra
Functions and Algorithms Part B: Undoing Algorithms (20 minutes)
Session 3, Part B
An algorithm is a recipe or a description of a mechanical set of steps for performing some task. For example, you can have an algorithm for making a peanut butter and jelly sandwich.
Mathematical algorithms are increasingly important in the computer age. Computer programs are essentially algorithms written in a language that computers understand. Here’s a mathematical algorithm (let’s call it Algorithm A):
- Pick a number (that’s the input)
- Double it
- Add 2 to the answer
- Divide that answer by 2
- Subtract 7 from what you get
- Multiply the result by 4 (that’s the output)
Use Algorithm A for these problems.
- If the input is 9, what is the output?
- If the input is 10, what is the output?
- If the input is n, what is the output?Tip: Try to run the algorithm’s steps using the variable n rather than a particular value. After the first step, the result is 2n. After the second step, the result is 2n + 2.
- If the output is 28, what is the input?
- If the output is 32, what is the input?
- What input produces an output of 48?
- What input produces an output of 36?
What strategies did you use to answer parts (d)-(g) of Problem B1?
Describe, in language similar to the way we described Algorithm A, an algorithm (call it Algorithm B) that undoes Algorithm A. This means that if you put a number into Algorithm A, then put that output into Algorithm B, you should end up with the original input.
Does Algorithm A undo Algorithm B? That is, if you put a number into Algorithm B and then put that output into Algorithm A, do you get back to your starting number?
Discuss your responses to Problems B2 and B3. Then discuss the video segment of Dr. Fuji monitoring medication for a newborn. How is math being used at Boston Medical Center? Where else might the concepts of doing and undoing have real-world applications?
- The output is 12.
- The output is 16.
- For an input n, the algorithm performs n >> 2n >> 2n + 2 >> n + 1 >> n – 6 >> 4n – 24.
- Knowing that the output is 4n – 24 means that we have to solve 4n – 24 = 28, an equation that is solved by n = 13. This means that the input must be 13.
- The input is 14.
- The input is 18.
- The input is 15.
Working backwards from the end of the algorithm to the beginning will undo it. There are other strategies, such as writing equations for each of (d)-(g).
Algorithm B “undoes” everything that Algorithm A does.
- Take the input (the output of Algorithm A) and
- Divide it by 4
- Add 7
- Double it
- Subtract 2
- Halve that
- There’s your output (of Algorithm B)
Test it out. See if you can figure out why it works by thinking of the algorithms as driving directions. Where would you end up if someone gave you directions like Algorithms A and B, and asked you to do them both? In short, yes, they undo each other.
Session 1 Algebraic Thinking
In this initial session, we will explore algebraic thinking first by developing a definition of what it means to think algebraically, then by using algebraic thinking skills to make sense of different situations.
Session 2 Patterns in Context
Explore the processes of finding, describing, explaining, and predicting using patterns. Topics covered include how to determine if patterns in tables are uniquely described and how to distinguish between closed and recursive descriptions. This session also introduces the idea that there are many different conceptions of what algebra is.
Session 3 Functions and Algorithms
In Session 1, we looked at patterns in pictures, charts, and graphs to determine how different quantities are related. In Session 2, we used patterns and variables to describe relationships in tables and in situations like toothpicks and triangles. This session extends the exploration of relationships to include the concepts of algorithm and function. Note1
Session 4 Proportional Reasoning
Look at direct variation and proportional reasoning. This investigation will help you to differentiate between relative and absolute meanings of "more" and to compare ratios without using common denominator algorithms. Topics include differentiating between additive and multiplicative processes and their effects on scale and proportionality, and interpreting graphs that represent proportional relationships or direct variation.
Session 5 Linear Functions and Slope
Explore linear relationships by looking at lines and slopes. Using computer spreadsheets, examine dynamic dependence and linear relationships and learn to recognize linear relationships expressed in tables, equations, and graphs. Also, explore the role of slope and dependent and independent variables in graphs of linear relationships, and the relationship of rates to slopes and equations.
Session 6 Solving Equations
Look at different strategies for solving equations. Topics include the different meanings attributed to the equal sign and the strengths and limitations of different models for solving equations. Explore the connection between equality and balance, and practice solving equations by balancing, working backwards, and inverting operations.
Session 7 Nonlinear Functions
Continue exploring functions and relationships with two types of non-linear functions: exponential and quadratic functions. This session reveals that exponential functions are expressed in constant ratios between successive outputs and that quadratic functions have constant second differences. Work with graphs of exponential and quadratic functions and explore exponential and quadratic functions in real-life situations.
Session 8 More Nonlinear Functions
Investigate more non-linear functions, focusing on cyclic and reciprocal functions. Become familiar with inverse proportions and cyclic functions, develop an understanding of cyclic functions as repeating outputs, work with graphs, and explore contexts where inverse proportions and cyclic functions arise. Explore situations in which more than one function may fit a particular set of data.
Session 9 Algebraic Structure
Take a closer look at "algebraic structure" by examining the properties and processes of functions. Explore important concepts in the study of algebraic structure, discover new algebraic structures, and solve equations in these new structures.
Session 10 Classroom Case Studies, Grades K-2
Explore how the concepts developed in Patterns, Functions, and Algebra can be applied at different grade levels. Using video case studies, observe what teachers do to develop students' algebraic thinking and investigate ways to incorporate algebra into K-8 mathematics curricula. This video is for the K-2 grade band.
Session 11 Classroom Case Studies, Grades 3-5
Explore how the concepts developed in Patterns, Functions, and Algebra can be applied at different grade levels. Using video case studies, observe what teachers do to develop students' algebraic thinking and investigate ways to incorporate algebra into K-8 mathematics curricula. This video is for the 3-5 grade band.
Session 12 Classroom Case Studies, Grades 6-8
Explore how the concepts developed in Patterns, Functions, and Algebra can be applied at different grade levels. Using video case studies, observe what teachers do to develop students' algebraic thinking and investigate ways to incorporate algebra into K-8 mathematics curricula. This video is for the 6-8 grade band.