In this series, we’ve been looking at black boxes, where you put something in and something comes out. From looking at its behavior, you can often propose a model for what is happening inside. If you build the model, and it behaves the same way as the original black box, you’ve got something that’s equivalent to the original black box. Equivalence doesn’t mean equality – there may be many ways to model what is going on in the black box, and there may be no easy way to choose one model over another. Our exploration in this series has led us in many interesting directions. Most recently we looked at what happens if you take a number line and bend it, like a slinky, into a cylindrical shape. In this post, we bent the number line so that numbers 4 apart would line up one above the other, and each number on the number line could be associated with either north, east, south or west. In the most recent post, we imagined the number line being wrapped around an old-fashioned clock so that each number would correspond to an hour from 1 to 12. On these slinky number lines, we looked at the effect of one operation, addition, and found that whether the result of addition of two numbers points north, east, south or west depends only on the compass direction of the two numbers involved and on nothing else.
This repetitive nature of a number line bent around a slinky might also remind us of the scenario we looked at in the very first post of this series: there we looked at a mysterious machine with a “next” button and a window in which a number shows. Each time we hit the button, another number shows in the window, in what seems to be a predictable repetition of the digits 3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,… With the perspective of the recent posts, we can now think of a number line bent like a slinky – completing a full turn every ten numbers. The mysterious box may move us along the number line on the slinky and show on the display where in the cycle we are.
The notion of things repeating after ten steps is of course central to our decimal number system. It applies most literally to the right-most digit in a number, as we count up. Let’s assume we start with the number 966839, as on the mechanical counter below, and then repeatedly count up by one.
We would produce the following sequence of numbers: 966839, 966840, 966841, 966842, 966843, 966844, 966845, 966846, 966847, 966848, 966849, 966850, 966851, 966852, 966853, … When you only pay attention to the right-most digit, you see them repeat in a cycle of ten steps. But the other digits in the number each cycle through a set of ten values in turn. It just happens a lot slower. If you take the same set of numbers, and look at the second digit from the right, you would see the sequence 3, 4…4, 5…5, etc., where each digit sticks around for ten steps and then changes to its next value. In the mechanical counter, this is realized by having each digit position consist of an identical wheel (ten digit values in the same sequence), and kicking each wheel forward only when the wheel to the right of it transitions from a “9” to a “0”. The effect of this arrangement is that the wheels to the left rotate at a much slower rate than those on the right. By putting enough wheels together in this arrangement, we can achieve very large cycles; in the mechanical counter shown, the overall cycle is one million. This means that one million kicks of the right-most wheel will bring the whole counter back to its previous state, after which the whole thing repeats.
The rightmost wheel corresponds to the rightmost digit of the number. If I have two numbers, and I focus exclusively on the rightmost digits, I can predict what the rightmost digit of the sum will be. Also what the rightmost digit of the difference will be, and the rightmost digit of the product. E.g. if I have a number X7 and another Y8, where the X and Y represent the digits that are covered up, you can predict that the sum will look like Z5, and that the difference of X7 – Y8 will havea rightmost digit of 9, and the product X7 × Y8 will end in a 6. Unfortunately, you can’t predict with certainty what the rightmost digit of the quotient is, even if there is no remainder. This turns out to have something to do with 10 not being a prime number.
If it seems obvious to you that the rightmost digits of the sum and product only depend on the rightmost digits of the original numbers, please note that you cannot predict the next digit over quite so easily. The second digit from the right of the sum does not depend only on the second digits from the right of the addends, and the second digit from the right of the product does not depend only on the second digits from the right of the factors. However, it turns out that you can predict the final two digits of the sum and product by knowing only the final two digits of the addends or factors. If our gear machine had wheels that had a hundred entries on them instead of ten, marked from “00” to “99”, we could again say that the position of the final wheel of the product could be determined from the position of the final wheels of the factors.