Introduction to Modular Arithmetic

advertisement
Introduction to Modular Arithmetic
Mathematics and Music
Suppose k is a positive integer. The remainder when a number is divided by k is called
the value of that number modulus k. We usually abbreviate modulus by mod, and write it
like this:
o
o
o
o
45 ≡ 5 (mod 10) “45 is equivalent to 5 modulo 10.”
36 ≡ 6 (mod 10)
36 ≡ 1 (mod 5)
36 ≡ 0 (mod 6)*
We actually use mod all the time without knowing it. When we tell time (assuming we’re
using the American system, where 1:00 is used for both 1 a.m. and 1 p.m.),
13:00 = 1:00
20:00 = 8:00
23:00 + 20 hours = 7:00
6:45 + 247 hours = 1:45
All we’re doing is computing the value mod 12. That is,
13 ≡ 1 (mod 12)
20 ≡ 8 (mod 12)
23 + 20 ≡ 11 + 8 (mod 12) ≡ 19 (mod 12) ≡ 7 (mod 12)
6:45 + 247 ≡ 6:45 + 7 (mod 12) ≡ 1:45 (mod 12)
We can also use modular arithmetic to solve problems about weeks, minutes, or seconds.
Solve the following using mod arithmetic and identify the number you’re using to find
the mod equivalence.
1. 8:00 + 45 hours =
2. If today is Thursday, what day of the week will it be 100 days later?
3. If it is 3:47 right now, what time will it be 279 minutes later?
*
Question: if 36 ≡ 0 (mod k), what are the possible values of k?
A modular addition table
Complete the table for addition modulo twelve. Put the smallest nonnegative number
equivalent to the given sum in the box.
0
1
2
3
4
5
6
7
8
9
10 11
0
1
2
3
4
5
6
7
8
9
10
11
Modular arithmetic and music
4. Suppose you start at G and go up 7 semitones. What is the resulting pitch class?
5. Pitch classes are normally numbered so that C = 0, C#/Db = 1, …, B = 11 (refer to the
pitch class circle handout). “G” is numbered ____. What is the number of the pitch
class in your answer to the previous question? _____
6. Suppose you start at G and go up n semitones, where n is an integer (if n is negative,
you’re actually going down n semitones). Describe how modular arithmetic can help
find the resulting pitch class.
Equivalence classes
Suppose n is an integer and k is a positive integer. The set of all numbers that are
equivalent to n modulo k is called the equivalence class of n modulo k.
7. Describe the equivalence class of 0 mod 12, and list a few members of the set.
8. The equivalence class of 1 mod 2 has a familiar name. What is it? ___________
In general, an equivalence class is a set of objects that are similar according to some
relation, called an equivalence relation. “Mod” is an example of an equivalence relation,
but there are many more. For example, if the equivalence relation is “x is equivalent to y
if x  2n y for some integer n,” the equivalence class of 1 is {…, 1/4, 1/2, 1, 2, 4, …}.
9. Is 5 equivalent to 1? What about 1/32? Explain.

10. How do you know if a number is equivalent to 1 using this relation?
11. Describe the numbers that are equivalent to 440 by this relation, and list a few of
them. Remind you of anything?
12. What is the relationship between pitch class and equivalence class?
13. Describe the equivalence class of A440 in two different ways, one using frequency
and the other using pitch.
Download