Weight-Botchers

Suppose you have a balance scale and four weights of 1 unit, 2 units, 4 units and 8 units. How many different weights can you match? If you know binary arithmetic, it’s easy to see that you can match any weight up to fifteen units inclusive. With the object in the left-hand pan of the scale and the weights in the right-hand pan, these are the matches:

01 = 1
02 = 2
03 = 2+1
04 = 4
05 = 4+1
06 = 4+2
07 = 4+2+1
08 = 8
09 = 8+1
10 = 8+2
11 = 8+2+1
12 = 8+4
13 = 8+4+1
14 = 8+4+2
15 = 8+4+2+1

Balance scale


The weights that sum to n match the 1s in the digits of n in binary.

01 = 0001 in binary
02 = 0010 = 2
03 = 0011 = 2+1
04 = 0100 = 4
05 = 0101 = 4+1
06 = 0110 = 4+2
07 = 0111 = 4+2+1
08 = 1000 = 8
09 = 1001 = 8+1
10 = 1010 = 8+2
11 = 1011 = 8+2+1
12 = 1100 = 8+4
13 = 1101 = 8+4+1
14 = 1110 = 8+4+2
15 = 1111 = 8+4+2+1

But there’s another set of four weights that will match anything from 1 unit to 40 units. Instead of using powers of 2, you use powers of 3: 1, 3, 9, 27. But how would you match an object weighing 2 units using these weights? Simple. You put the object in the left-hand scale, the 3-weight in the right-hand scale, and then add the 1-weight to the left-hand scale. In other words, 2 = 3-1. Similarly, 5 = 9-3-1, 6 = 9-3 and 7 = 9-3+1. When the power of 3 is positive, it’s in the right-hand pan; when it’s negative, it’s in the left-hand pan.

This system is actually based on base 3 or ternary, which uses three digits, 0, 1 and 2. However, the relationship between ternary numbers and the sums of positive and negative powers of 3 is more complicated than the relationship between binary numbers and sums of purely positive powers of 2. See if you can work out how to derive the sums in the middle from the ternary numbers on the right:

01 = 1 = 1 in ternary
02 = 3-1 = 2
03 = 3 = 10
04 = 3+1 = 11
05 = 9-3-1 = 12
06 = 9-3 = 20
07 = 9-3+1 = 21
08 = 9-1 = 22
09 = 9 = 100
10 = 9+1 = 101
11 = 9+3-1 = 102
12 = 9+3 = 110
13 = 9+3+1 = 111
14 = 27-9-3-1 = 112
15 = 27-9-3 = 120
16 = 27-9-3+1 = 121
17 = 27-9-1 = 122
18 = 27-9 = 200
19 = 27-9+1 = 201
20 = 27-9+3-1 = 202
21 = 27-9+3 = 210
22 = 27-9+3+1 = 211
23 = 27-3-1 = 212
24 = 27-3 = 220
25 = 27-3+1 = 221
26 = 27-1 = 222
27 = 27 = 1000
28 = 27+1 = 1001
29 = 27+3-1 = 1002
30 = 27+3 = 1010
31 = 27+3+1 = 1011
32 = 27+9-3-1 = 1012
33 = 27+9-3 = 1020
34 = 27+9-3+1 = 1021
35 = 27+9-1 = 1022
36 = 27+9 = 1100
37 = 27+9+1 = 1101
38 = 27+9+3-1 = 1102
39 = 27+9+3 = 1110
40 = 27+9+3+1 = 1111

To begin understanding the sums, consider those ternary numbers containing only 1s and 0s, like n = 1011[3], which equals 31 in decimal. The sum of powers is straightforward, because all of them are positive and they’re easy to work out from the digits of n in ternary: 1011 = 1*3^3 + 0*3^2 + 1*3^1 + 1*3^0 = 27+3+1. Now consider n = 222[3] = 26 in decimal. Just as a decimal number consisting entirely of 9s is always 1 less than a power of 10, so a ternary number consisting entirely of 2s is always 1 less than a power of three:

999 = 1000 - 1 = 10^3 - 1 (decimal)
222 = 1000[3] - 1 (ternary) = 26 = 27-1 = 3^3 - 1 (decimal)

