The thing about π

Consider the following setup, from the game ‘Factorio’, the game about factory management and automation:

There are two factories visible in this image – the two rectangular, green-walled buildings. Take the one on the left: it’s manufacturing electric furnaces, with steel plates, stone bricks and advanced circuits as ingredients. These three resources are visible on conveyor belts leading up to the factory (top, left, bottom resp.), terminated by blue and green inserters that move the objects from the belts to the factory floor.

In order to maintain a steady supply of electric furnaces, I need to keep the ‘resource pressure’ up. Think of it like a strong wind blowing against your window: even if you opened the window just a little, there’s enough air pressing on that side of the wall for a lot of it to flow into your room. Similarly, I need to make sure sufficient quantities of steel, stone bricks and advanced circuits are available whenever the factory needs it. And within Factorio, as in the real world I imagine, maintaining this resource pressure isn’t easy.

Even if we assume that all the raw materials for these ingredients are available in infinite quantities, the time taken to transport each resource, manufacture the required parts and then move them to the factory takes a different amount of time. And in the factory itself, each electric furnace consumes different quantities of each ingredient: 10 steel plates, 10 stone bricks and five advanced circuits). As a result, for example, if I maintain all three resources with equal pressure on the factory, I will still run out of steel plates and stone bricks faster than I will run out of advanced circuits.

In fact, I will run out of steel plates first because its crafting time is 32 seconds, versus 3.2 seconds for one stone brick. So the proper pressure to maintain here is P for advanced circuits, 2P for stone bricks and 20P for steel plates. (I’m ignoring the crafting time for advanced circuits to keep the example simple.) If I don’t keep up these proportions, I won’t have a steady supply of electric furnaces. Instead, I’ll run out of steel plates first, and by the time more plates are available, stone bricks will have run out, and by the time stone bricks are available, advanced circuits will have run out. And so on and on in a continuous cycle.

The concept of orbital resonance is somewhat similar. Did you know that for everyone two orbits Pluto completes around the Sun, Neptune completes three? This is the 2:3 resonance. And it’s comparable to the Factorio example in that the ratio between the two periodic activities – Neptune’s and Pluto’s revolution and the rate of repetitive consumption of stone bricks and advanced circuits – is a rational number. ‘Rational’ here means the number can be expressed as the ratio of two integers.

Animation of planets in a 2:1 resonance. Credit: Amitchell125/Wikimedia Commons, CC BY-SA 4.0
Animation of planets in a 2:1 resonance. Credit: Amitchell125/Wikimedia Commons, CC BY-SA 4.0

With Pluto and Neptune, it’s 2/3 of course, but in a more intuitive sense, the implication is that if you wait for long enough, you will be able to count off the number of times the orbital resonance plays out – i.e. the number of times both planets are back to their starting positions at the same time, which would be once every two Plutonian revolutions or once every three Neptunian revolutions.

Similarly, the resource-pressure resonance plays out once every 10 stone bricks or once every five advanced circuits are consumed.

This meta-periodicity, a term I’m using here to refer to the combined periodicity of two separately periodic motions, allows us a unique opportunity to understand how bizarre the number known as π (pi) is. π is an irrational number: there’s no way to express it as the ratio of two integers. (The following portion also applies to e and other irrational numbers.)

In ‘Factorio’, all resources are integral, which means there can only be 1, 2, 3, … stone bricks, and never 1.5, 2.25, 3.75, etc.; the same constraint applies to advanced circuits as well. So there is no way for me – no matter how I align my resource extraction and processing chains – to ensure that for every advanced circuit, an integer-times-π number of stone bricks are consumed as well. I can alter the length of the supply lines, increase or decrease the ‘normal’ processing time, even use faster/slower conveyor belts and inserters for different ingredients, but I will never succeed. So long as the quantities in play remain integers, there’s no way for me to achieve a resonance such that the ratio of its terms is π.

This is what makes π so beautiful and maddening at once. It exists on terms that no two integers can recreate by themselves.

There’s another way to look at it. Say two planets begin orbiting their common host star from the 12 o’clock position in their respective orbits. If they are in a π:1 resonance, they will never be exactly at the 12 o’clock at the same time ever again. It doesn’t matter if you wait a century, an epoch or forever.

This example offers to my mind an uncommon opportunity to understand the difference between attributes of π and ∞. There’s the oft-quoted and frankly too prosaic statement that π’s decimal places extend infinitely. I prefer the more poetic: that efforts using simple mathematical combinations of integers will never create π. Even if a combination operates recursively, and each cycle produces a closer approximation of π, it can run for ∞ time and still not get here.

Like there’s an immutable barrier between two forms of unattainability.