In this series we’ve been looking at operators and the models upon which they operate. We started by introducing a simple device like the one pictured below:
where every time the red button is pushed, the single digit on the little screen was observed to cycle through a repeating pattern 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 …
In part 2, we looked at a possible model that could underlie this behavior, and that particular model didn’t involve any arithmetic (or other things we commonly associate with mathematics), but it gave us a simple way to talk about machines with internal (and hidden) state. The button operated on the state rather than on the number shown in the window. In this post, we will show a model that does involve arithmetic a great deal, and we’ll see what conclusions we can draw from looking at such a model.
On this calculator, if you hit the clear button (labeled ON/C) and then hit “2+1=”, the window will show “3”. From then on, every time you hit the “=” key, the number shown in the window will increase by 1. It still remembers the “+1” from last time, and you don’t have to re-enter it each time. The calculator now acts as a counter, showing ever bigger numbers on the screen every time the “=” is pressed.
Now suppose I now stick this calculator in a box so that the “=” key is right under the red button and the transparent window of the box only shows the right-most digit of the calculator’s screen. Suppose further that the box containing the calculator holds it well enough in place to prevent other calculator buttons from being pressed by accident, and yet suppose that somehow the strip right under the calculator’s window is exposed to light sufficiently to power the calculator. How well would this device work?
Since we’ve put the calculator in counter mode by pressing the “+1=” keys, and the only key that is pressed subsequently is the “=” key, we can identify the state of the device with the number showing on the calculator screen – the entire number, that is, not merely the last digit of it that is showing through on the small window of the enclosing box. If the calculator screen shows “53”, we would say that 53 is the state of the device, and that “3” is showing on the small window of the device. In this model, we can still maintain that the red button is an operator that operates on the state. What the operator does to the state is very simple: it adds one. It counts up. If 53 is the state of the device, the state will be 54 after pressing the red button. Pressing the red button several more times will advance the state to 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, … Note that the last digit of these numbers cycles, as it’s supposed to, through the cycle 5 6 7 8 9 0 1 2 3 4 and repeats. You could press the red button literally thousands of times, and the number displayed on the calculator screen would grow several digits wide, yet the right most digit – the only one shown through the window on the device – will faithfully go through the same cycle over and over again, regardless of what the other digits are showing. A small section of the state transition table is shown below:
I could end the description right here, and say “See? We have another model.” And simply hope I have convinced you that two completely different models of what happens under the cover of the device do in fact account for identical external behavior.
But one of the interesting things in comparing models is looking for where the model breaks down. We can call this: looking for cracks in the black box. In the area of breakdown, one model is suddenly no longer strictly equivalent to the other. Such a breakdown may not in fact be a practical limitation – sometimes it is, sometimes it isn’t. You may have already wondered what happens with the calculator if we keep pressing the button long enough. Wouldn’t the state eventually be bigger than the largest number the calculator screen can show (99,999,999 on an 8-digit screen)? Yes, and in the case of this particular OfficeMax calculator, once the screen hits eight nines, and you press “=” one more time, the screen will show E 1.0000000, and from then on, no matter how often you press “=”, the calculator is stuck in this state. At that point, the output shown in the device will be stuck at 0, and will no longer cycle through the single digits in the way we expected.
Is this a real problem? We can answer that in at least two interesting ways. One is to look at the amount of time that it would take to actually press the red button close to one hundred million times. A rough calculation would show that if you were to continuously press the red button ten times every second, without any breaks, you could cycle through the hundred million states in 116 days – about four months.
To me, a more interesting answer is the original device that we started with, the device that we could play with but didn’t know the insides of, has a behavior that is only partially known to us as well. We played with it, and saw a repetitive behavior, but who is to say that this repetitive behavior wouldn’t also break down after some amount of time for some unknown reason? Maybe the original device has a battery in it that could run empty, or it only works in summer temperatures, or it only works the way it appeared to while you are in the Northern Hemisphere, or perhaps it wears out entirely after just one million button presses.
Looking at black boxes and making hypotheses about their internal composition and workings – this is something that physicists and biologists and computer scientists do all the time, and they tend to accept the limitations of doing so as something that is completely normal and inevitable. In mathematics, we often insist on a higher standard of certainty. This insistence can have very profound ramifications.