













Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!














Matthew Schwartz Statistical Mechanics, Spring 2019
In this lecture, we discuss many ways to think about entropy. The most important and most famous property of entropy is that it never decreases
Stot > 0 (1)
Here, Stot means the change in entropy of a system plus the change in entropy of the surroundings. This is the second law of thermodynamics that we met in the previous lecture.
There's a great quote from Sir Arthur Eddington from 1927 summarizing the importance of the second law:
If someone points out to you that your pet theory of the universe is in disagreement with Maxwell's equationsthen so much the worse for Maxwell's equations. If it is found to be contradicted by observationwell these experimentalists do bungle things sometimes. But if your theory is found to be against the second law of ther- modynamics I can give you no hope; there is nothing for it but to collapse in deepest humiliation.
Another possibly relevant quote, from the introduction to the statistical mechanics book by David Goodstein:
Ludwig Boltzmann who spent much of his life studying statistical mechanics, died in 1906, by his own hand. Paul Ehrenfest, carrying on the work, died similarly in 1933. Now it is our turn to study statistical mechanics.
There are many ways to dene entropy. All of them are equivalent, although it can be hard to see. In this lecture we will compare and contrast dierent denitions, building up intuition for how to think about entropy in dierent contexts.
The original denition of entropy, due to Clausius, was thermodynamic. As we saw in the last lecture, Clausius noted that entropy is a function of state, we can calculate the entropy dierence between two states by connecting them however we like. If we nd a reversible path to connect them, then the entropy change is determined simply by the heat absorbed:
Ssystem =
rev:
dQin T (Clausius entropy) (2)
This denition of entropy (change) called Clausius entropy. It is a thermodynamic, rather than statistical-mechanic, denition. It says that entropy is generated (or removed) from heating (or cooling) a system. Clausius entropy is important in that it directly connects to physics. As we saw in the last lecture, if the total Clausius entropy change were negative, it would be possible to create a system whose sole function is to turn heat into work.
In statistical mechanics, we can dene the entropy as
S = kBln (Boltzmann entropy) (3)
where is the number of microstates compatible with some macroscopic parameters (E ; V ; N ). This form is usually attributed to Boltzmann, although it was Planck who wrote it down in this form for the rst time. We'll call this the Boltzmann entropy since it's on Boltzmann's gravestone. Note that there is no arbitrariness in deciding which states to count in or how to weight them we count all states compatible with the macroscopic parmaters equally, with even
weight. That is part of the denition of S. From S, we extract the temperature as 1 T =^
@S @ E and then integrating over dE = dQ we recover Eq. (2).
Dening S in terms of microstates is useful in that it lets us compute S from a microscopic description of a system. For example, we saw that for a monatomic ideal gas, the Boltzmann entropy is given by
S = NkB
ln V +
ln
mE N
for some constant C. This is an example showing that entropy is a state variable: it depends only on the current state of a system, not how it got there (heat and work are not state variables). Clausius formula assumed entropy was a state variable. With the Boltzmann formula, we can check.
Another way to compute entropy came from considering the number of ways N particles could
be split into m groups of sizes ni. This number is = N! n 1 !nm!. Expanding for large^ ni^ gives
S = ¡kBN
i
filn fi (5)
where fi = n Ni. Since ni = N then
fi = 1 and so fi has the interpretation of a probability: fi are the probabilities of nding a particle picked at random in the group labeled i.
With the factor of kB but without the N , the entropy written in terms of probabilities is called the Gibbs entropy :
S = ¡kB
i
Piln Pi (Gibbs entropy) (6)
If all we do is maximize S at xed N , the prefactor doesn't matter. However, sometimes we care about how S depends on N , in which case we need to get the prefactor right. We'll return to this in Section 3.
All of these ways of thinking about entropy are useful. They are all ways of understanding entropy as disorder : the more microstates there are, the less organized are the particles. A solid has lower entropy than a gas because the molecules are more ordered: the constraints on the positions of the atoms in the solid and limitations on their velocities drastically reduce the number of possible congurations. Entropy as disorder is certainly intuitive, and conforms with common usage: a child playing with blocks will most certainly leave them more disordered than how she found them, so we say she has increased the entropy. There are fewer ways for something to be ordered than disordered.
In the second half of the 20th century, it was realized that a more general and useful way of thinking about entropy than entropy as disorder is entropy as uncertainty. That is, we associate entropy with our ignorance of the system, or our lack of information about what microstate it's in. Entropy as uncertainty makes a lot of unintuitive aspects of the second law of thermodynamics easier to understand. We have already come across this the connection between entropy and information when discussing the principle of molecular chaos the velocities of particles become correlated when they scatter, but over time the information of their correlations disperses over phase space and is lost. A solid has lower entropy than a gas because we have more information about the location of the atoms.
2 Section 1
It may be helpful to see that if we use Gibbs entropy denition that entropy does in fact increase during diusion. For simplicity consider a diusing gas in 1 dimension, with number density n(x; t). By the postulate of equal-a-priori probabilities, the probability of nding a gas molecule at x; t is proportional to the number density P (x; t) / n(x; t). Then the Gibbs entropy is S = ¡c
dxn ln n
for some normalization constant c. Now, the diusing gas satises the diusion equation @n@t = D @
(^2) n @x^2. Using this we nd
dS dt = ¡c
dx
@t [n ln n] = ¡c
dx [1 + ln n] dn dt = ¡cD
dx [1 + ln n]
@x
@x n (7)
Next, we integrate the rst (^) @x@ by parts and drop the boundary terms at x = 1 by assuming that
the density has nite support. This leads to
dS dt
= ¡cD(1 + ln n)
@x
n
¡
1
dx
n
@n @x
We conclude that during diusion the entropy strictly grows with time. It stops growing when @n @x = 0, i.e. when the density is constant, which is the state of maximum entropy. This calculation illustrates that the problem from the beginning of this section was not that the Gibbs entropy wouldn't increase, but rather that imposing constraints on the probabilities based on inaccessible information about past congurations is inconsistent with the postulate of equal a priori probabilities.
Although entropy is a theoretical construction it cannot be directly measured it is nevertheless extremely useful. In fact, entropy can be used to do work. One way to do so is though the entropy of mixing.
Say we have a volume V of helium with N molecules and another volume V of xenon also with N molecules (both monatomic gases) at the same temperature. If we let the gases mix, then each expands from V to 2V. The energy of each is constant so the entropy change of each is (from integrating the discussion of free expansion before or directly from Eq. (4)):
S = NkBln
= NkBln 2 (9)
So we get a total entropy change of
S = 2NkBln 2 (10)
This increase is called the entropy of mixing.
The entropy of mixing is a real thing, and can be used to do work. For example, say we had a vessel with xenon on one side and helium on the other, separated by a semi-permeable membrane that lets helium pass through and not xenon. Say the sides start at the same temperature and pressure. As the helium inevitably diuses through the membrane, it dilutes the helium side lowering its pressure and adds to the pressure on the xenon side. The net eect is that there is pressure on the membrane. This pressure can be used to do work.
The pressure when there is a mixed solution (like salt water) in which the solute (e.g. salt) cannot penetrate a semi-permeable barrier (e.g. skin) is is called osmotic pressure. For example, when you eat a lot of salt, your veins increase salt concentration and pull more water in from your body to compensate, giving you high blood pressure.
4 Section 3
In chemistry and biology, concentration gradients are very important. A concentration gradient means the concentration of some ion, like Na+^ or K+^ is not constant in space. When there is a concentration gradient, the system is not completely homogeneous, so entropy can be increased by entropy of mixing. Only when the concentrations are constant is there no way to increase the entropy more. Concentration gradients are critical for life. Neurons re when the concentration of certain chemicals or ions passes a threshold. If systems always work to eliminate concentration gradients, by maximizing entropy, how do the concentration gradients develop? The answer is work! Cells use energy to produce concentration gradients. There are proteins in the cell wall that work to pump sodium and potassium (or other ions) from areas of low concentration to areas of high concentration.
Figure 1. A cellular pump, present in practically every cell of every living thing. It uses energy in the form of ATP to establish concentration gradients
Another familiar eect due the entropy of mixing is how salt is able to melt ice. The salt draws water out of the ice (i.e. melts it) because saltwater has higher entropy than salt and ice separately. In order to study these physical processes in quantitative detail, we need rst to understand entropy better (this lecture), as well as free energy, chemical potentials, and phase transitions, which are topics for the next few lectures. We'll quantify osmotic pressure and temperature changes due to mixing (like in saltwater) in Lectures 8 and 9.
So entropy of mixing is a real thing, and is very important in physics, chemistry and biology. But it is still a little puzzling. Say instead of two dierent ideal gases, we just have helium. Again we start with two volumes V , N and E each, and remove a partition between them to let them mix. The calculation is identical to the calculation for helium and xenon and we still nd S = 2NkBln 2. What happens if we put the partition back in. We start with helium gas with volume 2 V number 2 N and energy 2 E. Its initial entropy, by Eq. (4) is
Sinit = 2NkB
ln 2 V +
ln
mE N
Now put a partition right down the middle of the gas, splitting it into two equal halves, each with V ; N and E. Then the entropy of the sum of the entropies of the two halves:
Snal = 2
NkB
ln V +
ln
mE N
= Sinit ¡ 2 NkBln 2 (12)
Thus the entropy has gone down, by exactly the entropy of mixing. If we mix the gases entropy goes, up, if we split them entropy goes down. That entropy could go down by simply sticking a partition in a gas seems very strange, and apparently violates the second law of thermodynamics. This is called the Gibbs paradox. There are two parts to resolving the Gibbs paradox. First, we will argue that the states we had been counting were not states of identical molecules like helium, but assumed indistinguishability. So we'll have to correct for this. Second, we should understand why the counting that we have been using, which is indeed counting something , would have entropy apparently go down. The rst question we address now, the second in Section 6.1.
Entropy of mixing 5
It's actually easier to account for the combinatoric factor in a large volume than with L = 2q. In a large volume, there are many more positions than there are particles so we can assume no two particles are in the same state. In fact we have to make this assumption classically, since if there is a reasonable chance that two particles are in the same state we need to know if they are fermions or bosons and use the appropriate quantum statistics (Lecture 10). In a large volume with every particle in a dierent position, we can simply divide by the N! for permuting those positions. This leads to
(q; p) = 2e
3 2 N^1 N!
(qp)^3
4 mE 3 N
2 (13)
This is the same as our old formula but has an extra (^) N^1! in front. The extra factor of N! was introduced by Gibbs. After using Stirling's approximation the entropy S = kBln is
S = NkB
ln
ln
4 mE 3 Nh^2
We have used qp = h (as will be explained in Lecture 10). This is the Sackur-Tetrode equation. Does the extra N! solve Gibbs paradox? For the gas with 2 V ; 2 N and 2 E , Eq. (11) becomes
Sinit = 2NkB
ln
ln
mE N
After splitting into two halves, Eq. (12) becomes
Snal = 2
NkB
ln
ln
mE N
= Sinit (16)
So the entropy is unchanged by adding, or removing the partition. What about the xenon/helium mixture? The gases are independent and do not interact, so each one separately acts just like helium alone. Thus inserting a partition in a helium/xenon mixture has a net eect of S = 0 on each separately and therefore S = 0 total as well. What about the entropy of mixing? Let's start with two separate gases. Using our new formula, the initial entropy is the sum of the two gases' entropies. Each one has volume V , energy E and N. So,
Sinit = 2
NkB
ln
ln
mE N
After letting the gasses mix, each gas goes from V! 2 V but N and E are the same, so we have
Snal = 2
NkB
ln
ln
mE N
= Sinit + 2NkBln 2 (18)
So now, with the N! factor added, we get a result that makes sense: there is only entropy of mixing if the two gases are dierent. Inserting a partition never changes the entropy. Removing a factor of N! from also conveniently changes the general formula for Boltzmann entropy in Eq. (5) to the Gibbs one in Eq. (6):
S = ¡kB
Piln Pi (19)
where Pi = n Ni are the number of particles with the properties of group i.
Note that with the extra factor N! in Eq. (13) entropy has become an extensive quantity. Extensive quantities are those that double when you have twice as much of the same thing. For example, energy E is extensive, as are N and V. The ratio of two extensive, quantities is an intensive property : one that characterizes the stu itself, independent of how much you have. Temperature and pressure and the heat capacity CV are intensive. We also use extrinsic as a synonym for extensive and intrinsic as a synonym for intensive.
Entropy of mixing 7
To see that entropy is extensive, note from the Sackur-Tetrode formula that doubling V ; N and E makes S double. This makes sense from the original deniton if you have two isolated systems with 1 microstates in one (entropy S 1 = kBln 1 ) and 2 microstates in the other (entropy S 2 = kBln 2 ) then the total number of microstates is = 1 2. So
S 12 = S 1 + S 2 (20)
This is true if the systems are truly isolated, whether or not we have the extra factor of N in the formula. It the systems are not isolated, Eq. (20) only works if we specify whether the particles are distinguishable so that we know if we need to add new states (by coarse graining) or if they are indistinguishable so that coarse graining would not add anything new. Getting entropy to be extensive both for distinguishable and indistinguishable particles was what motivated Gibbs to add the N! to. The N! is associated with indistinguishable particles. We can also see the extensive property from the denition of Gibbs entropy in terms of prob- abilities, in Eq. (6). Say we have two systems A and B with probabilities PiA^ and PjB. Then the Gibbs entropy of the combined system is
SAB = ¡kB
i;j
PiAPjBln(PiAPjB) (21)
=¡kB
i
PiA
j
PjBln(PjB) ¡
j
PjB
i
PiAln(PiA) (22)
So Gibbs entropy is an extensive quantity. If we had used the formula with the extra factor of N , Eq. (5), we would have found SAB =/ SA + SB. To be clear, indistinguishability just means we can't think of any way to tell them apart. There is a quantum denition of indistinguishability for identical particles. We're not talking about that. We're just talking about whether we can think up a device to distinguish all of the N 1024 helium molecules from each other. Recall that to do work using the entropy of mixing, we need something like a semipermeable membrane that lets one type of thing through and no the other. Perhaps we could tell a He^4 isotope from a He^3 isotope. An entropy denition that can tell them apart would dier from one that says they are distinguishable by 2!, which hardly matters. You are never going to be able to pick out each of the 10^24 individual He atoms in a gas, so the N! is essential classically or quantum mechanically. In a metal, on the other hand, you can tell where each atom is, so the atoms in a solid should be treated as distinguishable, even if they are identical elements (like in solid gold). We'll talk about metals in Lecture 13. It's worth adding that extensivity is a convenient property for entropy to have, but it is not guaranteed by any of the denitions of entropy. Indeed, in some systems, such as stars, entropy is not extensive due to long-range forces (gravity). With long-range interactions when you double the amount of stu, the system can be qualitatively dierent (a star not much smaller than the sun would not be hot enough to burn hydrogen, see Lecture 15). With that caveat in mind, for the vast majority of systems we consider, where interactions are local (nearest neighbor or contact interactions), entropy will be extensive and we can exploit that property to simplify many formulae and calculations.
Since distinguishability is an important and confusing topic, let's do an example of mixing and unmixing in full detail, with three dierent assumptions
In all cases, we star with a volume V of each, then let them mix, then put a partition in to separate them.
8 Section 3
Next, we introduce the concept of information entropy, as proposed by Claude Shannon in 1948. We'll start by discussing information entropy in the context of computation, as it was originally introduced, and then connect it back to physics once we understand what it is. Consider the problem of data compression: we have a certain type of data and want to compress it into as small a le as possible. How good is a compression algorithm? Of course if we have two algorithms, say .jpg and .gif, and some data, say a picture of a cat, then can just compress the data with the algorithms and see which is smaller. But it may turn out that for one picture of a cat the jpeg comes out smaller, and for another, the gif is smaller. Then which is better? Is it possible to make an algorithm better than either? What is the absolute best an algorithm can do? If you want lossless compression , so that the data can always be restored exactly from the compressed le, then it is impossible for any algorithm to compress all data. This follows from the pigeonhole principle: you can't put m pigeons in n holes if n < m without some hole having more than one pigeon. So you can't compress every data le. But that's ok. Most data les have some structure. For example, images often have similar colors next to each other. This leads to the idea of run-length- encoding: instead of giving all the colors as separate bytes, encode the information in pairs of byes: the rst byte in the pair gives the color and the second byte gives the number of pixels of that color. Run-length-encoding was used in early versions of .gif compression. It will compress almost all pictures. But if you give it white noise, where neighboring pixels are uncorrelated, then the compressed le will be bigger than the original. Another feature in image data is that it often has smooth features separated by relatively sharp edges. Thus taking a discrete Fourier transform becomes ecient, since high frequency modes are often absent in images. jpeg compression is based on discrete Fourier transforms. Again, white noise images will not compress because their Fourier transforms are not simpler than the original images.
For data that is text, the information is a sequence of letters. Dierent letters appear in a typical text with dierent frequencies. The standard way to write uncompressed text as numbers is with the ASCII code (American Standard Code for Information Interchange). In ASCII every letter is assigned a number from 0 to 127 which takes up 7 bits. For example, the ASCII code for e is 101 and the ASCII code for & is 38. There is an extended ASCII code as well, with 8 bits, allowing for letters such as ä which is 228. Since e is much more common than & it should be possible to eciently compress text, allowing for random sequences of symbols not to compress well. Here is a table of the probability of getting a given letter in some English text:
Figure 3. Probabilities of nding dierent letters in English text.
For example, if you open a book and pick a letter at random, 12.7% of the time the letter you pick will be e and only 0.1% of the time it will be q. Exploiting these frequencies, a good compression algorithm would nd a way to use fewer bits for e and more bits for q. What is the minimal number of bits you need to encode a given type of data? Shannon's answer was
H = minimial #bits = ¡
i
Pilog 2 Pi (26)
This quantity H is called the Shannon entropy or information entropy. (You may recognize this H as the same as Boltzmann's H with loge replaced by log 2 .) Shannon proved that you can't ever encode data with fewer than H bits, on average. This is known as the source coding theorem.
10 Section 4
For example, with the letter sequences above we nd
H = ¡[0.127 log 2 0.127 + 0.091 log 2 0.091 + + 0.001 log 2 0.001] = 4.17 (27)
This means the best we can possibly do is to represent each letter with 4.17 bits, on average. Having a non-integer number of bits it is not a problem; it just means that you could encode 100 characters with 417 bits and so on (see coin example below). Note that 4.17 is better than the 7 bits in ASCII. Of course, we don't need 7 bits to represent 26 letters, but a naive encoding would use 5 bits (so 25 = 32 characters), so since H = 4.17 < 5 this says you can do than better than 5 bits. Since we are considering non-integer bits, you might say we should use log 226 = 4.7 bits. Indeed, the 4.7 bits is exactly what Shannon entropy would say is the best encoding if the probabilities of nding each letter were equal: Pi = 261. That is
Hequal = ¡
i=
26 1 26 log 2
= log 226 = 4.7 (28)
That reason that we can use only 4.17 bits on average instead of 4.7 is because the probabilities are not equal. A better algorithm uses this extra information. Shannon also noted that in text, letters aren't randomly distributed with probabilities but form words. Using words rather than letters, in his 1948 paper Shannon estimated that H 2.62/letter for the entropy of English text. That is, it only takes 2.62 bits/letter to encode words. If a letter is given one byte (8 bits) in extended ASCII, this says that the maximal compression you could get is a compression factor of 8 2.62 =^ 3.05. The Hutter prize is a 50,000¿ competition to compress a 100MB snapshot of Wikipedia. The current record is 16 MB. For each 1% improvement you get 1,000¿. Note that already the compres- sion factor is 10016 = 6.25 so that each character is represented by (^8) 6.25^ bits = 1.28 bits. This is already much better than Shannon's original estimate. The improvement implies that Shannon's estimate of H is o, probably because he did not use all the information about the regularity of English text (for example, sentence structure); perhaps also Wikipedia articles are not typical text.
The source coding theorem doesn't tell you how to maximally compress the data, just what the maximal compression rate is. Let's think a little about what an optimal compression algorithm might look like. This should give us a better feel for Shannon entropy. Frist, we'll take some limits. If all the probabilities are equal with Pi = (^) N^1 then
i
log 2
= log 2 N (29)
This is just the number of bits to encode N letters. I.e. if N = 32, it takes 5 bits, if N = 64 it takes 6 bits and so on. If one of the probabilities is zero, then the eect on H is limP! 0 P ln P = 0. So adding something else to the data that never occurs does not aect the entropy. Conversely, if the data is completely uniform, so P = 1 for some character, then H = ¡ 1 log 2 1 = 0. So it takes zero bits to encode a completely determined sequence. Say we have a fair coin with 50% heads and 50% tails probabilities. Then
log 2
log 2
So it takes one bit to encode each ip. This is the best we can do. If the coin has 2 heads and no tails, then H = 0: we know it will always be heads. Now let's look at a more complicated example. Say the coin is weighted so it is 90% likely to get heads and 10% likely to get tails. Then we nd that
H = ¡(0.9log 2 0.9 + 0.1log 2 0.1) = 0.468 (31)
Information entropy 11
In information theory, the Shannon entropy is 0 if the coins are always heads. That is because we know exactly what will come next a head so our uncertainty is zero. If the coin is fair and half the time gives heads and half the time tails, then H = 1: we are maximally ignorant. We know nothing about what happens next. If the coin is unfair, 90% chance of heads, then we have a pretty good sense of what will happen next, but are still a little uncertain. If we know the data ahead of time (or the sequence of ips), we can write a simple code to compress it: 1 = the data. So there is no ignorance in that case, as with knowing the position of the gas molecules. With the uncertainty idea in mind, we can make more direct connections between information theory and thermodynamics.
The easiest way to connect information entropy to thermodynamic entropy is simply by inter- preting microstates, and their associated probabilities, as the data. In general, suppose that the probability of nding a system in a given microstate is Pi. Then we can compute a thermodynamic
entropy by multiplying the information entropy by a constant (recalling the relation ln ln^ x 2 = log 2 x)
kB(ln2)H = ¡kBln 2
i
Pilog 2 Pi = ¡kB
i
Piln Pi = S (36)
This is the Gibbs entropy from Eq. (6). Note that from the information theory point of view, the bits are necessarily indistinguishable (if a bit had a label, it would take more than one bit!), so it makes sense that the information entropy leads to Gibbs entropy. What values of Pi will maximize S? Given no other information of constraints on Pi, the postulate of equal a priori probabilities (or the principle of maximum entropy) gives that the
probability of a microstate i is Pi = 1 with the total number of microstates. In terms of information theory, if the Pi are equal, it means that the data is totally random: there is equal probability of nding any symbol. Thus there should be no way to compress the data at all. The data can be compressed only if there is some more information in the probabilities. So the minimal information leads to the maximum entropy. With Pi = 1 the entropy is
j =
kB
ln
= kBln (37)
which is of course the original Boltzmann entropy formula in Eq. (3). For another connection, consider the free expansion of a gas from a volume V to a volume 2 V. The change in entropy is S = kBN ln 2 or equivalently, H = (^) kB^1 ln 2 S = N. So the number
of bits we need to specify the system has gone up by N. But that's exactly what we should have expected: each bit says which of the 2V volumes each particle is in, so we need N more bits to specify the system.
We made an abstract connection between Gibbs entropy and information entropy. Actually, the connection is not just formal, they are actually the same thing. To see this, we need a little bit of the physics of computation. A key observation was made by Landauer in 1961. Landauer was interested in making powerful computers that used as little energy as possible. How little energy could they use? He considered a model of a bit with a (classical) double well. A ball on the left was 0 and a ball on the right was 1.
Figure 4. A model of information storage where a ball on the left is 0 and a ball on the right is 1.
Information entropy to thermodynamic entropy 13
The rst question is whether we can change the bit from 0 to 1 without using any energy. It seems that the answer is yes. For example, we could hook a line to the ball and tie it to a counterweight ball rolling down a hill with the opposite potential energy so that no work is done:
Figure 5. Hooking a pulley to the bit, we can move it from 1 to 0 without doing any work.
We just have to give the ball an innitesimal nudge and it will roll across, then another innitesimal nudge will stop it. So no energy is needed to ip this bit. This action is adiabatic and reversible, and can be also used to set 0 to 1 by running in reverse.
So if the bit is 0 it takes no energy to set it to 0 and if the bit is 1 it takes no energy to set it to 0. But what if we don't know what state the bit is in? Here's where it gets interesting. Suppose you had some automated mechanism for SetToZero to take the bit from 1 or 0 to 0. This is the kind of operation computers need to do all the time. Can we use our pulley gizmo to do it? The answer is no. In fact, the answer is no for any gizmo and any way of representing a bit. The reason as that we are just using Newton's laws, which are time-reversible. So if whatever action we do must be some some kind of 1-to-1 invertible function F acting on the position and momenta of the stu in the bit. If phase space point (~qi^0 ; p~i^0 ) represents 0 and point (~qi^1 ; p~i^1 ) represents 1, then we want F (~qi^0 ; p~i^0 ) = (~qi^1 ; p~i^1 ) and F (~qi^0 ; p~i^0 ) = (~qi^0 ; p~i^0 ). But this is impossible if F is invertible. This argument is very rigorous and holds even in quantum mechanics, since the Schrödinger equation can also be run backwards in time.
Now, computers are very good at SetToZero. How do they do it? If we are allowed to dissipate energy, it's easy. For example, if there is friction in our double well system, then SetToZero could be swing a mallet on the 1 side with enough energy to knock a ball over the hill. If there is no ball on the 1 side, the this does nothing 0! 0. If there is a ball on the 1 side, it will go over to 0 and then settle down to the minimum due to friction, 1! 0. Note that without friction this wouldn't work, since the ball would come back to 1. In a real computer, the information might be stored in the spin of a magnet on a magnetic tape. Applying a eld to ip the bit would release energy if it ips which would then dissipate as heat. No matter how you cut it, we nd
Landauer's principle : erasing information requires energy be dissipated as heat.
Erasing information is an essential step in computation. Every time we store information, we erase the information that was previously there. But is the erasing, the throwing out of information, that dissipates heat, not the storing of information. That was Landauer's critical insight.
The key element to showing that SetToZero on an unknown bit is impossible without dissipation was reversibility of the laws of physics. Erasing information cannot be done with a reversible process. Thus thermodynamic entropy increases when information is thrown out.
To be absolutely clear, strictly speaking the information is not really lost. The laws of physics are still reversible, even with friction, so the nal state could be run backwards to get the initial state. The nal state however requires not just knowing the bit we are interested in, but all the positions and momenta of all the particles carrying o the heat. If we only record the bit, we are averaging over all possible states of the other stu. It is in that averaging, that purposeful forgetting, where the information is actually lost. Dissipation into thermal energy implies this purposeful forgetting. Coarse graining erases information.
14 Section 5
or equivalently
H = 1 (39)
The information entropy goes up by one bit because we have lost one bit of information the position of the molecule.
We're now ready to tackle the most famous paradox about entropy, invented by Maxwell in 1867. Suppose we have a gas of helium and xenon, all mixed together in a box. Now say a little demon is sitting by a little shutter between the two sides of the box. When he sees a helium molecule come in from the right, he opens a little door and lets it go left. But when it's a xenon molecule coming in from the right, he doesn't open the door.
Figure 8. Fig 2: Maxwell's demon lets helium through, but not xenon
After a while, enough helium will be on the left that it will increase the pressure and this can be used to do work. The demon has made the system more ordered and the entropy has gone down. Your rst thought might be that the resolution to this puzzle has to do with identical particles. But this is not true. The paradox holds for pure helium. If the demon lets helium molecules go left and not right, the entropy would go down. Moving the door up and down doesn't take any work (it can be moved with an arbitrarily small push, and moreover the work can be completely recovered by stopping it), yet when the helium gets concentrated on one side it will exert a pressure on the barrier that can be used to do work. So this little demon is converting heat directly into work at constant temperature. In Maxwell's original formulation, the demon would only let the fastest molecules through one way and the slow ones the other way, so that the temperature dierence of the two sides would increase. These are all dierent ways of saying the second law of thermodynamics is violated. The demon doesn't have to be alive either. A robot could do his job, governed by the laws of physics. You just have to program him to tell xenon from helium or fast from slow. So conscious- ness doesn't have anything to do with it (although people sometimes like to say it does). For a mechanical example, say you had a little door with a very weak spring on it that only opens one way. If a molecule hits it from the left it will open and let the molecule through, but will not open when hit form the right (do you think this would really work?). Maxwell's demon has exasperated generations of physicists, for over 100 years. In the 1920s the great physicists Szilard and Brillouin argued that it must take the robot some energy to nd out which way the gas is going. The robot must shine light at least one photon of light on the molecule or something equivalent. The energy of this photon will then dissipate as heat increasing the entropy, so the total entropy of the demon/gas system would not go down. While it is true that doing the measurement with light does use energy and increase the entropy, it is possible to make a measurement using an arbitrarily small amount of energy, for example with an arbitrarily low frequency photon. The correct resolution to Maxwell's demon is that somewhere in the process of letting the molecules pass through from left to right, the robot has to ask: is the molecule on the left? He must store the answer to this question in some variable in his program, somewhere. So he must set a bit, using the SetToZero operation. This operation takes work, at least as much work as we get out from moving the molecule to the right side. In terms of information, we gain one bit of information by identifying the particle as left/right, xenon/helium or fast/slow. But we also erase one bit of information by using SetToZero, sending heat into the surrounds. So the net eect is S = 0. Entropy does not go down and there is no contradiction with the second law.
16 Section 6
You might instead suppose that we knew the bit on our tape was 0 to begin with. Then recording the position of the molecule with 0! 0 or 0! 1 does not require heat dissipation. In this case, it seems that Maxwell's demon does violate the second law. Note, however, that as we write the (random) locations of the molecules to our tape, our tape randomizes. So we are just moving the disorder from our gas into the disorder of the tape. In other words, Sgas = ¡Stape so the net entropy increase is still zero. Moreover. if we only have a nite sized tape then after a nite number of measurements we must start irreversibly erasing information. As soon as we do this, work is done, heat is dissipated, and the entropy of the surroundings increases. This thought experiment also claries why information entropy really is entropy. If we had a nite size tape of 0's, then Maxwell's demon could indeed make a nite amount of heat ow from a hot bath to cold bath. As Bennett puts it, a tape of 0's has fuel value that can be used to do work. So we must include the specication of this tape as part of the denition of the system. If we do so, then the entropy never decreases at any step, it just moves from the disorder of the molecules in the box to the disorder of the information on the tape. Thus the entropy for which S > 0 is strictly true should include both thermodynamic and information theoretic entropy. In this way Maxwell's demon was resolved by Bennett in 1982. after 115 years of confusion. As Feynman says in his Lectures on Computation (p. 150)
This realization that it is the erasure of information, and not measurement, that is the source of entropy generation in the computational process, was a major breakthrough in the study of reversible computation.
Having understood Maxwell's demon, we are now prepared to return to the Gibbs paradox for distinguishable particles. If we have a gas of entirely dierently colored balls and partition it, as
discussed in Section 3.4, the entropy does not go down because there are
2 N N
ways of picking
which half of the balls end up on the right and which half on the left. An objection to this is that once we partition the set, we can just look and see which half went where. If only one of the
2 N N
choices is made, then the entropy would go down by Ssys = ¡NkBln 2 , an apparent contradiction with the second law. Now that we understand information entropy, we know to ask how we knew which balls were on which side? To nd out, we have to look at the color of each ball. Equivalently, we have to measure for each ball which side it's on. Each such measurement must SetToZero some bit in whatever we're using to do the measurement. The entropy consumed by this measurement is exactly the entropy lost by the system. This conrms that a system of distinguishable particles is perfectly consistent and does not lead to violations of the second law of thermodynamics.
This section requires some advanced appreciation of quantum mechanics. It's not a required part of the course, but some students might nd this discussion interesting. In quantum mechanics, distinguishability takes a more fundamental role, as does measurement. Thus, naturally, there are additional ways to quantify entropy in quantum mechanics. These all involve the density matrix . Recall that in quantum mechanics, the states of the system are linear combinations of elements j i of a Hilbert space. You may know exactly what state a system is in, in which case we say that the system is in a pure state j i. Alternatively, you may only know the probabilities Pi that the system is in the state j (^) ii. In such situations, we say that the system is in a mixed state (technically, a mixed ensemble of states). The density matrix is dened as
=
Pj j (^) j ih (^) j j (40)
The von Neumann entropy is dened as S = ¡kBTr[ln] (41)
Quantum mechanical entropy (optional) 17
We can think of the whole universe as being described by a single wavefunction evolving in time. It's a pure state with entropy zero. Everything is entangled with everything else. As it becomes practically impossible to exploit that entanglement, exactly like it was impossible to exploit the correlations among scattered molecules classically, we coarse grain. Coarse graining in quantum mechanics means tracing over unmeasurable components. This increases the entropy and moreover turns a pure state into a mixed state. In this way, classical probabilities emerge from a completely deterministic quantum system. In summary, von Neumann entropy lets us understand both the information loss by measure- ment and by losing entanglement. Entanglement is the quantum analog of correlations in a classical system. Discarding this information is the reason quantum systems become non-deterministic and entropy increases. We don't have to discard the information though. In fact, guring out how to exploit the information stored in entanglement is critical to the function of quantum computers.
This section will be hard to follow if you don't know any general relativity. It's not a required part of the course, but some students might nd this discussion interesting. Using general relativity, you can prove some interesting results about black holes. General relativity is described by Einstein's equations, which are like a non-linear version of Maxwell's equations. Instead of @F = J we have
R ¡
Rg = T (52)
The right-hand side of this equation, T is the energy-momentum tensor, which is the source for gravitational radiation like the current J is the source for electromagnetic radiation. The object R is called the Ricci curvature, it is constructed by taking 2 derivatives on the metric g in various combinations: R = @@ g + @g @ g + . So g plays the role that the vector
potential A plays in Maxwell's equations where F = @A ¡ @A. If we set J = 0, there is a spherically-symmetric static solution to Maxwell's equations, A 0 = e 4 0 r and^ A ~ (^) = 0. This is the Coulomb potential. It has one free parameter e. The Coulomb
potential is singular at r = 0 indicating that there is some charge localized there. In fact, this solution corresponds to a current which is zero everywhere but the origin: J~^ = 0 and J 0 = e(~x ). In
Newtonian gravity, the spherically-symmetric static solution is the Newtonian potential = ¡GMr. with G Newton's constant. In general relativity, the spherically-symmetric static solution to Einestin's equations is
g 00 =
rs r
c^2 ; grr =
rs r
; g = r^2 ; g = r^2 sin^2 (53)
and gij = 0 for i =/ j. This solution, called the Schwarzschild solution, describes a black hole. This solution is unique up to a single parameter rs called the Schwarzschild radius. Its uniqueness implies black holes have no hair, meaning that every black hole is identical to an external observer (up to possible conserved charges like electric charge which can be seen through electric eld lines ending at the black hole). Note that the solution is singular not only at r = 0 but also at r = rs. In the non-relativistic limit, general relativity reduces to Newtonian gravity. The precise cor- respondance is that g 00 = 1 + 2. Matching on to = ¡G Mr lets us relate the parameter rs in the solution to the black hole mass M :
rs = 2
c^2
The sphere at r = rs called the event horizon. It turns out that nothing inside the event horizon can ever escape. The size (surface area) of the event horizon is
A = 4rs^2 = 16
c^4
Black hole entropy (optional) 19
Classically, things only fall in to a black hole, so their energy only goes up, and therefore the area of the event horizon only increases. Because the potential is singular on the event horizon, unusual things can happen. One such thing is that due to quantum eld theory the innite potential energy can be turned into kinetic energy, with photons produced that radiate inwards and outwards. Stephen Hawking showed that the spectrum of these photons is identical to a hot gas (a blackbody, to be covered in Lecture 12) at temperature
T = ~c^3 8 GMkB
This Hawking temperature is inversely proportional to the mass: very small black holes are very hot, and very large black holes are cold. This unusual behavior is associated with a negative heat capacity. Indeed, the specic heat of a black hole is
cS =
8 GkB ~c^3
As things fall into a black hole, its mass goes up and its temperature goes down. A solar mass black hole has a temperature T = 10 ¡^8 K. A supermassive black hole, like Sagittarius A?^ in the center of our galaxy is about 1 million solar masses and has T = 10 ¡^14 K. If nothing falls into a black hole, the black hole will completely evaporate due to Hawking radiation in nite time
tevap = 5120
~c^4
As a black hole evaporates, its mass goes down and its temperature goes up. The bigger the black hole, the longer it takes to evaporate. A solar-mass black hole would take 10^74 years to evaporate. An atom-mass black hole would evaporate in 10¡^98 seconds. You probably know that the universe is lled with cosmic microwave background (CMB) radi- ation at a temperature of 3 K. A black hole radiating at this temperature has mass M 3 K = 1022 kg, around the mass of the moon. So black holes less massive than M 3 K will be hotter than the CMB and therefore radiate more energy than they absorb, eventually evaporating. Black holes more massive than M 3 K will be colder than the CMB; these will absorb CMB radiation slowly increasing their mass. But as they increase in mass, their temperature drops further. Thus, although it is possible for a black hole to be in equilibrium with the CMB if it has exactly the right mass, this equilibrium is unstable. This is the typical behavior of systems with negative heat capacity.
Black holes also have entropy. Since (^) @E@S = (^1) T , taking the energy of a black hole as its rest mass, E = Mc^2 the entropy is
S =
dE T
~c
MdM =
~c
c^3 4 ~G
Note that black holes have entropy proportional to their surface area. String theory even provides a way of counting microstates for certain supersymmetric black holes that agrees with this formula. So black holes have entropy, but no hair, and they evaporate in nite time into pure uncorrelated heat. This means that if some data falls into a black hole, it is lost forever. In this way, black holes destroy information and radiate it out as heat, much like Landauer or Bennett's SetToZero operation. There is one important dierence though. When we SetToZero a bit, the information is not destroyed, just lost by being embedded irretrievably in correlations in the heat. We know this because the law of physics are reversible. When a black hole destroys information it really destroys it it cannot be stored in correlations of the outgoing radiation because nothing can get out of a black hole, including information. This is the black hole information paradox. To see this another way, information can fall into a black hole well before the radiation is emitted. Since black holes have no hair, that information cannot be accessed in any way by an external observer. For example, suppose we just through bits of information into a black hole, one by one, at such a rate that the energy input exactly equals the thermal radiation rate. Then the black hole's horizon stays constant so the information must be going out in the radiation. However, this is impossible since once something passes the black hole horizon, it can never aect anything outside the horizon. Thus the information really seems to be lost as it falls into the black hole.
20 Section 8