If a ternary number contains only 2s and is d digits long, it will be equal to 3^d – 1. But what about numbers containing a mixture of 2s, 1s and 0s? Well, all ternary numbers containing at least one 2 will have a negative power of 3 in the sum. You can work out the sum by using the following algorithm. Suppose the number is five digits long and the rightmost digit is digit #1 and the leftmost is digit #5:

01. i = 1, sum = 0, extra = 0, posi = true.
02. if posi = false, goto step 07.
03. if digit #i = 0, sum = sum + 0.
04. if digit #i = 1, sum = sum + 3^(i-1).
05. if digit #i = 2, sum = sum - 3^(i-1), extra = 3^5, posi = false.
06. goto step 10.
07. if digit #i = 0, sum = sum + 3^(i-1), extra = 0, posi = true.
08. if digit #i = 1, sum = sum - 3^(i-1).
09. if digit #i = 2, sum = sum + 0.
10. i = i+1. if i <= 5, goto step 2.
11. print sum + extra.

As the number of weights grows, the advantages of base 3 get bigger:

With 02 weights, base 3 reaches 04 and base 2 reaches 3: 04-3 = 1.
With 03 weights, base 3 reaches 13 and base 2 reaches 7: 13-7 = 6.
With 04 weights, 000040 - 0015 = 000025
With 05 weights, 000121 - 0031 = 000090
With 06 weights, 000364 - 0063 = 000301
With 07 weights, 001093 - 0127 = 000966
With 08 weights, 003280 - 0255 = 003025
With 09 weights, 009841 - 0511 = 009330
With 10 weights, 029524 - 1023 = 028501
With 11 weights, 088573 - 2047 = 086526
With 12 weights, 265720 - 4095 = 261625...

But what about base 4, or quaternary? With four weights of 1, 4, 16 and 64, representing powers of 4 from 4^0 to 4^3, you should be able to weigh objects from 1 to 85 units using sums of positive and negative powers. In fact, some weights can’t be matched. As you can see below, if n in base 4 contains a 2, it can’t be represented as a sum of positive and negative powers of 4. Nor can certain other numbers:

1 = 1 ← 1
2 has no sum = 2
3 = 4-1 ← 3
4 = 4 ← 10 in base 4
5 = 4+1 ← 11 in base 4
6 has no sum = 12 in base 4
7 has no sum = 13
8 has no sum = 20
9 has no sum = 21
10 has no sum = 22
11 = 16-4-1 ← 23
12 = 16-4 ← 30
13 = 16-4+1 ← 31
14 has no sum = 32
15 = 16-1 ← 33
16 = 16 ← 100
17 = 16+1 ← 101
18 has no sum = 102
19 = 16+4-1 ← 103
20 = 16+4 ← 110
21 = 16+4+1 ← 111
22 has no sum = 112
23 has no sum = 113
24 has no sum = 120
25 has no sum = 121
26 has no sum = 122
27 has no sum = 123
[...]

With a more complicated balance scale, it’s possible to use weights representing powers of base 4 and base 5 (use two pans on each arm of the scale instead of one, placing the extra pan at the midpoint of the arm). But with a standard balance scale, base 3 is the champion. However, there is a way to do slightly better than standard base 3. You do it by botching the weights. Suppose you have four weights of 1, 4, 10 and 28 (representing 1, 3+1, 9+1 and 27+1). There are some weights n you can’t match, but because you can match n-1 and n+1, you know what these unmatchable weights are. Accordingly, while weights of 1, 3, 9 and 27 can measure objects up to 40 units, weights of 1, 4, 10 and 28 can measure objects up to 43 units:

