Sunday, January 20, 2008

SoftwareChemistry

Last time we explored the development of quantum mechanics in the early part of the 20th century and saw how it led to the concept that the wavelike characteristics of particles could be expressed in terms of a complex wavefunction ψ(x) consisting of real and imaginary parts. We saw that, at first, physicists had a hard time figuring out what these complex wavefunctions really meant. Then in 1928, Max Born came up with the idea that the wavefunction solutions to Schrödinger’s equation could be thought of as probability waves, and that the probability of finding a particle at some point along the x-axis could be obtained by multiplying the particle’s wavefunction by its complex conjugate ψ(x)*ψ(x) at each point along the x-axis. This was a key insight. In classical mechanics, we also use equations to figure things out, but in all cases, we try to manipulate the equations to solve for the desired quantity that we are interested in. We always try to end up with an equation that looks like:

E  =   ½mv²

which is the classical equation for the kinetic energy of a particle. Then all we have to do is the old “plug ‘n chug” to get the kinetic energy E by plugging in the mass m and velocity v of the particle into the above formula. But in Born’s interpretation of the wavefunction, we did not do that to obtain the position of a particle. Instead, we performed a mathematical operation on the wavefunction ψ(x) itself by multiplying it by its complex conjugate ψ(x)*ψ(x), and we did not get an exact answer either, just an exact probability. Some additional mathematical thought shows that the wavefunction is the whole deal, meaning that everything that can be known about a particle, such as its position, energy, momentum, and angular momentum, is encapsulated within the wavefunction itself, and to obtain values for these quantities you have to perform strange mathematical operations upon the wavefunction. For example, going back to the time-independent Schrödinger equation for a particle moving along the x-axis:

-ħ²  d²ψ(x)   +   V(x) ψ(x)  =  E ψ(x)
──  ──────
2m     dx²

We see that if we define a mathematical operation H as:

H  =  -ħ²  d²       +   V(x)
          ──   ───
          2m   dx²

then we can rewrite the Schrödinger equation simply as:

H ψ(x) = E ψ(x)

The wavefunctions ψ(x) that satisfy the above equation are called eigenfunctions and the corresponding measured values of E are called eigenvalues. “Eigen” roughly means “characteristic” in German (you may have noticed that nearly all of the early 20th-century physicists I have mentioned in this blog were Germans, and that is where this terminology came from). So for the solutions to Schrödinger’s equation for a particle in a box, the eigenfunctions are:
                 ____
ψn(x) = √ 2/L    sin(nπx/L)

n = 1, 2, 3, ...

and the eigenvalues are:

En = n²h²
        ─────
         8mL²

n = 1, 2, 3, ...

where:
m = mass of the particle (electron in this case)
L = width of the box
h = Planck’s constant
n = quantum number

In general, the way you solve problems in quantum mechanics is to first solve Schrödinger’s equation for the problem at hand to obtain the desired wavefunctions (eigenfunctions). Then you apply mathematical operators to the eigenfunctions to obtain eigenvalues, which are the quantized answers you are seeking for your problem:

O ψ(x) = o ψ(x)

where O is some mathematical operator and o is a measured quantized value.

The above analysis can be applied to the hydrogen atom using Dirac’s equation, which is Schrödinger’s equation augmented by special relativity to take into account the fact that the electron orbiting the proton of a hydrogen atom is moving at a relativistic velocity. The result is a series of eigenfunction wavefunctions with associated eigenvalues, both defined by quantum numbers n, l, m, and s. The quantum number n defines the energy levels of the electron in the hydrogen atom and the l and m quantum numbers define the angular momentum of the electron as it orbits around the proton in the nucleus. The quantum number s is the strange quantum number that defines the inherent angular momentum of the electron itself, even though the electron is currently depicted as a fundamental particle with a dimension of zero and should not have any intrinsic angular momentum from a classical perspective. The result is that the electron in a hydrogen atom can exist as a series of electron wavefunctions (eigenfunctions) which are 3-dimensional “probability clouds” about the central proton of the hydrogen atom.

Like the particle in a box, which only had one quantum number - n, the quantum numbers for the hydrogen atom n, l, m, and s are just eigenvalues for the eigenfunction solutions to the Dirac or Schrödinger equation. For example, Figure 2 of Quantum Software shows the eigenfunction solutions for Schrödinger’s equation for the particle in a box for the eigenvalues n = 1, 2, and 3. These quantum numbers are hard to grasp mentally because our common sense is based upon our experiences with relatively large objects, so we do not have any quantum mechanical intuition. A helpful, but somewhat misleading, model is to relate the quantum numbers of the hydrogen atom to a classical system like the Earth orbiting the Sun. Such a model has its limitations, but I would bet that most physicists secretly harbor it deep down in their subconscious minds. The chief difference is that for the classical Earth-Sun system, the items below can take on continuous values, while their quantum counterparts can only take on fixed quantized values.

n - The approximate distance of the electron from the proton nucleus of hydrogen, like the distance of the Earth from the Sun. Now all the electron wavefunctions of the hydrogen atom are actually spread out over the entire Universe, so no matter where your hydrogen atom might be, there is a small chance that its electron is in Peoria. However, the most likely location of the electron will be close in near the proton nucleus of its hydrogen atom. The larger n is, the further out will be the electron’s maximum probability of existence.

l – The total amount of angular momentum of the electron, like the angular momentum of the Earth orbiting the Sun.

m – The direction in which the angular momentum vector points, like an arrow perpendicular to the orbital plane of the Earth’s orbit about the Sun

s – The inherent spin angular momentum of the electron, like the Earth spinning on its axis.

To make matters more confusing, chemists use the term “orbital” for these eigenfunctions or wavefunctions, probably because they too need to relate the quantum electron-proton system of hydrogen to a classical Earth-Sun system, in order to try to make sense of it all. The terms orbital, eigenfunction, or wavefunction all mean the same thing, they are just 3-dimensional probability clouds, so for the sake of clarity going forward, I will simply refer to these eigenfunctions as wavefunctions or orbitals.

The rules for the quantum numbers fall out of the solutions to Schrödinger’s equation for the hydrogen atom and go like this, for any given energy level n, there can be one or more wavefunctions or orbitals based upon the following rules:

For any n:
l = n – 1
m = the range of integers from –l to +l, like -2, -1, 0, +1, +2
s = ± ½

The first energy level has only one wavefunction or orbital:

n = 1
l = 0 because n – 1 = 0
m = 0 because the range of -l to +l = -0 to +0 = 0
s = ± ½

Chemists call this wavefunction the 1s orbital, which can hold 2 electrons, one with spin-up ↑ and one with spin-down ↓, and is denoted as 1s2. Notice that because l = 0, the 1s orbital has no quantized angular momentum, which is rather strange. You would think that electrons orbiting a proton should have some angular momentum, they certainly would according to Newtonian mechanics, but the 1s2 electrons do not have any.

The second energy level has 4 wavefunctions or orbitals:

1.    n = 2,   l = 0,   m = 0,   s= ± ½

Chemists call this the 2s orbital, which again, can hold 2 electrons, one with spin-up ↑ and one with spin-down ↓, denoted by 2s2. Again, because l = 0 the 2s orbital has no quantized angular momentum. The other 3 orbitals do have some quantized angular momentum because l = 1:

2.    n = 2,   l = 1,   m = -1,   s= ± ½
3.    n = 2,   l = 1,   m = 0,   s= ± ½
4.    n = 2,   l = 1,   m = +1,   s= ± ½

Chemists call these three orbitals the 2p orbitals, each of which can also hold 2 electrons, one with spin-up ↑ and one with spin-down ↓. The 2p orbitals are denoted by 2px, 2py,2pz, corresponding to m = -1, m = 0, and m = +1.

Figure 1 – The n=1 and n=2 Orbitals (Eigenfunctions or Wavefunctions) for the hydrogen atom (click to enlarge)

Notice that the 1s and 2s orbitals, with no quantized angular momentum because l = 0 for them, have spherically-shaped orbitals or wavefunctions. Again, these orbitals or wavefunctions are just probability clouds as depicted in the speckle plots of Figure 1. The 2p orbitals do have some quantized angular momentum because l = 1 for these orbitals. As we shall see, this is a key point, the 2p orbitals, and all orbitals with non-zero quantized angular momentum (meaning l > 0), have a 3-dimensional shape with preferred directions for electron existence, rather than being spherically-shaped orbitals like the 1s and 2s orbitals, with no preferred direction for electron existence. The 2p orbitals, on the other hand, each consist of two lobes that bulge in the x, y, and z directions, all oriented 900 to each other. So as you can see from the speckle plots of the 2p orbitals in Figure 1, the electrons of the 2p orbital have preferred zones of existence pointing in different directions, whereas the 1s and 2s orbitals do not. This is key to the formation of molecules with a 3-dimensional shape, like the organic molecules in living things. In fact, if it were not for the quantized angular momentum of electrons, carbon-based organic molecules would not have complex 3-dimensional shapes, and you would not be here contemplating the marvels of the quantum mechanics of electrons!

This is all very impressive, but as you can see, the math gets pretty heavy even for the simple hydrogen atom, which consists of a single electron orbiting a nucleus consisting of a single proton. The problem is that the next atom in the periodic table, helium, presents even greater mathematical challenges. In fact, nobody has ever exactly solved the Schrödinger equation for the helium atom, much less Dirac’s equation, because helium has a nucleus composed of two protons and two neutrons, and consequently, has two electrons orbiting its nucleus. The problem is that the two electrons interact with each other, and this complication requires that some approximations be made in order to solve Schrödinger’s equation for helium and the other 92 naturally occurring elements in the periodic table. Physicists call these approximations chemistry.

Yes, from the perspective of physics, the entire science of chemistry is just an approximate extension of the effective theory of quantum mechanics. This might sound a bit arrogant, especially since, like an old married couple, the chemists had to nag the physicists for more than 100 years before the physicists finally came up with the brilliant insight that atoms really did exist after all. In retaliation, chemists call quantum mechanics P-chem (physical chemistry). Most medical doctors do not start out in pre-med programs as physics majors, but many doctors do have a pre-med major in chemistry or biology. So if you are ever aggravated by one of your caregivers, just tell them that lately, your P-chem has been bothering you. There is a good chance that you will trigger a devastating Post-Traumatic Stress Disorder flashback.

To extend quantum mechanics to chemistry, we are faced with the daunting challenge of trying to find the wavefunctions for the electrons orbiting a molecule instead of orbiting the single nucleus of a single atom. Recall that a molecule is simply a combination of two or more atoms that are chemically bound together. In a molecule, we end up with multiple electrons orbiting multiple atomic nuclei containing protons and neutrons, all interacting with each other via the electromagnetic force between the electrons and protons. The wavefunctions of electrons orbiting the molecular nuclei are known as molecular orbitals, just as the wavefuntions of the electrons orbiting the nucleus of a single atom are called atomic orbitals. The concept of molecular orbitals was first introduced by Friedrich Hund and Robert S. Mulliken in 1927 and 1928, very shortly after the development of quantum mechanics by Heisenberg and Schrödinger in 1926. The first simple approximation for the solution of molecular orbitals was introduced in 1929 by Sir John Lennard-Jones as a linear combination of the atomic orbitals of the individual constituent atoms of the molecule. What Lennard-Jones did was to mix the wavefunctions of the individual atoms together to come up with the combined molecular orbitals of the electrons in molecules, like mixing together yellow paint with blue paint to come up with green paint. Figure 2 depicts the resulting molecular orbitals surrounding the atomic nuclei of a molecule. This figure is a little misleading, in that if the wavefunctions of the electron probability clouds surrounding a single atom were blown up to the size of a football stadium, the protons and neutrons of the atomic nucleus would be about the size of shelled peanuts on the 50-yard line.

Figure 2 - Molecular orbitals surrounding atomic nuclei (click to enlarge)

The electrons in a molecule are subject to two additional constraints. First of all, they cannot violate the Pauli exclusion principle that each electron has to have a unique combination of quantum numbers. Secondly, the electrons will arrange themselves in molecular orbitals to minimize their free energy in accordance with the second law of thermodynamics. Thus, the second law causes the electrons to fill the molecular orbitals with the lowest energy levels first, and the Pauli exclusion principle prevents the electrons from all occupying the same orbital with the lowest energy level. The result is that the electrons pile up into a hierarchy of molecular orbitals, just as they do in the atomic orbitals of an atom.

