Waiting for a Train with Einstein and Gödel

Gödel numbers, algorithms, and time

Sean Jude Lyons
Towards Data Science

--

Photo by Andrik Langfield on Unsplash

The way humans experience time is fascinating and mysterious. Time is experienced linearly and continuously in a single direction. We cannot go back to a certain point in time and make changes to the moments we have already experienced.

A famous Historian by the name of Niall Ferguson said something I find really interesting. He said people all around the world can dream of different futures. Each person imagines a different future for themselves, yet the future for all people always collapses in on itself into a single linear paradigm called History.

This short write up is not about History, but Fergusson makes an interesting point. He brings to attention how people from all around the world seem to have different futures ahead of them, yet strangely, they all seem to share a single past.

Portrait of Albert Einstein taken in 1947 — Photo from Wikimedia Commons

In the writing to follow, I’d like to draw your attention toward the nature of time and the nature of an algorithm. People’s perception of time can be pretty mechanical. Their perception is structured with the logic — time is based on a factual system. Einstein is well regarded for contrasting the mechanical nature of time from reality.

In a paper commonly called “On the Electrodynamics of Moving Bodies,” Einstein says when people talk about trains arriving at a platform they usually say, “the time the train arrived was at 7 o’clock”, but Einstein says it is not appropriate to say it in this way. He says it is more appropriate to say the train arrived at the same time the long hand of the clock was pointing at 12, and the short hand of the clock was pointing at 7.

This is because Einstein would like us to understand the clock hand and train are both moving. They both move simultaneously corresponding to each other only to finally culminate at a point. The point they culminate is when the train arrives at the platform, which just so happens to be the same point at which the long hand of the clock is pointing at 12 and the short hand of the clock is pointing at 7.

Essentially the culmination of the clock and train is simply an event, which is based on the mechanical movement and function of the clock, and this corresponds to the mechanical movement and function of the train. And so with a simple example, Einstein manages to displace our perception of the system of time, which is a system constructed by humans, and replace it with the dynamics of moving bodies. However, the system of time we have constructed as humans can be very useful.

For example, let us assume I am unloading a bunch of heavy boxes out of a truck and my friend comes up to me and asks me, “hey, when will you finish mate?” I look into the truck and I see about 50 boxes, I notice it takes me about 2 minutes to unload a single box, so I can multiply the number of boxes with the time I take to unload a single box, and there you go — about a hundred minutes. So I reply, “in about an hour and a half”.

My friend looks down at his watch and thinks to himself, it’s 5pm so Sean will probably be done after sunset. As simple as this example may be, we see here how human subsystems can make the unfolding of the universe predictable. My friend with a basic understanding of the human subsystem of time foresees how I will probably finish unloading the boxes after the sun has set. This would not have been possible a few thousand years ago.

Portrait of Kurt Gödel taken in 1924 circa. — Photo from Wikimedia Commons

These subsystems are great for making predictions about the world around us, but their logic doesn’t function the same way the universe does. In his Incompleteness theorems, Gödel proved there is a disjunction between human logic and the building blocks of the universe.

However, human subsystems can tell us things about the universe. Let’s digress slightly: suppose I create a rocket video game, and assume the gravitational constant as 9.8 metre per second squared, sure enough I can get the game to work and watch the rocket fly around.

But if Space X or NASA presupposed only this, their rocket is probably going to fail. The friction of air, the temperature, pressure, etc. — the variables are endless and it is very difficult to predict them all. However, we can create smaller games within our little rocket game. And if we continue making smaller and smaller games, we will ultimately articulate the logic for the smallest workable game.

And this logic can be represented as a Gödel number, which can tell us whether or not our game is complete. A Gödel number does not have to be meaningful to a human, but let’s write up a little algorithm about boarding a train. This algorithm will spit out a Gödel number, and this Gödel number will represent a grade of the underlying logic. So generally each number will somewhat grade the following logic: Train arrives (T) → Sean boards the train (S).

Sydney is bustling with people during the day, especially between the hours of 7am and 10am. It is safe to say the morning commute to work is no fun at all. So let’s create Gödel numbers, which represent a grade of the underlying logic of how long I have to wait for the train at the platform. The higher the Gödel number, the better my arrival time.

So let’s say — arriving around 10 minutes before the train arrives is worth a score/Gödel number of about a hundred. I usually like arriving ten minutes before the train arrives, it gives me leeway in case the train arrives a few minutes early. So our algorithm should look something like this —

Image by author

Therefore, if I arrive 60 minutes before the train departs it’s the worse case scenario, while if I arrive anywhere between 10 minutes before the train departs it’s the best case scenario. Try the code below to find your Gödel number:

With Gödel numbers we can form relationships between numbers, ideas, and logic. And if you really think about it, a computer is living logic. Owing to its underlying circuitry, each pixel on a computer screen illuminates a hue, shade, colour, etc., which has been formulated with formal logic. Lets say, we extract key features of a pixel to train a CNN, we are effectively just sorting out an appropriate Gödel number for training our model.

The weights of a model are merely vectors representing the logic of the convolutional neural network. In other words, the Gödel numbers of the neural network represent the way the neural network thinks. This is because the numbers are representations of neural network logic. They are the chains between individual perceptrons, which act like synapses moving information across the model allowing it to make its final prediction.

In this short story, we have now briefly touched on ML, Gödel Numbers, algorithmic subsystems, and time. I find it interesting how both Einstein and Gödel emphasised a shift away from what can only be described as a systematic and mechanical way of perceiving the world.

I like to think they showed us not what to think, but how to think about the world around us. Einstein and Gödel worked together at the Princeton Institute of Advanced Studies. It is said Einstein would come to the institute just to go for a walk with Kurt Gödel. I’d like to think this quote by Ernst G. Strauss surmises their friendship:

The one man who was, during the last years, certainly by far Einstein’s best friend, and in some ways strangely resembled him most, was Kurt Gödel, The great logician. They were very different in almost every personal way — Einstein gregarious, happy, full of laughter and common sense, and Gödel extremely solemn, very serious, quite solitary, and distrustful of common sense as a means of arriving at the truth. But they shared a fundamental quality: both went directly and wholeheartedly to the questions at the very center of things.

--

--