1 = 1 ← 1
2 has no sum = 2
3 = 4-1 ← 10 in base 3
4 = 4 ← 11 in base 3
5 = 4+1 ← 12 in base 3
6 = 10-4 ← 20
7 = 10-4+1 ← 21
8 has no sum = 22
9 = 10-1 ← 100
10 = 10 ← 101
11 = 10+1 ← 102
12 has no sum = 110
13 = 10+4-1 ← 111
14 = 10+4 ← 112
15 = 10+4+1 ← 120
16 has no sum = 121
17 = 28-10-1 ← 122
18 = 28-10 ← 200
19 = 28-10+1 ← 201
20 has no sum = 202
21 = 28-10+4-1 ← 210
22 = 28-10+4 ← 211
23 = 28-4-1 ← 212
24 = 28-4 ← 220
25 = 28-4+1 ← 221
26 has no sum = 222
27 = 28-1 ← 1000
28 = 28 ← 1001
29 = 28+1 ← 1002
30 has no sum = 1010
31 = 28+4-1 ← 1011
32 = 28+4 ← 1012
33 = 28+4+1 ← 1020
34 = 28+10-4 ← 1021
35 = 28+10-4+1 ← 1022
36 has no sum = 1100
37 = 28+10-1 ← 1101
38 = 28+10 ← 1102
39 = 28+10+1 ← 1110
40 = has no sum = 1111*
41 = 28+10+4-1 ← 1112
42 = 28+10+4 ← 1120
43 = 28+10+4+1 ← 1121


*N.B. 40 = 82-28-10-4, i.e. has a sum when another botched weight, 82 = 3^4+1, is used.

For Revver and Fevver

This shape reminds me of the feathers on an exotic bird:

feathers

(click or open in new window for full size)


feathers_anim

(animated version)


The shape is created by reversing the digits of a number, so you could say it involves revvers and fevvers. I discovered it when I was looking at the Halton sequence. It’s a sequence of fractions created according to a simple but interesting rule. The rule works like this: take n in base b, reverse it, and divide reverse(n) by the first power of b that is greater thann.

For example, suppose n = 6 and b = 2. In base 2, 6 = 110 and reverse(110) = 011 = 11 = 3. The first power of 2 that is greater than 6 is 2^3 or 8. Therefore, halton(6) in base 2 equals 3/8. Here is the same procedure applied to n = 1..20:

1: halton(1) = 1/10[2] → 1/2
2: halton(10) = 01/100[2] → 1/4
3: halton(11) = 11/100[2] → 3/4
4: halton(100) = 001/1000[2] → 1/8
5: halton(101) = 101/1000[2] → 5/8
6: halton(110) = 011/1000 → 3/8
7: halton(111) = 111/1000 → 7/8
8: halton(1000) = 0001/10000 → 1/16
9: halton(1001) = 1001/10000 → 9/16
10: halton(1010) = 0101/10000 → 5/16
11: halton(1011) = 1101/10000 → 13/16
12: halton(1100) = 0011/10000 → 3/16
13: halton(1101) = 1011/10000 → 11/16
14: halton(1110) = 0111/10000 → 7/16
15: halton(1111) = 1111/10000 → 15/16
16: halton(10000) = 00001/100000 → 1/32
17: halton(10001) = 10001/100000 → 17/32
18: halton(10010) = 01001/100000 → 9/32
19: halton(10011) = 11001/100000 → 25/32
20: halton(10100) = 00101/100000 → 5/32…

Note that the sequence always produces reduced fractions, i.e. fractions in their lowest possible terms. Once 1/2 has appeared, there is no 2/4, 4/8, 8/16…; once 3/4 has appeared, there is no 6/8, 12/16, 24/32…; and so on. If the fractions are represented as points in the interval [0,1], they look like this:

line1_1_2

point = 1/2


line2_1_4

point = 1/4


line3_3_4

point = 3/4


line4_1_8

point = 1/8


line5_5_8

point = 5/8


line6_3_8

point = 3/8


line7_7_8

point = 7/8


line_b2_anim

(animated line for base = 2, n = 1..63)


It’s apparent that Halton points in base 2 will evenly fill the interval [0,1]. Now compare a Halton sequence in base 3:

1: halton(1) = 1/10[3] → 1/3
2: halton(2) = 2/10[3] → 2/3
3: halton(10) = 01/100[3] → 1/9
4: halton(11) = 11/100[3] → 4/9
5: halton(12) = 21/100[3] → 7/9
6: halton(20) = 02/100 → 2/9
7: halton(21) = 12/100 → 5/9
8: halton(22) = 22/100 → 8/9
9: halton(100) = 001/1000 → 1/27
10: halton(101) = 101/1000 → 10/27
11: halton(102) = 201/1000 → 19/27
12: halton(110) = 011/1000 → 4/27
13: halton(111) = 111/1000 → 13/27
14: halton(112) = 211/1000 → 22/27
15: halton(120) = 021/1000 → 7/27
16: halton(121) = 121/1000 → 16/27
17: halton(122) = 221/1000 → 25/27
18: halton(200) = 002/1000 → 2/27
19: halton(201) = 102/1000 → 11/27
20: halton(202) = 202/1000 → 20/27
21: halton(210) = 012/1000 → 5/27
22: halton(211) = 112/1000 → 14/27
23: halton(212) = 212/1000 → 23/27
24: halton(220) = 022/1000 → 8/27
25: halton(221) = 122/1000 → 17/27
26: halton(222) = 222/1000 → 26/27
27: halton(1000) = 0001/10000 → 1/81
28: halton(1001) = 1001/10000 → 28/81
29: halton(1002) = 2001/10000 → 55/81
30: halton(1010) = 0101/10000 → 10/81

