Result is in the format month.day
example: March 1st would be 3.01
Activity: Birthday Algorithm
This activity requires only pencil and paper (no need for a computer). In this lesson students follow a series of steps to complete a math trick.
Students are introduced to:
- Algorithms
- Program flow
- Debugging
Algorithm
An Algorithm is series of steps, decisions and / or formulas. Some common examples include:
- Cooking recipes
- Map directions to an address
- Assembly instructions
Birthday Algorithm
The Birthday Algorithm displays a birthday as month.day
after following a set of calculations.
Follow the Birthday Algorithm steps below working with a partner. Record the steps and the answer for each step so you can troubleshoot. Doing this with just paper and pencil adds to the challenge. If the trick doesn’t work, retrace the steps and check each calculation with partner.
Produce a total at the end of each step and use the total in the next step until producing the birthday month.day
.
- Start with the number 7
- Multiply by month the person was born (number 1-12)
- Subtract 1
- Multiply by 13
- Add 5
- Subtract 2
- Add the day the person was born (number 1-31)
- Multiply by 11
- Subtract day the person was born (number 1-31)
- Subtract month the person was born (number 1-12)
- Divide by 5
- Add 22
- Divide by 200
- If not a match of the
month.day
of the persons birthday, carefully re-read the instructions and check answers at each step
What did we learn?
- Describe how well the algorithm worked. Explain what made the algorithm work or what was tried when it did not work.
- Explain how the algorithm could be improved in terms of efficiency and usability for the participant. Be sure to describe how to reduce the number of steps while maintaining the trick.
- Challenge: Write full equation at each step. Then try to simplify each answer.