We have already seen that the second law of thermodynamics can be expressed in many ways, and here is another. Recall that the second law states that the total amount of entropy (disorder) in the Universe must always increase whenever a change is made. Entropy is a measure of the depreciation of the Universe. Another expression of the second law is that systems naturally tend to minimize their free energy, the energy available to do work. Here is an old bar trick that illustrates this effect. Take out a book of paper matches and rip out one of the matches. Now offer to buy the next round of beers if anybody in your party can drop the match from a height of one foot onto the bar and have the match land on an edge. After several failed attempts, make the following counter-offer. Turn to one of your companions and offer to buy the next round of beers if you cannot successfully drop the match from a height of one foot onto the bar and have it land on an edge. However, if you do succeed, then your companion must buy the next round. Now take the match and simply fold it into a “V” shape. When you drop the match, it will naturally land on an edge. What is happening here is that the match is seeking a state of maximum entropy and minimum free energy. For the folded match, the state of minimum free energy is when the match is on an edge, while for the unfolded match, the state of minimum free energy is when the match is lying flat. Note that a flat match will not stand on its edge because, by falling over, it can release potential energy into kinetic energy. On the other hand, the folded match lying on its edge cannot fall over to a lower state of free energy.

As they taught you in high school, atoms like to combine into molecules by sharing electrons in covalent bonds. This is accomplished through shared molecular orbitals between atoms. The first atomic orbital of atoms 1s2 can hold 2 electrons, the next atomic orbital can hold 8 electrons, 2 in the 2s2 orbital and 6 in the 2px2, 2py2, and 2pz2 orbitals, and so forth down through the rest of the periodic table. So for hydrogen H, we can have two hydrogen atoms combine into a molecule of diatomic hydrogen by having each atom of hydrogen share its single electron with the other hydrogen atom to form H2 displayed as:

H─H

What happens from a molecular orbital point of view is that the 1s atomic orbitals of each hydrogen atom combine to form a sigma σ molecular bond which has a lower energy than the two 1s atomic orbitals combined together, so this σ bond holds the two hydrogen atoms together as a diatomic hydrogen molecule. There is also a σ* molecular orbital at a higher energy level than the 1s atomic orbitals. The σ molecular bond has lower energy because the two electrons of the hydrogen molecule have a high probability of being located between the two positively charged protons of the hydrogen nuclei to which they are attracted. On the other hand, for the σ* molecular orbital, the two hydrogen electrons spend most of their time further away from the two positively charged protons of the hydrogen molecule, which takes more potential energy and puts the σ* molecular orbital at a higher energy level than the σ bond.

Figure 3 – The Molecular Orbitals of a Diatomic Hydrogen Molecule (click to enlarge)

For the remainder of this post, let’s focus on carbon C, because the carbon atom is the basis for nearly all the molecules used by living things, and, in fact, the chemists have honored carbon with its own branch of chemistry called organic chemistry, because organic chemistry so dominates the field due to its biological and commercial significance. Carbon has a nucleus containing six protons and usually six neutrons and thus has 6 electrons. The first two electrons fit into the first atomic orbital of carbon 1s2, leaving four electrons left over for molecular bonding. These four electrons are called valence electrons. Remember, carbon will try to share four additional electrons with its four valence electrons to reach the magic number of 8 electrons to completely fill its 2p orbital.

Figure 4 – Carbon Tries To Share 4 Additional Electrons To Complete Its 2p Shell (click to enlarge)

This makes carbon very unique in that it can form very complex organic molecules since each carbon atom can bind to up to four additional atoms. For example, methane can be depicted as:

     H
      |
H─C─H
      |
     H

Carbon can also form very long molecules by chaining together many carbon atoms along a carbon backbone:

      H  H  H  H  H  H  H  H
      |    |   |   |    |    |   |   |
H─C─C─C─C─C─C─C─C─OH
      |    |   |   |    |    |   |   |
      H  H  H  H  H  H  H  H

Similarly, nitrogen N has a nucleus composed of seven protons and seven neutrons and consequently has seven electrons. Again, two electrons fit into its lowest atomic orbital leaving five left over for bonding. Thus nitrogen would like to share three additional electrons to get to the magic number of 8 for its second orbital. Oxygen O has a nucleus of 8 protons and 8 neutrons with 8 surrounding electrons. After two electrons fill its lowest atomic orbital, there are six electrons left over, leaving oxygen looking for two additional electrons.

When we combine carbon, hydrogen, oxygen, and nitrogen together we can form complex organic molecules like the amino acid serine:

      H  H  O
      |    |   ||
H─N─C─C─OH
           |
          OH

Notice that in serine, carbon has managed to share two electrons with one of the oxygen atoms in a double bond. Serine has a carbon backbone of only two carbon atoms, but as you can imagine, it is possible to form very complicated and very large organic molecules by hanging all sorts of side group atoms off a very long carbon chain backbone.

This is all accomplished through Lennard-Jones’ concept of hybridized molecular orbitals. For example, carbon’s four valence electrons can occupy four sp3 hybridized molecular orbitals formed by mixing together the s and px, py, and pz atomic orbitals of carbon. This yields a tetrahedral-shaped set of sp3 hybridized molecular orbitals for carbon, and this is the most common molecular orbital configuration for carbon.

Figure 5 – The sp3 Hybridized Orbitals Are a Combination of s and p Atomic Orbitals (click to enlarge)

Methane is formed by pairing up the single electron in the 1s atomic orbital of four hydrogen H atoms with the four sp3 orbitals of carbon C, forming σ bonds between the carbon C and hydrogen H atoms.

Figure 6 – Methane Forms a Tetrahedral Shape Because of sp3 Hybridized Carbon Orbitals (click to enlarge)

One of the misconceptions that can easily arise when you study chemistry is that when you look at all the chemical formulas and molecular models in your coursework, your eye is naturally drawn to the symbols for the atomic elements such as C, H, N, and O. This naturally makes you think of atomic nuclei, composed of protons and neutrons, binding together via their valence electrons to form molecules. As we have seen above, this is a bit of a distortion. Chemistry is really all about electrons in molecular orbitals. The atomic nuclei of atoms are really just dead weight, providing positive charge via their protons, but not really performing anything chemically significant beyond that. So when you look at a chemical formula or model for a molecule, you should really think of it as a collection of electron wavefunctions surrounding some highly concentrated positive charge in the nuclei of the atoms. The electrons really do all the work in chemistry, creating the microscopic chemical behaviors of substances, such as their chemical reactivity, acidity, and ability to oxidize other substances, and also the macroscopic characteristics of substances such as their melting and vaporization temperatures, specific heat, color, rigidity, ductility, and tensile strength. Most of everyday life is just electrons doing their thing in different quantum states; with the protons and neutrons of atomic nuclei just along for the ride.

Carbon can also form a hybridized orbital called sp2, which takes on a triangular shape and also an sp hybridized orbital which has a linear shape. The sp2 and sp orbitals lead to another kind of molecular bond called a π bond via a π molecular orbital. In Figure 7, we see the molecular bonding for ethane, ethene, and ethyne, which highlights this kind of π bonding. In ethane, each carbon atom forms σ bonds with three hydrogen atoms and also with the other carbon atom in ethane, using its four valence electrons in sp3 orbitals, as we have already seen with methane. In ethene, there are only two hydrogen atoms for each carbon atom to bind with, so there is a double bond between the carbon atoms denoted as:

C=C

What happens is that each of the carbon atoms has three of their four valence electrons in sp2 hybridized orbitals bound to the 1s orbitals of the two hydrogen atoms and also with the other carbon atom, forming σ bonds with all. The last valence electron of each carbon remains in a lobe-shaped atomic p orbital of each carbon atom. These two p orbital electrons form a π bond between the carbon atoms via a π molecular orbital, which is much weaker than the σ bonds between the carbon atoms. Chemists say that the electrons in the π bond are “delocalized”, meaning they are kind of floating above and below the plane of the carbon atoms. This is just the chemists’ way of expressing the quantum weirdness of electrons not knowing exactly where they are.

Ethyne is even stranger. Each carbon has two valence electrons in linearly shaped sp hybridized orbitals. One valence electron is bound to a hydrogen atom and the other valence electron is bound to the other carbon atom via σ bonds. The remaining two valence electrons of each carbon are in p orbitals of the carbon atoms and form two π bonds between the carbons. Thus there are three bonds between the carbon atoms, one σ bond, and two π bonds. Chemists denote a triple bond as:

C≡C

Figure 7 – Ethene and Ethyne Form σ and π Bonds (click to enlarge)

The key point is that it is the quantized angular momentum of electrons that is the chief element of chemistry. Because the electron wavefunctions or orbitals of carbon with quantized angular momentum have complex 3-dimensional shapes, organic molecules also have complex 3-dimensional shapes. And because carbon can combine with so many different atoms and has four valence electrons, organic molecules can become huge affairs with very complicated 3-dimensional shapes. When we study softwarebiology, we will see that large complex organic molecules with very complicated 3-dimensional structures are key to living things. These large organic molecules have very complicated molecular orbitals with strange shapes that can fit together like a lock and key to perform biological functions.

The fitting together of organic molecules is accomplished via the electromagnetic force. Remember that plots of molecular orbitals are just the probability clouds or wavefunctions of the molecular electrons. When you plot the electron probability cloud for a molecule, frequently you will find that the electrons have a higher probability of being found near one part of the molecule compared to the other parts. This part of the molecule will then have a net negative charge, while the other portions will have a net positive charge. Such molecules are called polar molecules, and the positive portion of a polar molecule will be attracted to the negative portion of other polar molecules. In Figure 8, we see polar water molecules attracting each other. The molecular electrons of a water molecule have a higher probability of being near the oxygen atom, compared to the two hydrogen atoms of the molecule, so water molecules have a net negative charge near the oxygen side of the molecule and a net positive charge near the hydrogen side of the molecule. The negative oxygen portions of water molecules are attracted to the positive hydrogen portion of water molecules, forming what are known as hydrogen bonds. These hydrogen bonds in water form a weak lattice of water molecules even when water is in a liquid state. This highly polar nature of water is what gives water very high melting and boiling point temperatures because the water molecules like to stick together due to the electromagnetic attraction between molecules. The electrical attraction between water molecules allows water molecules to come together in a crystal lattice (ice) at a much higher temperature than a non-polar molecule of a similar weight. Similarly, the electrical stickiness of water molecules prevents them from boiling away unless they are jiggled by a lot of thermal energy. The polar nature of water and its tendency to form a lattice of water molecules bound together by hydrogen bonds is very important in biology. In SoftwareBiologywe will see that this is a necessary condition for the formation of cellular membranes.

Figure 8 – Water Molecules Are Polar and the Positive Parts Attract the Negative Parts (click to enlarge)

Notice that the bonding angle between the oxygen atom and the two hydrogen atoms is 104.45 0 and that all three do not line up in a straight line. Again this is due to the strange geometry of the molecular orbitals of water, like the sp3 molecular orbitals of methane. This geometry all goes back to the strange lobe-like probability cloud, or wavefunction, of the p orbital of electrons that have an angular momentum quantum number of l = 1. If the wavefunction for the p orbital electrons did not have this lobe-like shape, water molecules would be linear and would not be polar molecules because the negative oxygen atom would be sandwiched between to positive hydrogen atoms, and we would not be here marveling at water molecules because life in this Universe would probably be impossible.

Because organic molecules can be polar and quite large with very complicated 3-dimensional structures, they can form large intermeshing affairs, that fit together like a lock and key. Because the shapes of the organic molecules have to be just so and the charge patterns just right for organic molecules to fit together like a lock and key, they offer a bit of specificity – only certain organic molecules can fit into a locking position with another. In SoftwareBiology, we will see this is a key requirement for living things.

Figure 9 – Only Organic Molecules of the Correct Shape Can Fit Together in a Locking Position (click to enlarge)

