Donald Knuth: Explorations in religion from the “Yoda of silicon valley”

Donald Knuth: Explorations in religion from the “Yoda of silicon valley”

Donald Knuth gained numerous epithets, among them “the world’s greatest computer scientist”, the “father of algorithm analysis”, and “the yoda of silicon valley.” His major work, the multi-volume Art of Computer Programming, was named as one of the top ten physical science monographs of all time. In other works he outlined a liberal, mystical view of Christianity, which nonetheless maintained the central tenets of mainstream Christian belief, and also speculated on issues of freewill, determinism, and miracles in relation to insights from classical computing and quantum computing.

His most noteworthy works on religion are “3:16 – Bible Texts Illuminated”, which gave an analysis of the sixteenth verse of chapter three of every book in the Bible, and “Things a Computer Scientist Rarely Talks About”, which provided transcripts of a lecture series and Q&A sessions on religion which he gave during the autumn of 1997. In the 1997 lecture series Knuth explored what might be termed “quantum theology” which he approached from a computational perspective. This allowed him to address and offer insights and even solutions to tough issues which are as old as Christian theology including freewill, divine foreknowledge, divine intervention, and the problem of evil.

Mysticism – the experience of the felt presence of God – was close to his heart and he explored this in relation to the work of the theologian Paul Tillich. His view of Christianity was liberal. He explored the ways in which scripture could contain errors and inconsistencies, and undergo fraudulent attempts to change its meaning, and held some other religions in high regard as alternative cultural paths to God. But he also held on to strong elements of traditional Christianity: Knuth attends church every Sunday, prays, speaks of messages from God that are sent in inspired manner through the Bible, speaks of Jesus as saviour, of life after death and heaven, and speaks of “God’s wishes” for his own life and work.

The opening lecture of his 1997 series discussed the misrepresentation of religion in the media. Knuth noted that many of his fellow academics appeared to be merely repeating populist views of religion, which were easy to criticise, but which he said bore very little relation to what religion was for him. He also noted that there was a “craving” for a better understanding of the relationship between science and religion, praised recent contributions made to this issue by physicists, biologists, and cosmologists, and stated that computer science could contribute further to exploring this relationship:

 “I’m disturbed by the notions of religion that many of my academic friends have: but I understand that their notions have been formed quite naturally, in relation to the things that they see in the media… My colleagues conception of faith had largely been formed by ‘televangelists’, who would do things like foretell the future… Most of my university friends had no conception of what God meant to me and to my friends at church.”

He estimated that only 5-10% of his colleagues in computer science believed in God (a field that is known to be among the most unreligious of all academic fields), but said he was surprised, on the publication of 3:16, that the overwhelming reaction among his colleagues who read it was one of interest, curiosity, and gratitude.

As for the theological content of the lectures, Knuth arguably addresses many classic theological questions better than any of the others I have sampled. This is generally achieved through a combination of points taken from research into quantum processes and quantum computing, applied to old but recurring theological questions.

Mysticism and religious experiences

Knuth developed a liberal form of Christianity but still maintained the central ideas of the religion. In a Q&A session at the end of the sixth lecture of the 1997 series a student asked whether or not God was material, and Knuth replied that God exists “in another dimension, I think, orthogonal to physics.” He went on to say that this meant that God would probably never be describable by physics. In contrast to speculative theories in physics, which posit extra-dimensions as the cause of the universe, Knuth says that there is evidence of God available in the world. For Knuth one of the sources of evidence of God is the felt presence of God in the life of those who build up a relationship with God.

He also noted that people seem to know instinctively when they are encountering God, without ever being able to perfectly define such encounters, much as we laugh instinctively without being able to adequately define humour to someone who had never experienced it. He quoted Peter Gomes, who said we experience “close encounters of the transcendent kind that suggest relationships beyond the power of our experience to reckon, but which we know in some fundamental way to be true.”


Above: A slide from Knuth’s book, 3:16, in which a letter to Timothy proclaims the mystery of Christianity. In fact Knuth may have shed some theoretical light on some mysterious aspects of Christianity in his other religious book, Things a Computer Scientist Rarely Talks About, by approaching theology from the perspective of quantum computing.


