Session 3, Part B: Undoing Algorithms (20 minutes)
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):
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. Close Tip
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.
Video Segment In this segment, Professor Cossey works with Lolita and Deanna to find the algorithm that undoes Algorithm A, then they discuss why such an algorithm would have its steps reversed. Watch the segment after you have completed Problem B3. If you get stuck on the problem, you can watch the video segment to help you.
Professor Cossey refers to "inverse operations." Give some examples. Do all operations have inverse operations?
You can find this segment on the session video, approximately 7 minutes and 29 seconds after the Annenberg Media logo.
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?
Video Segment In this segment, Dr. Fujii of the Boston Medical Center describes the importance of doing and undoing in prescribing medication to newborns. Watch this segment after you have completed Part B: Undoing Algorithms. The segment is taken from the "real world" example at the end of the Session 3 video.
What inverse operations does Dr. Fujii use? How are the questions he answers similar to those you answered in Problem B1?
You can find this segment on the session video, approximately 21 minutes and 52 seconds after the Annenberg Media logo.