So here is the strange thing. If electrons did not have quantized angular momentum, all atomic orbitals would be spherically-shaped like the 1s and 2s orbitals in Figure 1, and the most complicated molecule you could make would be a very long linear molecule with σ bonds between atoms, like the diatomic hydrogen molecule of Figure 3. Clearly, living things could not exist in such a universe. Living things need large complex 3-dimensional molecules in order to exist. This is an example of the weak Anthropic Principle in action, which will be covered in a future posting on SoftwareBiology.

I have been focusing on molecules composed of carbon, hydrogen, oxygen, and nitrogen atoms because these are the atoms of life and will come in handy when we switch our focus to the biological aspects of softwarephysics. Fully 96% of your body weight is due to carbon, hydrogen, oxygen, and nitrogen atoms with the remaining 4% coming from traces of other atoms such as sulfur (S) and phosphorous (P).

High School Chemistry is Vindicated
The end result of all this quantum mechanics is to confirm all of the chemistry you learned in high school which was empirically discovered by chemists in the 19th century. Chemistry is all about electrons and the electromagnetic force between the electrons and protons. This is rather strange since the electrons in an atom represent an insignificant amount of the mass of an atom. Protons have 1836 times as much mass as electrons, and neutrons are just slightly more massive than protons, with a mass that is equal to 1.00138 times that of a proton. Thus, a 200-pound man consists of about 100 pounds of protons, 100 pounds of neutrons, but only about 0.87 ounces of electrons! Yet all of your interactions with the Universe are performed with this small mass of electrons. Everything you see, hear, smell, taste, and feel results from the interactions of less than one ounce of electrons. And all of the biochemical reactions that keep you alive, and even your thoughts at this very moment are all accomplished with this small mass of electrons! This all stems from the fact that, although electrons are very light relative to protons and neutrons, for some unknown reason, they pack a whopping amount of electrical charge. In fact, the light electrons have the same amount of electrical charge as the much heavier protons, just with the opposite sign, so it is the electromagnetic force that really counts in chemistry, not the electrons themselves. In that regard, chemistry can really be considered to be the study of the electromagnetic force, and not the study of matter, since electrons are nearly massless particles.

Softwarechemistry
Let us adopt the physicist’s perspective, in which all of chemistry can be seen as simply an extension of the effective theory of quantum mechanics. With that in mind, let us explore the corresponding implications for softwarechemistry.

Recall that the individual characters in a sample line of source code:

discountedTotalCost = (totalHours * ratePerHour) - costOfNormalOffset;

are each defined by 8 quantized bits, with each bit in one of two quantum states “1” or “0”, which can also be characterized as ↑ or ↓.

C = 01000011 = ↓ ↑ ↓ ↓ ↓ ↓ ↑ ↑
H = 01001000 = ↓ ↑ ↓ ↓ ↑ ↓ ↓ ↓
N = 01001110 = ↓ ↑ ↓ ↓ ↑ ↑ ↑ ↓
O = 01001111 = ↓ ↑ ↓ ↓ ↑ ↑ ↑ ↑

We may then think of each character in the above line of code as an atom in an organic molecule. Thus, each variable in the line of code becomes an organic molecule in a chemical reaction with the other variables or organic molecules in the line of code and ultimately produces a macroscopic software effect. The 8 quantized bits for each character are the equivalent of the spins of 8 electrons in 8 electron shells that may be either in a spin-up↑ or spin-down ↓ state. And the chemical characteristics of each character (atom) are determined by the arrangements of the spin-up ↑ or spin-down ↓ state of the bits (electrons) in the character. The characters (atoms) in each variable come together to form an organic molecule, in which the spins of all the associated characters form molecular orbitals for the variable, giving the variable its ultimate softwarechemical characteristics. As a programmer, your job is to assemble characters (atoms) into variables (molecules) that interact in lines of code to perform the desired functions of the software under development.

Living things have evolved very reliable methods to do the same thing. Just take a look at any college textbook on biochemistry. In it, you will find very complicated flow charts of biosynthetic and metabolic pathways that put to shame the multithreaded logic found in a typical java EJB. And the fact that these pathways are constantly being run in a multithreaded manner, trillions upon trillions of times, within each of the 100 trillion cells in your body, just boggles the mind. For example, Figure 10 depicts the famous Krebs cycle. In 1937, Hans Krebs proposed the Krebs cycle for organisms that have an oxygen-based metabolism. The Krebs cycle is a programming loop that controls the breakdown of proteins, fats and carbohydrates into smaller molecules. The loop results in the liberation of carbon dioxide and electrons that are used to form high-energy phosphate bonds in the form of adenosine triphosphate (ATP) - the chemical energy reservoir of cells. Krebs discovered how certain individual reactions are linked to each other in a do-loop and how energy is released by this process for use by the cell for all its activities. He proposed the steps in this loop in 1937 and was awarded the 1953 Nobel Prize in Physiology or Medicine for this work.

The Krebs cycle is like a processing loop that transforms the value of a share of IBM stock into physical cash coming out of an ATM. The share of IBM stock begins as a set of bits stored somewhere in cyberspacetime on the computers run by your online stock broker. When you sell the share of stock, the bits storing the share of stock are debited from your account and some bits over in the IBM portion of cyberspacetime are deleted too. The resulting cash value is credited to the money market bits of your online stock broker account. From there the cash value bits can be transferred to your local bank, and ultimately, you can punch in some numbers into an ATM and out pops some physical cash that can be used to buy a cup of coffee. In this example, the share of IBM stock is like an energy-rich carbohydrate molecule and the cash popping out of the ATM is like a molecule called ATP, which is the biochemical energy equivalent of cash. In a capitalistic economic system, money is the equivalent of energy in a biochemical sense, since, as everybody knows, it makes the world go round. There is an old joke in thermodynamics that energy is the ability to do work, while money is the ability not to do work.

Figure 10 – The Krebs cycle.

Your body uses the energy in ATP to build the complex organic molecules necessary to perform the functions of life. Taking simple atoms and producing complex organic molecules from them is clearly a violation of the second law of thermodynamics because we are taking disordered atoms and creating highly ordered organic molecules from them. As a programmer, you are well aware of the equivalent problem of assembling characters into lines of code that actually work. The only way around this problem is to degrade the low entropy chemical energy in carbohydrates and fats into disordered heat energy, and that is what your body does. Using the Krebs cycle, your body converts the chemical energy stored in carbohydrates and fats into chemical energy stored in ATP. The cells in your body then degrade the low entropy chemical energy stored in ATP into heat energy in order to create complex organic molecules. In this way, the second law is not violated. Your body heat is a way for your body to excrete entropy while increasing its internal information content at the same time in the form of information-rich organic molecules. The moment you die, your body begins to cool off, and you begin to disintegrate as the second law of thermodynamics runs wild.

I will close with that sobering thought in mind. Next time, as promised, we will continue on with exploring the really strange implications of quantum mechanics, in an effort to combat the objection that equating the characters in a line of code with physical atoms is a bit of a stretch. You will learn that thanks to 20th-century physics, there really isn’t much tangible stuff left in the physical Universe, so equating the bits of information in source code in the Software Universe with physical atoms in the physical Universe, is really not such a stretch after all.

Comments are welcome at scj333@sbcglobal.net

To see all posts on softwarephysics in reverse order go to:
https://softwarephysics.blogspot.com/

Regards,
Steve Johnston

Saturday, December 29, 2007

Quantum Software

Perhaps it is time to take stock of how far we have come with softwarephysics. Recall that softwarephysics is a simulated science, where we try to match up the effective theories of physics that describe the physical Universe, with the corresponding effective theories of softwarephysics that describe similar phenomena in the Software Universe. We began with the struggles of 18th-century steam engine designers and the resulting development of thermodynamics. We saw that thermodynamics was an effective theory that described the macroscopic behavior of matter in terms of pressures, volumes, temperatures, and energy flows. We were also introduced to the second law of thermodynamics, which held that the entropy or disorder of the Universe was constantly increasing, and that the only way we could buck this trend and produce order out of disorder, like a car out of iron ore, was to degrade the low entropy chemical energy in a fuel into high entropy disordered energy, also known as heat. We found that entropy is a measure of the depreciation of the Universe, the total amount always increases and never decreases as a whole, but can be decreased locally with an expenditure of effort. We saw that software too was subject to the second law of thermodynamics in that software tended to depreciate, or increase in entropy, through the introduction of bugs whenever software was worked upon by programmers, and that the only way to add macroscopic functionality to software, and thereby reduce its entropy, was to degrade the chemical energy in a programmer’s brain into heat energy. We then drilled down deeper into another effective theory of physics called statistical mechanics, which took the macroscopic ideas of thermodynamics and examined them at the microscopic level of molecules and atoms. With statistical mechanics, we saw that entropy could also be viewed in terms of the microscopic disorder of the microstates that a system could exist in, and we used the entropy of poker hands to clarify this idea. The paradox of Maxwell’s Demon was presented next, and we learned how Leon Brillouin solved the paradox with his concept of information as a decrease in the entropy of a system at the microscopic level. We then used these ideas to show that software tended to increase in entropy, and decrease in information content, whenever programmers worked on software because there were many more “buggy” versions of a piece of software than correct versions. Next, we examined the special theory of relativity and found that information, the stuff that Leon Brillouin used to solve Maxwell’s Demon, was just as real as matter or energy. In order to preserve the concept of causality, we had to introduce the limitation that information could not travel faster than the speed of light; the same limitation that special relativity imposed upon matter and energy. So the information that flows through our computer systems on a 24 x 7 basis is tangible stuff after all. Finally, we ended with the general theory of relativity and the concept of spacetime, which we extended to cyberspacetime as a stage upon which the events of the Software Universe and IT could unfold.

The ultimate purpose of all this is to collect enough effective theories in softwarephysics to be able to frame the fundamental problem of software. With the fundamental problem of software in hand, we will see that a biological approach to software is in order, and at that point, we will switch gears to cover the biological aspects of softwarephysics. We are about half way there, and I just wanted to briefly stop to recap our progress to date because our next stop will bring us to the really strange physics of the 20th century, quantum mechanics, and its very counterintuitive assertions. As one of my old physics professors used to say, “You never really understand quantum mechanics; you just get used to it”. So be prepared to hold on tight!

The Software Universe is Quantized
In my last posting on cyberspacetime, we saw that the cyberspacetime of the Software Universe is quantized in both the cyberspace and time dimensions. Because the time dimension of cyberspacetime comes in quanta of time of less than a nanosecond (10-9 seconds) and the number of microprocessors on a server or PC is not readily apparent to end-users, the quantization of cyberspacetime vanishes at the macroscopic level familiar to IT professionals and laymen end-users. For example, even the most economical of PCs are now equipped with a dual-core processor with two CPUs, and a modern data warehouse can scale up to 1,024 nodes, with each node containing 4 dual-core processors, for a total of 8,192 microprocessors. During the course of a single browser session on the Internet, end-users can easily interact with thousands of microprocessors over the span of trillions of nanoseconds, but this all just appears as one large continuous cyberspacetime to them.

For layman end-users and IT managers, the same can be said of software itself. They only view software macroscopically and are only interested in the macroscopic functions that software performs, the speed with which the functions execute, and the stability and reliability of its performance. For them, software is a continuous macroscopic substance. Programmers, on the other hand, are well aware of the quantization of software at the source code level. For programmers, software is composed of lines of source code. And each line of code has a microscopic purpose which translates into a macroscopic effect. In turn, the lines of code are composed of characters, which must be exactly correct in both number and kind. Each character of a line of code is composed of a series of 8 quantized bits, with each bit in one of two quantum states “1” or “0”, which can also be characterized as ↑ or ↓. For example, in the following line of code:

discountedTotalCost = (totalHours * ratePerHour) - costOfNormalOffset;

some sample characters have ASCII representations of:

C = 01000011 = ↓ ↑ ↓ ↓ ↓ ↓ ↑ ↑
H = 01001000 = ↓ ↑ ↓ ↓ ↑ ↓ ↓ ↓
N = 01001110 = ↓ ↑ ↓ ↓ ↑ ↑ ↑ ↓
O = 01001111 = ↓ ↑ ↓ ↓ ↑ ↑ ↑ ↑

The physical characteristics of each character in a line of code and its ultimate macroscopic effects are defined by the arrangement of its 8 quantized bits ↑ ↓.

