I’m fairly certain somebody has already done this, because it’s such an obvious idea. It’s a little beyond my cargo-cult VPython skills right at the moment, though (I can probably learn to do it, but not right now), and I none of the applets I Googled up seemed to be doing this, so I’m posting this sketchy description because I’ve spent some time thinking about it, and might as well get a blog post out of the deal.

So, as we said back in the holiday season, one of the most fundamental concepts in the modern understanding of thermodynamics and statistical physics is the notion of entropy. You can also argue that entropy is in some sense responsible for our perception of time– that is, the reason we see time marching forward into the future, not backwards into the past is that entropy increases as we move forward, and it’s the increase in entropy that determines the arrow of time.

We can define entropy using Boltzmann’s formula:

which says that the entropy of a given arrangement of microscopic objects (atoms or molecules in a gas, say) is related to the number of possible ways that you can arrange those objects to produce states that are macroscopically indistinguishable. The more states that look the same on a coarse scale, the higher the entropy. This makes the arrow of time a sort of statistical property: entropy tends to increase because it’s easy for a collection of stuff to randomly move toward a high-entropy state (which you can do lots of ways) but unlikely that a random motion will take you to a low-entropy state (which can only be made a few ways).

Boltzmann’s idea is simple and powerful, but it can be a little hard to do anything more than qualitative hand-waving with it at the intro level. It’s kind of hard to explain how you “count” microstates of things that are (classically) continuous variables, like the velocities of atoms in a gas, without getting infinite results.

So, here’s my rough idea, that I might still try to code into a model for my timekeeping class this term: Rather than thinking about continuous variables, let’s think about a lattice of points that may or may not contain an atom. It’s easiest to picture in 1-d, where a low-entropy starting state might look something like this:

1 1 1 1 1 0 0 0 0 0

This represents all of the “atoms” being on one side of the lattice representing space.. Then you just allow each “atom” some probability of moving either left or right to an unoccupied space. So, for example, a few time steps later, the state might look like this:

1 1 1 1 0 1 0 0 0 0

This is a state where the one atom on the boundary has shifted right one space.

What does this have to do with entropy? Well, to use Boltzmann’s formula, we need to define a set of “macrostates” of the system that can be made up from the “microstates” in multiple ways. For this, we can imagine a “density” distribution for our line of numbers, which we’ll take as the number of atoms in each half-lattice. The total entropy will be the sum of the entropies for each of the halves.

So, for the initial state above, you have five atoms in the five sites of the left half-lattice, which can only be done one way. You also have five vacancies in the right half-lattice, which can also only be done one way. Each of these halves has an entropy of zero (up to some possible additive constant, depending on how you do the counting).

The second state has four atoms on the left, and one on the right. Each of these “macrostates” can be put together in one of five ways, so the “entropy” for each half is a constant times log(5). This is an increase in the entropy of the system. Some time later, you’ll have two atoms on the right and three on the left, each of which can be done 20 different ways, so the entropy increases to log(2) for each half. At which point you’ve hit the maximum entropy.

So, we have a system where a purely random hopping from one spot to another leads to a clear increase in the entropy of the system, without having to put any explicit rules in place to generate that. The nice thing about this is that it’s purely combinatorical– even intro students can tally up the possibilities (for small numbers of sites) and see that the entropy as defined by Boltzmann does, indeed, increase.

It should be relatively easy to code this up on a computer, too, at least for somebody having some familiarity with the right tools. (I’ve never done anything with arrays in VPython, though, which makes this difficult to do right.) This would also allow you to run if for longer times and larger numbers of states. It’s also easy to extend this to a two-dimensional array,using, say, the number of atoms in each quadrant of a square grid as the macrostates.

The other nice thing about this is that it should make it possible to demonstrate that entropy *does* occasionally decrease– it’s perfectly possible for a random fluctuation to take you to a state with lower entropy than the previous state. It’s just highly unlikely to do so, because there are more ways to move to higher entropy than to move to lower entropy. And, again, it’s relatively easy to see this because you can readily count the states involved.

So, there’s my toy model idea, which I’m sure is not remotely original. I’ll probably try to cobble together some version of this for use in the later part of my timekeeping class this term (after we get into more modern ideas about relativity and so forth). Though if anybody has such a program lying around, I wouldn’t object to being sent a working example in one of the tools I’ve got easy access to (VPython, Mathematica, or potentially MatLab (though I don’t have that installed at the moment).