And here is an animated gif representing the Halton sequence in base 3 as points in the interval [0,1]:

line_b3_anim


Halton points in base 3 also evenly fill the interval [0,1]. What happens if you apply the Halton sequence to a two-dimensional square rather a one-dimensional line? Suppose the bottom left-hand corner of the square has the co-ordinates (0,0) and the top right-hand corner has the co-ordinates (1,1). Find points (x,y) inside the square, with x supplied by the Halton sequence in base 2 and y supplied by the Halton sequence in base 3. The square will gradually fill like this:

square1

x = 1/2, y = 1/3


square2

x = 1/4, y = 2/3


square3

x = 3/4, y = 1/9


square4

x = 1/8, y = 4/9


square5

x = 5/8, y = 7/9


square6

x = 3/8, y = 2/9


square7

x = 7/8, y = 5/9


square8

x = 1/16, y = 8/9


square9

x = 9/16, y = 1/27…


square_anim

animated square


Read full page: For Revver and Fevver

Clock around the Rock

If you like minimalism, you should like binary. There is unsurpassable simplicity and elegance in the idea that any number can be reduced to a series of 1’s and 0’s. It’s unsurpassable because you can’t get any simpler: unless you use finger-counting, two symbols are the minimum possible. But with those two – a stark 1 and 0, true and false, yin and yang, sun and moon, black and white – you can conquer any number you please. 2 = 10[2]. 5 = 101. 100 = 1100100. 666 = 1010011010. 2013 = 11111011101. 9^9 = 387420489 = 10111000101111001000101001001. You can also perform any mathematics you please, from counting sheep to modelling the evolution of the universe.

Yin and Yang symbol

1 + 0 = ∞

But one disadvantage of binary, from the human point of view, is that numbers get long quickly: every doubling in size adds an extra digit. You can overcome that disadvantage using octal or hexadecimal, which compress blocks of binary into single digits, but those number systems need more symbols: eight and sixteen, as their names suggest. There’s an elegance there too, but binary goes masked, hiding its minimalist appeal beneath apparent complexity. It doesn’t need to wear a mask for computers, but human beings can appreciate bare binary too, even with our weak memories and easily tiring nervous systems. I especially like minimalist binary when it’s put to work on those most maximalist of numbers: the primes. You can compare integers, or whole numbers, to minerals. Some are like mica or shale, breaking readily into smaller parts, but primes are like granite or some other ultra-hard, resistant rock. In other words, some integers are easy to divide by other integers and some, like the primes, are not. Compare 256 with 257. 256 = 2^8, so it’s divisible by 128, 64, 32, 16, 8, 4, 2 and 1. 257 is a prime, so it’s divisible by nothing but itself and 1. Powers of two are easy to calculate and, in binary, very easy to represent:

2^0 = 1 = 1
2^1 = 2 = 10[2]
2^2 = 4 = 100
2^3 = 8 = 1000
2^4 = 16 = 10000
2^5 = 32 = 100000
2^6 = 64 = 1000000
2^7 = 128 = 10000000
2^8 = 256 = 100000000

Primes are the opposite: hard to calculate and usually hard to represent, whatever the base:

02 = 000010[2]
03 = 000011
05 = 000101
07 = 000111
11 = 001011
13 = 001101
17 = 010001
19 = 010011
23 = 010111
29 = 011101
31 = 011111
37 = 100101
41 = 101001
43 = 101011

