Probabilities and Empty Heaps

by Nancy Killia

(Private email between the authors. Reprinted by permission.)

(Editor's Note: See Killia [ 1997] for background information on this topic.)

Hi there Mike! (and Martin, too)

Sorry I missed your presentation at last winter's ArcheoComputing conference in Las Vegas. Hear you made quite a splash. Next time...

Martin recently forwarded your email about yarrow stick algorithm probabilities -- some mumbo jumbo about wanting a second opinion. Well, I reverse engineered the numbers in your message to reconstruct the proof, since there seemed to be some subtle differences with my own numbers. It looks like the differences all boil down to a hidden empty heap problem.

When I factored the fractions you listed, I noticed you assumed a probability of 37/48 for a yang change in the first toss of the sticks, while my analysis used 36/47. The remaining changes also had this off-by-one problem. The discrepancy refers to the case where the full bundle is divided into 2 heaps, left=48 and right=1. After removing a stick from the right pile, the right heap is empty, nada, no sticks, "what heap?" (in the pre-zero days). Counting down the left heap by 4 leaves 4, but what does counting down that empty right heap by 4 produce? I remember you saying the remainder is 0, giving a value of 1+4+0 = 5 = yang for the change.

I've always leaned to the position that this 48-1 case is an illegal operation, no different than 49-0 and 0-49, because it causes a system crash. Certainly you can "randomly divide" the bundle into 48-1, but random division is only one step in the whole program. If you keep in mind that Chinese math at the time had no provisions for calculating with zeros, let alone even imagining the concept, you can see why empty heaps produce ill-ops. When you deplete the lone stick in the right heap and start counting down an empty pile, what sense could they possibly make of this operation? They didn't use the modern remainder function, x%y, where the result is between 0 and y-1. They always used the upper remainder, x%%y, which is between 1 and y. 0%%4 = 4, not 0. The operator should remove 4 lines from the empty pile and place them in the left fingers? This begs the question, since they couldn't even say "0%%4" -- how can you operate on a heap that "isn't there" (again, pre-zero terms)? The program falters here, and while a human throwing sticks may not crash (there's an amusing image for you!), a computer certainly would. And even if it didn't, the sum should be 1+4+4 = 9 = yin instead, technically speaking.

Now, I realize we always have this friendly argument after a few drinks -- ain't bar room metaphysics like that? And the difference in the probabilities between the two paradigms is not numerically significant. And that even talking about the probability of random division is a slippery concept, like debating how many Wise Ones can dance on the head of a pin. But the whole reason for running the yarrow stick algorithm is to produce a hexagram to answer a client's question; random division is NOT an end in itself. What client would pay up if they came for a reading and the answer wasn't a hexagram, but the Blue Screen of Death? That is "beyond the pale" inauspicious!

Oh well, here's to more metaphysics! Catch ya around...