Is the Physical Universe Quantized Too?
Recall that the general theory of relativity relied upon Einstein’s Equivalence Principle, which held that the effects of gravity and acceleration were deemed equivalent for all observations. Thus the slowing down of accelerated clocks could be used to predict the slowing down of clocks in a gravitational field and vice versa. The Equivalence Principle is a two-way street, that allows physicists to jump back and forth between accelerated reference frames and gravitational fields. In softwarephysics we have a similar two-way street in the Equivalence Conjecture of softwarephysics:

Over the past 70 years, through the uncoordinated efforts of over 50 million independently acting programmers to provide the world with a global supply of software, the IT community has accidentally spent more than $10 trillion creating a computer simulation of the physical Universe on a grand scale – the Software Universe.

The Equivalence Conjecture is an outgrowth of Konrad Zuse’s Calculating Space, published in 1967, in which he proposed that the physical Universe was equivalent to a network of computers, and which gave birth to the concept of digital physics. Using nothing more than the Equivalence Conjecture of softwarephysics, we could logically predict that the physical Universe must also be quantized too! I am just trying to have a little fun here. The discovery of the quantization of the physical Universe actually has a very long history going back thousands of years to Ancient Greece.

Atoms and the Void
It all began around 450 B.C., when Leucippus and his student Democritus, proposed that the world was composed of a “void” filled with eternal, unchanging, quantized particles called atoms. The Greek word atomos means "uncuttable". According to Democritus, if you kept cutting a piece of gold in half, ultimately you would end up with a single uncuttable atom of gold. These atoms were eternal and unchanging, so the multitude of changes seen in the real world was an illusion, the result of combining or breaking apart combinations of atoms. This atomic view of the Greek atomists contrasted sharply with the philosophy of many of the other Greek philosophers of the day, which held that matter was a continuous substance composed of 4 elemental substances – fire, water, earth, and air. But if matter was really composed of atoms, what forces held the atoms together in combinations, and why didn’t they all just fall apart in a pile at the bottom of the void? These questions plagued the atomists and hampered the acceptance of atomic theory until the 20th century. In 1803, John Dalton, a school teacher, used the concept of atoms to explain why elemental substances always reacted in simple proportions by weight. For example, 12 grams of carbon always reacted with 32 grams of oxygen to form 48 grams of carbon dioxide, and 4 grams of hydrogen always combined with 32 grams of oxygen to form 36 grams of water. Dalton proposed that each element consisted of a unique kind of atom and that these atoms could join with each other to form chemical compounds:

C + O2 → CO2
2 H2 + O2 → 2 H2O

Strangely enough, physics was the last branch of science to fully buy into the atomic theory. The strongly positivist school of thought, led by Ernst Mach, frowned upon atoms because they could not be directly observed. This began to change in 1897, when J. J. Thompson successfully isolated electrons in atoms by deflecting a cathode ray, a stream of electrons, in a vacuum tube with a magnetic and an electric field. Thompson discovered that the charge-to-mass ratio of the electrons from a variety of cathodes, made of different metals, was always the same. Thompson concluded that electrons must be a negatively charged particle, common to all atoms and that all electrons were identical. Since normal matter has no net electrical charge, Thompson proposed that atoms consisted of a smeared out positive charge with embedded electrons – the plum pudding model of the atom.

In 1909, Hans Geiger and Ernest Marsden, under the direction of Ernest Rutherford, bombarded a thin gold foil, about 200 atoms thick, with alpha particles. An alpha particle is a helium nucleus, consisting of two protons and two neutrons, which manages to tunnel out of a much larger radioactive nucleus such as radon. An alpha particle obtains a high velocity, and consequently lots of kinetic energy, as it is rapidly pushed away from the mother radioactive nucleus by the many protons in the radioactive nucleus. The plum pudding model of the atom predicted that, as the alpha particles passed through the gold foil, they should only have been deflected by a small angle of a few degrees. The surprising result from this experiment was that some of the alpha particles were deflected by very large angles, with some actually reflecting right back into the radioactive source. In 1911, Rutherford proposed that the backscattering of the alpha particles was caused by a very small, positively charged nucleus, less than 3.4 x 10-14 meters in size, and about 100,000 times smaller than the overall size of the gold atoms. The negative charge of the surrounding electrons, orbiting the positively charged nucleus, neutralized the nucleus, yielding atoms with no net electrical charge. In this model, atoms were composed mostly of empty space, with negatively charged electrons orbiting a central positively charged nucleus, like the Earth orbiting the Sun.

Quantization of the Atom
As with relativity, this model presented a problem for classical electrodynamics. The orbiting electrons, moving in circles around the positively charged nucleus, would be constantly accelerating, and should, by classical electrodynamic theory, be constantly radiating off electromagnetic radiation. As the orbiting electrons in atoms radiated off all of their orbital kinetic energy, all the atoms in the Universe should immediately collapse in the blink of an eye. In an earlier posting, I cited a similar problem with classical electrodynamics that Max Planck confronted in 1900. According to classical electrodynamics, the walls of the room in which you are currently located should be at a temperature of absolute zero, having converted all of the energy of the free electrons in the walls of the room into ultraviolet light and x-rays. This was known as the “Ultraviolet Catastrophe” at the time and is another example of an effective theory bumping up against the limitations of its effective range of reliable prediction. In 1900, Max Planck was able to resolve this dilemma by proposing that the energy of the oscillating electrons in the walls of your room was quantized into a set of discrete integer multiples of an elementary unit of energy E = hf.
Thus:

E = nhf

where
n = 1, 2, 3, ...
h = Planck’s constant = 4.136 x 10-15 eV sec
f = frequency of the electron oscillation

You can read a translation of his famous 1900 paper, that first introduced the concept of quantization at:

http://www.ffn.ub.es/luisnavarro/nuevo_maletin/Planck%20(1900),%20Distribution%20Law.pdf

Max Planck regarded his inspiration/revelation of the quantization of the oscillation energy of the free electrons and their radiated energy as a mathematical trick to overcome the Ultraviolet Catastrophe. But in 1905, the same year that he published the special theory of relativity, Einstein proposed that Planck’s discovery was not a mathematical trick at all. Einstein proposed that sometimes light, an electromagnetic wave in classical electrodynamics, could also behave like a stream of quantized particles, that we now call photons, with energy:

E = hf

In 1913, Niels Bohr adopted a similar strategy of quantization to resolve the problem of atoms spontaneously collapsing due to radiating away all of their orbital energy. Bohr proposed that the angular momentum L of the electrons was quantized too.

L = nħ

where ħ = h/2π and n = 1, 2, 3, …

Bohr proposed that electrons did not radiate energy so long as they remained in one of the quantized orbits about the nucleus.

Angular momentum is a measure of the amount of spin that a body has. In classical mechanics, the angular momentum of an electron orbiting a nucleus is:

L = mvr

where
m = mass of the electron
v= the velocity of the electron
r = radius of the electron’s orbit

and the angular momentum L can take on any value as the velocity v and radius r vary continuously. For example, the conservation of angular momentum is the reason that a skater spins faster when she pulls in her arms in a spin and can take on any value. But in Bohr’s model of the atom, the electrons could only take on quantized values of angular momentum with quantized amounts of energy. For hydrogen, which consists of a single electron orbiting a nucleus composed of a single proton, the energy states became:

En = -13.6 eV/n²

where n = 1, 2, 3, …

An electron-volt, eV, is a very small amount of energy. It is the amount of energy that an electron gains as it accelerates in a vacuum towards the positive pole of a one-volt battery and away from the negative pole of the battery. Most chemical reactions have an energy of a few electron-volts per molecular reaction, so it is a convenient unit of energy for atomic theory.

The energies of the quantized states of hydrogen run as:

n = 1: E1 = -13.6/1 = -13.6 eV
n = 2: E2 = -13.6/4 = -3.4 eV
n = 3: E3 = -13.6/9 = -1.5 eV
n = 4: E4 = -13.6/16 = -0.85 eV

where n=1 is the lowest energy level of the atom. In the Bohr model of the atom, quantized photons of light are emitted or absorbed when electrons jump from one quantum state to another. For example, when an electron in the second energy level of hydrogen with n = 2 drops to the lowest quantum state of n = 1, a photon with energy:

∆E = -3.4 - (-13.6) = 10.2 eV

is emitted. Using the formula:

E = hf

it easy to calculate the frequency of a photon with 10.2 eV of energy, and this is what is observed spectroscopically in the laboratory in confirmation of Bohr’s predicted value.

In 1860 Gustav Kirchhoff and Robert Bunsen invented the modern spectroscope, consisting of a gas flame, a slit, a prism, and a small observing telescope. Kirchoff and Bunsen introduced small amounts of materials into a flame and then allowed the colored light from the flame to pass through a slit and then on through a prism. They then observed the image of the slit with a small telescope. The prism caused the single slit to appear as a series of multiple slits, or lines, of different colors caused by the splitting up of the different frequencies of light within the colored light of the flame. You can repeat their experiment by sprinkling a little salt water in the flame of a gas range and observing the characteristic yellow color of excited sodium atoms. Kirchoff and Bunsen did not know it at the time, but what was happening was that the high temperature of the flame was bouncing atoms around in the flame causing some of the electrons in the atoms to get excited. As the electrons transitioned back to lower energy levels, they gave off photons of specific frequencies or colors. You can read their original paper at:

http://chemteam.info/Chem-History/Kirchhoff-Bunsen-1860.html

In 1924, Louis de Broglie proposed in his doctoral thesis, that if light waves could sometimes behave as particles, then perhaps particles, like electrons, could also behave like waves with a wavelength λ of:

λ = h/mv

where
λ = wavelength
h = Planck's constant
m = mass of the particle
v = the velocity of the particle

In 1925, Clinton Davisson and Lester Germer were at Bell Labs bombarding a nickel target with electrons in a vacuum tube. During one of the runs of their experiment, the tube leaked causing the nickel to oxidize. To salvage the nickel target, they had to heat the nickel to a high temperature. Unknown to them, the heating of the nickel fused the nickel into several large crystals. When the fused nickel target was later bombarded with electrons again, they discovered that the electrons were now reflected back in a diffraction pattern. Diffraction patterns are a telling characteristic of waves. It is the diffraction of light waves off the closely spaced pits on a music CD that creates the rainbow sparkle that you see when you shine a light on it. The light waves diffract off the regularly spaced pattern of pits on a CD and get spread out at different angles by their frequencies (or wavelengths and colors), just as a prism spreads out light by its colors or frequencies. In fact, you can make a simple homemade spectroscope using a CD and two pieces of cardboard. Tape the two pieces of cardboard together, such that there is a narrow slit between the two pieces, about 1/16th of an inch wide. Now place the CD on a flat table with the label side down, and then put the cardboard with the slit, in front of a desk lamp containing a compact fluorescent bulb. Be sure to position the desk lamp, so that the photons from the slit have to do a bank shot off the CD at an angle to reach your eyes. Reflected in the CD you will see the bright white reflection of the slit, but you will also see the image of the slit as a series of colored circular slits or lines expanding out from the center of the CD. That is the diffraction pattern. If you look carefully, you will see a complex pattern of closely spaced lines; two red lines, a broad yellow line, a green line, a blue line, and an indigo line, with black spaces between the colored lines. This is the spectral signature of the excited mercury atoms in the compact fluorescent bulb, and it is first-hand proof of both the quantization of the energy levels in mercury atoms and of the emitted photons too. In a similar fashion, Davisson and Germer observed essentially the same thing, when they accelerated electrons to specific energies and bombarded their crystalline nickel target; they too obtained a diffraction pattern of reflected electrons at specific angles. The electrons diffracted off the regularly spaced nickel atoms in the crystalline lattice of the nickel crystal at specific angles, just as the photons in your homemade spectroscope diffracted off of the pattern of pits in the CD at specific angles with specific colors or frequencies. Davisson and Germer reported their results in a paper published in 1927, confirming de Broglie’s idea of the wavelike behavior of particles.

The idea that particles, like electrons, could behave as waves allowed for a reinterpretation of Bohr’s conjecture that the angular momentum of the electrons in a hydrogen atom was quantized as:

L = nħ

where ħ = h/2π and n = 1, 2, 3, …

We could now envision the electron as a standing wave, surrounding the central positively charged proton. Just as only certain wavelengths of sound can exactly fit into a pop bottle and resonate when you blow across the mouth of the bottle, only electrons with certain fixed wavelengths or energies could exactly fit around the circumference of an electron orbital about the proton.

The Bohr quantum model of the atom was very successful at predicting the spectra from hydrogen atoms, but less so for more complex atoms. It also did not explain things like why the spectral lines from atoms split into two or more lines when exposed to a strong magnetic field. As with all effective theories, it had its limitations. Clearly, some improvements were required.

Erwin Schrödinger
The next advance came from a 38-year-old physicist, Erwin Schrödinger, who was still struggling to make his mark in physics. The rule of thumb in physics is that most of the great advances come from people under the age of 30, probably because the inspiration/revelation step of the scientific method seems to come easier to the young at heart with less to lose. At this point, physicists had been working with the mathematics of waves for more than 100 years and were well aware that all known waves obeyed a differential equation of a particular form known as the wave equation. Schrödinger was convinced that for the de Broglie hypothesis about the wavelike behavior of matter to advance, a wave equation for particles was required. So in the winter of 1926, Schrödinger packed up his latest mistress and left his home and wife in Vienna for a couple of weeks of sabbatical in a Swiss chalet. There he worked out a famous wave equation for particles, now known as the Schrödinger equation. The story goes that he had two pearls, one for each ear, that allowed him to work undisturbed by his mistress. His wife back in Vienna certainly was not a distraction either. He truly was young at heart at the age of 38 and ripe for some inspiration/revelation.

To understand the significance of all this, we need to delve a little into the mathematics of differential equations. Imagine a very long taught guitar string stretched between two walls that are separated by a large distance. If we pluck the string near the left wall, a pulse will begin to travel to the right. Figure 1 below is a snapshot of a small section of a possible pulse at a particular time as it moves to the right.

Figure 1 (click to enlarge)


The motion of the pulse can be described by a scary looking differential equation, known as the wave equation for a stretched string, which describes how each small section of the string moves up and down as the pulse passes by.

The Wave Equation of a Stretched String

∂²y  =  μ   ∂²y
──      ──  ───
∂x²      T    ∂t²

We will be dealing a little bit with differential equations when we get to chaos theory in softwarephysics, so let’s spend a little time with the wave equation to show that it is really not so scary after all. The project plan for a large IT project can be pretty scary too if you look at the whole thing at once. However, if you break it down into its individual tasks, it looks much less formidable. It’s important to take life one 2x4 at a time. The first term in the equation on the left is called the second partial derivative of the pulse with respect to the x-axis (distance along the string). It is just the curvature of a small section of the string as the pulse passes by (see Figure 1):

∂²y
──
∂x²

When this term is a big number, it means that the curvature of the string is large and the string has a peak or valley. When this term is a smaller number, it means that the curvature is low and the string is kind of flat. The variable μ is the density of the string. When μ is large, it means that the string is heavy; when μ is small, it means that the string is light. The variable T is the tension in the string, or how tightly the string is stretched. So if we just look at what we have so far, we see that the curvature of the string pulse is equal to the density of the string μ divided by the tension T of the string times “something else”. This makes sense. When the string is stretched very tightly, the tension T is large, so the curvature of the pulse should get flatter (smaller). Also, when the density μ of the string gets bigger, the curvature of the pulse should get larger too, because a heavy string should be less flattened by a tension T, than a light flimsy string. Now we have to look at the “something else” term on the far right:

∂²y
──
∂t²

This term is called the second partial derivative with respect to time. It is just the curvature of the pulse in time – how fast a tiny section of the string accelerates up and down as the pulse passes by. A flat pulse will not accelerate up and down very quickly as it passes by, while a tightly peaked pulse will accelerate up and down quickly as the pulse passes by.

The wave equation for the stretched string now makes sense as a whole. It simply says that the curvature of the pulse along the x-axis gets bigger when the density μ of the string gets bigger, or when tension T gets smaller, or when the rate at which the string accelerates up and down as the pulse passes by gets bigger. When you work out the mathematics, the velocity of the pulse is given by:
           ____
v  =  √ T/μ

The hard part about differential equations is solving them. You have to find a curve that meets the above requirements. When you take a course in differential equations, they teach you all sorts of ingenious techniques using calculus to guess what curvy line fits the requirements. For the problem at hand, the solution to the wave equation for a stretched string fixed at both ends is a series of standing sine waves, which look something like Figure 2 below. The string can be excited into many standing waves, defined by a number n = 1, 2, 3,… which describes how many wavelengths of the standing wave just exactly fit between the two fixed points.

Schrödinger’s Equation
Working with Einstein’s equation for the energy of a photon and de Broglie’s equation for the wavelength of a particle, Schrödinger had a problem. Unlike the velocity of a wave on a string, which only depended upon the density of the string μ and its tension T, the velocity of a particle’s wave depended upon the wavelength of the particle λ:

v  =  h
        ──
       2mλ

Schrödinger believed that a particle must really be a wavepacket of many superimposed waves of different wavelengths that added up in phase near the location of the particle. Given the above equation, the waves in the wavepacket would tend to move at different velocities because they all had different wavelengths. The traditional wave equation, like the one for a wave pulse on a string, would not work under such conditions. Schrödinger overcame this problem with the following compromise equation, that sort of looks like a traditional wave equation. Note that the wavefunction Ψ is just a wiggly line, like the pulse on our string, and is pronounced like the word “sigh”, and m is the mass of the particle.

-ħ²    ∂²Ψ  =  iħ ∂Ψ
──      ──            ──
2m    ∂x²            ∂t

He had to make two modifications to the standard wave equation:

1. He used the first partial derivative with respect to time, instead of the second partial derivative with respect to time on the far right side of the “=” sign

2. The equation contained:
          ____
i  =  √ -1

(or in other words  i²  =  -1  )

which meant that the Schrödinger equation was a complex differential equation, with an imaginary part containing the quantity “i”, the square root of -1. Now we all know that there is no “real” number, that when multiplied by itself (squared) produces a -1, but that does not scare off mathematicians! Several hundred years ago, mathematicians became comfortable with the idea of an “imaginary” number i, which they defined as the square root of -1. “Real” numbers, the kind of numbers that we are used to dealing with, are just numbers that do not have an imaginary part. A little later, physicists discovered that the Universe seemed to just love “imaginary” numbers. The imaginary number i started to pop up in all sorts of equations and was nearly as popular as π. Now the fact that Schrödinger’s equation contained an imaginary part meant that solutions to the equation, known as wavefunctions Ψ, would not be totally “real” either, because they would contain imaginary parts using the square root of -1. As we shall see, this implication created a problem for the interpretation of what exactly a wavefunction really was. All of the other waves we had experience with, like waves on a string, light waves, or water waves were “real” functions or curvy lines. What did a complex wavefunction, with both “real” and “imaginary” parts, mean?

Schrödinger’s Time Independent Equation for a Single Dimension
We can simplify Schrödinger’s equation by getting rid of the part that depends upon time for the cases where the energy E does not change with time. That is certainly true for the electrons in an atom, so long as they remain in their orbits and do not jump from one orbit to another and emit or absorb a photon.

-ħ²  d²ψ(x)   +   V(x) ψ(x)  =  E ψ(x)
──  ──────
2m     dx²

In this equation, we use ψ for the wavefunction, instead of the full-blown Ψ, because it does not contain the part that varies with time. ψ is still just a wiggly line, like the pulse on our string, and is still pronounced like the word “sigh”. In addition, we added a term V(x) which is another function or wiggly line that describes how the potential energy of the particle varies as it moves back and forth along the x-axis. Imagine a straight road that runs across a hilly landscape and that you are riding a bicycle. If you ride your bicycle up a hill, you can tell that you are increasing your potential energy V(x) because it is hard to peddle up the hill as you convert some of your kinetic energy into potential energy. Similarly, it is easy to coast down a hill on a bicycle, because some of the potential energy V(x) that you have stored away, is converted back into kinetic energy. Another way of looking at this is that V(x) is also a way of describing a force. For example, the topography of the wiggly V(x) function seems to produce a force pulling you down the hill and another force impeding your progress up the hill. So the above formula allows you to calculate the wavefunction ψ for a particle subject to a force.

The Particle in a Box
Recall Figure 1 in my posting The Demon of Software, which depicted two containers full of molecules bouncing around. In 1872, Ludwig Boltzmann developed statistical mechanics by envisioning the molecules existing in a large number of microstates. This was many years before the arrival of quantum mechanics, so Boltzmann had to make up his microstates by arbitrarily force-fitting the molecules into little mathematical cubicles, like saying “I can tell by your energy that you are a perfect size 8”, at least approximately. Let us now apply Schrödinger’s equation to this problem to find the real microstates. To simplify the problem, imagine a single container of width “L” along the x-axis containing a single particle, such as an electron, in it. The electron is bouncing back and forth along the x-axis like a target in a shooting gallery. The electron only feels a force when it hits one of the walls on either the left or right side of the container at x = 0 or x = L, so the potential energy V(x) between the walls is zero. At the walls located at x = 0 and x = L, the electron feels an infinite force pushing it back into the container, so the potential energy hill V(x) at these two points is very steep and actually goes straight up to infinity.

When you solve Schrödinger’s equation for this problem, you get quantized solutions that are sine wavefunctions:
                 ____
ψn(x) = √ 2/L    sin(nπx/L)


n = 1, 2, 3, ...


En = n²h²
        ─────
         8mL²

n = 1, 2, 3, ...

where
m = mass of the particle (electron in this case)
L = width of the box
h = Planck’s constant
n = quantum number

For example for the lowest energy level where n = 1:
                 ____
ψ1(x) = √ 2/L    sin(πx/L)

E1 = h²
        ─────
         8mL²

What is happening here is that you can only fit sine waves into the box that have wavelengths that fit just right. The “n”s determine the number of wavelengths of the sine wavefunction that fits in the box properly and the energy En of each wavefunction. It is easier to see this as a plot rather than as an equation. Figure 2 shows the first three wavefunctions for n = 1, 2, and 3.

Figure 2


The above wavefunctions look a lot like the first three octaves of a vibrating guitar string, and indeed, are identical to what you get for a vibrating string.

Remember, I warned you about wavefunctions being strange. At first, nobody really knew what to do with them. Physicists are just like other people. They tend to take ideas that they are familiar with and project these ideas onto things that are new to them. Physicists have a few popular models. Grab a small pebble and keep making it smaller in your mind, until it is infinitely small with a dimension of zero. When you are finished, you have a particle. Now take the particle and throw it into a still pond. The resulting waves that propagate away are another good model. Take a bar magnet, as Michael Faraday did, and cover it with a piece of paper. Then sprinkle some iron filings over it. The “lines of force” that you see are a field. Faraday called it a field because it reminded him of a freshly plowed farmer’s field. So when Schrödinger came up with his equation, nobody really knew what to make of the wavefunction solutions to the equation. Schrödinger thought they might have something to do with the electric field of electrons, but he wasn’t quite sure.

In 1928 Max Born came up with another interpretation. Born proposed that the wavefunction was really a probability wave. Imagine that a gang of young thugs moves into your neighborhood and that they begin to knock off liquor stores late at night in the surrounding area. In order to avoid capture, the gang decides to only knock off each liquor store once in case the police are in hiding. If you plot the liquor stores that get knocked off versus time, you will see an expanding wave of crime. The odds of a particular liquor store getting knocked off increases as the wave passes by and diminishes as the wave moves on. Recall that usually, the wavefunctions that are solutions to Schrödinger’s equation are complex, meaning that they have both “real” and “imaginary” parts and that we are only used to dealing with solutions to wave equations that are real. Born knew that it was a mathematical fact that whenever you multiplied a complex number or function by its complex conjugate, you always obtained a real number because all of the imaginary parts disappeared. To obtain the complex conjugate of a wavefunction Ψ, all you have to do is change i to –i wherever you see it. The resulting function is denoted as Ψ*.

Born proposed that the probability of finding a particle at a position x was:

Ψ* Ψ = | Ψ|²

