Teacher resources and professional development across the curriculum

Teacher professional development and classroom resources across the curriculum

Session 9, Part B:
Guess My Rule (20 minutes)

One way to compare algorithms is to play the "Guess My Rule" game. Here's how it goes:

 • Someone makes up a mystery algorithm (like "take a number, double it, and add 2 to the answer"). He or she writes it down or draws a picture of it (with machines, for example) and keeps it secret. • The algorithm writer then takes "requests." Other people suggest inputs and request outputs. Everyone records the results. • Other people try to guess the algorithm with as few requests as possible. If someone says, "I've got it," that person writes down his or her guess of the algorithm, either in words or pictures. • If the guess is the same as the mystery algorithm, the round is over. If (as often happens) the guessed algorithm looks different from the mystery algorithm, the guessers have to either prove that they will always produce the same result, or they must find an input where the algorithms produce different outputs. For example, a match for "take a number, double it, and add 2" might be "take a number, add 1, and double the answer."

Note 3

In the following Interactive Activity, the computer will make up several mystery algorithms, and you can try to guess them!

Problem B1

Describe some strategies for playing "Guess My Rule."

 Problem B2 When you play "Guess My Rule," you often come up with an algorithm that acts the same as the mystery algorithm but contains different steps. In what sense are these algorithms the same? In what sense are they different? Do you think they represent the same function?

 Session 9: Index | Notes | Solutions | Video