Having the division method for doing clock arithmetic means that we can do more complicated things than just addition and subtraction. For instance, we can now do multiplication in clock arithmetic!. As an example, we can see that 3 x 7 mod 5 = 1 because 21 (= 3 x 7) divided by 5 gives a remainder of 1, and 6 x 5 mod 15 = 0 since 30 divided by 15 gives a remainder of 0. We can combine multiplication with addition and subtraction to get more complex expressions in clock arithmetic as well. Thus, 3x(7-2) mod 6 = 3 since 15 (= 3x(7-2)) divided by 6 gives a remainder of 3.

Let's return to Judy in the video game. Suppose the screen is 18 inches wide and 15 inches high. Every time you press an arrow key on the keyboard, she moves 1 inch in the direction of the arrow (up, down, right or left). If Judy is currently 2 inches fro m the bottom of the screen and 12 inches from the left side of the screen and you press the right arrow key 10 times, where will she now be on the screen? Since she starts at 12 inches from the left side of the screen and goes 10 more inches to the right, she should be 22 inches from the left side of the screen ... but the screen is only 18 inches wide! As soon as she gets 18 inches from the left side, she starts all over again at the left edge of the screen. So, she will be 22 mod 18 = 4 inches from the left side. If you now press the up arrow 18 times, she will be 20 mod 15 = 5 inches from the bottom of the screen. If we know where she is on the screen, we can find out where she will be after any number of any combination of arrow key presses using cloc k arithmetic. Suppose that Judy is again at 2 inches from the bottom and 12 inches from the left side of the screen. Press the left arrow 4 times, the up arrow 10 times, the right arrow 20 times, the up arrow 12 times, the left arrow 2 times, the down arr ow 6 times and the right arrow 9 times. Where's Judy? We can keep track of the left/right and the up/down movements seperately. Consider the left/right moves. She starts at 12, moves to the left are subtractions and moves to the right are additions and th e whole thing is done mod 18, so we would calculate:

(12 -4 +20 -2 + 9) mod 18 = 35 mod 18 = 17 inches from the left of the screen.

For the up/down moves, she starts at 2 and ups are additions, downs are subtractions, to get:

(2 +10 + 12 - 6) mod 15 = 18 mod 15 = 3 inches from the bottom of the screen.

The up/down calculation is done mod 15 because the screen is only 15 inches high.

- 25 right, 14 up, 6 left, 2 down, 5 left, 12 up, 10 right, 4 down, 5 left?
- 30 right, 16 up, 10 left, 5 down, 15 right, 8 up, 12 left, 10 up, 22 right?

Answers to Division Method Questions

Answers to 2nd set of problems

Answers to Where's Judy?

**First answer:** (12 + 25 -6 -5 + 10 - 5) mod 18 = 31 mod 18 = **13 inches from the left**

and (2 + 14 -2 + 12 - 4) mod 15 = 22 mod 15 = **7 inches from the bottom**.

**Second answer:** (12 + 30 -10 + 15 -12 + 22) mod 18 = 57 mod 18 = **3 inches from the left**

and (2 + 16 - 5 + 8 + 10) mod 15 = 31 mod 15 = **1 inch from the bottom**.

Return to Questions