The complexity of the Universe in a cup of milk and coffee

…and how simple JPEG images can help us study it.

Michele Ginolfi
3 min readAug 30, 2023

[…] ourselves and everything around us, all the stars, all the galaxies, are like those beautiful milk and coffee structures that form as our beverage mixes. We are part of the most extraordinary and complex phase of our Universe where interesting things can happen, as entropy increases!

Imagine a cup of good coffee, and a bit of milk on the side, ready to be poured.

We are talking about a rather simple system, at least for our senses which processes information by taking spatial and temporal averages. Coffee on one side, and milk on the other, everything very orderly.

Now, imagine slowly pouring the milk into the coffee.

We all know the spectacle that awaits! As if by magic, while milk and coffee blend, they give rise to complex structures with the most diverse shapes, beginning to twist and dance in the glass.

This evolutionary phase of the system appears much more complex than the initial one, where milk and coffee are separate. One simple reason to understand this is that more information is needed to describe this state. We can’t simply say “The milk is on one side and the coffee on the other”, but we have to say “There is a helix-shaped structure at the bottom of the glass, another circular one in the center, etc, etc”. You got it.

After a few seconds, the intriguing structures disappear, milk and coffee mix completely, and we have our homogeneous beverage. The system has returned to being simple. It takes little information to describe it: “Milk and coffee are completely mixed”. Easy to describe, straightforward.

For those who grasp the concept of entropy, we’ve transitioned from an initial state of low entropy (separate milk and coffee) to a final state of maximum entropy (fully mixed milk and coffee). Intuitively, there are many more ways for the system to be in the homogeneous final state than in the separate initial state.

And it’s remarkable and beautiful, that interesting things happen just as entropy rapidly increases!

Now, let’s go and see a simple and delightful experiment.

I took a video of some milk being poured into coffee from a web repository of free videos (yes, you can find absolutely everything on the internet!) and I analyzed what happens to the system in each individual frame, breaking down the video into images. Specifically, I examined the complexity of each frame, estimating it through JPEG compression algorithms. Yes, you heard right, the beloved old JPEG images!

The idea is quite simple and is explained by the excellent physicist Sean Carroll in his book “Something Deeply Hidden”, or also here in his video: https://www.youtube.com/watch?v=b0sSHn2jSqk&t=1s. For fellow scientists, here’s the paper: https://arxiv.org/abs/1405.6903.

In very few words, the compression algorithm works to retrieve and encode all the information of the data into a compressed file. If the image is more complex, it requires more bytes to be described, thus making the file heavier. If the image is simpler, the file is lighter. Of course, all under the same boundary conditions.

Therefore, I calculated the weight of various compressed images taken from different frames of the video, thus estimating the temporal evolution of complexity in the system. The video below precisely illustrates this (taken from one of my tweets — which was retweeted by Sean Carrol, btw!).

The complexity, estimated as the amount of information needed to describe the frame, reaches its peak at the center (just as we expected) when interesting structures are present in the glass. In the beginning, the system is simple, then complexity emerges, and eventually, we return to simplicity. All the while, entropy is on a one-way journey towards its maximum.

And do you know what’s interesting? The interesting thing is that we ourselves and everything around us, all the stars, all the galaxies, are like those beautiful milk and coffee structures that form as our beverage mixes. We are part of the most extraordinary and complex phase of our Universe where interesting things can happen, as entropy increases! … but I’ll also discuss this in the article on entropy. Stay tuned!

And now, let’s enjoy a nice cup of milk and coffee :-)

Photo by Chevanon Photography on Pexels.com

--

--

Michele Ginolfi
0 Followers

I am a scientist, fascinated by the attempt to understand the nature of the Universe. I love connecting with diverse cultures through art and travel.