| Digit | 1st | 2nd | 3rd | 4th |
| 0 | girl | Over 15 | Not in choir | short |
| 1 | boy | Under 15 | In choir | tall |
Consider the above table, and then see how neatly we can code the subsets of school-pupils we looked at in the article before last on page 22:
Questions:
1. What kind of person is 0110?
2. What binary code represents you?
3. What nice ways are there of ordering these 16 four-digit codes?
Now, in the new-style Venn diagrams, we get each new set (see page , and our cover picture) by weaving in and out all around the circle, and the order in which you divide old compartments to create new compartments (2n of them, all touching the circle, at the nth stage) provides a natural (but far from obvious) ordering of the binary codes of the 2n-1 old compartments, corresponding to ordering the 2n-1 combinations of n-1 things.
The nice surprise is that this order is none other than the "Gray
code" ordering used in combinatorial mathematics. It was invented for
a very practical purpose by an American telephone engineer Elisha Gray,
over a century ago. The point, in those early telecommunications days,
was that you had to shuffle levers to change binary (off-on) codes, and
it was good economics to know which codes were 'nearest' to which, in
the sense of fewest lever changes. Look at the circular
ordering given here of the 4-figure codes, determined by the
route taken by the (dotted) 5th curve in the Venn diagram above; you will
see that in this arrangement EACH CODE DIFFERS FROM ITS NEIGHBOURS BY
CHANGING ONLY ONE DIGIT.
Previous Article in Venn series: Venn things get messy
Next Article: Venn are we going to stop talking about Venn?