reperiendi

Formal axiomatic divination

Posted in Borges, Math, Programming, Time by Mike Stay on 2010 September 1

It’s well known that “in Xanadu did Kublai Khan a stately pleasure dome decree,” but his true legacy is the field of formal axiomatic divination. In 1279, Khan sought an auspicious date on which to begin construction of the palace. He consulted each of his twelve astrologers separately and without warning; unsurprisingly, he received twelve different answers. Khan flew into a rage and said that until the astrologer’s craft was as precise as that of his masons and carpenters, they were banished from his presence.

Kublai Khan died in 1294 and his successor Temur Khan was convinced to reinstate the astrologers. Despite this, the young mathematician Zhu Shijie took up the old Khan’s challenge in 1305. Zhu had already completed two enormously influential mathematical texts: Introduction to Mathematical Studies, published in 1299, and True reflections of the four unknowns, published in 1303. This latter work included a table of “the ancient method of powers”, now known as Pascal’s triangle, and Zhu used it extensively in his analysis of polynomials in up to four unknowns.

In turning to the analysis of divination, Zhu naturally focused his attention on the I Ching. The first step in performing an I Ching divination is casting coins or yarrow stalks to construct a series of hexagrams. In 1308, Zhu published his treatise on probability theory, Path of the falling stone. It included an analysis of the probability for generating each hexagram as well as betting strategies for several popular games of chance. Using his techniques, Zhu became quite wealthy and began to travel; it was during this period that he was exposed to the work of the mathematicians in northern China. In the preface to True reflections, Mo Ruo writes that “Zhu Shijie of Yan-shan became famous as a mathematician. He travelled widely for more than twenty years and the number of those who came to be taught by him increased each day.”

Zhu worked for nearly a decade on the subsequent problem, that of interpreting a series of hexagrams. Hexagrams themselves are generated one bit at a time by looking at remainders modulo four of random handfuls of yarrow stalks; the four outcomes either specify the next bit directly or in terms of the previous bit. These latter rules give I Ching its subtitle, The Book of Changes. For mystical reasons, Zhu asserted that the proper interpretation of a series of hexagrams should also be given by a set of changes, but for years he could find no reason to prefer one set of changes to any other. However, in 1316, Zhu wrote to Yang Hui:

“I dreamed that I was summoned to the royal palace. As I stepped upon the threshold, the sun burst forth over the gilded tile; I was blinded and, overcome, I fell to my knees. I lifted my hand to shield my eyes from its brilliance, and the Emperor himself took it and raised me up. To my surprise, he changed his form as I watched; he became so much like me that I thought I was looking in a mirror.

“‘How can this be?’ I cried. He laughed and took the form of a phoenix; I fell back from the flames as he ascended to heaven, then sorrowed as he dove toward the Golden Water River, for the water would surely quench the bird. Yet before reaching the water, he took the form of an eel, dove into the river and swam to the bank; he wriggled ashore, then took the form of a seed, which sank into the earth and grew into a mighty tree. Finally he took his own form again and spoke to me: ‘I rule all things; things above the earth and in the earth and under the earth, land and sea and sky. I can rule all these because I rule myself.’

“I woke and wondered at the singularity of the vision; when my mind reeled in amazement and could stand no more, it retreated to the familiar problem of the tables of changes. It suddenly occurred to me that as the Emperor could take any form, there could be a table of changes that could take the form of any other. Once I had conceived the idea, the implementation was straightforward.”

The rest of the letter has been lost, but Yang Hui described the broad form of the changes in a letter to a friend; the Imperial Changes were a set of changes that we now recognize as a Turing-complete programming language, nearly seven hundred years before Turing. It was a type of register machine similar to Melzak’s model, where seeds were ‘planted’ in pits; the lists of hexagrams generated by the yarrow straws were the programs, and the result of the computation was taken as the interpretation of the casting. Zhu recognized that some programs never stopped–some went into infinite loops, some grew without bound, and some behaved so erratically he couldn’t decide whether they would ever give an interpretation.

Given his fascination with probabilities, it was natural that Zhu would consider the probability that a string of hexagrams had an interpretation. We do not have Zhu’s reasoning, only an excerpt from his conclusion: “The probability that a list of hexagrams has an interpretation is a secret beyond the power of fate to reveal.” It may be that Zhu anticipated Chaitin’s proof of the algorithmic randomness of this probability as well.

All of Zhu’s works were lost soon after they were published; True reflections survived in a corrupted form through Korean (1433 AD) and Japanese (1658 AD) translations and was reintroduced to China only in the nineteenth century. One wonders what the world might have been like had the Imperial Changes been understood and exploited. We suppose it is a secret beyond the power of fate to reveal.

6 Responses

Subscribe to comments with RSS.

  1. Douglas Summers-Stay said, on 2010 September 2 at 3:40 am

    That’s really clever. It might be good to link to the implementation of the algorithms in the bureaucracy of Prince Cheng: http://llamasandmystegosaurus.blogspot.com/2007/05/chinese-room-argument.html

  2. reperiendi said, on 2010 September 2 at 7:04 am

    Absolutely, thanks! That post was part of my inspiration.

  3. Rebecca said, on 2010 September 2 at 2:30 pm

    And I would link it to Moses 6:63. Divination indeed.
    http://scriptures.lds.org/en/moses/6

  4. Gregory Chaitin said, on 2010 September 3 at 3:00 pm

    Fascinating! Where can one find more about this?
    In particular, that crucial letter from Yang Hui to a friend?

    • reperiendi said, on 2010 September 3 at 3:24 pm

      Hello, Greg! Great to see you here.

      > Fascinating! Where can one find more about this? In particular, that crucial letter from Yang Hui to a friend?

      Alas, this is fiction, though I tried hard to make it true-to-life. I noticed that many divination techniques involve randomly sampling a message from some distribution and then coming up with an interpretation of that message, just like the definition of Omega. There are even forms of divination that “time out” when looking for an interpretation and try again (like randomly opening the Bible and pointing at a verse until you find one that applies to your problem or stimulates you to think about things in a new light), so by increasing the time limit, you get computable enumerability. It’s the interpretation where all the bunkum creeps into divination, so I thought it was at least plausible that someone would have tried to formalize that part.

      Zhu Shijie really was a mathematician during the time of Kublai Khan, and really did publish the first two books I mentioned. Yang Hui also lived during the same time period, but it’s unknown if they communicated with each other.

      You can find out more information about these guys by following the links below:
      http://www-history.mcs.st-and.ac.uk/Biographies/Zhu_Shijie.html
      http://www.cultural-china.com/chinaWH/html/en/Kaleidoscope2079bye5163.html
      http://www.cultural-china.com/chinaWH/html/en/Kaleidoscope2079bye5164.html

    • reperiendi said, on 2010 September 3 at 3:28 pm

      And of course, there’s the whole oracular terminology associated with jumps that made the association with divination even stronger.

      By the way, I’m curious: how did you find out about this post? Did Cris forward it to you?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: