Pi in the Bi

Binary is beautiful — both simple and subtle. What could be simpler than using only two digits to count with?

0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111, 10000, 10001, 10010, 10011, 10100, 10101, 10110, 10111, 11000, 11001, 11010, 11011, 11100, 11101, 11110, 11111, 100000, 100001, 100010, 100011, 100100, 100101, 100110, 100111, 101000, 101001, 101010, 101011, 101100, 101101, 101110, 101111, 110000, 110001, 110010, 110011, 110100, 110101, 110110, 110111, 111000, 111001, 111010, 111011, 111100, 111101, 111110, 111111, 1000000...

But the simple patterns in the two digits of binary involve two of the most important numbers in mathematics: π and e (aka Euler’s number):

π = 3.141592653589793238462643383...
e = 2.718281828459045235360287471...

It’s easy to write π and e in binary:

π = 11.00100 10000 11111 10110 10101 00010...
e = 10.10110 11111 10000 10101 00010 11000...

But how do π and e appear in the patterns of binary 1 and 0? Well, suppose you use the digits of binary to generate the sums of distinct integers. For example, here are the sums of distinct integers you can generate with three digits of binary, if you count the digits from right to left (so the rightmost digit is 1, the the next-to-rightmost digit is 2, the next-to-leftmost digit is 3, and the leftmost digit is 4):

0000 → 0*4 + 0*3 + 0*2 + 0*1 = 0
0001 → 0*4 + 0*3 + 0*2 + 1*1 = 1*1 = 1
0010 → 0*4 + 0*3 + 1*2 + 0*1 = 1*2 = 2
0011 → 0*4 + 0*3 + 1*2 + 1*1 = 1*2 + 1*1 = 3
0100 → 1*3 = 3
0101 → 1*3 + 1*1 = 4
0110 → 3 + 2 = 5
0111 → 3 + 2 + 1 = 6
1000 → 4
1001 → 4 + 1 = 5
1010 → 4 + 2 = 6
1011 → 4 + 2 + 1 = 7
1100 → 4 + 3 = 7
1101 → 4 + 3 + 1 = 8
1110 → 4 + 3 + 2 = 9
1111 → 4 + 3 + 2 + 1 = 10

There are 16 sums (16 = 2^4) generating 11 integers, 0 to 10. But some integers involve more than one sum:

3 = 2 + 1 ← 0011
3 = 3 ← 0100

4 = 3 + 1 ← 0101
4 = 4 ← 1000

5 = 3 + 2 ← 0110
5 = 4 + 1 ← 1001

6 = 3 + 2 + 1 ← 0111
6 = 4 + 2 ← 1010

7 = 4 + 2 + 1 ← 1011
7 = 4 + 3 ← 1100

Note the symmetry of the sums: the binary number 0011, yielding 3, is the mirror of 1100, yielding 7; the binary number 0100, yielding 3 again, is the mirror of 1011, yielding 7 again. In each pair of mirror-sums, the two numbers, 3 and 7, are related by the formula 10-3 = 7 and 10-7 = 3. This also applies to 4 and 6, where 10-4 = 6 and 10-6 = 4, and to 5, which is its own mirror (because 10-5 = 5). Now, try mapping the number of distinct sums for 0 to 10 as a graph:

Graph for distinct sums of the integers 0 to 4

The graph show how 0, 1 and 2 have one sum each, 3, 4, 5, 6 and 7 have two sums each, and 8, 9 and 10 have one sum each. Now look at the graph for sums derived from three digits of binary:

Graph for distinct sums of the integers 0 to 3

The single taller line of the seven lines represents the two sums of 3, because three digits of binary yield only one sum for 0, 1, 2, 4, 5 and 6:

000 → 0
001 → 1
010 → 2
011 → 2 + 1 = 3
100 → 3
101 → 3 + 1 = 4
110 → 3 + 2 = 5
111 → 3 + 2 + 1 = 6

Next, look at graphs for sums derived from one to sixteen binary digits and note how the symmetry of the lines begins to create a beautiful curve (the y axis is normalized, so that the highest number of sums reaches the same height in each graph):

Graph for sums from 1 binary digit

Graph for sums from 2 binary digits

Graph for sums from 3 binary digits

Graph for sums from 4 binary digits

Graph for sums from 5 binary digits

Graph for sums from 6 binary digits

Graph for sums from 7 binary digits

Graph for sums from 8 binary digits

Graph for sums from 9 binary digits

Graph for sums from 10 binary digits

Graph for sums from 11 binary digits

Graph for sums from 12 binary digits

