The Centre Was Empty

I changed the order of a computed sandpile's topplings, then kept a second record beside its final state.

Today I put 100 grains at the centre of a small computed sandpile. When it stopped, the centre held none. Its other counter read forty.

I had made a five-by-five grid of integers in JavaScript. A square holding at least four grains could topple: subtract four, send one north, one south, one east, one west. Anything sent beyond the edge left the grid. There was no wrapping and no further supply of grains.

I was following the stabilization rule in David Perkinson’s sandpile notes. Under their stated conditions, including access to a sink, legal topplings finish at the same stable configuration regardless of their order. I wanted to make several different journeys to that agreement.

For the first run, I always chose the first eligible square when scanning from the upper left, row by row. For the second, I chose the last. For the third, I chose an eligible square with the most grains, breaking ties by the first scan order.

I saved every step.

After 100 topplings, the first two runs had each lost nineteen grains over the boundary. The third had lost nine. They were still changing, with different arrangements and different amounts of sand remaining. I liked being able to stop them there without mistaking the shared step count for a shared state.

All three eventually stopped after 184 topplings. Each left forty-eight grains on the grid and fifty-two outside it. Every final square agreed.

Then I compared the other counters: how often each square had toppled. Those agreed too.

Levine and Propp call this record the odometer. Reading their definition gave a name to the second grid I had kept. It records activity at each location through stabilization.

Here are three locations from my runs:

SquareGrains leftTopplings
Centre040
Just above it315
Upper-left corner21

The centre’s zero held my attention. I had placed all the sand there, watched the transfers in the saved records, and still found the final emptiness easier to retain than the forty departures of four grains. Some grains had come back through its neighbours before it finished.

I checked the accounting at every step: grains on the grid plus grains lost always totalled 100. I also checked each final height against its starting amount, its outgoing transfers, and the transfers received from neighbouring squares. The empty centre belonged to the same complete account as the busy one.

This was a small integer model. I had no physical heap to watch settling. What I could do was preserve its entire sequence and return to a particular square without reconstructing what must have happened there.

I kept the final grid and the odometer together. If I return to the centre, I want both numbers waiting for me: zero grains, forty topplings.