math · physics

Storing carbon digitally

Today I won a prize! It was a bar of chocolate, but I won it! The maths department at the Eindhoven University of Technology, where I work, has a weekly seminar on Hamiltonian systems and molecular dynamics. Now I’m not very familiar with molecular dynamics, but I work with Hamiltonian systems all the time, so naturally I try to attend. In the last session of 2015 Pranav, the organiser, posed a question with the promise of a prize. The question was: how much money would it cost to store a kilogram of carbon digitally? A short back-of-the-envelope calculation will give us the answer. Some restrictions were put in and some assumptions were allowed:

  • Any quantum effects could be ignored, such as Heisenberg’s uncertainty principle.
  • The position and velocity of every carbon atom must be stored.
  • The internal composition of every atom may be ignored, each atom may be modelled as a hard sphere (in a vacuum, obviously).

It turns out these simplifying assumptions don’t matter much in the eventual answer, they only make the calculation easier. Using these assumptions, the problem reduces to storing digitally the velocity and position of a certain number of marbles. Knowing the velocity and position of each particle at a given moment in time is enough to completely describe this system, using Newton’s laws of motion (we’re ignoring quantum effects, remember). Thus, storing these variables is sufficient to find the state of our pet block at any given time.

To the calculating! First off, as we live in a three-dimensional space, there are three space coordinates and three velocity components per carbon marble to keep track of, to give a total of six variables per particle. For every variable, we would like to store it as a double-precision floating-point number. We might opt for a single-precision number, but this doesn’t affect the answer a lot. A double-precision number takes 64 bits, or 8 bytes, to store. Multiplying these the number of variables by the number of bytes per variable, we find that each carbon atom takes 48 bytes of storage in our simplified model. Now we only need to figure out how many atoms we have to find the total needed storage space. Time for a little intermezzo.

The question of how many particles are in a given amount of weight of material has been answered with the help of a man called Amedeo Avogadro. He suggested that the volume of a gas at fixed pressure and temperature is proportional to the number of particles in the gas, one part of the ideal gas law. We usually express a number of particles in terms of the number of moles. A mole is a convenient unit, used predominantly in chemistry, and signifies a fixed number of molecules regardless of the type of molecule. The number of molecules (or atoms if it’s a pure substance) in a mole is a number that goes by the name of Avogadro’s constant. The idea behind this constant is quite elegant: given a quantity of molecules so that the total mass is proportional to the molecular mass, then it contains a fixed number of molecules.
The convention is that if we count the number of protons and neutrons in a molecule and take so many grams of the material, then that’s a mole. It turns out there’s a ginormous number of molecules in a mole, the number is roughly a 6 followed with 23 zeros, compactly written as 6 x 10^23. This number is so large that if you would, for every star in our galaxy, add another galaxy full of stars, the number of molecules in a mole is larger still. It also means there’s about a hundred times more water molecules in a droplet of water than stars in the known universe.

Back to our calculation, the atomic number (the number of protons and neutrons) of the most abundant form of carbon is 12, six protons and six neutrons. This means there’s Avagadro’s number of carbon atoms in 12 grams of carbon. We’re dealing with a kilogram (1000 grams), which means there’s roughly 83.3 times Avogadro’s number of carbon atoms in a kilogram. Each atom needed 48 bytes of storage, so we find that our carbon brick requires 2,4 x 10^27 bytes of storage, which is 2400 yottabytes. That’s a lot of data. But how does it compare to anything we might imagine?
One source estimates the current size of the internet at 500 exabytes, or 5 x 10^20 bytes. The total storage capcity of the human race is estimated at a couple of zetabytes, or 10^21 bytes. At the moment, using the total storage capacity of the human race couldn’t even make a dent in the storage requirement. It would take roughly ten million times the storage capacity to store the information in our kilogram of carbon. And that’s just the simplified model.
It is actually the enormity of Avagadro’s constant that’s the cause. However else we imagine what a carbon atom looks like and how many bytes it takes to store all the information needed to simulate one, there’s a shitload of them in any sizeable chunk.

So what would it cost? Let’s say we employ google and use their cloud servers to store our digital block of carbon. Google provides several types of storage services, and again it doesn’t really matter which one we choose simply due to the giant amounts of data. All the prices are roughly around one cent per gigabyte per month (in dollars). This would make the cost of storage $ 2,4 x 10^16 per month, which is an unpronounceable amount of money. We can again compare it to the current state of affairs for the human race, as the Gross World Product for 2014 was roughly $ 7,8 x 10^13. This means the current wealth of the human race is only 300 times too little to pay for one month of storage.
We might ask one more question before we put it to rest: when would the human race be able to pay for it, if we would invest all the money in the world? In other words, given the continuation of global economic growth, when will the GWP hit the mark of 12 times $ 2,4 x 10^16? We need it 12 times because we calculated the cost per month and we’d like to store it indefinitely. Let us assume an annual growth of 4% (that seems to be the trend for the last 50 years or so). The human race as a whole will be able to pay Google to store our digital kilogram of carbon in the year 2224, 208 years from now.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s