I am currently working through W. Ross Ashby's An Introduction to Cybernetics, and I'm stuck on a problem of calculating variety for a vector. I know the answer (I caved and checked), but I can't figure out how to calculate it, and that's my real question. I'm not an advanced mathematics student, so it is possible--even likely--that I'm missing something obvious.
= = = = =
First, some definitions, since I'm not sure if vector, variety, etc. are used differently in cybernetics than in other areas of math:
vector: "a compound entity, having a definite number of components." Notated inside parentheses, separated by commas.
variety: "in relation to a set of distinguishable elements, will be used to mean. . . the number of distinct elements" (Also, depending on context, the log base 2 of the number of distinct elements, but this particular problem the first sense is used.)
independence: "The components are independent when the variety in the whole of some given set of vectors equals the sum of the (logarithmic) varieties in the individual components." The components "vary independently" within the defined set.
(All quotes from Ashby, 1956)
= = = = =
Now, the problem itself:
"A vector has ten components, each of which can take one of the values: 1, 2, 3, 4. How much variety has the set of vectors if (i) the components vary independently; (ii) under the rule that no two adjacent components may differ in value by more than one unit?"
The answer to (i) is simply 4^10, or 1,048,576 possible vectors. It's straightforward because the varieties of each of the independent components are the same.
Part (ii)... I don't even really know where to begin with part (ii). After wrestling with it for an hour or so, I checked the answer key to see if I was on the right track. I wasn't. The given answer is a variety of 21,892, and I have no idea where that number comes from.
As I read the problem, a value of 1 in a given component may be followed only by 1 or 2 in the next component, whereas a 2 may be followed by 1, 2, or 3--a different number of possibilities depending on the initial value (similarly, three possibilities follow a 3, and only two follow a 4). So, then, the first component will have the full variety of four, but each component that follows will have a different variety (either two or three) depending on the value of the previous component.
I've spent a couple more hours trying to come up with the 21,892, but I can't seem to set the problem up right. I could probably bang out a program in Python to brute-force the allowable combinations, but I assume that there is a (relatively) simple pencil-and-paper way to do this--Ashby was writing in 1956 (no pocket calculators) for non-mathematicians. So far the mathematics have been pretty elementary, except when marked as optional (which this problem isn't).
This is self-directed study, and no grade is riding on it, but I really want to understand before I move on. Can someone give me a push in the right direction? Thanks in advance.