Maximalist numbers, minimalist base: it’s a potent combination. But “brimes”, or binary primes, nearly all have one thing in common. Apart from 2, a special case, each brime must begin and end with 1. For the digits in-between, the God of Mathematics seems to be tossing a coin, putting 1 for heads, 0 for tails. But sometimes the coin will come up all heads or all tails: 127 = 1111111[2] and 257 = 100000001, for example. Brimes like that have a stark simplicity amid the jumble of 83 = 1010011[2], 113 = 1110001, 239 = 11101111, 251 = 11111011, 277 = 100010101, and so on. Brimes like 127 and 257 are also palindromes, or the same reading in both directions. But less simple brimes can be palindromes too:

73 = 1001001
107 = 1101011
313 = 100111001
443 = 110111011
1193 = 10010101001
1453 = 10110101101
1571 = 11000100011
1619 = 11001010011
1787 = 11011111011
1831 = 11100100111
1879 = 11101010111

But, whether they’re palindromes or not, all brimes except 2 begin and end with 1, so they can be represented as rings, like this:

Ouroboros5227

Those twelve bits, or binary digits, actually represent the thirteen bits of 5227 = 1,010,001,101,011. Start at twelve o’clock (digit 1 of the prime) and count clockwise, adding 1’s and 0’s till you reach 12 o’clock again and add the final 1. Then you’ve clocked around the rock and created the granite of 5227, which can’t be divided by any integers but itself and 1. Another way to see the brime-ring is as an Ouroboros (pronounced “or-ROB-or-us”), a serpent or dragon biting its own tail, like this:

Alchemical Ouroboros

Alchemical Ouroboros (1478)

Dragon Ouroboros

Another alchemical Ouroboros (1599)

But you don’t have to start clocking around the rock at midday or midnight. Take the Ouroboprime of 5227 and start at eleven o’clock (digit 12 of the prime), adding 1’s and 0’s as you move clockwise. When you’ve clocked around the rock, you’ll have created the granite of 6709, another prime:

Ouroboros6709

Other Ouroboprimes produce brimes both clockwise and anti-clockwise, like 47 = 101,111.

Clockwise

101,111 = 47
111,011 = 59
111,101 = 61

Anti-Clockwise

111,101 = 61
111,011 = 59
101,111 = 47

If you demand the clock-rocked brime produce distinct primes, you sometimes get more in one direction than the other. Here is 151 = 10,010,111:

Clockwise

10,010,111 = 151
11,100,101 = 229

Anti-Clockwise

11,101,001 = 233
11,010,011 = 211
10,100,111 = 167
10,011,101 = 157

The most productive brime I’ve discovered so far is 2,326,439 = 1,000,110,111,111,110,100,111[2], which produces fifteen distinct primes:

Clockwise (7 brimes)

1,000,110,111,111,110,100,111 = 2326439
1,100,011,011,111,111,010,011 = 3260371
1,110,100,111,000,110,111,111 = 3830207
1,111,101,001,110,001,101,111 = 4103279
1,111,110,100,111,000,110,111 = 4148791
1,111,111,010,011,100,011,011 = 4171547
1,101,111,111,101,001,110,001 = 3668593

Anti-Clockwise (8 brimes)

1,110,010,111,111,110,110,001 = 3768241
1,100,101,111,111,101,100,011 = 3342179
1,111,111,011,000,111,001,011 = 4174283
1,111,110,110,001,110,010,111 = 4154263
1,111,101,100,011,100,101,111 = 4114223
1,111,011,000,111,001,011,111 = 4034143
1,110,110,001,110,010,111,111 = 3873983
1,000,111,001,011,111,111,011 = 2332667


Appendix: Deciminimalist Primes

Some primes in base ten use only the two most basic symbols too. That is, primes like 11[10], 101[10], 10111[10] and 1011001[10] are composed of only 1’s and 0’s. Furthermore, when these numbers are read as binary instead, they are still prime: 11[2] = 3, 101[2] = 5, 10111[2] = 23 and 1011001[2] = 89. Here is an incomplete list of these deciminimalist primes:

11[10] = 1,011[2]; 11[2] = 3[10] is also prime.

101[10] = 1,100,101[2]; 101[2] = 5[10] is also prime.

10,111[10] = 10,011,101,111,111[2]; 10,111[2] = 23[10] is also prime.