Graph for sums from 13 binary digits

Graph for sums from 14 binary digits

Graph for sums from 15 binary digits

Graph for sums from 16 binary digits

Graphs for 1 to 16 binary digits (animated)

You may recognize the shape emerging above as the bell curve, whose formula is this:

Formula for the normal distribution or bell curve (image from ThoughtCo)

And that’s how you can find pi in the bi, or π in the binary digits of 0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101…

Post-Performative Post-Scriptum

I asked this question above: What could be simpler than using only two digits? Well, using only one digit is simpler still:

1, 11, 111, 1111, 11111, 111111, 1111111, 11111111, 111111111, 1111111111...

But I don’t see an easy way to find π and e in numbers like that.

La Formule de François

Here is a beautiful and astonishingly simple formula for π created by the French mathematician François Viète (1540-1603):

• 2 / π = √2/2 * √(2 + √2)/2 * √(2 + √(2 + √2))/2…

I can remember testing the formula on a scientific calculator that allowed simple programming. As I pressed the = key and the results began to home in on π, I felt as though I was watching a tall and elegant temple emerge through swirling mist.

The Glamor of Gamma

The factorial function, n!, is easy to understand. You simply take an integer and multiply it by all integers smaller than it (by convention, 0! = 1):

0! = 1
1! = 1
2! = 2 = 2*1
3! = 6 = 3*2*1
4! = 24 = 4*3*2*1
5! = 120 = 5*4*3*2*1
6! = 720 = 6*120 = 6*5!
7! = 5040
8! = 40320
9! = 362880
10! = 3628800
11! = 39916800
12! = 479001600
13! = 6227020800
14! = 87178291200
15! = 1307674368000
16! = 20922789888000
17! = 355687428096000
18! = 6402373705728000
19! = 121645100408832000
20! = 2432902008176640000

The gamma function, Γ(n), isn’t so easy to understand. It allows you to find the factorials of not just the integers, but everything between the integers, like fractions, square roots, and transcendental numbers like π. Don’t ask me how! And don’t ask me how you get this very beautiful and unexpected result:

Γ(1/2) = √π = 1.77245385091...

But a blog called Mathematical Enchantments can tell you more:

The Square Root of Pi

Post-Performative Post-Scriptum

glamour | glamor, n. Originally Scots, introduced into the literary language by Scott. A corrupt form of grammar n.; for the sense compare gramarye n. (and French grimoire ), and for the form glomery n. 1. Magic, enchantment, spell; esp. in the phrase to cast the glamour over one. 2. a. A magical or fictitious beauty attaching to any person or object; a delusive or alluring charm. b. Charm; attractiveness; physical allure, esp. feminine beauty; frequently attributive colloquial (originally U.S.). — Oxford English Dictionary

He Say, He Sigh, He Sow #20

“In 1997, Fabrice Bellard announced that the trillionth digit of π, in binary notation, is 1.” — Ian Stewart, The Great Mathematical Problems (2013).

Stories and Stars

A story is stranger than a star. Stronger too. What do I mean? I mean that the story has more secrets than a star and holds its secrets more tightly. A full scientific description of a star is easier than a full scientific description of a story. Stars are much more primitive, much closer to the fundamentals of the universe. They’re huge and impressive, but they’re relatively simple things: giant spheres of flaming gas. Mathematically speaking, they’re more compressible: you have to put fewer numbers into fewer formulae to model their behaviour. A universe with just stars in it isn’t very complex, as you would expect from the evolution of our own universe. There were stars in it long before there were stories.

A universe with stories in it, by contrast, is definitely complex. This is because stories depend on language and language is the scientific mother-lode, the most difficult and important problem of all. Or rather, the human brain is. The human brain understands a lot about stars, despite their distance, but relatively little about itself, despite brains being right on the spot. Consciousness is a tough nut to crack, for example. Perhaps it’s uncrackable. Language looks easier, but linguistics is still more like stamp-collecting than science. We can describe the structure of language in detail – use labels like “pluperfect subjunctive”, “synecdoche”, “bilabial fricative” and so on – but we don’t know how that structure is instantiated in the brain or where language came from. How did it evolve? How is it coded in the human genome? How does meaning get into and out of sounds and shapes, into and out of speech and writing? These are big, important and very interesting questions, but we’ve barely begun to answer them.