The theologian Tillich was also influential. Knuth said that Tillich “gave an excellent description of how I sometimes feel deep down”. He quoted the following passage from Tillich: “eternal life is a present gift: He who listens to Christ has eternity already. He is no longer subject to the driving of time.” In another passage, he explained further, that “Suddenly we are grasped by a peace which is above reason, that is, above theoretical seeking for the true, and above our practical striving for the good. … We know that now, in this moment, we are in the good, in spite of all our weakness and evil.”

Tillich’s understanding of the Gospel of John was influential for Knuth’s own translation of John 3:16. This is one of the best known verses in the Bible and is usually translated in an otherworldly fashion, referring to an eternal life in a world beyond:

“For God so loved the world

that he gave his only Son,

that whoever believes in him

shall not perish but have eternal life.”

Knuth believed that a better translation emphasised the ever-present nature of eternal life, as well as the future nature. Following the Christian path leads to a fuller life now, as well as in the future. This was his preferred translation:

“Yes, this is how God loved the world:

He gave his only child;

So that all people with faith in him can

escape destruction and live a full life;

Now and forever.”

Knuth clarifies what this fuller life is actually like: “The idea that you can be living in eternal life today, and that its an on-going process – essentially a timeless thing – is really what the fourth gospel means by the phrase ‘eternal life.’ ” This fuller life is the life which Tillich has described, the life of the mystic. Eternal life was something that already existed in this world. The eternity of heaven was already present in our lives and an encounter with this intense spiritual presence was possible. Knuth spoke of heaven as a place existing after death, but said that for 20 years he had been more motivated by experiences of the divine in this life, and the fullness it brought.

The stance of Tillich, along with other Christian mystics, is actually entirely consistent with classical theology it is just not particularly well known. In Catholic thought God is both immanent and transcendent meaning that God is present or immanent in the world as well as completely beyond the world or transcendent to it. In Eastern Orthodox thought this is termed panentheism, meaning that God is present in everything in space and time, but also exists outside of space and time as well. The timeless, eternal attributes of God in classical theology are therefore also present in the everyday world which we experience.

It is perhaps not surprising given his emphasis on experience that Knuth was not married to a rigid reading of the text of the Bible and formed a liberal view of Christianity. For Knuth the Bible is the word of God, but this means that it contains messages from God, and not that everything it contains actually happened. Just as Jesus taught in parables which contained messages, so does God in his word. Knuth reported having experiences of what seemed to be a muse (spiritual guide) when writing his book “Surreal Numbers”, and thought that something similar may have been at work in the Bible. God influenced its writing, its general theme, its messages, but did not dictate every word. He also believed that the spiritual texts of some other religions had also often been inspired by God. In summing up his experiences with Bible studies he commented:

“The 3:16 project helped me to understand the complexity of religious studies, that these things are not simply black or white. I became much less dogmatic about such issues. I began to learn about other religions and to see that God need not exclusively be identified with the Christian dogma. At the same time many aspects of Christianity became more precious to me, more deeply a source of inner peace, although I no longer considered them to be the necessary and sufficient way to approach God.”

But this was definitely not an extreme modernism which would write supernatural elements out of Christianity and make use of it simply for moral guidance. The essential tenants of the belief system are maintained and Knuth would certainly find a high degree of commonality with the beliefs and behaviours of typical church-goers from around the world. In any case he stated that having finished the project he had “come through with what I felt was a strong enough faith to get me through the rest of my life, this gave me a confidence that I couldn’t have had before I did the experiment.”

One of Knuth’s reasons for interpreting the Bible liberally was difficulty in pinning down what it actually said. He noted that Bible translations usually have notes to the text in various places which say things like “some manuscripts read…” or “Hebrew obscure.” In any one translation there are not a huge number of these, which gives the impression that there are not a huge number of ambiguities in the Bible. But the different translations all have these kind of notes in different places and given the large number of translations, when they are considered together, this does amount to a large number of ambiguities. He also noted that for each translation the verses that were flagged as ambiguous are only verses that a translator had been unable to resolve. Many other verses will have had ambiguities that the translator made a decision on, but were likely not certain. In fact “almost every verse of the Bible has textual problems, where the scholars who collated these manuscripts have had to make a call on what readings are original.”