101,111[10] = 11,000,101,011,110,111[2]; 101,111[2] = 47[10] is also prime.

1,011,001[10] = 11,110,110,110,100,111,001[2]; 1,011,001[2] = 89[10] is also prime.

1,100,101[10] = 100,001,100,100,101,000,101[2]; 1,100,101[2] = 101[10] is also prime.

10,010,101[10] = 100,110,001,011,110,111,110,101[2]; 10,010,101[2] = 149[10] is also prime.

10,011,101[10] = 100,110,001,100,000,111,011,101[2]; 10,011,101[2] = 157[10] is also prime.

10,100,011[10] = 100,110,100,001,110,100,101,011[2]; 10,100,011[2] = 163[10] is also prime.

10,101,101[10] = 100,110,100,010,000,101,101,101[2]; 10,101,101[2] = 173[10] is also prime.

10,110,011[10] = 100,110,100,100,010,000,111,011[2]; 10,110,011[2] = 179[10] is also prime.

10,111,001[10] = 100,110,100,100,100,000,011,001[2].

11,000,111[10] = 101,001,111,101,100,100,101,111[2]; 11,000,111[2] = 199[10] is also prime.

11,100,101[10] = 101,010,010,101,111,111,000,101[2]; 11,100,101[2] = 229[10] is also prime.

11,110,111[10] = 101,010,011,000,011,011,011,111[2].

11,111,101[10] = 101,010,011,000,101,010,111,101[2].

100,011,001[10] = 101,111,101,100,000,101,111,111,001[2]; 100,011,001[2] = 281[10] is also prime.

100,100,111[10] = 101,111,101,110,110,100,000,001,111[2].

100,111,001[10] = 101,111,101,111,001,001,010,011,001[2]; 100,111,001[2] = 313[10] is also prime.

101,001,001[10] = 110,000,001,010,010,011,100,101,001[2].

101,001,011[10] = 110,000,001,010,010,011,100,110,011[2]; 101,001,011[2] = 331[10] is also prime.

101,001,101[10] = 110,000,001,010,010,011,110,001,101[2].

101,100,011[10] = 110,000,001,101,010,100,111,101,011[2].

101,101,001[10] = 110,000,001,101,010,110,111,001,001[2].

101,101,111[10] = 110,000,001,101,010,111,000,110,111[2]; 101,101,111[2] = 367[10] is also prime.

101,110,111[10] = 110,000,001,101,101,000,101,011,111[2].

101,111,011[10] = 110,000,001,101,101,010,011,100,011[2]; 101,111,011[2] = 379[10] is also prime.

101,111,111[10] = 110,000,001,101,101,010,101,000,111[2]; 101,111,111[2] = 383[10] is also prime.

110,010,101[10] = 110,100,011,101,001,111,011,110,101[2].

110,100,101[10] = 110,100,011,111,111,111,010,000,101[2]; 110,100,101[2] = 421[10] is also prime.

110,101,001[10] = 110,100,100,000,000,001,000,001,001[2].

110,110,001[10] = 110,100,100,000,010,010,100,110,001[2]; 110,110,001[2] = 433[10] is also prime.

110,111,011[10] = 110,100,100,000,010,100,100,100,011[2]; 110,111,011[2] = 443[10] is also prime.

Flesh and Binary

It’s odd that probability theory is so counter-intuitive to human beings and so late-flowering in mathematics. Men have been gambling for thousands of years, but didn’t develop a good understanding of what happens when dice are rolled or coins are tossed until a few centuries ago. And an intuitive grasp of probability would have been useful long before gambling was invented. Our genes automatically equip us to speak, to walk and to throw, but they don’t equip us to understand by instinct why five-tails-in-a-row makes heads no more likely on the sixth coin-toss than it was on the first.

Dice from ancient Rome

Dice and gambling tokens from ancient Rome

Or to understand why five-boys-in-a-row makes the birth of a girl next time no more likely than it was during the first pregnancy (at least in theory). Boy/girl, like heads/tails, is a binary choice, so binary numbers are useful for understanding the probabilities of birth or coin-tossing. Questions like these are often asked to test knowledge of elementary probability:

1. Suppose a family have two children and the elder is a boy. What is the probability that both are boys?

2. Suppose a family have two children and at least one is a boy. What is the probability that both are boys?