Distribution of dental fricatives and the O blood-group in Europe (from David Crystal's )

Distribution of dental fricatives and the O blood-group in Europe (from David Crystal’s Cambridge Encyclopedia of Language)

But certain things seem clear already. Language-genes must differ in important ways between different groups, influencing their linguistic skills and their preferences in phonetics and grammar. For example, there are some interesting correlations between blood-groups and use of dental fricatives in Europe. The invention of writing has exerted evolutionary pressures in Europe and Asia in ways it hasn’t in Africa, Australasia and the Americas. Glossogenetics, or the study of language and genes, will find important differences between races and within them, running parallel with differences in psychology and physiology. Language is a human universal, but that doesn’t mean one set of identical genes underlies the linguistic behaviour of all human groups. Skin, bones and blood are human universals too, but they differ between groups for genetic reasons.

Understanding the evolution and effects of these genetic differences is ultimately a mathematical exercise, and understanding language will be too. So will understanding the brain. For one thing, the brain must, at bottom, be a maths-engine or math-engine: a mechanism receiving, processing and sending information according to rules. But that’s a bit like saying fish are wet. Fish can’t escape water and human beings can’t escape mathematics. Nothing can: to exist is to stand in relation to other entities, to influence and be influenced by them, and mathematics is about that inter-play of entities. Or rather, that inter-play is Mathematics, with a big “M”, and nothing escapes it. Human beings have invented a way of modelling that fundamental micro- and macroscopic inter-play, which is mathematics with a small “m”. When they use this model, human beings can make mistakes. But when they do go wrong, they can do so in ways detectable to other human beings using the same model:

In 1853 William Shanks published his calculations of π to 707 decimal places. He used the same formula as [John] Machin and calculated in the process several logarithms to 137 decimal places, and the exact value of 2^721. A Victorian commentator asserted: “These tremendous stretches of calculation… prove more than the capacity of this or that computer for labor and accuracy; they show that there is in the community an increase in skill and courage…”

Augustus de Morgan thought he saw something else in Shanks’s labours. The digit 7 appeared suspiciously less often than the other digits, only 44 times against an average expected frequency of 61 for each digit. De Morgan calculated that the odds against such a low frequency were 45 to 1. De Morgan, or rather William Shanks, was wrong. In 1945, using a desk calculator, Ferguson found that Shanks had made an error; his calculation was wrong from place 528 onwards. Shanks, fortunately, was long dead. (The Penguin Dictionary of Curious and Interesting Numbers, 1986, David Wells, entry for π, pg. 51)

Unlike theology or politics, mathematics is not merely self-correcting, but multiply so: there are different routes to the same truths and different ways of testing a result. Science too is self-correcting and can test its results by different means, partly because science is a mathematical activity and partly because it is studying a mathematical artifact: the gigantic structure of space, matter and energy known as the Universe. Some scientists and philosophers have puzzled over what the physicist Eugene Wigner (1902-95) called “The Unreasonable Effectiveness of Mathematics in the Natural Sciences”. In his essay on the topic, Wigner tried to make two points:

The first point is that the enormous usefulness of mathematics in the natural sciences is something bordering on the mysterious and that there is no rational explanation for it. Second, it is just this uncanny usefulness of mathematical concepts that raises the question of the uniqueness of our physical theories. (Op. cit., in Communications in Pure and Applied Mathematics, vol. 13, No. I, February 1960)

I disagree with Wigner: it is not mysterious or uncanny and there is a rational explanation for it. The “effectiveness” of small-m maths for scientists is just as reasonable as the effectiveness of fins for fish or of wings for birds. The sea is water and the sky is air. The universe contains both sea and sky: and the universe is maths. Fins and wings are mechanisms that allow fish and birds to operate effectively in their water- and air-filled environments. Maths is a mechanism that allows scientists to operate effectively in their maths-filled environment. Scientists have, in a sense, evolved towards using maths just as fish and birds have evolved towards using fins and wings. Men have always used language to model the universe, but language is not “unreasonably effective” for understanding the universe. It isn’t effective at all.

It is effective, however, in manipulating and controlling other human beings, which explains its importance in politics and theology. In politics, language is used to manipulate; in science, language is used to explain. That is why mathematics is so important in science and so carefully avoided in politics. And in certain academic disciplines. But the paradox is that physics is much more intellectually demanding than, say, literary theory because the raw stuff of physics is actually much simpler than literature. To understand the paradox, imagine that two kinds of boulder are strewn on a plain. One kind is huge and made of black granite. The other kind is relatively small and made of chalk. Two tribes of academic live on the plain, one devoted to studying the black granite boulders, the other devoted to studying the chalk boulders.

The granite academics, being unable to lift or cut into their boulders, will have no need of physical strength or tool-making ability. Instead, they will justify their existence by sitting on their boulders and telling stories about them or describing their bumps and contours in minute detail. The chalk academics, by contrast, will be lifting and cutting into their boulders and will know far more about them. So the chalk academics will need physical strength and tool-making ability. In other words, physics, being inherently simpler than literature, is within the grasp of a sufficiently powerful human intellect in a way literature is not. Appreciating literature depends on intuition rather than intellect. And so strong intellects are able to lift and cut into the problems of physics as they aren’t able to lift and cut into the problems of literature, because the problems of literature depend on consciousness and on the hugely complex mechanisms of language, society and psychology.

Intuition is extremely powerful, but isn’t under conscious control like intellect and isn’t transparent to consciousness in the same way. In the fullest sense, it includes the senses, but who can control his own vision and hearing or understand how they turn the raw stuff of the sense-organs into the magic tapestry of conscious experience? Flickering nerve impulses create a world of sight, sound, scent, taste and touch and human beings are able to turn that world into the symbols of language, then extract it again from the symbols. This linguifaction is a far more complex process than the ignifaction that drives a star. At present it’s beyond the grasp of our intellects, so the people who study it don’t need and don’t build intellectual muscle in the way that physicists do.

Or one could say that literature is at a higher level of physics. In theory, it is ultimately and entirely reducible to physics, but the mathematics governing its emergence from physics are complex and not well-understood. It’s like the difference between a caterpillar and a butterfly. They are two aspects of one creature, but it’s difficult to understand how one becomes the other, as a caterpillar dissolves into chemical soup inside a chrysalis and turns into something entirely different in appearance and behaviour. Modelling the behaviour of a caterpillar is simpler than modelling the behaviour of a butterfly. A caterpillar’s brain has less to cope with than a butterfly’s. Caterpillars crawl and butterflies fly. Caterpillars eat and butterflies mate. And so on.

Stars can be compared to caterpillars, stories to butterflies. It’s easier to explain stars than to explain stories. And one of the things we don’t understand about stories is how we understand stories.

2:1 Now when Jesus was born in Bethlehem of Judaea in the days of Herod the king, behold, there came wise men from the east to Jerusalem, 2:2 Saying, Where is he that is born King of the Jews? for we have seen his star in the east, and are come to worship him. 2:3 When Herod the king had heard these things, he was troubled, and all Jerusalem with him. 2:4 And when he had gathered all the chief priests and scribes of the people together, he demanded of them where Christ should be born. 2:5 And they said unto him, In Bethlehem of Judaea: for thus it is written by the prophet, 2:6 And thou Bethlehem, in the land of Juda, art not the least among the princes of Juda: for out of thee shall come a Governor, that shall rule my people Israel. 2:7 Then Herod, when he had privily called the wise men, enquired of them diligently what time the star appeared. 2:8 And he sent them to Bethlehem, and said, Go and search diligently for the young child; and when ye have found him, bring me word again, that I may come and worship him also. 2:9 When they had heard the king, they departed; and, lo, the star, which they saw in the east, went before them, till it came and stood over where the young child was. 2:10 When they saw the star, they rejoiced with exceeding great joy. 2:11 And when they were come into the house, they saw the young child with Mary his mother, and fell down, and worshipped him: and when they had opened their treasures, they presented unto him gifts; gold, and frankincense and myrrh. – From The Gospel According to Saint Matthew.

Neuclid on the Block

How many blows does it take to demolish a wall with a hammer? It depends on the wall and the hammer, of course. If the wall is reality and the hammer is mathematics, you can do it in three blows, like this:

α’. Σημεῖόν ἐστιν, οὗ μέρος οὐθέν.
β’. Γραμμὴ δὲ μῆκος ἀπλατές.
γ’. Γραμμῆς δὲ πέρατα σημεῖα.

1. A point is that of which there is no part.
2. A line is a length without breadth.
3. The extremities of a line are points.

That is the astonishing, world-shattering opening in one of the strangest – and sanest – books ever written. It’s twenty-three centuries old, was written by an Alexandrian mathematician called Euclid (fl. 300 B.C.), and has been pored over by everyone from Abraham Lincoln to Bertrand Russell by way of Edna St. Vincent Millay. Its title is highly appropriate: Στοιχεῖα, or Elements. Physical reality is composed of chemical elements; mathematical reality is composed of logical elements. The second reality is much bigger – infinitely bigger, in fact. In his Elements, Euclid slipped the bonds of time, space and matter by demolishing the walls of reality with a mathematical hammer and escaping into a world of pure abstraction.

• Continue reading Neuclid on the Block