at the point x. So to plot the probability of finding the electron in our 1-dimensional box, we just have to square the absolute value of its wavefunction. Figure 3 shows the resulting plot.

Figure 3 (click to enlarge)


Now here comes the interesting part. Classical mechanics predicts that the probability of finding the electron at any point should be the same for each point along the x-axis, because the electron is just bouncing back and forth like a target in a shooting gallery, and that the electron could have any energy at all, since the energy is just defined by how fast the electron is bouncing back and forth. However, the wavefunctions that are solutions to Schrödinger’s equation predict that the energy of the electron is quantized and comes in discrete allowed values. They also predict that the probability of finding the electron along the x-axis varies according to the energy state of the electron defined by its quantum number n. For the lowest energy level, where n = 1, the electron is most likely to be found near the center of the box because ψ*ψ has a peak there. That is not too bothersome. However, for the second energy level, where n = 2, something really strange happens. There is a high probability of finding the electron on either the left or right side of the box, but never in the center! How can an electron move back and forth in the box without ever passing through the center? For the higher energy levels, where n = 3, 4, 5, …, there are even more dead spots where ψ*ψ = 0, and the electron will never be found! This is just another example of the quantum strangeness that is built into our Universe.

Quantum Mechanics of the Atom
Schrödinger was able to apply his new equation for the case of the hydrogen atom and derive its energy levels defined by the quantum number n by using a V(x) caused by the electrostatic force of the proton pulling on the electron. Again, these matched the spectroscopically observed energy levels of the hydrogen atom, also predicted by the Bohr model of the atom. Because electrons moving around a proton have some rotational motion, Schrödinger’s wavefunctions for the hydrogen atom also had two additional quantum numbers l and m, which defined quantized amounts of angular momentum, and these quantum numbers explained most of the splitting of spectral lines in a magnetic field that Bohr’s model did not. But there was still a small amount of additional spectral line splitting that Schrödinger’s model failed to predict. Schrödinger’s wavefunctions for electrons in atoms had one additional major failing.

In 1921, Otto Stern and Walter Gerlach performed an experiment which showed that electrons had an intrinsic quantized angular momentum they called spin and a small associated magnetic field like a tiny bar magnet. Stern and Gerlach shot hot silver atoms from an oven through a distorted magnetic field and found that the beam of silver atoms split into two beams. This was a little strange since electrons are now thought of as fundamental point particles with a dimension of zero, so how could electrons have any angular momentum, if angular momentum is defined as L = mvr and electrons have an r = 0? The other strange thing was that if electrons were really spinning like little tops, they should spin in all different directions, but when Stern and Gerlach performed their experiment, they always found that the electrons were either spinning in the same direction as their magnetic field or 1800 in the opposite direction of their magnetic field. How did the electrons know how to align their spins in advance, before they got to the magnetic field? Again this is just quantum strangeness at work. Stern and Gerlach found that electrons are like little spinning magnets of dimension zero with a spin-up ↑ or spin-down ↓ of magnitude:

Sz = ± ½ ħ

In 1928 Paul Dirac realized that, from the standpoint of classical mechanics, the electrons orbiting the nucleus of an atom would have to move very quickly to overcome the electrostatic force pulling them into the positively charged nucleus. In fact, the electrons would have to move at about 30% of the speed of light and would experience relativistic effects. Schrödinger had used the classical concept of the energy E of a particle in his equation but had not taken into account any relativistic effects. When Dirac included these effects into a much more complicated form of the wave equation, the quantized spin of electrons popped out just as Stern and Gerlach had observed. The other thing that the Dirac equation predicted was that electrons came in two forms; one with a negative charge and positive energy and one with a positive charge and negative energy! We now call these positively charged electrons, positrons. Positrons were the first form of antimatter predicted by physics, and Carl D. Anderson actually observed a positron in 1932 in a cosmic ray experiment carried aloft in a balloon. With Dirac’s equation, we now have a model for the atom composed of a positively charged nucleus surrounded by electrons with wavefunctions defined by four quantum numbers n, l, m, and s.

In 1925, Wolfgang Pauli wondered why all of the electrons in an atom did not simply decay to their lowest energy level of n = 1 by emitting photons. He empirically proposed that each electron in an atom had to be in a unique quantum state. The implication of this proposal was that each electron had to have a unique wavefunction defined by a unique combination of quantum numbers n, l, m, and s. This meant that as you throw electrons into an atom, the electrons have to arrange themselves in shells about the nucleus, as the available slots for each combination of n, l, m, and s is taken up. This is a good thing because the chemical characteristics of an atom are chiefly defined by the arrangement of its electrons in shells and especially by the electrons near the surface of the atom in the outer electron shells. If all electrons were at their lowest energy level of n = 1, you would not be sitting here contemplating atoms because there would be no chemical activity in the Universe, and you would not exist. It turns out that, theoretically, all of chemistry can be derived from the quantum mechanical model of atoms.

Quantum Implications for Softwarephysics
Recall that the individual characters in a line of source code:

discountedTotalCost = (totalHours * ratePerHour) - costOfNormalOffset;

are each defined by 8 quantized bits, with each bit in one of two quantum states “1” or “0”, which can also be characterized as ↑ or ↓.

C = 01000011 = ↓ ↑ ↓ ↓ ↓ ↓ ↑ ↑
H = 01001000 = ↓ ↑ ↓ ↓ ↑ ↓ ↓ ↓
N = 01001110 = ↓ ↑ ↓ ↓ ↑ ↑ ↑ ↓
O = 01001111 = ↓ ↑ ↓ ↓ ↑ ↑ ↑ ↑

We may think of each character in a line of code as an atom, and each line of code as a molecular chemical reaction which ultimately produces a macroscopic effect. The 8 quantized bits for each character are the equivalent of the spins of 8 electrons in 8 electron shells that may be either in a spin-up↑ or spin-down ↓ state. And the chemical characteristics of each character are determined by the arrangements of the spin-up ↑ or spin-down ↓ state of the bits in the character.

I apologize for all of the math in this posting. If you feel a little confused, you are in good company. Nobody really understands any of this stuff.

Next time we will expand upon these ideas and develop the quantum mechanical formulation of softwarechemistry and try to delve a little into the cosmic interpretation of what all this means.

Comments are welcome at scj333@sbcglobal.net

To see all posts on softwarephysics in reverse order go to:
https://softwarephysics.blogspot.com/

Regards,
Steve Johnston

Saturday, December 15, 2007

Cyberspacetime

Last time we explored Einstein’s special theory of relativity and saw how observers in relative motion with each other measured different times and distances between events. This created a problem for causality because there was no absolute “now”, so observers could disagree on the sequence of events and could possibly even observe an effect happen before its cause. The only way we were able to resolve this problem and preserve causality was to presume that information could not travel faster than light. We also saw how Einstein took a very positivistic approach to his new concept of space and time by only dealing with observable phenomena like the ticking of light clocks, the paths and timings of light beams, and the lengths of objects measured directly with yardsticks. Einstein made no reference to an absolute space or time, that we presume exists, but which we cannot directly measure.

People frequently sum this all up with the phrase that “everything is relative”, meaning that anything goes. But that is not the case at all. It turns out that my distances and times may disagree with yours, but I will always be able to convert them into your distances and times through the use of a set of handy conversion formulas known as the Lorentz transformations. For example, you might claim that a certain classic Led Zeppelin CD costs 10 euros, while I maintain that it goes for just under $15 U.S. dollars. That is because of the current currency transformation:

1 euro = 1.47139 U.S. dollars

We will always disagree on the exact numerical cost of items when you use euros and I use dollars, but we will always be able to convert one cost to the other with a transformation formula like the one above.

The Lorenz transformations all have the following term in them:
   _______
√1 - v²/c²

where v is the velocity of your friend’s spaceship speeding by, and c is the velocity of light. When v is 10% of the speed of light, then

v/c = 0.1

and

v²/c² = 0.01

so
   _______
√1 - v²/c²   =
   _____
√1 - 0.01   =
   ___
√0.99   =   0.99498743710...   ≈ 1

For relative velocities under 10% of the speed of light, the Lorenz transformations are similar to the situation where:

1 euro ≈ 1 U.S. dollar

and everybody agrees on the numerical cost of goods. In such a situation, everybody agrees on the distances and times between events to a very good approximation, and Newtonian mechanics makes very accurate predictions.

Spacetime
The Newtonian idea of a fixed and absolute space, providing a stage or background upon which the events of the Universe could unfold, was so appealing that it was very hard to part with. In Einstein’s original positivistic concept of relativity, there is no stage; there is only a dialog between the players in terms of their relative observations of each other. In 1907, Hermann Minkowski, a former university math professor of Einstein, realized that we could still have a stage for our players if we combined space and time into a 4-dimensional spacetime. By adding time as a 4th dimension to our traditional 3-dimensional world, we could unite space and time into spacetime. But how can you possibly combine the 3-dimensional world of x, y and z coordinates that are measured in feet, yards, miles, or meters with time that is measured in seconds? To understand this better, let us turn to an example from American football. The playing area of an official NFL football field is 100 yards in length and 160 feet in width. For some unknown reason, distances along the x-axis of a football field are measured in yards, while distances along the y-axis are measured in feet and inches from the sidelines. For example:

NFL Hash marks are the narrowest of all the levels of football play. They measure 70 feet, 9 inches from the sidelines and are 18 feet, 6 inches wide. (same as the width of the goal posts)

Now imagine that you are at a football game with a friend. The both of you watch a play where the quarterback finds that nobody is open and decides to run the ball himself (see top section of Figure 1). The quarterback receives the football at point A and proceeds to run in a straight line to point B where he is tackled. You observe that the quarterback made a gain of ∆x yards during the play and that he managed to run ∆y feet across the field as well. Recall that ∆y gains across the field are meaningless in football, so long as you stay within the playing area defined by the sidelines. It turns out that your friend has started the celebration party a little too early with the help of Mr. Jack Daniels, and is in no condition to make observations, but does so just the same. Your friend sees the same play that you just witnessed, but is looking cockeyed at the field (see bottom section of Figure 1). Your friend observes that the quarterback made a gain of ∆x` yards during the play and that he managed to run ∆y` feet across the field at the same time. When the two of you compare notes, you find that you disagree about both the X-dimensional gains in yards and the Y-dimensional gain in feet:

∆x ≠ ∆x`
∆y ≠ ∆y`

Being in a better mental condition than your friend, you remember the Pythagorean theorem from high school. You realize that if you both make your X-dimensional and Y-dimensional measurements in feet rather than in yards and feet, then you can use the Pythagorean theorem to find the total distance D that the quarterback ran. The total distance of the play should be the same for all observers no matter how they look at the playing field:

D² = ∆y² + ∆x²
D² = ∆y`² + ∆x`²

And sure enough, when all of the calculations are completed, you both agree that the quarterback ran a total of D feet before being tackled, even though you still disagree on the X-dimensional and Y-dimensional gains of the play.

Figure 1 (click to enlarge)


Let’s extend the above example, which was conducted in space, to a similar scenario conducted in spacetime. The top section of Figure 2 is a spacetime plot of the next football play. Because it is hard to plot more than 2 dimensions at a time on a piece of paper, in a traditional spacetime plot we usually plot one of the normal 3-dimensions X, Y, or Z of space vs. time T. The normal convention is to plot T vs. X, and we shall do the same. The X-axis in the spacetime plot represents the distance down the length of the football field, as it did in Figure 1 above, and T represents the time of the play. In the second play, the quarterback again decides to run the ball, but this time he runs straight down the field in the X-dimension from point A to point B in a straight line and does not run across the field at all. With the T-dimension, we measure the time it takes for the quarterback to run the play. As before, we measure the progress of the play as motion through spacetime with ∆x and ∆t components.

Now imagine that you and your friend are on spaceships in relative motion with each other watching the second play. Even though the quarterback only runs straight down the field in the X-dimension, you and your friend will again disagree on the number of yards the ball was carried ∆x and you will also disagree on how long the play lasted ∆t because your friend’s relative motion makes him look cockeyed at your spacetime! From the bottom section of Figure 2 we see that:

∆x ≠ ∆x`
∆t ≠ ∆t`