People sometimes assume that the two questions are equivalent, but binary makes it clear that they’re not. If 1 represents a boy, 0 represents a girl and digit-order represents birth-order, the first question covers these possibilities: 10, 11. So the chance of both children being boys is 1/2 or 50%. The second question covers these possibilities: 10, 01, 11. So the chance of both children being boys is 1/3 = 33·3%. But now examine this question:

3. Suppose a family have two children and only one is called John. What is the probability that both children are boys?

That might seem the equivalent of question 2, but it isn’t. The name “John” doesn’t just identify the child as a boy, it identifies him as a unique boy, distinct from any brother he happens to have. Binary isn’t sufficient any more. So, while boy = 1, John = 2. The possibilities are: 20, 21, 02, 12. The chance of both children being boys is then 1/2 = 50%.

The three questions above are very simple, but I don’t think Archimedes or Euclid ever addressed the mathematics behind them. Perhaps they would have made mistakes if they had. I hope I haven’t, more than two millennia later. Perhaps the difficulty of understanding probability relates to the fact that it involves movement and change. The Greeks developed a highly sophisticated mathematics of static geometry, but did not understand projectiles or falling objects. When mathematicians began understood those in Renaissance Italy, they also began to understand the behaviour of dice, coins and cards. Ideas were on the move then and this new mathematics was obviously related to the rise of science: Galileo (1564-1642) is an important figure in both fields. But the maths and science can be linked with apparently distinct phenomena like Protestantism and classical music. All of these things began to develop in a “band of genius” identified by the American researcher Charles Murray. It runs roughly from Italy through France and Germany to Scotland: from Galileo through Beethoven and Descartes to David Hume.

Map of Europe from Mercator's Atlas Cosmographicae (1596)

Map of Europe from Mercator’s Atlas Cosmographicae (1596)

But how far is geography also biology? Having children is a form of gambling: the dice of DNA, shaken in testicle- and ovary-cups, are rolled in a casino run by Mother Nature. Or rather, in a series of casinos where different rules apply: the genetic bets placed in Africa or Europe or Asia haven’t paid off in the same way. In other words, what wins in one place may lose in another. Different environments have favoured different sets of genes with different effects on both bodies and brains. All human beings have many things in common, but saying that we all belong to the same race, the human race, is like saying that we all speak the same language, the human language. It’s a ludicrous and anti-scientific idea, however widely it may be accepted (and enforced) in the modern West.

Languages have fuzzy boundaries. So do races. Languages have dialects and accents, and so, in a sense, do races. The genius that unites Galileo, Beethoven and Hume may have been a particular genetic dialect spoken, as it were, in a particular area of Europe. Or perhaps it’s better to see European genius as a series of overlapping dialects. Testing that idea will involve mathematics and probability theory, and the computers that crunch the data about flesh will run on binary. Apparently disparate things are united by mathematics, but maths unites everything partly because it is everything. Understanding the behaviour of dice in the sixteenth century leads to understanding the behaviour of DNA in the twenty-first.

The next step will be to control the DNA-dice as they roll. China has already begun trying to do that using science first developed in the West. But the West itself is still in the thrall of crypto-religious ideas about equality and environment. These differences have biological causes: the way different races think about genetics, or persuade other races to think about genetics, is related to their genetics. You can’t escape genes any more than you can escape maths. But the latter is a ladder that allows us to see over the old genetic wall and glimpse the possibilities beyond it. The Chinese are trying to climb over the wall using super-computers; the West is still insisting that there’s nothing on the other side. Interesting times are ahead for both flesh and binary.

Appendix

1. Suppose a family have three children and the eldest is a girl. What is the probability that all three are girls?

2. Suppose a family have three children and at least one is a girl. What is the probability that all three are girls?

3. Suppose a family have three children and only one is called Joan. What is the probability that all three are girls?

The possibilities in the first case are: 000, 001, 010, 011. So the chance of three girls is 1/4 = 25%.

The possibilities in the second case are: 000, 001, 010, 011, 100, 101, 110. So the chance of three girls is 1/7 = 14·28%.

The possibilities in the third case are: 200, 201, 210, 211, 020, 021, 120, 121, 002, 012, 102, 112. So the chance of three girls is 3/12 = 1/4 = 25%.