The book is also noteworthy for his use of scientific methods to shred some religious ideas. He is against populist views of religion, and found them unhelpful, even damaging. For example, he shreds certain theories that codes can be found in the Bible, reminding us that similar prophecies can be derived from the Microsoft Access Developers Tool Kit!

Quantum mechanics and theology

Knuth made use of ideas from computer science and quantum mechanics in order to outline a modern Christian theology. Its main points were as follows. God cannot know everything in advance. In fact, God may have deliberately created a universe in which he cannot know everything in advance. God can have all possible knowledge but still not know everything that happens in advance, just the probabilities of events happening. God can have an influence over which of the possible branches of events actually occur (he can influence what happens, and work “miracles”). Moreover, we, being images of God, can also influence what happens and this is how free will is possible. Our choices bring one branch of events or another into being.

He prefaced these ideas with comments about the relationship between computer science and theology and the unique insight that computer programmers may have, which are worth repeating:

“I think its fair to say that many of today’s large computer programs rank among the most complex intellectual achievements of all time. They’re absolutely trivial by comparison with any of the works of God, but they’re still somehow closer to those works than anything else we know… I think people who write programs do have at least a glimmer of extra insight into the  nature of God for that very reason, because creating a program often means that you have to create a small universe.”

He then introduced the British mathematician John Conway’s Game of Life. The Game of Life is a simulation of the evolution of “life forms” using a two dimensional grid of squares which represent cells. Each cell “lives” or “dies” from one moment to the next depending on a simple set of rules. If a cell has less than two neighbouring cells at any one time it dies (by underpopulation). Cells with more than three neighbours die (by overcrowding). Cells are born when they have exactly three neighbours, and continue to live if they have two or three neighbours. From a random initial configuration, known as the “seed”, the game will then play out to create an “evolving universe” of simulated life.


Above: Detail from a rendering of Conway’s Game of Life simulation. Unlike a real universe in which outcomes are probabilistic, a Game of Life simulation is entirely deterministic. A being with perfect computational power could know the outcome at any iteration from any starting condition in advance.


Knuth notes that the model is deterministic and hence in a sense all possible scenarios for the game already exist. For example, we could work out that the number one million and one would come after the number one million without having to count all the way up. A similar thing applies with the iterations of the Game of Life. With perfect knowledge we could know the outcomes of any iteration of the game from any set of initial starting conditions before they happened and so we would not have to run the model.

But the real universe does not work like this because it is not deterministic. Outcomes in real universes are probabilities not certainties. Given the same starting conditions, outcomes in the Game of Life will always be the same. But in the real universe the same starting conditions will give different outcomes on different runs because state changes in the system are matters of probability.

When Newton’s thought dominated physics the universe was believed to be deterministic. It was thought that any outcome could be known in advance given perfect knowledge of starting conditions, perfect knowledge of the laws of physics, and unlimited computational power. The same determinism was maintained in the relativistic worldview which Albert Einstein brought to physics, although the laws which governed it were different to those of Newton under certain circumstances. But around the same time another form of physics, the physics of the quanta of energy, known as quantum physics or quantum mechanics, was emerging and this field showed that at the smallest units of operation known in the universe – the collapse of superposition states into subatomic particles with fixed classical states – things were operating according to chance. This meant that the starting conditions of larger scale phenomena could never be known precisely. The effect can be magnified by other larger scale phenomena observed in organic system such as the butterfly effect, resulting in random larger scale outcomes.

A classical computer is actually incapable of generating truly random numbers. Such computers can only generate pseudo random numbers which are really created deterministically by an algorithm. The number that is generated is always entirely predictable if the algorithm is known. But collapse of superposition into classical states is truly random. The resulting states cannot be known in advance and sequences of such truly random events can be used to generate truly random numbers. A quantum computer generates a truly random number by collapsing photons or electrons from superposition states into classical states. This classical state might be the angular momentum of the particle for example (also known as its spin). Repeating this procedure several times will produce a discrete series of binary alternatives. The value of those states can then be used to form bytes, which can correspond to any natural number. The collapse from superposition is a probability, and the state which the system collapses into can never be known in advance, meaning that a truly random number can be created.

