Back in the early days of quantum mechanics, Einstein cooked up a nice simple little model of the thermodynamics of solids. In this model, the solid is construed simply as a collection of modes in each of which the solid may carry some quanta of energy; the quanta are all the same and are able to move freely among the modes. The modes are thus (implicitly) quantised simple harmonic oscillators of equal frequency.
Each actual atom of the solid is presumed to typically be the sites of a few modes; the archetypical mode being the atom's oscillation in some physical direction, generally giving each atom three modes. However, the modes are assumed to have lives independent of one another without regard to whether they are situated at the same atom.
In particular, it is supposed that the quanta are perpetually being randomly redistributed among the modes. For the sake of definiteness, this random redistribution may be thought of as the modes playing a never-ending game at each turn in which one mode is selected at random; if it has no quanta, nothing happens in this turn; otherwise it loses one quantum which is given to a mode at random. The physical import of this supposition is that the arrangement of quanta among modes is random.
Consider a body with some number, N, of modes and total energy consisting of some number n of quanta, each of some energy e. We can enquire to know how many ways there are to arrange those n quanta among those N modes; call this number of ways W(N,n). When we have just 1 mode, there is only one way to arrange the quanta, no matter what n is; so we know that W(1) = (: 1 ←n :{naturals}). [Aside: W(0) = ({1}::{0}) only allows n = 0.] Suppose, then, that we know W(N-1) and wish to know W(N); chose some particular site among the N; if this site has i quanta, there are W(N-1,n-i) ways to arrange the remaining n-i quanta among the remaining N-1 sites; each value of i from 0 to n is feasible; so we can infer that W(N,n) = sum(: W(N-1,n-i) ←i :n+1). Reversing the order of summation, i.e. substituting j = n-i, this is identically
Now, it happens that there is a standard function of
combinatorics, chose, for which chose(M,m) is the number of distinct subsets of
size m that may be selected from a set of size M; and its value is given by
chose(M,m) = M!/m!/(M-m)! for m from 0 up to M, and zero for m outside that
range. [The function (: n! ←n :) has the name factorial and defined by 0!
= 1, (1+n)! = n!.(1+n) for each natural n. The famous Fibonacci triangle
is a representation of the function here called chose.] Furthermore we have,
for any natural m and M,
Now, chose(M, 0) = 1 for all M; hence when m is 0 we have sum(: chose(i+M,i) ←i :1+m) = chose(M,0) = chose(M+1+m,m). When this is true for some given M and m, we can add chose(M+1+m,m+1) to it to obtain sum(: chose(i+M,i) ←i :2+m) = chose(M+2+m,m+1) and infer that sum(: chose(i+M,i) ←i :1+n) = chose(n+1+M,n) for ever natural n and M.
Now, W(1) = (: 1←n :{naturals}) and chose(n,n) = 1 for all n; so consider any N for which W(N) = (: chose(n+N-1,n) ←n :{naturals}) and consider, for any n,
which is just the formula for W(N) with N replaced by N+1. We can thus infer that W(N,n) = chose(n+N-1,n) gives the number of ways n quanta may be distributed among N sites, for every natural n and N. As a way to eliminate the stray -1 from the formula, it will be convenient to discuss bodies with N+1 modes, for various natural N, rather than with N modes; in any case, this conveniently gets rid of the case of 0 modes, which only admits of 0 quanta (so isn't interesting).
So now suppose we bring two such bodies, with same-sized quanta, into
contact in such a way that quanta are able to pass between them; suppose one
body shares n quanta among N+1 modes and the other shares m quanta among M+1
modes. Transferring i quanta from the former to the latter will give us an
arrangement which allows us chose(n-i+N,n-i).chose(m+i+M,m+i) arrangements; in
so far as this increases with i, we can expect quanta to flow in the indicated
direction; in so far as it decreases with i we can expect quanta to flow the
other way; and if its maximum is attained at i=0 we'll see no heat-flow - the
two bodies were initially at the same temperature
as one another. Now,
Call this F(i) and consider
with heat flowing from the N-body to the M-body if F(1) > F(0), the
other way if F(-1) > F(0) and neither way otherwise. Thus the N-body is
hotter than the M-body if F(1) > F(0) iff M/(m+1) > N/n iff n/N >
(m+1)/M; and the M-body is hotter than the N-body iff F(-1) > F(0) iff m/M
> (n+1)/N. In between, when m/(n+1) ≤ M/N ≤ (m+1)/n, neither is
hotter
. Note that, since (m+1)/M > m/M, when the N-body is hotter
than the M-body, we do have n/N > m/M; but this is not (in itself) a
sufficient condition to imply that the N-body is hotter than the M-body.
Written by Eddy.