Is there some way to come to a mutual agreement for the second play as we did for the first play? Yes, just as the distance D measured in space is the same for all observers, the interval Ι in spacetime is also the same for all observers. The interval Ι is like the distance between events in spacetime. You and your friend will both agree on the interval Ι of the play, so long as you both measure time and space in meters, just as you both agreed on the distance D traveled in the first play when you both measured ∆x and ∆y in feet. After all, there is nothing profound about measuring time in seconds. A second is just some arbitrary unit of time that has something to do with the current rate of spin of the planet that we happen to find ourselves on at the moment. The Universe really doesn’t know about or care about seconds. To convert seconds to meters, we need to use the speed of light. The speed of light is 3 x 108 meters/second, so to measure time in meters we need to use a conversion factor, just like we needed a conversion factor to change yards into feet:

1 yard = 3 feet

1 second = 3 x 108 meters of time

Once you convert your time measurements into meters of time, you can apply a modified Pythagorean theorem:

Ι² = ∆t² - ∆x²
Ι² = ∆t`² - ∆x`²

Notice that to measure the interval Ι between events in spacetime, you need to use a “-“ sign instead of a “+” sign in the equation.

Once again, when all of the calculations are completed, you and your friend will now both agree on the interval Ι of the play, even though you will still disagree on the X-dimensional and T-dimensional measurements.

Figure 2 (click to enlarge)


An interesting thing about intervals is that since light travels exactly one meter of distance in one meter of time, the interval between any two events defined by the motion of a light beam is always zero. For example, the interval between a photon leaving the surface of the Sun and arriving at the Earth 8 minutes later, after traveling 93 million miles is zero! If you examine Figure 1 and Figure 2 in my posting Is Information Real? , you will find a similar situation. In this situation, there are two events – the flash of the flash unit and the recording of the flash of light in the camera. Let us say that the mirror of the LightClock is 5 meters from the flash unit and camera, giving a round trip distance of 10 meters in the Y-dimension. Your friend will observe that there is no X-dimensional distance between the flash of light and the recording of the flash by the camera because the flash goes straight up and down for him. He will observe some T-dimensional distance between the events because it will take 10 meters of time for the flash to go straight up to the mirror and reflect back into the camera. Notice that in this problem, we have to deal with 2 dimensions of space, ∆x and ∆y and one of time ∆t, so we need to tack on another dimension to our formula for the interval Ι:

Ι² = ∆t² - ∆x² - ∆y²

Figure 1
∆y = 10 meters of space
∆x = 0 meters of space
∆t = 10 meters of time
Ι = 0

In Figure2 you will observe the same two events, but you will observe that there is an X-dimensional distance ∆x between the flash of light and the recording of the flash by the camera because the light beam has to do a bank shot off the mirror. You will also observe that the T-dimensional distance will be greater than 10 meters of time because the flash has to travel a longer distance to make the bank shot, and it will take more than 10 meters of time to do so.

Figure 2
∆y = 10 meters of space
∆x > 0 meters of space
∆t > 10 meters of time
Ι = 0

In both cases, you and your friend will disagree on the X-dimensional and T-dimensional differences ∆x and ∆t between the two events of the flash unit flashing and the camera recording the flash, but in both cases, you will agree that the interval Ι is zero. The extra ∆x and ∆t you observe cancel each other out, so that you still obtain an interval Ι = 0 too, just like your friend.

In this analysis, I am using the convention for the interval Ι that Edwin Taylor and John Wheeler use in their excellent book on the special theory of relativity Spacetime Physics (1963) because it yields positive intervals for everyday experiences, which is more in keeping with our experiences of positive distances in space. However, most treatments of the interval reverse the signs on ∆x and ∆t and define the interval as:

s² = ∆x² - ∆t²

but that definition yields negative intervals between most day-to-day events in the Universe. The signs on the ∆x and ∆t are really just a meaningless human convention that the Universe is not concerned with. The important thing is which term is larger. For example, suppose you see a man walking past your home on the sidewalk and you want to calculate the interval between his footsteps. Let’s suppose that relative to you the man takes 1-meter footsteps every second in your reference frame. What interval do you measure? Going back to our formula:

Ι² = ∆t² - ∆x²

∆x = 1 meter of space
∆t = 3 x 108 meters of time = 300,000,000 meters of time

Ι² = 300,000,000² - 1²
Ι² = 90,000,000,000,000,000 – 1
Ι² ≈ 90,000,000,000,000,000

Taking the square root we find:

Ι ≈ 300,000,000 meters

So in our reference frame, the man is mainly moving through spacetime in time and hardly moving through space at all as he walks by! This would be true even if he were driving past your home in a racecar or flying past in a jet airliner. As you sit there quietly at rest in your own reference frame, watching the man slowly stroll by, naturally your ∆x = 0, so you will find yourself traveling through 300,000,000 meters of spacetime every second. Even when you are just sitting still looking out the window, you will find yourself speeding through spacetime at the speed of light, but only in the time dimension! This is the reason nobody stumbled upon the special theory of relativity until 1905. Because we are all speeding through spacetime at the speed of light, mainly in the time dimension, we do not experience relativistic effects. Only when ∆x becomes large, and of the same magnitude as ∆t, do we experience the effects of the special theory of relativity. For example, if the man we were observing was able to run past our house at 50% of the speed of light, then his ∆x between footsteps would become 150,000,000 meters and our calculation of the interval Ι between his footsteps would drop significantly. This would make us see his wristwatch run slow and his body shrink in width as he rapidly flew by. Stranger yet, if we were to observe photons speeding by our home, we would measure an interval of:

Ι² = 300,000,000² – 300,000,000² = 0

because we would observe a ∆x = 300,000,000 meters and a ∆t = 300,000,000 meters.

But since all observers must agree upon the same interval between events, and the photons think that they are at rest with a ∆x = 0, the photons must calculate their intervals of zero as:

Ι² = 0² – 0² = 0

So in the reference frame of photons, which we see speeding by at the speed of light, there is no change in time or space for them – the photons are frozen in their spacetime and do not experience time or age at all! So for many photons, the Big Bang just happened and they are just sitting around waiting for something to happen, which is hard to do when your clock does not move.

When ∆t is greater than ∆x, physicists say that events are timelike because time dominates the calculation of the interval, and when ∆x is greater than ∆t, physicists say that the events are spacelike because space dominates the calculation of the interval. When events A and B are timelike, it means that there is enough time between the events for a beam of light to reach from event A to event B, and consequently, it is possible for event A to cause event B to happen. When events A and B are spacelike, it means that there is not enough time between the events for a beam of light to reach from event A to event B, and consequently, it is not possible for event A to cause event B to happen.

The Stage Returns
In Minkowski’s reformulation of special relativity, we once again have a stage or background of spacetime upon which the events of the Universe can unfold. Einstein did not at first like this reformulation of his theory of relativity because he thought it was too close to the old Newtonian concept of absolute space. But after a while, he warmed up to the idea and found it of great use as he tried to generalize his theory of relativity for all observers. Recall that his original version of relativity, published in 1905, only covered the special case of observers moving at constant speeds in straight lines with no acceleration. However, if you go back to your spaceship and turn on the engine, Einstein’s first postulate that you cannot perform any experiment that reveals if you are moving relative to an absolute space literally flies out the window. When you accelerate, you can easily tell that you are moving relative to an absolute space because everything tumbles back towards the back end of your spaceship! For example, if you try pouring one of those little bottles of gin, while your airplane rapidly accelerates for takeoff, you will most likely end up with it all over your shirt!

The Equivalence Principle
In 1907, Einstein had another revelation that solved the above problem. He realized that if a man fell out of a window and was in free-fall, then all effects of gravity would simply disappear. For example, we frequently watch astronauts in free-fall on the Space Shuttle become “weightless”. With this inspiration/revelation, Einstein concluded that he could reinstate his first postulate of relativity by postulating that gravity and acceleration were equivalent. This has become known as the Equivalence Principle:

"we [...] assume the complete physical equivalence of a gravitational field and a corresponding acceleration of the reference system."

With the Equivalence Principle, it once again became possible to conclude that no experiment could be performed to determine if you were moving or standing still relative to an absolute space. For example, suppose you are on a spaceship and let go of one of those little cans of Spam, and you observe that it immediately falls to the floor. According to the Equivalence Principle, you will not be able to tell if you are sitting on a launch pad on Earth in a gravitational field, or if you are out in outer space accelerating upwards at 32 ft/sec². Similarly, if the Spam just sits there and floats like it does on the Space Shuttle when it is in orbit, you will not be able to tell if you are in free-fall in a gravitational field or far out in interstellar space just coasting along.

Spacetime Curvature
Einstein’s new postulate of the Equivalence Principle had even more far-reaching consequences than Einstein’s original two postulates of special relativity, but at a high intellectual cost. The original special theory of relativity, published in 1905, used little more than high school algebra for the most part. On the other hand, Einstein’s new general theory of relativity, published in 1915, used tensor calculus and non-Euclidean geometry which taxed even the most math proficient physicists of the day. Einstein’s new general theory of relativity relied heavily on Minkowski’s concept of spacetime. Not only did we have our stage back, but now we found that the stage could be distorted, like watching a play in a curvy fun-house mirror.

Imagine a large merry-go-round that can spin very quickly. Start out with the merry-go-round not spinning and measure the radius R of the merry-go-round with a standard foot ruler. Next measure the circumference C of the merry-go-round using the same standard foot ruler. If you divide the circumference by the radius, you will get:

C / R = 2π ≈ 2 * 3.141592…..

This should not come as a surprise because that is what they taught you in high school geometry, also known as Euclidean geometry, where the three angles of a triangle add up to 1800 and π is determined using a circle and the above formula.

Now spin up the merry-go-round to a high rate of rotational speed and measure the radius R and circumference C again. You will find that the radius R will not change because the rotational motion is perpendicular to the radius R and there is no relativistic shortening in that dimension. However, when you measure the circumference C, you will find that you get a larger number than before because the standard foot ruler you use will shorten in the direction of the rotational motion because of relativistic effects:

C / R > 2π

This is clearly not what you learned in high school geometry. According to the general theory of relativity, the reason that you no longer measure a value of 2π is that the merry-go-round is accelerating, and its spacetime is no longer flat but is curved and deformed. When the merry-go-round spins, the direction of its motion on the circumference is constantly changing, and that is an acceleration. That’s why you feel a tug trying to pull you off the merry-go-round when it is spinning. If you put clocks along the circumference of the merry-go-round while it is spinning, you will also notice that they run slower than a clock placed at the center of the merry-go-round. Again the rotational motion along the circumference of the merry-go-round is causing time to slow down because of relativistic effects, and this is further evidence of the distortion of spacetime caused by the acceleration of the merry-go-round. If accelerations can curve spacetime, then using the Equivalence Principle, we can predict that gravitational fields must also curve spacetime too. In fact, the general theory of relativity proposes that gravity really is just a curvature of spacetime itself.

It’s easier to see how this works for the curvature of a 2-dimensional surface than for a 4-dimensional spacetime, so let’s go back to our football field. Imagine our football field again, but this time it is situated on the Equator of the Earth with its X-dimensional length aligned in an east-west direction along the Equator. If you add up the angles in a triangle on the football field by stretching a rope between three players, you will get 1800, just as you learned in geometry class in high school. Now let the size of the football field expand many times over until the 50-yard line reaches the North and South Poles of the Earth. Don’t worry about what happens to the length of the football field during this example. If you now add up the angles in a triangle formed by a player on the Equator in South America, a player on the Equator in Africa, and a player at the North Pole, you will get more than 1800, in fact, the angles will add up to about 2700 because each angle in the triangle will be close to 900. This is a sure sign that the surface of the Earth is curved and not flat. Euclidean geometry, the kind of geometry you learned in high school, only works for flat surfaces. For curved surfaces, you have to use the non-Euclidean geometry developed by Bernhard Riemann in 1854.

Now have the player in South America and the player in Africa both start walking due north towards the North Pole. As the two players proceed due north, they will find that they are slowly approaching each other and that they will finally meet at the North Pole. Even though both players were traveling due north in straight lines, it will seem as if there was some “force” pulling them closer together. Of course, there really was no force at all. The two players were merely walking in straight lines on a curved 2-dimensional surface defined by the surface of the Earth. It was the curvature of the 2-dimensional surface that brought them together, not some “force”. The general theory of relativity says the same thing about gravity. The apparent curved orbit of the Earth about the Sun is caused by the Earth moving in a straight line through a curved spacetime. The general theory of relativity proposes that matter, energy, and pressure cause spacetime to deform. However, it is mainly the great mass of the Sun that causes spacetime near the Sun to deform, but the thermal energy of the Sun and the great pressure at its core, also provide lesser amounts of deformation too. When an object moves through a deformed spacetime in a straight line, it seems to move in a curved line through space. We interpret the deflected motion of the object to be the result of the “force” of gravity when really it is just a peculiarity of the distorted spacetime that the object is moving through. That is why all objects fall with the same acceleration, as Galileo observed. They are all just moving through the same deformed spacetime in straight lines.

All of the above can be expressed in terms of Einstein’s famous field equations for general relativity, which in their most concise form are:

Gμν = 8 π Tμν

The expression on the left represents the curvature of spacetime and the expression on the right represents the matter and energy content of spacetime. The simplicity of the above formula is a bit misleading. It really represents a large matrix of nonlinear partial differential equations. In Software Chaos, we will learn that we generally cannot solve nonlinear differential equations and must instead use computers to calculate numerical solutions for them. This is just the case for Einstein’s field equations. Exact solutions can only be calculated for the simplest of problems, while high-speed supercomputers are required for more complicated problems. However, approximate solutions to some problems can also be obtained by making some simplifying approximations to certain problems.

To illustrate this process, suppose you have a Mercator projection map of the world and wish to determine the distance between Panama City near the Equator and London. The Mercator projection is a projection of the spherical Earth onto a cylinder surrounding the Earth, which produces a map with straight lines of both latitude and longitude forming a grid. The advantage of the Mercator projection is that courses of constant bearing appear as straight lines on the Mercator projection, so if you set your ship on a Northwest course, it will follow a straight line on your map. The problem with the Mercator projection is that it stretches both the north-south and east-west scales near the poles so that Greenland appears to have the same land area as Africa even though it is really 14 times smaller in area. Now if you try to find the distance between Panama City and London on the map using the Pythagorean theorem by measuring the distance along the Equator from Panama City to the longitude of London and then measuring the distance due north from the Equator to London you will find that the distance D that you obtain will not be correct:

D² ≠ ∆y² + ∆x²

However, you will find that by applying some correction factors to the above equation, you can once again find an equation that approximately yields the distance D between Panama City and London:

D² = A∆y² + B∆x²

The correction factors A and B are a reflection of the fact that space on a Mercator projection is distorted.

Similarly, for gravitational fields that are not too strong, like the gravitational field around the Sun, the interval Ι can be approximately written for objects moving towards and away from the Sun as:

Ι² = (1 - 2GM/c² x) ∆t² - (1 + 2GM/c² x) ∆x²

G = Newton’s gravitational constant
M = the mass of the Sun
x = the distance from the Sun
c = the speed of light
∆x = a small change in the distance from the Sun
∆t = a small change in time

The above correction factors to the interval are again the result of spacetime being distorted by the mass of the Sun. So the special theory of relativity is simply the general theory of relativity applied to a flat spacetime in which our original equation for the interval has no correction terms and is like the Pythagorean theorem for flat space. It turns out that for objects moving at orbital speeds about the Sun, such as the Sun’s planets, nearly all of this distortion to spacetime is due to the distortion of time, so Newtonian gravity is really just an illusion resulting from the distortion of time! For more on the general theory of relativity see Gravity from the ground up (2003) by Bernard Schutz, which is an amazing mathematical treatment of the general theory of relativity using only high school algebra!

The general theory of relativity is an incredibly accurate effective theory that takes over when Newtonian mechanics and Newtonian gravity break down at high velocities and large masses. It works over a very large range of conditions and predicts things like the slowing down of time in gravitational fields, the curvature of light beams near massive objects, the physics of black holes, and the cosmological expansion of spacetime. For example, we have been able to observe stellar systems composed of two neutron stars orbiting each other. A neutron star is a star that has reached the end of its life and has collapsed into a mass of neutrons so dense that a teaspoonful has a mass of 5 trillion tons, and its surface gravity is a trillion times stronger than Earth’s. As the two neutron stars orbit each other, they create gravity waves, ripples in spacetime, that radiate energy away causing an orbital decay of the pair. And the observed orbital decay agrees with Einstein’s predictions to one part in 1014. Even your GPS unit relies on Einstein’s general theory of relativity. There are currently 31 GPS satellites orbiting at an altitude of 12,600 miles above the Earth, and each contains a very accurate atomic clock. The signals from the GPS satellites travel to your GPS unit at the speed of light, so by knowing the travel time of the signals from at least 4 of the GPS satellites, it is possible to determine your position on Earth very accurately. In order to do that, it is very important to have very accurate timing measurements. Because the GPS satellites are moving relative to your GPS unit on Earth, their onboard atomic clocks run slower and lose about 7.2 microseconds per day due to their high velocities. But because the satellites are also further from the center of the Earth and in a weaker gravitational field, where spacetime is less deformed than on the surface of the Earth, their atomic clocks also run faster and gain 45.9 microseconds per day due to the weaker gravity out there. The net effect is a gain of 38.7 microseconds per day, so the GPS atomic clocks have to be purposefully built to run slow by 38.7 microseconds per day before they are launched so that they will keep in sync with clocks on the surface of the Earth. If this correction were not made, an error in your position of 100 yards/day would accrue. But despite the great success of the general theory of relativity, it is still only an effective theory that does not work for very small things where quantum effects predominate, but that is a story for another time.

Spacetime and Cosmology
The general theory of relativity had a huge impact on the new science of cosmology early in the 20th century because it could provide a description of the overall curvature of spacetime for the entire Universe as a whole. There will be a future posting devoted entirely to cybercosmology, but here is a brief thumbnail sketch of events as we currently understand them for the physical Universe. Our bubble Universe formed about 14 billion years ago in a Big Bang, perhaps from a rapidly expanding false vacuum (Andrei Linde 1986), or from a black hole in a previous bubble Universe (Lee Smolin 1992). The radius of the visible Universe, that portion of our bubble that we can see with telescopes, is currently only 14 billion light years because that is the furthest distance that light could have traveled towards us in the 14 billion years since the Big Bang. But the visible Universe is just a very tiny speck in our bubble which is more than 1026 times larger, or perhaps, even infinitely large. Our bubble is so large because it went through a very rapid cosmic expansion called Inflation during the first 10-32 seconds after the Big Bang that stretched the spacetime of our bubble until it was nearly flat (Alan Guth 1981). The spacetime of the Universe has continued to expand since the Inflation but at a much lower rate of expansion. The rapid expansion of spacetime during the Inflation might sound like a violation of the restriction, imposed by the special theory of relativity, that nothing can move faster than the speed of light, but that is not the case. It is true that matter, energy, and information cannot travel faster than the speed of light through spacetime, but spacetime itself can expand much faster than the speed of light, and that is what happened during the Inflation. The end result is that we can only see a very tiny portion of our bubble Universe out to a distance of 14 billion light years, but our bubble continues on to an infinite, or nearly infinite, size filled with galaxies we cannot yet see. At the instant of the Big Bang, a huge quantity of positive energy in the form of photons, and a matching amount of negative energy in the form of gravitational potential energy was released. The net amount of energy in our bubble Universe seems to be zero, which certainly is the case if spacetime is truly flat. So it appears that our bubble Universe was essentially made from “nothing”. It seems that today, most cosmologists think that there probably are an infinite number of other bubble universes, forming an infinite multiverse.

Cyberspacetime
In the general theory of relativity, the physical Universe is a 4-dimensional spacetime. The Software Universe, on the other hand, is a 2-dimensional cyberspacetime, consisting of a time dimension and a cyberspace dimension. The world currently produces about 500 billion microprocessors per year, so there should be about 1 – 10 trillion active microprocessors at the present time. Deep down at the hardware level, cyberspacetime is not a continuum - both dimensions are quantized. The cyberspace dimension is defined by the 1 – 10 trillion currently active discrete microprocessors, wherever they might be, and the individual system clocks of each microprocessor quantize the time dimension. Microprocessors currently run with a clock speed of about 109 Hz, so the time dimension of cyberspacetime is quantized into quantum chunks of time of about 10-9 second each.

As with spacetime in the physical Universe, cyberspacetime is the stage upon which the events of the Software Universe and IT unfold. The Software Universe began in a Big Bang about 2.1 billion seconds ago as a few bytes of machine code on Konrad Zuse’s Z3 computer in the spring of 1941 and has expanded and evolved into the complex Software Universe we see today, consisting of millions of terabytes of software residing on trillions of microprocessors. Cyberspacetime began on Earth but has expanded to every planet in our solar system and is currently leaving our solar system on board the Pioneer 1 & 2 and Voyager 1 & 2 probes.

At the logical level, most familiar to IT professionals, the graininess caused by the quantization of cyberspacetime at the hardware level vanishes and so most IT professionals just view it as a large cyberspacetime continuum. Like the spacetime of the physical Universe, cyberspacetime is nearly flat. For example, I frequently work from home in a suburb of Chicago in the middle of the night (for me) with some of my fellow Middleware Operations team members who are located in India and with our Command Center which is located 26 miles from my home. Our Unix server farms and mainframe datacenters are scattered throughout the U.S. in different cities. But as far as I can tell, it is all just one large flat cyberspacetime to me. Programmers only have to worry about warped cyberspacetime if they write code for one of the 300 geosynchronous satellites orbiting at an altitude of 22,300 miles, one of the 31 GPS satellites orbiting at 12,600 miles, or distant space probes, because cyberspacetime is more warped here on Earth than way out there. But even we Earthbound programmers still have to contend with the limitation imposed by the special theory of relativity that requires that information cannot travel faster than the speed of light. This becomes a factor for telecommunication over satellite links and is why the software on the Spirit and Opportunity probes on Mars must be located on board the probes and not back on Earth in a JPL control room since it can take up to 21 minutes for commands from JPL to reach Mars. When I worked for Amoco in the credit card processing section of IT, we had to worry about the 240 milliseconds that we lost in sending credit card transactions up from the gas stations to a geosynchronous satellite and back down to our mother Earth station in Tulsa. When customers swiped their cards in a CRIND (Card Reader in Dispenser) at the pump, we lost 240 milliseconds because our transactions could not travel faster than the speed of light, and those 240 milliseconds could not be regained by tuning the network no matter how hard we tried.

The Software Universe is not made of things; it consists only of processes and flows of information between discrete events in the two dimensions of cyberspacetime. There is the illusion that the Software Universe is filled with real things, such as files and databases with purchase orders and inventory levels on them, but that is an illusion. For example, when you edit a file with notepad, you are not interacting with a file; you are interacting with a process. Just press CTRL-ALT-DEL to open Windows Task Manager, click on the Processes tab and look for the notepad.exe. The PID is the process ID for the notepad process you are interacting with. The CPU Time is the distance the notepad process has traveled along the time dimension of cyberspacetime measured in dedicated CPU cycles to the notepad process. Nothing ever interacts with "things" in cyberspacetime because the "things" have to first be read into the memory of a computer and placed under the control of a process. Only the processes interact with each other in cyberspacetime. Therefore, files and databases on disk drives, tapes, and CDs are not part of the Software Universe; they are part of the physical Universe. In the Software Universe, we have two processes called "read" and "write" which allow us to pass information into and out of cyberspacetime. So at the logical level, above the hardware level, the Software Universe is simply made up of information and was created out of “nothing”, just like the physical Universe. We shall see in a future posting on cybercosmology, that a Universe simply made out of information and composed only of interacting processes, might be a good model for the physical Universe too.

Next time we will drill down even deeper by turning to another effective theory of physics called quantum mechanics and explore the nature of the microstates of statistical mechanics, the structure of atoms, and software at the level of individual characters in source code.

Comments are welcome at scj333@sbcglobal.net

To see all posts on softwarephysics in reverse order go to:
https://softwarephysics.blogspot.com/

Regards,
Steve Johnston