Knuth related the random collapse of superposition states to Arthur Peacocke’s suggestion that God can possess all possible knowledge (all knowledge that can be known at a particular time), but cannot have knowledge of things which cannot be known in advance. For example, God might have perfect knowledge of the probabilities of radioactive decay, but no knowledge of how those probabilities actually play out without waiting to see what happened. This weighs heavily on classical theological debates. Does God have foreknowledge of all events, and if so how is free will possible? If God knows how I act in advance, do I have free will? If God doesn’t know, how is God omniscient? Peacocke’s answer was that God knows everything that can be known in advance, but somethings cannot be known in advance, and must be observed as actual instances to see what happens.

The probabilistic universe of quantum operations has restored the possibility of free will. The deterministic universe which Einstein believed in is replaced by a universe whose outcomes cannot be known in advance, even by a being who holds all possible knowledge. God can have all possible knowledge of the probabilities of quantum events but not of the actual outcome of those events. For centuries theologians had wondered how we can be free to make choices if God is omniscient and knows all of our choices in advance. In a universe governed by quantum probabilities even a being with perfect knowledge of the probabilities of outcomes cannot know which outcomes actually occur. The probabilistic universe appears to allow for free will in humans and an omniscient being to coexist.

Knuth also mentioned some relevancies from mathematics. These included Gödel’s incompleteness theorems in which Gödel showed that certain mathematical outcomes could not be known in advance. Turing produced an equivalent of this in computer science known as the halting problem which demonstrated that the answers to certain computational problems cannot be known in advance even in principle, and must be actually run physically on a computational machine to see how they resolve. Once again we see that situations may exist in which an omniscient being might know only the probabilities of outcomes in advance not what actually happens. This, perhaps, was one of the reasons that creation was necessary: the universe had to be run for real in order to see what happened, as the outcomes could not be determined beforehand.


Above: An original figure from the transcript of the lecture series. Branching pathways represent possibilities, determined at the quantum mechanical level. The different outcomes are probabilistic, not deterministic. Even an omniscient being cannot know which outcome actually occurs, only the probabilities of different outcomes. Both God, through miracles, and human beings, through free will, can influence different outcomes.


Moreover, in such a universe creation can “go wrong.” Probabilities can play out to produce low probability negative outcomes like the Fall. God can create a universe with a high probability of a good outcome, but it can still go wrong, due to low probability turns of events at crucial points.

Knuth extends these ideas to suggest that God can also play an active role in interfering with aspects of the universe. The atonement itself would be an example of this. Some have dismissed the idea of the atonement as nonsensical. But it is the nature of true randomness of superposition collapse at the quantum level, and the butterfly effect at macro levels, that very unlikely connections can occur between seemingly disconnected events. An omniscient being would be able to see these connections (or at least their probabilities) and act on them in order to redirect the course of a universe away from a negative path. The sacrifice of a “son” to “save” a universe is one of these extremely improbable connections.

For Knuth, quantum phenomena not only make some things unknowable by God, but God can also influence what happens. God’s will can be felt in the world. God can answer prayers. Miracles can happen. An answered prayer, after all, must be a miracle if God has actively intervened and the positive outcome is not merely coincidental. Not only this, but the act of free will itself is a kind of miracle which he speculates we are all performing with each choice we make. We are acting like mini versions of God, acting in his image, determining which branches of the tree of possible events are actualised. As Knuth summed up:

 “For me the significance of the probabilistic model for quantum theory is that it clearly makes room for free will, and it allows God to exert dynamic control over the world without violating any physical laws… we can think of God as a tree pruner, occasionally influencing the outcome of various branches while simultaneously adjusting the non-observable information behind the scenes so that all observations remain consistent with quantum mechanics. And we ourselves – even us, our spirits or souls or minds or whatever you want to call this part of our being – we might be little tree pruners too, with much more limited and local powers, or course, but still able to exercise freewill in this way.”

Knuth’s views can be summarised as a mixture of traditional Christian theology, more liberal insights from modern Bible studies, personal experience of God and kinship with the mystics, and fairly unique insights into traditional theological problems enabled by his encyclopedic knowledge of computer science and mathematics.