0% found this document useful (0 votes)
10 views96 pages

The Notion of Computation: Excerpted From

This chapter discusses the concept of computation as a framework for understanding complex behaviors in systems like cellular automata. It emphasizes the importance of abstraction in analyzing computations performed by these systems, regardless of their underlying rules, and introduces the idea of universality, where a single system can perform various tasks through different programming. The chapter also presents examples of cellular automata that can compute simple and complex functions, illustrating their potential for universal computation.

Uploaded by

zkdcuf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views96 pages

The Notion of Computation: Excerpted From

This chapter discusses the concept of computation as a framework for understanding complex behaviors in systems like cellular automata. It emphasizes the importance of abstraction in analyzing computations performed by these systems, regardless of their underlying rules, and introduces the idea of universality, where a single system can perform various tasks through different programming. The chapter also presents examples of cellular automata that can compute simple and complex functions, illustrating their potential for universal computation.

Uploaded by

zkdcuf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 96

EXCERPTED FROM

CHAPTER 11

The Notion of
Computation
11
The Notion of Computation

Computation as a Framework
In earlier parts of this book we saw many examples of the kinds of
behavior that can be produced by cellular automata and other systems
with simple underlying rules. And in this chapter and the next my goal
is to develop a general framework for thinking about such behavior.
Experience from traditional science might suggest that standard
mathematical analysis should provide the appropriate basis for any such
framework. But as we saw in the previous chapter, such analysis tends to
be useful only when the overall behavior one is studying is fairly simple.
So what can one do when the behavior is more complex?
If traditional science was our only guide, then at this point we
would probably be quite stuck. But my purpose in this book is precisely
to develop a new kind of science that allows progress to be made in
such cases. And in many respects the single most important idea that
underlies this new science is the notion of computation.
Throughout this book I have referred to systems such as cellular
automata as simple computer programs. So now the point is actually to
think of these systems in terms of the computations they can perform.
In a typical case, the initial conditions for a system like a cellular
automaton can be viewed as corresponding to the input to a
computation, while the state of the system after some number of steps
corresponds to the output. And the key idea is then to think in purely

637
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

abstract terms about the computation that is performed, without


necessarily looking at all the details of how it actually works.
Why is such an abstraction useful? The main reason is that it
potentially allows one to discuss in a unified way systems that have
completely different underlying rules. For even though the internal
workings of two systems may have very little in common, the
computations the systems perform may nevertheless be very similar.
And by thinking in terms of such computations, it then becomes
possible to imagine formulating principles that apply to a very wide
variety of different systems—quite independent of the detailed
structure of their underlying rules.

Computations in Cellular Automata


I have said that the evolution of a system like a cellular automaton can
be viewed as a computation. But what kind of computation is it, and
how does it compare to computations that we typically do in practice?
The pictures below show an example of a cellular automaton whose
evolution can be viewed as performing a particular simple computation.
If one starts this cellular automaton with an even number of
black cells, then after a few steps of evolution, no black cells are left.
But if instead one starts it with an odd number of black cells, then a
single black cell survives forever. So in effect this cellular automaton
can be viewed as computing whether a given number is even or odd.

input: 1 2 3 4 5 6 7 8 9 10

output: 1 0 1 0 1 0 1 0 1 0

A simple cellular automaton whose evolution effectively computes the remainder


after division of a number by 2. Starting from a row of n black cells, 0 black cells
survive if n is even, and 1 black cell survives if n is odd. The cellular automaton
follows elementary rule 132, as shown on the left.

638
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

One specifies the input to the computation by setting up an appropriate


number of initial black cells. And then one determines the result of the
computation by looking at how many black cells survive in the end.
Testing whether a number is even or odd is by most measures a
rather simple computation. But one can also get cellular automata to
do more complicated computations. And as an example the pictures
below show a cellular automaton that computes the square of any
number. If one starts say with 5 black squares, then after a certain
number of steps the cellular automaton will produce a block of
exactly 5  5  25 black squares.

input: 2 3 4 5

output: 4 9 16 25

A cellular automaton that computes the square of any number. The cellular automaton effectively works by adding the original
number n together n times. The underlying rule used here involves eight possible colors for each cell.

At first it might seem surprising that a system with the simple


underlying structure of a cellular automaton could ever be made to perform
such a computation. But as we shall see later in this chapter, cellular
automata can in fact perform what are in effect arbitrarily sophisticated
computations. And as one example of a somewhat more sophisticated
computation, the picture on the next page shows a cellular automaton that
computes the successive prime numbers: 2, 3, 5, 7, 11, 13, 17, etc.

639
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

The rule for this cellular automaton is somewhat


complicated—it involves a total of sixteen colors possible for each
cell—but the example demonstrates the point that in principle a
cellular automaton can compute the primes.

23 5 7 11 13 17 19 23 29 31

A cellular automaton constructed to compute the prime numbers. The system generates a dark gray stripe on the left at all positions
that correspond to any product of numbers other than 1. White gaps then remain at positions that correspond to the prime numbers 2,
3, 5, 7, 11, 13, 17, etc. The cellular automaton effectively does its computation using the standard sieve of Eratosthenes method. The
structures on the right bounce backwards and forwards with repetition periods corresponding to successive odd numbers. Once in each
period they produce a gray stripe which propagates to the left, so that in the end there is a gray stripe corresponding to every multiple of
every number. The rule for the cellular automaton shown here involves 16 possible colors for each cell.

640
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

So what about the cellular automata that we discussed earlier in


this book? What kinds of computations can they perform?
At some level, any cellular automaton—or for that matter, any
system whatsoever—can be viewed as performing a computation that
determines what its future behavior will be.
But for the cellular automata that I have discussed in this section,
it so happens that the computations they perform can also conveniently
be described in terms of traditional mathematical notions.
And this turns out to be possible for some of the cellular automata
that I discussed earlier in this book. Thus, for example, as shown below,
rule 94 can effectively be described as enumerating even numbers.
Similarly, rule 62 can be thought of as enumerating numbers that are
multiples of 3, while rule 190 enumerates numbers that are multiples of
4. And if one looks down the center column of the pattern it produces,
rule 129 can be thought of as enumerating numbers that are powers of 2.

rule 94 rule 62 rule 190 rule 129

Examples of simple cellular automata whose evolution corresponds to computations that can easily be described in traditional
mathematical terms. In analogy to the previous page, the positions of white cells at the bottom of the rule 94 picture correspond to
even numbers, on the left in rule 62 to multiples of 3, in rule 190 to multiples of 4, and in the center column of rule 129 to powers of 2.

But what kinds of computations are cellular automata like the


ones on the right performing? If we compare the patterns they produce
to the patterns we have seen so far in this section, then immediately we
suspect that we cannot describe these computations by anything as
simple as saying, for example, that they generate primes. rule 30

So how then can we ever expect to describe these computations?


Traditional mathematics is not much help, but what we will see is that
there are a collection of ideas familiar from practical computing that
provide at least the beginnings of the framework that is needed. rule 45

Examples of cellular automata that have simple underlying rules but whose
overall behavior does not seem to correspond to computations with any
kind of simple description in standard mathematical or other terms.
rule 73

641
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

The Phenomenon of Universality


In the previous section we saw that it is possible to get cellular
automata to perform some fairly sophisticated computations. But for
each specific computation we wanted to do, we always set up a cellular
automaton with a different set of underlying rules. And indeed our
everyday experience with mechanical and other devices might lead us
to assume that in general in order to perform different kinds of tasks we
must always use systems that have different underlying constructions.
But the remarkable discovery that launched the computer
revolution is that this is not in fact the case. And instead, it is possible
to build universal systems whose underlying construction remains
fixed, but which can be made to perform different tasks just by being
programmed in different ways.
And indeed, this is exactly how practical computers work: the
hardware of the computer remains fixed, but the computer can be
programmed for different tasks by loading different pieces of software.
The idea of universality is also the basis for computer languages. For
in each language, there are a certain set of primitive operations, which are
then strung together in different ways to create programs for different tasks.
The details of a particular computer system or computer language
will certainly affect how easy it is to perform a particular task. But the
crucial fact that is by now a matter of common knowledge is that with
appropriate programming any computer system or computer language
can ultimately be made to perform exactly the same set of tasks.
One way to see that this must be true is to note that any
particular computer system or computer language can always be set up
by appropriate programming to emulate any other one.
Typically the way this is done is by having each individual
action in the system that is to be emulated be reproduced by some
sequence of actions in the other system. And indeed this is ultimately
how, for example, Mathematica works. For when one enters a
command such as Log15 , what actually happens is that the program
which implements the Mathematica language interprets this command

642
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

by executing the appropriate sequence of machine instructions on


whatever computer system one is using.
And having now identified the phenomenon of universality in the
context of practical computing, one can immediately see various
analogs of it in other areas of common experience. Human languages
provide an example. For one knows that given a single fixed underlying
language, it is possible to describe an almost arbitrarily wide range of
things. And given any two languages, it is for the most part always
possible to translate between them.
So what about natural science? Is the phenomenon of
universality also relevant there? Despite its great importance in
computing and elsewhere, it turns out that universality has in the past
never been considered seriously in relation to natural science.
But what I will show in this chapter and the next is that in fact
universality is for example quite crucial in finding general ways to
characterize and understand the complexity we see in natural systems.
The basic point is that if a system is universal, then it must
effectively be capable of emulating any other system, and as a result it
must be able to produce behavior that is as complex as the behavior of
any other system. So knowing that a particular system is universal
thus immediately implies that the system can produce behavior that
is in a sense arbitrarily complex.
But now the question is what kinds of systems are in fact universal.
Most present-day mechanical devices, for example, are built only
for rather specific tasks, and are not universal. And among electronic
devices there are examples such as simple calculators and electronic
address books that are not universal. But by now the vast majority of
practical electronic devices, despite all their apparent differences, are
based on computers that are universal.
At some level, however, these computers tend to be extremely
similar. Indeed, essentially all of them are based on the same kinds of
logic circuits, the same basic layout of data paths, and so on. And
knowing this, one might conclude that any system which was universal
must include direct analogs of these specific elements. But from

643
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

experience with computer languages, there is already an indication that


the range of systems that are universal might be somewhat broader.
Indeed, Mathematica turns out to be a particularly good example,
in which one can pick very different sets of operations to use, and yet
still be able to implement exactly the same kinds of programs.
So what about cellular automata and other systems with simple
rules? Is it possible for these kinds of systems to be universal?
At first, it seems quite implausible that they could be. For the
intuition that one gets from practical computers and computer
languages seems to suggest that to achieve universality there must be
some fundamentally fairly sophisticated elements present.
But just as we found that the intuition which suggests that
simple rules cannot lead to complex behavior is wrong, so also the
intuition that simple rules cannot be universal also turns out to be
wrong. And indeed, later in this chapter, I will show an example of a
cellular automaton with an extremely simple underlying rule that can
nevertheless in the end be seen to be universal.
In the past it has tended to be assumed that universality is
somehow a rare and special quality, usually possessed only by systems
that are specifically constructed to have it. But one of the results of this
chapter is that in fact universality is a much more widespread
phenomenon. And in the next chapter I will argue that for example it
also occurs in a wide range of important systems that we see in nature.

A Universal Cellular Automaton


As our first specific example of a system that exhibits universality, I
discuss in this section a particular universal cellular automaton that
has been set up to make its operation as easy to follow as possible.
The rules for this cellular automaton itself are always the same.
But the fact that it is universal means that if it is given appropriate
initial conditions it can effectively be programmed to emulate for
example any possible cellular automaton—with any set of rules.
The next three pages show three examples of this.

644
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

The universal cellular automaton emulating elementary rule 254. Each cell in rule 254 is
represented by a block of 20 cells in the universal cellular automaton. Each of these
blocks encodes both the color of the cell it represents, and the rule for updating this color.

rule 254

645
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

The universal cellular automaton emulating elementary rule 90. The underlying rules for
the universal cellular automaton are exactly the same as on the previous page. But each
block in the initial conditions now contains a representation of rule 90 rather than rule 254.

rule 90

646
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

The universal cellular automaton emulating rule 30. A total of 848 steps in the
evolution of the universal cellular automaton are shown, corresponding to 16
steps in the evolution of rule 30.

rule 30

647
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

On each page the underlying rules for the universal cellular


automaton are exactly the same. But on the first page, the initial
conditions are set up so as to make the universal cellular automaton
emulate rule 254, while on the second page they are set up to make it
emulate rule 90, and on the third page rule 30.
The pages that follow show how this works. The basic idea is
that a block of 20 cells in the universal cellular automaton is used to
represent each single cell in the cellular automaton that is being
emulated. And within this block of 20 cells is encoded both a
specification of the current color of the cell that is being represented, as
well as the rule by which that color is to be updated.

1 0 1 0 1 1
0 1 0

0 0 1 0 1 1
0 1 0

0 1 0 1 0
1 0 1

1 1 0 1 0 0
1 0 1 0

0 1 1 0 1
0 1 1

0 1 1 0 1
0 1

0 1 0 1 1
1 0

0 1 0 1 0
1 0

0 1 1 0 0
0 1

0 1 1 0 1
0 1

0 1 0 1 1 1
1 0 1

0 1 0 1 1 1
1 0 1 1 1

0 1 1 0 1 1
0 1 1

0 1 1 0 1
0 1

The rules for the universal cellular automaton. There are 19 possible colors for each cell, represented here by 19 different icons.
Since the new color of each cell depends on the previous colors of a total of five cells, there are in principle 2,476,099 cases to
cover. But by using to stand for a cell with any possible color, many cases are combined. Note that the cases shown are in a
definite order reading down successive columns, with special cases given before more general ones. With the initial conditions
used, there are some combinations of cells that can never occur, and these are not covered in the rules shown.

648
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

cell values 0 1 0

rule 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0

1 1 1
0 1 1 0 1 1 0 1 1
1 0 1 1 0 1 1 0 1
0 0 0 0 0 0 0 0 0
1 1 0 1 1 0 1 1 0
0 1 0 0 1 0 0 1 0
1 0 0 1 0 0 1 0 0
0 0 1 0 0 1 0 0 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1
left cell 1 1 1 1 1 1
1 1 1 1 1 1
0 1 0 1 0 1
1 0 1 0 1 0
0 0 0 0 0 0
1 1 1 1 1 1
0 1 0 1 0 1
1 0 1 0 1 0
0 0 0 0 0 0
1 1 1 1 1 1
center cell 1 1 1
1 1 1
1 1 1
0 0 0
1 1 1
0 0 0
1 1 1
0 0 0
1 1 1
0 0 0
right cell 1 1 1

result

new step

1 1 1
0 1 1 0 1 1 0 1 1
1 0 1 1 0 1 1 0 1
0 0 0 0 0 0 0 0 0
1 1 0 1 1 0 1 1 0
0 1 0 0 1 0 0 1 0
1 0 0 1 0 0 1 0 0
0 0 1 0 0 1 0 0 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
0 1 0 1 0 1

Details of how the universal cellular automaton emulates rule


254. Each of the blocks in the universal cellular automaton
represents a single cell in rule 254, and encodes both the current
1 1 1 1 1 1 1 0 = 254
color of the cell and the form of the rule used to update it.

649
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

cell values 0 1 0

rule 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0

1 1 1
0 1 1 0 1 1 0 1 1
1 0 1 1 0 1 1 0 1
0 0 0 0 0 0 0 0 0
1 1 0 1 1 0 1 1 0
0 1 0 0 1 0 0 1 0
1 0 0 1 0 0 1 0 0
0 0 1 0 0 1 0 0 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1
left cell 1 1 1 1 1 1
1 1 1 1 1 1
0 1 0 1 0 1
1 0 1 0 1 0
0 0 0 0 0 0
1 1 1 1 1 1
0 1 0 1 0 1
1 0 1 0 1 0
0 0 0 0 0 0
1 1 1 1 1 1
center cell 1 1 1
1 1 1
1 1 1
0 0 0
1 1 1
0 0 0
1 1 1
0 0 0
1 1 1
0 0 0
right cell 1 1 1

result

new step

1 1 1
0 1 1 0 1 1 0 1 1
1 0 1 1 0 1 1 0 1
0 0 0 0 0 0 0 0 0
1 1 0 1 1 0 1 1 0
0 1 0 0 1 0 0 1 0
1 0 0 1 0 0 1 0 0
0 0 1 0 0 1 0 0 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
0 1 0 1 0 1

Details of how the universal cellular automaton emulates


rule 90. The only difference in initial conditions from the
picture on the previous page is that each block now encodes
0 1 0 1 1 0 1 0 = 90
rule 90 instead of rule 254.

650
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

cell values 0 1 0

rule 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0

1 1 1
0 1 1 0 1 1 0 1 1
1 0 1 1 0 1 1 0 1
0 0 0 0 0 0 0 0 0
1 1 0 1 1 0 1 1 0
0 1 0 0 1 0 0 1 0
1 0 0 1 0 0 1 0 0
0 0 1 0 0 1 0 0 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1
left cell 1 1 1 1 1 1
1 1 1 1 1 1
0 1 0 1 0 1
1 0 1 0 1 0
0 0 0 0 0 0
1 1 1 1 1 1
0 1 0 1 0 1
1 0 1 0 1 0
0 0 0 0 0 0
1 1 1 1 1 1
center cell 1 1 1
1 1 1
1 1 1
0 0 0
1 1 1
0 0 0
1 1 1
0 0 0
1 1 1
0 0 0
right cell 1 1 1

result

new step

1 1 1
0 1 1 0 1 1 0 1 1
1 0 1 1 0 1 1 0 1
0 0 0 0 0 0 0 0 0
1 1 0 1 1 0 1 1 0
0 1 0 0 1 0 0 1 0
1 0 0 1 0 0 1 0 0
0 0 1 0 0 1 0 0 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
0 1 0 1 0 1

Details of how the universal cellular automaton emulates


rule 30. Once again, the only difference in initial conditions
from the facing page is that each block now encodes rule 30
0 0 0 1 1 1 1 0 = 30
instead of rule 90.

651
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

In the examples shown, the cellular automata being emulated


have 8 cases in their rules, with each case giving the outcome for one of
the 8 possible combinations of colors of a cell and its immediate
neighbors. In every block of 20 cells in the universal cellular
automaton, these rules are encoded in a very straightforward way, by
listing in order the outcomes for each of the 8 possible cases.
To update the color of the cell represented by a particular block,
what the universal cellular automaton must then do is to determine
which of the 8 cases applies to that cell. And it does this by successively
eliminating cases that do not apply, until eventually only one case
remains. This process of elimination can be seen quite directly in the
pictures on the previous pages. Below each large black or white triangle,
there are initially 8 vertical dark lines. Each of these lines corresponds to
one of the 8 cases in the rule, and the system is set up so that a particular
line ends as soon as the case to which it corresponds has been eliminated.
It so happens that in the universal cellular automaton discussed
here the elimination process for a given cell always occurs in the block
immediately to the left of the one that represents that cell. But the
process itself is not too difficult to understand, and indeed it works in
much the way one might expect of a practical electronic logic circuit.
There are three basic stages, visible in the pictures as three stripes
moving to the left across each block. The first stripe carries the color of the
left-hand neighbor, and causes all cases in the rule where that neighbor does
not have the appropriate color to be eliminated. The next two stripes then
carry the color of the cell itself and of its right-hand neighbor. And after all
three stripes have passed, only one of the 8 cases ever survives, and this case
is then the one that gives the new color for the cell.
The pictures on the last few pages have shown how the universal
cellular automaton can in effect be programmed to emulate any cellular
automaton whose rules involve nearest neighbors and two possible
colors for each cell. But the universal cellular automaton is in no way
restricted to emulating only rules that involve nearest neighbors. And
thus on the facing page, for example, it is shown emulating a rule that
involves next-nearest as well as nearest neighbors.

652
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

The universal cellular automaton emulating one step in the evolution of the rule shown above,
which involves next-nearest as well as nearest-neighbor cells. The rule now covers a total of 32
cases, corresponding to the possible arrangements of colors of a cell and its nearest and
next-nearest neighbors. The picture shows the evolution of five cells according to the rule shown,
with each cell now being represented by a block of 70 cells in the universal cellular automaton.

653
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

The blocks needed to represent each cell are now larger, since they
must include all 32 cases in the rule. There are also five elimination
stages rather than three. But despite these differences, the underlying rule
for the universal cellular automaton remains exactly the same.
What about rules that have more than two possible colors for
each cell? It turns out that there is a general way of emulating such
rules by using rules that have just two colors but a larger number of
neighbors. The picture on the facing page shows an example. The idea is
that each cell in the three-color cellular automaton is represented by a
block of three cells in the two-color cellular automaton. And by
looking at neighbors out to distance five on each side, the two-color
cellular automaton can update these blocks at each step in direct
correspondence with the rules of the three-color cellular automaton.
The same basic scheme can be used for rules with any number of
colors. And the conclusion is therefore that the universal cellular
automaton can ultimately emulate a cellular automaton with
absolutely any set of rules, regardless of how many neighbors and how
many colors they may involve.
This is an important and at first surprising result. For among other
things, it implies that the universal cellular automaton can emulate
cellular automata whose rules are more complicated than its own. If one
did not know about the basic phenomenon of universality, then one
would most likely assume that by using more complicated rules one
would always be able to produce new and different kinds of behavior.
But from studying the universal cellular automaton in this section,
we now know that this is not in fact the case. For given the universal
cellular automaton, it is always in effect possible to program this cellular
automaton to emulate any other cellular automaton, and therefore to
produce whatever behavior the other cellular automaton could produce.
In a sense, therefore, what we can now see is that nothing
fundamental can ever be gained by using rules that are more
complicated than those for the universal cellular automaton. For given
the universal cellular automaton, more complicated rules can always be
emulated just by setting up appropriate initial conditions.

654
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

An example of how a cellular automaton with three possible colors and


nearest-neighbor rules can be emulated by a cellular automaton with only two
possible colors but a larger number of neighbors (in this case five on each side). The basic idea is to represent each cell in
the three-color rule by a block of three cells in the two-color rule, according to the correspondence given on the left. The
three-color rule illustrated here is totalistic code 1599 from page 70.

655
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

Looking at the specific universal cellular automaton that we have


discussed in this section, however, we would probably be led to assume
that while the phenomenon of universality might be important in
principle, it would rarely be relevant in practice. For the rules of the
universal cellular automaton in this section are quite complicated—
involving 19 possible colors for each cell, and next-nearest as well as
nearest neighbors. And if such complication was indeed necessary in
order to achieve universality, then one would not expect that universality
would be common, for example, in the systems we see in nature.
But what we will discover later in this chapter is that such
complication in underlying rules is in fact not needed. Indeed, in the
end we will see that universality can actually occur in cellular
automata with just two colors and nearest neighbors. The operation of
such cellular automata is considerably more difficult to follow than the
operation of the universal cellular automaton discussed in this section.
But the existence of universal cellular automata with such simple
underlying rules makes it clear that the basic results we have obtained
in this section are potentially of very broad significance.

Emulating Other Systems with Cellular Automata


The previous section showed that a particular universal cellular
automaton could emulate any possible cellular automaton. But what
about other types of systems? Can cellular automata also emulate these?
With their simple and rather specific underlying structure one
might think that cellular automata would never be capable of
emulating a very wide range of other systems. But what I will show in
this section is that in fact this is not the case, and that in the end
cellular automata can actually be made to emulate almost every single
type of system that we have discussed in this book.
As a first example of this, the picture on the facing page shows
how a cellular automaton can be made to emulate a mobile automaton.
The main difference between a mobile automaton and a cellular
automaton is that in a mobile automaton there is a special active cell
that moves around from one step to the next, while in a cellular

656
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

An example of a mobile automaton (see page 71) being emulated by a


cellular automaton. In the mobile automaton shown on the left each
cell has two possible colors. In the cellular automaton shown on the
right, the cells have four possible colors, with two darker colors
corresponding to the active cell in the mobile automaton. The rules for
the mobile automaton and the cellular automaton are shown below. In
the rules for the cellular automaton, indicates a cell of any color.

x
x

automaton all cells are always effectively treated as being exactly the
same. And to emulate a mobile automaton with a cellular automaton it
turns out that all one need do is to divide the possible colors of cells in
the cellular automaton into two sets: lighter ones that correspond to
ordinary cells in the mobile automaton, and darker ones that
correspond to active cells. And then by setting up appropriate rules and
choosing initial conditions that contain only one darker cell, one can
produce in the cellular automaton an exact emulation of every step in
the evolution of a mobile automaton—as in the picture above.
The same basic approach can be used to construct a cellular
automaton that emulates a Turing machine, as illustrated on the next
page. Once again, lighter colors in the cellular automaton represent
ordinary cells in the Turing machine, while darker colors represent the
cell under the head, with a specific darker color corresponding to each
possible state of the head.
One might think that the reason that mobile automata and
Turing machines can be emulated by cellular automata is that they
both consist of fixed arrays of cells, just like cellular automata. So then
one may wonder what happens with substitution systems, for example,
where there is no fixed array of elements.

657
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

An example of a Turing machine being


emulated by a cellular automaton. In the
Turing machine on the left each cell has
two possible colors, and the head has
three possible states. In the cellular
automaton, the cells have eight possible
colors, with the lightest two colors being
used for cells not at the position of the
head. The rules for the Turing machine
and the cellular automaton are shown
below. In the rules for the cellular
automaton, indicates a cell of any color.

x
x

The pictures on the facing page demonstrate that in fact these can
also be emulated by cellular automata. But while one can emulate each
step in the evolution of a mobile automaton or a Turing machine with a
single step of cellular automaton evolution, this is no longer in general
true for substitution systems.
That this must ultimately be the case one can see from the fact
that the total number of elements in a substitution system can be
multiplied by a factor from one step to the next, while in a cellular
automaton the size of a pattern can only ever increase by a fixed
amount at each step. And what this means is that it can take
progressively larger numbers of cellular automaton steps to reproduce
each successive step in the evolution of the substitution system—as
illustrated in the pictures on the facing page.
The same kind of problem occurs in sequential substitution
systems—as well as in tag systems. But once again, as the pictures on
page 660 demonstrate, it is still perfectly possible to emulate systems
like these using cellular automata.
But just how broad is the set of systems that cellular automata can
ultimately emulate? All the examples of systems that I have shown so far
can at some level be thought of as involving sequences of elements that
are fairly directly analogous to the cells in a cellular automaton.

658
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

(a) (b) (c)

(a) (b) (c)

( a) ( b) ( c)

Examples of cellular automata that emulate substitution systems. The successive steps in the evolution of each substitution
system are obtained at the points indicated by arrows. Note that the sequences of elements generated by the cellular automata
are aligned at the right, while in the pictures of the substitution systems shown they are aligned at the left. The rules for the
three cellular automata involve only nearest neighbors, and allow 12 possible colors for each cell.

659
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

A cellular automaton set up to emulate a sequential substitution system. The cellular automaton involves 28
colors and nearest-neighbor rules. The strings produced by the sequential substitution system appear on
successive diagonal stripes indicated by arrows in the evolution of the cellular automaton on the right.

But one example where there is no such direct analogy is a


register machine. And at the outset one might not imagine that such a
system could ever readily be emulated by a cellular automaton.
But in fact it turns out to be fairly straightforward to do so, as
illustrated at the top of the facing page. The basic idea is to have the
cellular automaton produce a pattern that expands and contracts on
each side in a way that corresponds to the incrementing and
decrementing of the sizes of numbers in the first and second registers of

660
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

An example of a register machine being


emulated by a cellular automaton. The
cellular automaton has 12 possible colors
for each cell. Of these, 5 are used by the
center cell to represent the point that has
been reached in the register machine
program. The other 7 are used to
implement signals that propagate out to
the left and right to do the analog of
incrementing and decrementing each
register.
1
3

the register machine. In the center of the cellular automaton is then a 27

cell whose possible colors correspond to possible points in the program


for the register machine. And as the cell makes transitions from one 81

color to another, it effectively emits signals that move to the left or


right modifying the pattern in the cellular automaton in a way that
243
follows each instruction in the register machine program.
So what about systems based on numbers? Can these also be
emulated by cellular automata? As one example the picture on the right
729
shows how a cellular automaton can be set up to perform repeated
multiplication by 3 of numbers in base 2. And the only real difficulty in
this case is that carries generated in the process of multiplication may
need to be propagated from one end of the number to the other. 2187

So what about practical computers? Can these also be emulated


by cellular automata? From the examples just discussed of register
machines and systems based on numbers, we already know that cellular
automata can emulate some of the low-level operations typically found Repeated multiplication
in computers. And the pictures on the next two pages show how by 3 in base 2 being
performed by a cellular
cellular automata can also be made to emulate two other important automaton with 11
aspects of practical computers. colors.

661
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

The pictures below show how a cellular automaton can evaluate


any logic expression that is given in a certain form. And the picture on the
facing page then shows how a cellular automaton can retrieve data from a
numbered location in what is effectively a random-access memory.

0 0 0 1 1 0 1 1

pªq

0 1 1 1

0 0 0 1 1 0 1 1

p©q

0 0 0 1

0 0 0 1 1 0 1 1

¨ ((¨ p) ª (¨ q))

0 0 0 1

00 0 0 01 0 1 10 1 0 11 1 1

(p © q) ª ((¨ p) © (¨ q))

1 0 0 1

A cellular automaton which emulates basic logic circuits. The underlying rules for the cellular automaton are exactly
the same in each case, and involve nearest neighbors and five possible colors for each cell. But the initial condition
can represent a logic expression that involves any number of variables together with the operations of AND, OR and
NOT. In the examples above, two variables, p and q , are used, and in each case the behavior obtained with all four
possible combinations of values for p and q are shown.

662
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

Operation 1: : write a 1 at location 1 0 0 1 1 (19) Operation 2: : write a 1 at location 1 1 0 1 (13)

Operation 3: : read data at location 1 0 0 1 1 (19) Operation 4: : write a 0 at location 1 1 0 0 1 (25)

A cellular automaton set up to emulate random-access memory in a computer. The memory is on the right, and can be of any size.
Instructions come in from the left, with memory locations specified by addresses consisting of binary digits.

The details for any particular case are quite complicated, but in
the end it turns out that it is in principle possible to construct a cellular
automaton that emulates a practical computer in its entirety.
And as a result, one can conclude that any of the very wide
range of computations that can be performed by practical computers
can also be done by cellular automata.
From the previous section we know that any cellular automaton
can be emulated by a universal cellular automaton. But now we see that
a universal cellular automaton is actually much more universal than
we saw in the previous section. For not only can it emulate any cellular
automaton: it can also emulate any of a wide range of other systems,
including practical computers.

663
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

Emulating Cellular Automata with Other Systems


In the previous section we discovered the rather remarkable fact that
cellular automata can be set up to emulate an extremely wide range of
other types of systems. But is this somehow a special feature of cellular
automata, or do other systems also have similar capabilities?
In this section we will discover that in fact almost all of the
systems that we considered in the previous section—and in Chapter 3—
have the same capabilities. And indeed just as we showed that each of
these various systems could be emulated by cellular automata, so now
we will show that these systems can emulate cellular automata.
As a first example, the pictures below show how mobile automata
can be set up to emulate cellular automata. The basic idea is to have the
active cell in the mobile automaton sweep backwards and forwards,
updating cells as it goes, in such a way that after each complete sweep it
has effectively performed one step of cellular automaton evolution.

(a)

(b)

(a) (b)

Examples of mobile automata emulating cellular automata. In case (a) the rules for the mobile automaton are set
up to emulate the rule 90 elementary cellular automaton; in case (b) they are set up to emulate rule 30. The
pictures on the right are obtained by keeping only the steps indicated by arrows on the left, corresponding to
times when the active cell in the mobile automaton is further to the left than it has ever been before. The mobile
automata used here involve 7 possible colors for each cell.

664
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

The specific pictures at the bottom of the facing page are for
elementary cellular automata with two possible colors for each cell and
nearest-neighbor rules. But the same basic idea can be used for cellular
automata with rules of any kind. And this implies that it is possible to
construct for example a mobile automaton which emulates the
universal cellular automata that we discussed a couple of sections ago.
Such a mobile automaton must then itself be universal, since the
universal cellular automaton that it emulates can in turn emulate a
wide range of other systems, including all possible mobile automata.
A similar scheme to the one for mobile automata can also be used
for Turing machines, as illustrated in the pictures below. And once
again, by emulating the universal cellular automaton, it is then possible
to construct a universal Turing machine.
But as it turns out, a universal Turing machine was already
constructed in 1936, using somewhat different methods. And in fact
that universal Turing machine provided what was historically the very
first clear example of universality seen in any system.

(a)

(b)

(a)

(b)

(a) (b)

Examples of Turing machines that emulate cellular automata with rules 90 and 30. The pictures on the right are obtained by
keeping only the steps indicated by arrows on the left. The Turing machines have 6 states and 3 possible colors for each cell.

665
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

Continuing with the types of systems from the previous section,


we come next to substitution systems. And here, for once, we find that
at least at first we cannot in general emulate cellular automata. For as
we discussed on page 83, neighbor-independent substitution systems
can generate only patterns that are either repetitive or nested—so they
can never yield the more complicated patterns that are, for example,
needed to emulate rule 30.
But if one generalizes to neighbor-dependent substitution systems
then it immediately becomes very straightforward to emulate cellular
automata, as in the pictures below.

Neighbor-dependent substitution systems that emulate cellular automata with rules 90 and 30. The
systems shown are simple examples of neighbor-dependent substitution systems with highly
uniform rules always yielding just one cell and corresponding quite directly to cellular automata.

What about sequential substitution systems? Here again it turns


out to be fairly easy to emulate cellular automata—as the pictures at
the top of the facing page demonstrate.
Perhaps more surprisingly, the same is also true for ordinary tag
systems. And even though such systems operate in an extremely simple
underlying way, the pictures at the bottom of the facing page
demonstrate that they can still quite easily emulate cellular automata.
What about symbolic systems? The structure of these systems is
certainly vastly different from cellular automata. But once again—as
the picture at the top of page 668 shows—it is quite easy to get these
systems to emulate cellular automata.

666
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

(a) (b)

rule 90 rule 90 shifted rule 30 rule 30 shifted

(a)

(b)

Sequential substitution systems that emulate cellular automata with rules 90


and 30. The pictures at the top above are obtained by keeping only the steps
indicated by arrows on the left. The sequential substitution systems involve
elements with 3 possible colors.
( a) ( b)

(a) (b)

rule 90 rule 90 shifted rule 30 rule 30 shifted

(a)

(b)

Tag systems that emulate the rule 90 and rule 30 cellular automata. The pictures
at the top above are obtained by keeping only the steps indicated by arrows on
the left. Both tag systems involve 6 colors.
( a) ( b)

667
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

r  p   p   q   p   p   r 
p  r  p   p    p   p   q   p   p   r 
p  r  p   p   q    p   q   p   p   r 
p  r  p   p   q   p    q   p   p   r 
p  r  p   p   q   p   q    p   p   r 
r  p   p   q   p   q   p   p   r 
p  r  p   p    p   p   q   p   q   p   p   r 
p  r  p   p   q    p   q   p   q   p   p   r 
p  r  p   p   q   p    q   p   q   p   p   r 
p  r  p   p   q   p   p    p   q   p   p   r 
p  r  p   p   q   p   p   p    q   p   p   r 
p  r  p   p   q   p   p   p   q    p   p   r 
r  p   p   q   p   p   p   q   p   p   r 
p  r  p   p    p   p   q   p   p   p   q   p   p   r 
p  r  p   p   q    p   q   p   p   p   q   p   p   r 
p  r  p   p   q   p    q   p   p   p   q   p   p   r 
p  r  p   p   q   p   q    p   p   p   q   p   p   r 
p  r  p   p   q   p   q   p    p   p   q   p   p   r 
p  r  p   p   q   p   q   p   q    p   q   p   p   r 
p  r  p   p   q   p   q   p   q   p    q   p   p   r 
p  r  p   p   q   p   q   p   q   p   q    p   p   r 
r  p   p   q   p   q   p   q   p   q   p   p   r 
p  r  p   p    p   p   q   p   q   p   q   p   q   p   p   r 
p  r  p   p   q    p   q   p   q   p   q   p   q   p   p   r 
p  r  p   p   q   p    q   p   q   p   q   p   q   p   p   r 
p  r  p   p   q   p   p    p   q   p   q   p   q   p   p   r 
p  r  p   p   q   p   p   p    q   p   q   p   q   p   p   r 
p  r  p   p   q   p   p   p   p    p   q   p   q   p   p   r 
p  r  p   p   q   p   p   p   p   p    q   p   q   p   p   r 
p  r  p   p   q   p   p   p   p   p   p    p   q   p   p   r 
p  r  p   p   q   p   p   p   p   p   p   p    q   p   p   r 
p  r  p   p   q   p   p   p   p   p   p   p   q    p   p   r 
r  p   p   q   p   p   p   p   p   p   p   q   p   p   r 
p  r  p   p    p   p   q   p   p   p   p   p   p   p   q   p   p   r 
p  r  p   p   q    p   q   p   p   p   p   p   p   p   q   p   p   r 
p  r  p   p   q   p    q   p   p   p   p   p   p   p   q   p   p   r 
p  r  p   p   q   p   q    p   p   p   p   p   p   p   q   p   p   r  (a) (b)
p  r  p   p   q   p   q   p    p   p   p   p   p   p   q   p   p   r 
p  r  p   p   q   p   q   p   p    p   p   p   p   p   q   p   p   r 
p  r  p   p   q   p   q   p   p   p    p   p   p   p   q   p   p   r 
p  r  p   p   q   p   q   p   p   p   p    p   p   p   q   p   p   r 
p  r  p   p   q   p   q   p   p   p   p   p    p   p   q   p   p   r 
p  r  p   p   q   p   q   p   p   p   p   p   q    p   q   p   p   r 
p  r  p   p   q   p   q   p   p  (a)
p   p   p   q   p    q   p   p   r 
p  r  p   p   q   p   q   p   p   p   p   p   q   p   q    p   p   r 

rule 90 shifted rule 30 shifted

ï[x_][ï][ï][ï] ! ï[x[ï]][ï][ï], ï[x_][ï][ï][ð] ! ï[x[ð]][ï][ð], ï[x_][ï][ð][ï] ! ï[x[ï]][ð][ï], ï[x_][ï][ð][ð] ! ï[x[ð]][ð][ð], ï[x_][ð][ï][ï] ! ï[x[ð]][ï][ï],
(a)
ï[x_][ð][ï][ð] ! ï[x[ï]][ï][ð], ï[x_][ð][ð][ï] ! ï[x[ð]][ð][ï], ï[x_][ð][ð][ð] ! ï[x[ï]][ð][ð], ñ[x_] ! ï[ñ[ï][ï]][x], ï[x_][ï][ï][ñ] ! x[ï][ï][ñ]

ï[x_][ï][ï][ï] ! ï[x[ï]][ï][ï], ï[x_][ï][ï][ð] ! ï[x[ð]][ï][ð], ï[x_][ï][ð][ï] ! ï[x[ð]][ð][ï], ï[x_][ï][ð][ð] ! ï[x[ð]][ð][ð], ï[x_][ð][ï][ï] ! ï[x[ð]][ï][ï],
(b)
ï[x_][ð][ï][ð] ! ï[x[ï]][ï][ð], ï[x_][ð][ð][ï] ! ï[x[ï]][ð][ï], ï[x_][ð][ð][ð] ! ï[x[ï]][ð][ð], ñ[x_] ! ï[ñ[ï][ï]][x], ï[x_][ï][ï][ñ] ! x[ï][ï][ñ]

Symbolic systems set up to emulate cellular automata that have rules 90 and 30. Unlike the examples of symbolic systems in
Chapter 3, which involve only one symbol, these symbolic systems involve three symbols, ï , ð and ñ .

And as soon as one knows that any particular type of system is


capable of emulating any cellular automaton, it immediately follows
that there must be examples of that type of system that are universal.
So what about the other types of systems that we considered in
Chapter 3? One that we have not yet discussed here are cyclic tag
systems. And as it turns out, we will end up using just such systems later
in this chapter as part of establishing a dramatic example of universality.
But to demonstrate that cyclic tag systems can manage to
emulate cellular automata is not quite as straightforward as to do this
for the various kinds of systems we have discussed so far. And indeed
we will end up doing it in several stages. The first stage, illustrated in
the picture at the top of the facing page, is to get a cyclic tag system to
emulate an ordinary tag system with the property that its rules depend
only on the very first element that appears at each step.

668
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

A cyclic tag system


emulating a tag system that
depends only on the first
element at each step. In the
tag system evolution tag system expanded evolution expanded tag system
evolution, successive colors
of elements are encoded by
having a black cell at
tag system rule
successive positions inside a
fixed block of white cells.

cyclic tag system evolution cyclic tag system rule

And having done this, the next stage is to get such a tag system to
emulate a Turing machine. The pictures on the next page illustrate how
this can be done. But at least with the particular construction shown,
the resulting Turing machine can only have cells with two possible
colors. The pictures below demonstrate, however, that such a Turing

Turing machines with two


colors emulating ones with
more colors.

669
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

Turing machine evolution

Turing machine rule

Turing machine left and right numbers

tag system evolution (150 steps) tag system rule

tag system compressed evolution (1500 steps)

Emulating a Turing machine with a tag system that depends only on the first element at each step. The configuration of cells on each
side of the head in the Turing machine is treated as a base 2 number. At the steps indicated by arrows the tag system yields
sequences of dark cells with lengths that correspond to each of these numbers.

670
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

machine can readily be made to emulate a Turing machine with any


number of colors. And through the construction of page 665 this then
finally shows that a cyclic tag system can successfully emulate any
cellular automaton—and can thus be universal.
This leaves only one remaining type of system from Chapter 3:
register machines. And although it is again slightly complicated, the
pictures on the next page—and below—show how even these systems
can be made to emulate Turing machines and thus cellular automata.

register 1
register 2
digits
digits
(reversed)

(203,205 steps) Turing machine evolution

A register machine emulating a


slightly more complicated Turing
machine than on the next page. Turing machine rule

register machine program

So what about systems based on numbers, like those we


discussed in Chapter 4? As an example, one can consider a
generalization of the arithmetic systems discussed on page 122—in
which one has a whole number n , and at each step one finds the
remainder after dividing by a constant, and based on the value of this
remainder one then applies some specified arithmetic operation to n .

671
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

register 1 register 2 register 3

Turing machine evolution

Turing machine rule

register 1
register 2
digits
digits
(reversed)

(10,000 steps)

register machine evolution (300 steps)

register 1 register 2

register machine compressed evolution (1800 steps)

register machine program

An example of a register machine set up to emulate a Turing machine. The Turing machine used
here has two states for the head; the register machine program has 72 instructions and uses
three registers. The register machine compressed evolution keeps only steps corresponding to
every other time the third register gets incremented from zero.

672
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

The picture below shows that such a system can be set up to


emulate a register machine. And from the fact that register machines
are universal it follows that so too are such arithmetic systems.
And indeed the fact that it is possible to set up a universal system
using essentially just the operations of ordinary arithmetic is closely
related to the proof of Gödel’s Theorem discussed on page 784.
But from what we have learned in this chapter, it no longer seems
surprising that arithmetic should be capable of achieving universality.
Indeed, considering all the kinds of systems that we have found can
exhibit universality, it would have been quite peculiar if arithmetic had
somehow not been able to support it.

5 = 0 + 5 210 300
11 = 1+52 3
12 = 2 + 5 211 310
33 = 3+52 3
17 = 2 + 5 200 321
48 = 3+52 3
49 = 4 + 5 2 00 321
15 = 0 + 5 21 31
31 = 1+52 3
10 = 0 + 5 221 300
21 = 1+52 3
22 = 2 + 5 222 310
63 = 3+52 3
32 = 2 + 5 211 321
93 = 3+52 3 An example of how a simple arithmetic
47 = 2 + 5 200 332
138 = 3+52 3 system can emulate a register machine.
139 = 4 + 5 2 00 332
45 = 0 + 5 21 32
91 = 1+52 3 The arithmetic system takes the value n
30 = 0 + 5 221 311
61
20
= 1+52 3
= 0 + 5 232 300
that it obtains at each step, computes
41 = 1+52 3
42 = 2 + 5 233 310 Mod[n, 30] , and then depending on the
123 = 3+52 3
62 = 2 + 5 222 321 result applies to n one of the arithmetic
183 = 3+52 3
92 = 2 + 5 211 332
273 = 3 + 5 20 33 operations specified by the rule on the
137 = 2 + 5 20 34
408
409
= 3+52 3
= 4 + 5 2 00 343
left below. The rule is set up so that if the
135 = 0 + 5 21 33
271 = 1 + 5 2 1 32 value of n is written in the form i + 5 , 2 a ,
90 = 0+52 3
181
60
= 1 + 5 2 22 321
= 0+52 3
3 b then the values of i , a and b on
121 = 1 + 5 2 33 310
40 = 0 + 5 24 30 successive steps correspond
81 = 1+52 3
82 = 2 + 5 244 310 respectively to the position of the
243 = 3 + 5 23 31
122 = 2 + 5 23 32
363 = 3 + 5 2 2 32 register machine in its program, and to
182 = 2+52 3
543 = 3 + 5 2 21 333 the values of the two registers (2 and 3
272 = 2+52 3
813 = 3 + 5 2 10 344
407 = 2+52 3 appear because they are the first two
1218 = 3 + 5 2 0 35
1219
405
= 4 + 5 2 00 354
= 0 + 5 21 34
primes; 5 appears because it is the
811 = 1 + 5 2 1 33
270 = 0+52 3 length of the register machine program).
541 = 1 + 5 2 22 332
180 = 0+52 3 The values of n in the pictures on the left
361 = 1 + 5 2 33 321
120 = 0+52 3
241 = 1 + 5 2 44 310 are indicated on a logarithmic scale.
80 = 0+52 3

2n+1 ( n-1) / 3 3 ( n-1) ( n + 1) / 2 ( n-4) / 3 2n+1 n+1 3 ( n-1) n+1 n+1

0 1 2 3 4 5 6 7 8 9

2n+1 n+1 3 ( n-1) ( n + 1) / 2 n+1 2n+1 ( n-1) / 3 3 ( n-1) n+1 ( n-4) / 3

10 11 12 13 14 15 16 17 18 19

2n+1 n+1 3 ( n-1) ( n + 1) / 2 n+1 2n+1 n+1 3 ( n-1) n+1 n+1

20 21 22 23 24 25 26 27 28 29

673
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

Implications of Universality
When we first discussed cellular automata, Turing machines,
substitution systems, register machines and so on in Chapter 3, each of
these kinds of systems seemed rather different. But already in Chapter 3
we discovered that at the level of overall behavior, all of them had
certain features in common. And now, finally, by thinking in terms of
computation, we can begin to see why this might be the case.
The main point, as the previous two sections have
demonstrated, is that essentially all of these various kinds of
systems—despite their great differences in underlying structure—can
ultimately be made to emulate each other.
This is a very remarkable result, and one which will turn out to
be crucial to the new kind of science that I develop in this book.
In a sense its most important consequence is that it implies that
from a computational point of view a very wide variety of systems, with
very different underlying structures, are at some level fundamentally
equivalent. For one might have thought that every different kind of
system that we discussed for example in Chapter 3 would be able to
perform completely different kinds of computations.
But what we have discovered here is that this is not the case. And
instead it has turned out that essentially every single one of these systems
is ultimately capable of exactly the same kinds of computations.
And among other things, this means that it really does make sense to
discuss the notion of computation in purely abstract terms, without
referring to any specific type of system. For we now know that it ultimately
does not matter what kind of system we use: in the end essentially any
kind of system can be programmed to perform the same computations. And
so if we study computation at an abstract level, we can expect that the
results we get will apply to a very wide range of actual systems.
But it should be emphasized that among systems of any
particular type—say cellular automata—not all possible underlying
rules are capable of supporting the same kinds of computations.
Indeed, as we saw at the beginning of this chapter, some cellular
automata can perform only very simple computations, always yielding

674
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

for example purely repetitive patterns. But the crucial point is that as
one looks at cellular automata with progressively greater
computational capabilities, one will eventually pass the threshold of
universality. And once past this threshold, the set of computations that
can be performed will always be exactly the same.
One might assume that by using more and more sophisticated
underlying rules, one would always be able to construct systems with ever
greater computational capabilities. But the phenomenon of universality
implies that this is not the case, and that as soon as one has passed the
threshold of universality, nothing more can in a sense ever be gained.
In fact, once one has a system that is universal, its properties are
remarkably independent of the details of its construction. For at least as
far as the computations that it can perform are concerned, it does not
matter how sophisticated the underlying rules for the system are, or
even whether the system is a cellular automaton, a Turing machine, or
something else. And as we shall see, this rather remarkable fact forms
the basis for explaining many of the observations we made in Chapter 3,
and indeed for developing much of the conceptual framework that is
needed for the new kind of science in this book.

The Rule 110 Cellular Automaton


In previous sections I have shown that a wide variety of different kinds
of systems can in principle be made to exhibit the phenomenon of
universality. But how complicated do the underlying rules need to be in
a specific case in order actually to achieve universality?
The universal cellular automaton that I described earlier in this
chapter had rather complicated underlying rules, involving 19 possible
colors for each cell, depending on next-nearest as well as nearest
neighbors. But this cellular automaton was specifically constructed so
as to make its operation easy to understand. And by not imposing this
constraint, one might expect that one would be able to find universal
cellular automata that have at least somewhat simpler underlying rules.
Fairly straightforward modifications to the universal cellular
automaton shown earlier in this chapter allow one to reduce the number

675
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

of colors from 19 to 17. And in fact in the early 1970s, it was already
known that cellular automata with 18 colors and nearest-neighbor rules
could be universal. In the late 1980s—with some ingenuity—examples of
universal cellular automata with 7 colors were also constructed.
But such rules still involve 343 distinct cases and are by almost
any measure very complicated. And certainly rules this complicated
could not reasonably be expected to be common in the types of systems
that we typically see in nature. Yet from my experiments on cellular
automata in the early 1980s I became convinced that very much simpler
rules should also show universality. And by the mid-1980s I began to
suspect that even among the very simplest possible rules—with just two
colors and nearest neighbors—there might be examples of universality.
The leading candidate was what I called rule 110—a cellular
automaton that we have in fact discussed several times before in this
book. Like any of the 256 so-called elementary rules, rule 110 can be
specified as below by giving the outcome for each of the eight possible
combinations of colors of a cell and its nearest neighbors.

The underlying rules for the rule 110 cellular automaton discussed in this section. As elsewhere in the
book, each of the eight cases shows what the new color of a cell should be based on its own previous
color, and on the previous colors of its neighbors. Despite the extreme simplicity of its underlying rules,
what this section will demonstrate is that the rule 110 cellular automaton is in fact universal, and is thus
in a sense capable of arbitrarily complex behavior. If the values of the cells in each block are labelled p , q
and r , then rule 110 can be written as Mod[(1 + p) q r + q + r, 2] or ¨ (p © q © r) © (q ª r) .

Looking just at this very simple specification, however, it seems


at first quite absurd to think that rule 110 might be universal. But as
soon as one looks at a picture of how rule 110 actually behaves, the idea
that it could be universal starts to seem much less absurd. For despite
the simplicity of its underlying rules, rule 110 supports a whole variety
of localized structures—that move around and interact in many
complicated ways. And from pictures like the one on the facing page, it
begins to seem not unreasonable that perhaps these localized structures
could be arranged so as to perform meaningful computations.

676
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

A typical example of the behavior of rule 110 with random initial conditions. From looking at pictures like these one can begin to imagine
that it could be possible to arrange localized structures in rule 110 so as to be able to perform meaningful computations. Note that page
292 already showed many of the types of localized structures that can occur in rule 110.

In the universal cellular automaton that we discussed earlier in


this chapter, each of the various kinds of components involved in its
operation had properties that were explicitly built into the underlying
rules. Indeed, in most cases each different type of component was
simply represented by a different color of cell. But in rule 110 there are
only two possible colors for each cell. So one may wonder how one
could ever expect to represent different kinds of components.

677
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

The crucial idea is to build up components from combinations of


localized structures that the rule in a sense already produces. And if this
works, then it is in effect a very economical solution. For it potentially
allows one to get a large number of different kinds of components without
ever needing to increase the complexity of the underlying rules at all.
But the problem with this approach is that it is typically very
difficult to see how the various structures that happen to occur in a
particular cellular automaton can be assembled into useful components.
And indeed in the case of rule 110 it took several years of work to
develop the necessary ideas and tools. But finally it has turned out to be
possible to show that the rule 110 cellular automaton is in fact universal.
It is truly remarkable that a system with such simple underlying
rules should be able to perform what are in effect computations of
arbitrary sophistication, but that is what its universality implies.
So how then does the proof of universality proceed?
The basic idea is to show that rule 110 can emulate any possible
system in some class of systems where there is already known to be
universality. And it turns out that a convenient such class of systems
are the cyclic tag systems that we introduced on page 95.
Earlier in this chapter we saw that it is possible to construct a
cyclic tag system that can emulate any given Turing machine. And
since we know that at least some Turing machines are universal, this
fact then establishes that universal cyclic tag systems are possible.
So if we can succeed in demonstrating that rule 110 can emulate
any cyclic tag system, then we will have managed to prove that rule 110
is itself universal. The sequence of pictures on the facing page shows
the beginnings of what is needed. The basic idea is to start from the
usual representation of a cyclic tag system, and then progressively to
change this representation so as to get closer and closer to what can
actually be emulated directly by rule 110.
Picture (a) shows an example of the evolution of a cyclic tag
system in the standard representation from pages 95 and 96. Picture (b)
then shows another version of this same evolution, but now rearranged
so that each element stays in the same position, rather than always
shifting to the left at each step.

678
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

(a) (b)

summary:

Four views of a cyclic tag system


with rules as shown above, drawn
so as to be progressively closer to (c)
what can be emulated directly in
rule 110. Picture (a) shows the
cyclic tag system in the same form
as on pages 95 and 96. Picture (b)
shows the system with sequences
on successive steps rearranged so
that they do not shift to the left
when the first element is removed.
Picture (c) is a skewed version of
(b) in which the way information is
used from the underlying rules at
each step is explicitly indicated.
Picture (d) shows a more definite
mechanism for the evolution of the
system in which different lines
effectively indicate the motions of
different pieces of information.
(d)

679
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

A cyclic tag system in general operates by removing the first


element from the sequence that exists at each step, and then adding a
new block of elements to the end of the sequence if this element is
black. A crucial feature of cyclic tag systems is that the choice of what
block of elements can be added does not depend in any way on the form
of the sequence. So, for example, on the previous page, there are just
two possibilities, and these possibilities alternate on successive steps.
Pictures (a) and (b) on the previous page illustrate the consequences
of applying the rules for a cyclic tag system, but in a sense give no
indication of an explicit mechanism by which these rules might be applied.
In picture (c), however, we see the beginnings of such a mechanism.
The basic idea is that at each step in the evolution of the system,
there is a stripe that comes in from the left carrying information about
the block that can be added at that step. Then when the stripe hits the
first element in the sequence that exists at that step, it is allowed to pass
only if the element is black. And once past, the stripe continues to the
right, finally adding the block it represents to the end of the sequence.
But while picture (c) shows the effects of various lines carrying
information around the system, it gives no indication of why the lines
should behave in the way they do. Picture (d), however, shows a much
more explicit mechanism. The collections of lines coming in from the
left represent the blocks that can be added at successive steps. The
beginning of each block is indicated by a dashed line, while the
elements within the block are indicated by solid black and gray lines.
When a dashed line hits the first element in the sequence that
exists at a particular step, it effectively bounces back in the form of a
line propagating to the left that carries the color of the first element.
When this line is gray, it then absorbs all other lines coming from
the left until the next dashed line arrives. But when the line is black, it
lets lines coming from the left through. These lines then continue until
they collide with gray lines coming from the right, at which point they
generate a new element with the same color as their own.
By looking at picture (d), one can begin to see how it might be
possible for a cyclic tag system to be emulated by rule 110: the basic

680
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

a black element in the sequence a white element in the sequence

a black element in a block a white element in a block

the initial form of a separator between blocks the later form of a separator between blocks

a black element ready to be added a white element ready to be added

Objects constructed from localized structures in rule 110, used for the emulation of cyclic tag systems. Each of the pictures
shown is 500 cells wide. The objects in the top two pictures correspond to the thick vertical black and gray lines in picture (d)
on page 679. The objects in the next two pictures correspond to the dark and light gray lines that come in from the left in
picture (d). (Note that all the structures are left-right reversed in rule 110.) The third pair of pictures correspond to two versions
of the dashed lines in picture (d). And the fourth pair of pictures correspond to right-going lines on the right-hand side of
picture (d). All the localized structures involved in the pictures above were shown individually on page 292. Note that the
spacings between structures are crucial in determining the objects they represent.

681
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

idea is to have each of the various kinds of lines in the picture be


emulated by some collection of localized structures in rule 110.
But at the outset it is by no means clear that collections of
localized structures can be found that will behave in appropriate ways.
With some effort, however, it turns out to be possible to find the
necessary constructs, and indeed the previous page shows various
objects formed from localized structures in rule 110 that can be used to
emulate most of the types of lines in picture (d) on page 679.
The first two pictures show objects that correspond to the black
and white elements indicated by thick vertical lines in picture (d). Both of
these objects happen to consist of the same four localized structures, but
the objects are distinguished by the spacings between these structures.
The second two pictures on the previous page use the same idea
of different spacings between localized structures to represent the black
and gray lines shown coming in from the left in picture (d) on page 679.
Note that because of the particular form of rule 110, the objects
in the second two pictures on the previous page move to the left
rather than to the right. And indeed in setting up a correspondence
with rule 110, it is convenient to left-right reverse all pictures of
cyclic tag systems. But using the various objects from the previous
page, together with a few others, it is then possible to set up a
complete emulation of a cyclic tag system using rule 110.
The diagram on the facing page shows schematically how this
can be done. Every line in the diagram corresponds to a single localized
structure in rule 110, and although the whole diagram cannot be drawn
completely to scale, the collisions between lines correctly show all the
basic interactions that occur between structures.
The next several pages then give details of what happens in each
of the regions indicated by circles in the schematic diagram.
Region (a) shows a block separator—corresponding to a dashed
line in picture (d) on page 679—hitting the single black element in the
sequence that exists at the first step. Because the element hit is black,
an object must be produced that allows information from the block at
this step to pass through. Most of the activity in region (a) is concerned
with producing such an object. But it turns out that as a side-effect two

682
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

(a)

(b)

(c)

(d)

(e)

(f)

(g)

(h)

(i)

A schematic diagram of how rule 110 can be made to emulate a cyclic tag system. Each line in this diagram corresponds to one localized
structure in rule 110. Note that the relative slopes of the structures are reproduced faithfully here, but their spacings are not. Note also
that lines shown in different colors here often correspond to the same structure in rule 110.

683
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

(a) (b) (c)

Close-ups of circled regions shown schematically on the previous page. Each picture is 320 cells wide and shows 1200 evolution steps.

684
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

(d) (e) (f )

Close-ups (continued).

685
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

(g) (h) (i)

Close-ups (continued).

686
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

additional localized structures are produced that can be seen


propagating to the left. These structures could later cause trouble, but
looking at region (b) we see that in fact they just pass through other
structures that they meet without any adverse effect.
Region (c) shows what happens when the information
corresponding to one element in a block passes through the kind of
object produced in region (a). The number of localized structures that
represent the element is reduced from twelve to four, but the spacings
of these structures continue to specify its color. Region (d) then shows
how the object in region (c) comes to an end when the beginning of the
block separator from the next step arrives.
Region (e) shows how the information corresponding to a black
element in a block is actually converted to a new black element in the
sequence produced by the cyclic tag system. What happens is that the
four localized structures corresponding to the element in the block
collide with four other localized structures travelling in the opposite
direction, and the result is four stationary structures that correspond to
the new element in the sequence.
Region (f) shows the same process as region (e) but for a white
element. The fact that the element is white is encoded in the wider
spacing of the structures coming from the right, which results in
narrower spacing of the stationary structures.
Region (g) shows the analog of region (a), but now for a white
element instead of a black one. The region begins much like region (a),
except that the four localized structures at the top are more narrowly
spaced. Starting around the middle of the region, however, the behavior
becomes quite different from region (a): while region (a) yields an object
that allows information to pass through, region (g) yields one that stops
all information, as shown in regions (h) and (i).
Note that even though they begin very differently, regions (d) and
(i) end in the same way, reflecting the fact that in both cases the system
is ready to handle a new block, whatever that block may be.
The pictures on the last few pages were all made for a cyclic tag
system with a specific underlying rule. But exactly the same principles

687
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

can be used whatever the underlying rule is. And the pictures below
show schematically what happens with a few other choices of rules.
The way that the lines interact in the interior of each picture is
always exactly the same. But what changes when one goes from one
rule to another is the arrangement of lines entering the picture.
In the way that the pictures are drawn below, the blocks that
appear in each rule are encoded in the pattern of lines coming in from the
left edge of the picture. But if each picture were extended sufficiently far
to the left, then all these lines would eventually be seen to start from the
top. And what this means is that the arrangement of lines can therefore
always be viewed as an initial condition for the system.

Schematic diagrams of how cyclic tag systems with four different underlying rules can be emulated. The lines in each diagram
correspond essentially to collections of localized structures in rule 110. The processes that occur in the interior of each picture are
always the same; the different cyclic tag system rules are implemented by different arrangements of lines entering each picture.

688
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

This is then finally how universality is achieved in rule 110. The


idea is just to set up initial conditions that correspond to the blocks that
appear in the rule for whatever cyclic tag system one wants to emulate.
The necessary initial conditions consist of repetitions of blocks of
cells, where each of these blocks contains a pattern of localized
structures that corresponds to the block of elements that appear in the
rule for the cyclic tag system. The blocks of cells are always quite
complicated—for the cyclic tag system discussed in most of this section
they are each more than 3000 cells wide—but the crucial point is that
such blocks can be constructed for any cyclic tag system. And what this
means is that with suitable initial conditions, rule 110 can in fact be
made to emulate any cyclic tag system.
It should be mentioned at this point however that there are a few
additional complications involved in setting up appropriate initial
conditions to make rule 110 emulate many cyclic tag systems. For as
the pictures earlier in this section demonstrate, the way we have made
rule 110 emulate cyclic tag systems relies on many details of the
interactions between localized structures in rule 110. And it turns out
that to make sure that with the specific construction used the
appropriate interactions continue to occur at every step, one must put
some constraints on the cyclic tag systems being emulated.
In essence, these constraints end up being that the blocks that
appear in the rule for the cyclic tag system must always be a multiple of
six elements long, and that there must be some bound on the number of
steps that can elapse between the addition of successive new elements
to the cyclic tag system sequence.
Using the ideas discussed on page 669, it is not difficult, however,
to make a cyclic tag system that satisfies these constraints, but that
emulates any other cyclic tag system. And as a result, we may therefore
conclude that rule 110 can in fact successfully emulate absolutely any
cyclic tag system. And this means that rule 110 is indeed universal.

689
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

The Significance of Universality in Rule 110


Practical computers and computer languages have traditionally been
the only common examples of universality that we ever encounter. And
from the fact that these kinds of systems tend to be fairly complicated
in their construction, the general intuition has developed that any
system that manages to be universal must somehow also be based on
quite complicated underlying rules.
But the result of the previous section shows in a rather
spectacular way that this is not the case. It would have been one thing if
we had found an example of a cellular automaton with say four or five
colors that turned out to be universal. But what in fact we have seen is
that a cellular automaton with one of the very simplest possible 256
rules manages to be universal.
So what are the implications of this result? Most important is
that it suggests that universality is an immensely more common
phenomenon than one might otherwise have thought. For if one knew
only about practical computers and about systems like the universal
cellular automaton discussed early in this chapter, then one would
probably assume that universality would rarely if ever be seen outside
of systems that were specifically constructed to exhibit it.
But knowing that a system like rule 110 is universal, the whole
picture changes, and now it seems likely that instead universality
should actually be seen in a very wide range of systems, including many
with rather simple rules.
A couple of sections ago we discussed the fact that as soon as one
has a system that is universal, adding further complication to its rules
cannot have any fundamental effect. For by virtue of its universality the
system can always ultimately just emulate the behavior that would be
obtained with any more complicated set of rules.
So what this means is that if one looks at a sequence of systems with
progressively more complicated rules, one should expect that the overall
behavior they produce will become more complex only until the threshold
of universality is reached. And as soon as this threshold is passed, there
should then be no further fundamental changes in what one sees.

690
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

The practical importance of this phenomenon depends greatly


however on how far one has to go to get to the threshold of universality.
But knowing that a system like rule 110 is universal, one now
suspects that this threshold is remarkably easy to reach. And what this
means is that beyond the very simplest rules of any particular kind, the
behavior that one sees should quickly become as complex as it will ever be.
Remarkably enough, it turns out that this is essentially what we
already observed in Chapter 3. Indeed, not only for cellular automata but
also for essentially all of the other kinds of systems that we studied, we
found that highly complex behavior could be obtained even with rather
simple rules, and that adding further complication to these rules did not
in most cases noticeably affect the level of complexity that was produced.
So in retrospect the results of Chapter 3 should already have
suggested that simple underlying rules such as rule 110 might be able to
achieve universality. But what the elaborate construction in the
previous section has done is to show for certain that this is the case.

Class 4 Behavior and Universality


If one looks at the typical behavior of rule 110 with random initial
conditions, then the most obvious feature of what one sees is that there
are a large number of localized structures that move around and interact
with each other in complicated ways. But as we saw in Chapter 6, such
behavior is by no means unique to rule 110. Indeed, it is in fact
characteristic of all cellular automata that lie in what I called class 4.
The pictures on the next page show a few examples of such class
4 systems. And while the details are different in each case, the general
features of the behavior are always rather similar.
So what does this mean about the computational capabilities of
such systems? I strongly suspect that it is true in general that any
cellular automaton which shows overall class 4 behavior will turn
out—like rule 110—to be universal.
We saw at the end of Chapter 6 that class 4 rules always seem to
yield a range of progressively more complicated localized structures.
And my expectation is that if one looks sufficiently hard at any

691
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

( a) rule 110 ( b) second-order rule 37

( c) totalistic 2-color next-nearest-neighbor code 52 ( d) totalistic 3-color code 1815

(a) (c) (d)


(b)

Examples of cellular automata with class 4 overall behavior, as discussed in Chapter 6. I strongly suspect that all class 4 rules,
like rule 110, will turn out to be universal.

particular rule, then one will always eventually be able to find a set of
localized structures that is rich enough to support universality.
The final demonstration that a given rule is universal will no
doubt involve the same kind of elaborate construction as for rule 110.

692
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

But the point is that all the evidence I have so far suggests that for any
class 4 rule such a construction will eventually turn out to be possible.
So what kinds of rules show class 4 behavior?
Among the 256 so-called elementary cellular automata that allow
only two possible colors for each cell and depend only on nearest
neighbors, the only clear immediate example is rule 110—together with
rules 124, 137 and 193 obtained by trivially reversing left and right or
black and white. But as soon as one allows more than two possible
colors, or allows dependence on more than just nearest neighbors, one
immediately finds all sorts of further examples of class 4 behavior.
In fact, as illustrated in the pictures on the facing page, it is
sufficient in such cases just to use so-called totalistic rules in which the
new color of a cell depends only on the average color of cells in its
neighborhood, and not on their individual colors.
In two dimensions class 4 behavior can occur with rules that
involve only two colors and only nearest neighbors—as shown on page
249. And indeed one example of such a rule is the so-called Game of
Life that has been popular in recreational computing since the 1970s.
The strategy for demonstrating universality in a two-dimensional
cellular automaton is in general very much the same as in one
dimension. But in practice the comparative ease with which streams of
localized structures can be made to cross in two dimensions can reduce
some of the technical difficulties involved. And as it turns out there
was already an outline of a proof given even in the 1970s that the Game
of Life two-dimensional cellular automaton is universal.
Returning to one dimension, one can ask whether among the 256
elementary cellular automata there are any apart from rule 110 that
show even signs of class 4 behavior. As we will see in the next section,
one possibility is rule 54. And if this rule is in fact class 4 then it is my
expectation that by looking at interactions between the localized
structures it supports it will in the end—with enough effort—be
possible to show that it too exhibits the phenomenon of universality.

693
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

The Threshold of Universality in Cellular Automata


By showing that rule 110 is universal, we have established that
universality is possible even among cellular automata with the very
simplest kinds of underlying rules. But there remains the question of
what is ultimately needed for a cellular automaton—or any other kind
of system—to be able to achieve universality.
In general, if a system is to be universal, then this means that by
setting up an appropriate choice of initial conditions it is possible to get the
system to emulate any type of behavior that can occur in any other system.
And as a consequence, cellular automata like the ones in the pictures below
are definitely not universal, since they always produce just simple uniform
or repetitive patterns of behavior, whatever initial conditions one uses.

rule 4 rule 51 rule 108 rule 250

Examples of elementary cellular automata which only ever show purely uniform or purely repetitive behavior, and which
therefore definitely cannot be universal. These cellular automata are necessarily all class 1 or class 2 systems.

In a sense the fundamental reason for this—as we discussed on


page 252—is that such class 1 and class 2 cellular automata never allow
any transmission of information except over limited distances. And the
result of this is that they can only support processes that involve the
correlated action of a limited number of cells.
In cellular automata like the ones at the top of the facing page
some information can be transmitted over larger distances. But the way
this occurs is highly constrained, and in the end these systems can only
produce patterns that are in essence purely nested—so that it is again
not possible for universality to be achieved.
What about additive rules such as 90 and 150?
With simple initial conditions these rules always yield very
regular nested patterns. But with more complicated initial conditions,
they produce more complicated patterns of behavior—as the pictures at

694
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

rule 184

rule 14 rule 62

Examples of cellular automata that do allow information to be transmitted over large distances, but only in
very restricted ways. The overall patterns produced by such cellular automata are essentially nested. No
cellular automata of this kind can ever be universal.

the bottom of this page illustrate. As we saw on page 264, however,


these patterns never in fact really correspond to more than rather
simple transformations of the initial conditions. Indeed, even after say
1,048,576 steps—or any number of steps that is a power of two—the
array of cells produced always turns out to correspond just to a simple
superposition of two or three shifted copies of the initial conditions.

rule 90

rule 150 rule 90 rule 150

Examples of cellular automata with additive rules. The repetitive occurrence of states that correspond to
simple transformations of the initial conditions prevent such cellular automata from ever being universal.

695
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

And since there are many kinds of behavior that do not return to
such predictable forms after any limited number of steps, one must
conclude that additive rules cannot be universal.
At the end of the last section I mentioned rule 54 as another
elementary cellular automaton besides rule 110 that might be class 4.
The pictures below show examples of the typical behavior of rule 54.

Two views of the evolution of rule 54 from typical random initial conditions. The top view shows
the color of every cell at every step. The bottom groups together pairs of cells, and shows only
every other step. There are various localized structures—and hints of class 4 behavior.

696
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

Some localized structures are definitely seen. But are they enough
to support class 4 behavior and universality? The pictures below show
what happens if one starts looking in turn at each of the possible initial
conditions for rule 54. At first one sees only simple repetitive behavior.
At initial condition 291 one sees a very simple form of nesting. And as
one continues one sees various other repetitive and nested forms. But at
least up to the hundred millionth initial condition one sees nothing
that is fundamentally any more complicated.

1 3 75 259 291 787 803 56549

th
Forms of behavior seen in the first 100 million initial conditions for rule 54. With initial condition 291 the n new stripe on the
right is produced at step 2 n 2 + 8 n - 9 . Even in the last case shown, the arrangement of stripes eventually becomes completely
regular, with the n th new stripe being produced at step n 2 + 21 n/ 2 - {6, 5, -4, 3}0Mod[n, 4] + 11/ 2 . Pairs of cells are grouped
together in each picture, as at the bottom of the facing page.

So can rule 54 achieve universality? I am not sure. It could be that


if one went just a little further in looking at initial conditions one
would see more complicated behavior. And it could be that even the
structures shown above can be combined to produce all the richness
that is needed for universality. But it could also be that whatever one
does rule 54 will always in the end just show purely repetitive or nested
behavior—which cannot on its own support universality.
What about other elementary cellular automata?

697
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

As I will discuss in the next chapter, my general expectation is that


more or less any system whose behavior is not somehow fundamentally
repetitive or nested will in the end turn out to be universal. But I suspect
that this fact will be very much easier to establish for some systems than
for others—with rule 110 being one of the easiest cases.
In general what one needs to do in order to prove universality is to
find a procedure for setting up initial conditions in one system so as to
make it emulate some general class of other systems. And at some level
the main challenge is that our experience from programming and
engineering tends to provide us with only a limited set of methods for
coming up with such a procedure. Typically what we are used to doing is
constructing things in stages. Usually we start by building components,
and then we progressively assemble these into larger and larger
structures. And the point is that at each stage, we need think directly
only about the scale of structures that we are currently handling—and
not for example about all the pieces that make up these structures.
In proving the universality of rule 110, we were able to follow
essentially the same basic approach. We started by identifying various
localized structures, and then we used these structures as components
in building up the progressively larger structures that we needed.
What was in a sense crucial to our approach was therefore that
we could readily control the transmission of information in the system.
For this is what allowed us to treat different localized structures as
being separate and independent objects.
And indeed in any system with class 4 behavior, things will
typically always work in more or less the same way. But in class 3
systems they will not. For what usually happens in such systems is that
a change made even to a single cell will eventually spread to affect all
other cells. And this kind of uncontrolled transmission of information
makes it very difficult to identify pieces that could be used as definite
components in a construction.
So what can be done in such cases? The most obvious possibility
is that one might be able to find special classes of initial conditions in
which transmission of information could be controlled. And an
example where this can be potentially done is rule 73.

698
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

The pictures below show the typical behavior of rule 73—first


with completely random initial conditions, and then with initial
conditions in which no run of an even number of black squares occurs.

Two examples of rule 73. The top example uses completely random initial conditions; the bottom
example uses initial conditions in which no run of an even number of black squares ever occurs. The
bottom example is actually part of the pattern obtained from a single black cell—just to the right of
the center column, starting with step 1000.

In the second case rule 73 exhibits typical class 3 behavior—with


the usual uncontrolled transmission of information. In the first case,
however, the black walls that are present seem to prevent any
long-range transmission of information at all.
So can one then achieve something intermediate in rule 73—in
which information is transmitted, but only in a controlled way?
The pictures at the top of the next page give some indication of how
this might be done. For they show that with an appropriate background rule
73 supports various localized structures, some of which move. And while
these structures may at first seem more like those in rule 54 than rule 110,
I strongly suspect that the complexity of the typical behavior of rule 73 will
be reflected in more sophisticated interactions between the structures—and
will eventually provide what is needed to allow universality to be
demonstrated in much the same way as in rule 110.

699
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

Examples of localized structures in rule 73. Note that in the last case shown, the background patterns on either side are mirror images.

So what about a case like rule 30? With strictly repetitive initial
conditions—like any cellular automaton—this must yield purely
repetitive behavior. But as soon as one perturbs such initial conditions,
one normally seems to get only complicated and seemingly random
behavior, as in the top row of pictures below.

Examples of patterns produced by rule 30 with repetitive backgrounds. The top row shows the effect of inserting a single extra
black cell into various backgrounds. The bottom row shows all localized structures involving up to 25 cells supported by rule 30 on
repetitive backgrounds with blocks of up to 25 cells. Note that these localized structures always move one cell to the right at each
step—making it impossible for them to interact in non-trivial ways.

Yet it turns out still to be possible to get localized structures—as


the bottom row of pictures above demonstrate. But these structures

700
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

always seem to move at the same speed, and so can never interact. And
even after searching many billions of cases, I have never succeeded in
finding any useful set of localized structures in rule 30.
The picture below shows what happens in rule 45. Many possible
perturbations to repetitive initial conditions again yield seemingly
random behavior. But in one case a nested pattern is produced. And
structures that remain localized are now fairly common—but just as in
rule 30 always seem to move at the same speed.

Examples of patterns produced by inserting a single extra black cell into repetitive backgrounds for rule 45. Note the appearance of a
slanted version of the nested pattern from rule 90. In rule 45, localized structures turn out to be fairly common—but as in rule 30 they
always seem to move at the same speed, and so presumably cannot interact to produce any kind of class 4 behavior.

So although this means that the particular type of approach we


used to demonstrate the universality of rule 110 cannot immediately be
used for rule 30 or rule 45, it certainly does not mean that these rules
are not in the end universal. And as I will discuss in the next chapter, it
is my very strong belief that in fact they will turn out to be.
So how might we get evidence for this?
If a system is universal, then this means that with a suitable
encoding of initial conditions its evolution must emulate the evolution
of any other system. So this suggests that one might be able to get
evidence about universality just by trying different possible encodings,
and then seeing what range of other systems they allow one to emulate.
In the case of the 19-color universal cellular automaton on page
645 it turns out that encodings in which individual black and white
cells are represented by particular 20-cell blocks are sufficient to allow
the universal cellular automaton to emulate all 256 possible elementary
cellular automata—with one step in the evolution of each of these
corresponding to 53 steps in the evolution of the original system.

701
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

rule 146
rule 90
rule 0
rule 204

rule 170 rule 146

rule 240

rule 22

rule 90

rule 50
rule 51
rule 170
rule 204
rule 240 rule 50

rule 254
rule 0

rule 54

rule 170

rule 204

rule 240

rule 254

rule 90

rule 45

rule 90

rule 148 rule 90 rule 0 rule 240


rule 176 rule 0 rule 240 rule 128
rule 170
rule 184 rule 204 rule 170
rule 204
rule 170 rule 51
rule 240
rule 110
rule 0 rule 192
rule 184
rule 128 rule 238
rule 0
rule 136
rule 128
rule 240 rule 184
rule 15 rule 94

rule 204
Examples of using various specific elementary cellular automata to emulate other elementary
rule 48
cellular automata. In each case single cells are encoded as blocks of cells, and all distinct such
rule 41 encodings with blocks up to length 20 are shown.

702
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

So given a particular elementary cellular automaton one can then


ask what other elementary cellular automata it can emulate using
blocks up to a certain length.
The pictures on the facing page show a few examples.
The results are not particularly dramatic. No single rule is able to
emulate many others—and the rules that are emulated tend to be rather
simple. An example of a slight surprise is that rule 45 ends up being
able to emulate rule 90. But at least with blocks up to length 25, rule 30
for example is not able to emulate any non-trivial rules at all.
From the proof of universality that we gave it follows that rule
110 must be able to emulate any other elementary cellular automaton
with blocks of some size—but with the actual construction we
discussed this size will be quite astronomical. And certainly in the
picture on the facing page rule 110 does not seem to stand out.
But although it seems somewhat difficult to emulate the
complete evolution of one cellular automaton with another, it turns out
to be much easier to emulate fragments of evolution for limited
numbers of steps. And as an example the picture below shows how rule
30 can be made to emulate the basic action of one step in rule 90.

Rule 30 set up to emulate a single XOR operation—as used in a step of rule 90 evolution. The initial
conditions for rule 30 are fixed except at the two positions indicated, where input can effectively be
given. The picture shows that for each possible combination of inputs, the result from the rule 30
evolution corresponds exactly to the output from the XOR.

The idea is to set up a configuration in rule 30 so that if one


inserts input at particular positions the output from the underlying rule
30 evolution corresponds exactly to what one would get from a single
step of rule 90 evolution. And in the particular case shown, this is
achieved by having blocks 3 cells wide between each input position.
But as the picture on the next page indicates, by having
appropriate blocks 5 cells wide rule 30 can actually be made to emulate

703
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

rule 0

rule 1

rule 2

rule 30

rule 45

rule 90

rule 110

rule 255

Illustrations of how rule 30 can be set up to emulate a single step in the evolution of all elementary cellular automata.

one step in the evolution of every single one of the 256 possible
elementary cellular automata.
So what about other underlying rules?
The picture on the facing page shows for several different
underlying rules which of the 256 possible elementary rules can
successfully be emulated with successively wider blocks. In cases where
the underlying rules have only rather simple behavior—as with rules 90
and 184—it turns out that it is never possible to emulate more than a

704
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

few of the 256 possible elementary rules. But for underlying rules that
have more complex behavior—like rules 22, 30, or 110—it turns out
that in the end it is always possible to emulate all 256 elementary rules.

rule 22 rule 30 rule 41 rule 54 rule 90 rule 110 rule 184


0 0 0 0 0 0 0

10 10 10 10 10 10 10

20 20 20 20 20 20 20

30 30 30 30 30 30 30

40 40 40 40 40 40 40

50 50 50 50 50 50 50

60 60 60 60 60 60 60

70 70 70 70 70 70 70

80 80 80 80 80 80 80

90 90 90 90 90 90 90

100 100 100 100 100 100 100

110 110 110 110 110 110 110

120 120 120 120 120 120 120

130 130 130 130 130 130 130

140 140 140 140 140 140 140

150 150 150 150 150 150 150

160 160 160 160 160 160 160

170 170 170 170 170 170 170

180 180 180 180 180 180 180

190 190 190 190 190 190 190

200 200 200 200 200 200 200

210 210 210 210 210 210 210

220 220 220 220 220 220 220

230 230 230 230 230 230 230

240 240 240 240 240 240 240

250 250 250 250 250 250 250


0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5
block width block width block width block width block width block width block width

Summaries of how various underlying cellular automata do in emulating a single step in the evolution of each of the 256
possible elementary cellular automata using the scheme from the facing page with blocks of successively greater widths.

The emulation here is, however, only for a single step. So the fact
that it is possible does not immediately establish universality in any
ordinary sense. But it does once again support the idea that almost any
cellular automaton whose behavior seems to us complex can be made
to do computations that are in a sense as sophisticated as one wants.
And this suggests that such cellular automata will in the end turn
out to be universal—with the result that out of the 256 elementary
rules one expects that perhaps as many as 27 will in fact be universal.

705
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

Universality in Turing Machines and Other Systems


From the results of the previous few sections, we now have some idea
where the threshold for universality lies in cellular automata. But what
about other kinds of systems—like Turing machines? How complicated
do the rules need to be in order to get universality?
In the 1950s and early 1960s a certain amount of work was done
on trying to construct small Turing machines that would be universal.
The main achievement of this work was the construction of the
universal machine with 7 states and 4 possible colors shown below.

The rule for a universal Turing machine with 7 states and 4 colors constructed in 1962. Until now, this was essentially the simplest
known universal Turing machine. Note that one element of the rule can be considered as specifying that the Turing machine
should “halt” with the head staying in the same location and same state.

tag system evolution tag system evolution shifted

tag system rule:

Turing machine evolution Turing machine evolution compressed

An example of how the Turing machine above can emulate a tag system. A black element in the tag
system is set up to correspond to a block of four cells in the Turing machine, while a white element
corresponds to a single cell.

706
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

The picture at the bottom of the facing page shows how universality
can be proved in this case. The basic idea is that by setting up appropriate
initial conditions on the left, the Turing machine can be made to emulate
any tag system of a certain kind. But it then turns out from the discussion
of page 667 that there are tag systems of this kind that are universal.
It is already an achievement to find a universal Turing machine as
comparatively simple as the one on the facing page. And indeed in the forty
years since this example was found, no significantly simpler one has been
found. So one might conclude from this that the machine on the facing
page is somehow at the threshold for universality in Turing machines.
But as one might expect from the discoveries in this book, this is
far from correct. And in fact, by using the universality of rule 110 it
turns out to be possible to come up with the vastly simpler universal
Turing machine shown below—with just 2 states and 5 possible colors.

The rule for the simplest Turing machine currently known to be universal, based on discoveries in
this book. The machine has 2 states and 5 possible colors.

Turing machine evolution compressed

An example of how the Turing machine above manages to emulate rule 110.
The compressed picture is made by keeping only the steps indicated at
which the head is further to the right than ever before. To get the picture
shown requires running the Turing machine for a total of 5000 steps.

Turing machine evolution

707
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

As the picture at the bottom of the previous page illustrates, this


Turing machine emulates rule 110 in a quite straightforward way: its head
moves systematically backwards and forwards, at each complete sweep
updating all cells according to a single step of rule 110 evolution. And
knowing from earlier in this chapter that rule 110 is universal, it then
follows that the 2-state 5-color Turing machine must also be universal.
So is this then the simplest possible universal Turing machine?
I am quite certain that it is not. And in fact I expect that there are
some significantly simpler ones. But just how simple can they actually be?
If one looks at the 4096 Turing machines with 2 states and 2 colors
it is fairly easy to see that their behavior is in all cases too simple to
support universality. So between 2 states and 2 colors and 2 states and 5
colors, where does the threshold for universality in Turing machines lie?

(a) (b)

(c) (d)

(a) (b)

(c) (d)

Examples of Turing machines with 2 states and 4 colors that show


complex behavior. The compressed pictures above are based on
50,000 steps of evolution. In all cases, all cells are initially white.
(a) (b) (c) (d)

708
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

The pictures at the bottom of the facing page give examples of


some 2-state 4-color Turing machines that show complex behavior. And
I have little doubt that most if not all of these are universal.
Among such 2-state 4-color Turing machines perhaps one in
50,000 shows complex behavior when started from a blank tape.
Among 4-state 2-color Turing machines the same kind of complex
behavior is also seen—as discussed on page 81—but now it occurs only
in perhaps one out of 200,000 cases.
So what about Turing machines with 2 states and 3 colors? There
are a total of 2,985,984 of these. And most of them yield fairly simple
behavior. But it turns out that 14 of them—all essentially equivalent—
produce considerable complexity, even when started from a blank tape.
The picture below shows an example.

One of the 14 essentially equivalent 2-state 3-color Turing machines that


yield complicated behavior when started from a blank tape. The
compressed picture above is made by taking the first 100,000 steps, and
keeping only those at which the head is further to the left than ever before. The interior of the pattern that emerges
is like an inverted version of the rule 60 additive cellular automaton; the boundary, however, is more complicated. In
the numbering scheme of page 761 this is machine 596,440 out of the total of 2,985,984 with 2 states and 3 colors.

And although it will no doubt be very difficult to prove, it seems


likely that this Turing machine will in the end turn out to be universal.
And if so, then presumably it will by most measures be the very
simplest Turing machine that is universal.

709
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

With 3 states and 2 colors it turns out that with blank initial
conditions all of the 2,985,984 possible Turing machines of this type
quickly evolve to produce simple repetitive or nested behavior. With
more complicated initial conditions the behavior one sees can
sometimes be more complicated, at least for a while—as in the pictures
below. But in the end it still always seems to resolve into a simple form.

( a)

( b)

( c)

Examples of 3-state 2-color


Turing machines which behave
for a while in slightly complicated
ways. With more elaborate initial
conditions, these machines can
be made to exhibit complicated
behavior for longer.

( a) ( b) ( c)

Yet despite this, it still seems conceivable that with appropriate


initial conditions significantly more complex behavior might occur—and
might ultimately allow universality in 3-state 2-color Turing machines.
From the universality of rule 110 we know that if one just starts
enumerating cellular automata in a particular order, then after going
through at most 110 rules, one will definitely see universality. And
from other results earlier in this chapter it seems likely that in fact one
would tend to see universality even somewhat earlier—after going
through only perhaps just ten or twenty rules.
Among Turing machines, the universal 2-state 5-color rule on
page 707 can be assigned the number 8,679,752,795,626. So this means

710
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

that after going through perhaps nine trillion Turing machines one will
definitely tend to find an example that is universal. But presumably one
will actually find examples much earlier—since for example the 2-state
3-color machine on page 709 is only number 596,440.
And although these numbers are larger than for cellular
automata, the fact remains that the simplest potentially universal
Turing machines are still very simple in structure, suggesting that the
threshold for universality in Turing machines—just like in cellular
automata—is in many respects very low.
So what about other types of systems?
I suspect that in almost any case where we have seen complex
behavior earlier in this book it will eventually be possible to show that
there is universality. And indeed, as I will discuss at length in the next
chapter, I believe that in general there is a close connection between
universality and the appearance of complex behavior.
Previous examples of systems that are known to be universal
have typically had rules that are far too complicated to see this with any
clarity. But an almost unique instance where it could potentially have
been seen even long ago are what are known as combinators.
Combinators are a particular case of the symbolic systems that
we discussed on page 102 of Chapter 3. Originally intended as an
idealized way to represent structures of functions defined in logic,
combinators were actually first introduced in 1920—sixteen years
before Turing machines. But although they have been investigated
somewhat over the past eighty years, they have for the most part been
viewed as rather obscure and irrelevant constructs.
The basic rules for combinators are given below.

[x_][y_][z_] ! x[z][y[z]] Rules for symbolic systems known as combinators, first


[x_][y_] ! x introduced in 1920, and proved universal by the mid-1930s.

With short initial conditions, the pictures at the top of the next
page demonstrate that combinators tend to evolve quickly to simple
fixed points. But with initial condition (e) of length 8 the pictures show

711
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

 [  [  ] ] [  ] [  ] [  ]  [  [  ] ] [  ] [  ] [  ]
 [  ] [  ] [  [  ] ] [  ]  [  ] [  ] [  [  ] ] [  ]
 [  [  ] ] [  [  [  ] ] ] [  ]  [  [  ] ] [  [  [  ] ] ] [  ]
 [  ] [  ] [  [  [  ] ] [  ] ]  [  ] [  ] [  [  [  ] ] [  ] ]
 [  [  [  ] ] [  ] ] [  [  [  [  ] ] [  ] ] ]  [  [  [  ] ] [  ] ] [  [  [  [  ] ] [  ] ] ]
 [  [  ] ] [  ]  [  [  [  ] ] [  ] ] [  [  [  [  ] ] [  ] ] ]
 [  ]  [  [  [  ] ] [  ] ] [  [  [  [  ] ] [  ] ] ]
 [  ]  [  [  [  ] ] [  ] ] [  [  [  [  ] ] [  ] ] ]
 [  ]  [  [  [  ] ] [  ] ] [  [  [  [  ] ] [  ] ] ]
 [  ]  [  [  [  ] ] [  ] ] [  [  [  [  ] ] [  ] ] ]
 [  ]  [  [  [  ] ] [  ] ] [  [  [  [  ] ] [  ] ] ]

(a) [[]][][][] (b) [[]][][][]

(c) [[]][][][][] (d) [][][[[]]][]

(e) [[]][][][][]

(e) [[]][][][][]

(f ) [][][[[[]]]][] (g) [][][[[]]][][]

(h) [][][[[]]][][] (i) [][][[]][][[]]

( j) [[[][]]][][][] (k) [][][[[][]]][]

400 (f ) (g)
300 400
200 200
100
0 0
0 50 100 150 200 0 50 100 150 200

1500
1500 (h) (i) ( j)
5000 1000
1000
500 500
0 0 0
0 20 40 60 80 0 20 40 60 80 0 50 100

(k)
10000
5000
0
0 200 400 600 800 1000

Examples of combinator evolution. The expression in case (e) is the shortest that leads to unlimited growth. The
plots at the bottom show the total sizes of expressions reached on successive steps. Note that the detailed
pattern of evolution—though not any final fixed point reached—can depend on the fact that the combinator rules
are applied at each step in Mathematica /. order.

712
T H E N O T I O N O F C O M P U T A T I O N C H A P T E R 1 1

that no fixed point is reached, and instead there is exponential growth


in total size—with apparently rather random internal behavior.
Other combinators yield still more complicated behavior—
sometimes with overall repetition or nesting, but often not.
There are features of combinators that are not easy to capture
directly in pictures. But from pictures like the ones on the facing page it
is rather clear that despite their fairly simple underlying rules, the
behavior of combinators can be highly complex.
And while issues of typical behavior have not really been studied
before, it has been known that combinators are universal almost since
the concept of universality was first introduced in the 1930s.
One way that we can now show this is to demonstrate that
combinators can emulate rule 110. And as the pictures on the next page
illustrate, it turns out that just repeatedly applying the combinator
expression below reproduces successive steps in the evolution of rule 110.

[[[]][[[[[][]]]][[[]][[[[[[][]][[[]]]][[[[[]][[[[[][]]]][[[]][[[[
]][[[[[][]]]][[[]][[[][]][[]]]]]][[[]][[[[][]][[[]]]][[[]]]]]]]]][[[]][[[
[][]][[[]]]][[]]]]]]][[[[[[][]][[[[[][]][[[[[][]][[]]][[]]]]][[]]]]]]][[[
]][[[[[[][]][[[]]]][[[[[]][[[[[][]]]][[[]][[[[][]][[]]][[]]]]]][[[]][
[[[]][[[[[][]]]][[[]][[[][]][[[]]]]]]][[[]][[[[[[][]][[]]][[[]]]][[[[
[][]][[]]][[]]][[[]]]]][[[[[[[][]][[]]][[]]][[[]]]][[[]]]][[[[[[[[][
]][[]]][[]]][[]]][[[]]]][[[]]]][[]]]]]]]]]]][[[[]][[[[[][]]]][[[]][[[[]][[
[[[][]]]][[[]][[[][]][[]]]]]][[[]]]]]]][[[]]]]][[[]]]]]]][[]]]]]][[[]][[[[[
[]][]]]][[[][]][[[]]]]]]

A combinator expression that corresponds to the operation of doing one step of rule 110 evolution.

There has in the past been no overall context for understanding


universality in combinators. But now what we have seen suggests that such
universality is in a sense just associated with general complex behavior.
Yet we saw in Chapter 3 that there are symbolic systems with
rules even simpler than combinators that still show complex behavior.
And so now I suspect that these too are universal.
And in fact wherever one looks, the threshold for universality
seems to be much lower than one would ever have imagined. And this is
one of the important basic observations that led me to formulate the
Principle of Computational Equivalence that I discuss in the next chapter.

713
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

step 1 10 100 1000 10,000

step 2 10 100 1000 10,000 100,000

(459 steps) (664 steps)

step 3 step 4

Emulating the rule 110 cellular automaton using combinators. The rule 110 combinator from the previous page is applied once for
each step of rule 110 evolution. The initial state is taken to consist of a single black cell.

714
NOTES FOR CHAPTER 11
4 NOTES
Sytems Based on Numbers
The Notion of Computation NOTES

X
Computation as a Framework constructed a so-called harmonic analyzer, in which an
TitleName
assembly of disks were used to sum trigonometric series and
â History of computing. Even in prehistoric times there were PARTNAME
thus to predict tides. Kelvin mentioned that a similar device
no doubt schemes for computation based for example on
could be built to solve differential equations. This idea was
making specific arrangements of pebbles. Such schemes
independently developed by Vannevar Bush, who built the
were somewhat formalized a few thousand years ago with
first mechanical so-called differential analyzer in the late
the invention of the abacus. And by about 200 BC the
1920s. And in the 1930s, electrical analog computers began to
development of gears had made it possible to create devices
be produced, and in fact they remained in widespread use for
(such as the Antikythera device from perhaps around 90
finding approximate solutions to differential equations until
BC) in which the positions of wheels would correspond to
the late 1960s.
positions of astronomical objects. By about 100 AD Hero
had described an odometer-like device that could be driven The types of machines discussed so far all have the feature
automatically and could effectively count in digital form. that they have to be physically rearranged or rewired in
But it was not until the 1600s that mechanical devices for order to perform different calculations. But the idea of a
digital computation appear to have actually been built. programmable machine already emerged around 1800, first
Around 1621 Wilhelm Schickard probably built a machine with player pianos, and then with Marie Jacquard’s
based on gears for doing simplified multiplications invention of an automatic loom which used punched cards to
involved in Johannes Kepler’s calculations of the orbit of determine its weaving patterns. And in the 1830s, Charles
the Moon. But much more widely known were the Babbage described what he called an analytical engine,
machines built in the 1640s by Blaise Pascal for doing which, if built, would have been able to perform sequences of
addition on numbers with five or so digits and in the 1670s arithmetic operations under punched card control. Starting at
by Gottfried Leibniz for doing multiplication, division and the end of the 1800s tabulating machines based on punched
square roots. At first, these machines were viewed mainly cards became widely used for commercial and government
as curiosities. But as the technology improved, they data processing. Initially, these machines were purely
gradually began to find practical applications. In the mid- mechanical, but by the 1930s, most were electromechanical,
1800s, for example, following the ideas of Charles Babbage, and had units for carrying out basic arithmetic operations.
so-called difference engines were used to automatically The Harvard Mark I computer (proposed by Howard Aiken
compute and print tables of values of polynomials. And in 1937 and completed in 1944) consisted of many such units
from the late 1800s until about 1970 mechanical calculators hooked together so as to perform scientific calculations.
were in very widespread use. (In addition, starting with Following work by John Atanasoff around 1940, electronic
Stanley Jevons in 1869, a few machines were constructed for machines with similar architectures started to be built. The
evaluating logic expressions, though they were viewed first large-scale such system was the ENIAC, built between
almost entirely as curiosities.) 1943 and 1946. The focus of the ENIAC was on numerical
computation, originally for creating ballistics tables. But in
In parallel with the development of devices for digital
the early 1940s, the British wartime cryptanalysis group
computation, various so-called analog computers were also
(which included Alan Turing) constructed fairly large
built that used continuous physical processes to in effect
electromechanical machines that performed logical, rather
perform computations. In 1876 William Thomson (Kelvin)
than arithmetic, operations.

1107
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

All the systems mentioned so far had the feature that they One of the crucial ideas of a general-purpose computer is that
performed operations in what was essentially a fixed sequences of such bits of data in memory can represent
sequence. But by the late 1940s it had become clear, information of absolutely any kind. Numbers for example are
particularly through the writings of John von Neumann, that typically represented in base 2 by sequences of 32 or more
it would be convenient to be able to jump around instead of bits. Similarly, characters of text are usually represented by
always having to follow a fixed sequence. And with the idea sequences of 8 or more bits. (The character “a” is typically
of storing programs electronically, this became fairly easy to 01100001.) Images are usually represented by bitmaps
do, so that by 1950 more than ten stored-program computers containing thousands or millions of bits, with each bit
had been built in the U.S. and in England. Speed and specifying for example whether a pixel at a particular
memory capacity have increased immensely since the 1950s, location should, say, be black or white. Every possible
particularly as a result of the development of semiconductor location in memory has a definite address, independent of its
chip technology, but in many respects the basic hardware contents. The address is typically represented as a number
architecture of computers has remained very much the same. which itself can be stored in memory.
Major changes have, however, occurred in software. In the What makes possible essential universality in a practical
late 1950s and early 1960s, the main innovation was the computer is that the data which is stored in memory can be a
development of computer languages such as FORTRAN, program. At the lowest level, a program consists of a
COBOL and BASIC. These languages allowed programs to be sequence of instructions to be executed by the processor. Any
specified in a somewhat abstract way, independent of the particular kind of processor is built to support a certain fixed
precise details of the hardware architecture of the computer. set of possible kinds of instructions, each represented by a
But the languages were primarily intended only for specific number or opcode. There are typically a few tens of
specifying numerical calculations. In the late 1960s and early possible instructions, each executed by a certain part of the
1970s, there developed the notion of operating systems— circuit in the processor. A typical one of these instructions
programs whose purpose was to control the resources of a might add two numbers together; a program would specify
computer—and with them came languages such as C. And which numbers to add by giving their addresses in memory.
then in the late 1970s and early 1980s, as the cost of computer What practical computers always basically do is to repeat
memory fell, it began to be feasible to manipulate not just millions of times a second a simple cycle, in which the
purely numerical data, but also data representing text and processor fetches an instruction from memory, then executes
later pictures. With the advent of personal computers in the the instruction. The address of the instruction to be fetched at
early 1980s, interactive computing became common, and as each point is specified by the current value of the program
the resolution of computer displays increased, concepts such counter—a number stored in memory that is incremented by
as graphical user interfaces developed. In more recent years the processor, or can be modified by instruction in the
continuing increases in speed have made it possible for more program. At any given time, there are usually several
and more layers of software to be constructed, and for many programs stored in the memory of a computer, all organized
operations previously done with special hardware to be by an operating system program which determines when
implemented purely in software. other programs should run. Devices like keyboards, mice and
â Practical computers. At the lowest level the hardware of a microphones convert input into data that is inserted into
practical computer consists of digital electronic circuits. In memory at certain fixed locations. The operating system
these circuits, lumps of electric charge (in 2001 about half a periodically checks these locations, and if necessary runs
million electrons each) flow through channels which cross to programs to respond to the input that is given.
form various kinds of gates. Each gate performs a simple A crucial achievement in practical computing over the past
logic operation; for example, letting charge pass in one several decades has been the creation of more and more
channel only if charge is present in the other channel. From sophisticated software. Often the programs that make up
circuits containing millions of such gates are built the two this software are several million instructions long. They
main elements of the computer: the processor which usually contain many subprograms that perform parts of
actually performs computations, and the memory which their task. Some programs are set up to perform very
stores data. The memory consists of an array of cells, with specific applications, say word processing. But an important
the presence or absence of a lump of charge at gates in each class of programs are languages. A language provides a
cell representing a 1 or 0 value for the bit of data associated fixed set of constructs that allow one to specify
with that cell. computations. The set of instructions performed by the

1108
T H E N O T I O N O F C O M P U T A T I O N N O T E S F O R C H A P T E R 1 1

processor in a computer constitutes a low-level “machine” and the initial conditions consist of {10, 0, 4, 8} surrounded
!!!
language. In practice, however, programs are rarely written by 0 ’s. The right-hand region in the pattern grows like t .
at such a low level. More often, languages like C, FORTRAN, (See also page 132.)
Java or Mathematica are used. In these languages, each â Random initial conditions. The pictures below show the
construct represents what is often a large number of squaring and primes cellular automata starting from
machine instructions. There are two basic ways that random initial conditions. Note that for both systems the
languages can operate: compiled or interpreted. In a majority of cases in their rules are not used in the specific
compiled language like C or FORTRAN, the source code of computations for which they were constructed. Changing
the program must always first be translated by a compiler these cases can lead to different behavior with random
program into object code that essentially consists of machine initial conditions.
instructions. Once compiled, a program can be executed any
number of times. In an interpreted language, each piece of
input effectively causes a fixed subprogram to be executed
to perform an operation specified by that input.
â Intuition from practical computing. See page 872.

Computations in Cellular Automata

â Page 639 · Other examples. Rule 152 and rule 144, which
effectively compute Ceiling[n/ 2] and Ceiling[n/ 4] ,
respectively, are shown below with n = 18 initial black cells.
â Efficiency of computations. Present-day practical computers
almost always process data in a basically sequential manner.
Cellular automata, however, intrinsically operate in parallel,
and can thus presumably perform at least some
rule 152 rule 144 computations in fundamentally fewer steps. (Compare the
discussion of P completeness on page 1149.)
As discussed on page 989 rule 184 effectively determines
whether its initial conditions correspond to a balanced â Minimal programs for sequences. See page 1186.
sequence of open and close parentheses. (Rule 132 can be
viewed as being like a syntax checker for a regular language;
rule 184 for a context-free language.)
The Phenomenon of Universality

â Page 639 · Squaring cellular automaton. The rules are â History of universality. In Greek times it was noted as a
{{0, _, 3} ! 0, {_, 2, 3} ! 3, {1, 1, 3} ! 4, {_, 1, 4} ! 4, {1 Ï 2, 3, philosophical matter that any single human language can be
_} ! 5, {p : (0 Ï 1), 4, _} ! 7 - p, {7, 2, 6} ! 3, {7, _, _} ! 7, used to describe the same basic range of facts and processes.
{_, 7, p : (1 Ï 2)} ! p, {_, p : (5 Ï 6), _} ! 7 - p, {5 Ï 6, p : (1 Ï 2), _} ! And with logic introduced as a way to formalize arguments
7 - p, {5 Ï 6, 0, 0} ! 1, {_, p : (1 Ï 2), _} ! p, {_, _, _} ! 0}
(see page 1099), Gottfried Leibniz in the 1600s considered the
and the initial conditions consist of Append[Table[1, {n}], 3]
idea of setting up a universal language based on logic that
surrounded by 0 ’s. The rules can be implemented using
would provide a precise description analogous to a
GeneralCARule as given on page 867. (See also page 1186.)
mathematical proof of any fact or process. But while Leibniz
â Page 640 · Primes cellular automaton. The rules are considered the possibility of checking his descriptions by
{{13, 3, 13} ! 12, {6, _, 4} ! 15, {10, _, 3 Ï 11} ! 15, {13, 7, _} ! machine, he apparently did not imagine setting up the analog
8, {13, 8, 7} ! 13, {15, 8, _} ! 1, {8, _, _} ! 7, {15, 1, _} ! 2,
of a computation in which something is explicitly generated
{_, 1, _} ! 1, {1, _, _} ! 8, {2 Ï 4 Ï 5, _, _} ! 13, {15, 2, _} ! 4,
{_, 4, 8} ! 4, {_, 4, _} ! 5, {_, 5, _} ! 3, {15, 3, _} ! 12, from input that has been given.
{_, x : (2 Ï 3 Ï 8), _} ! x, {_, x : (11 Ï 12), _} ! x - 1, {11, _, _} ! 13, The idea of having an abstract procedure that can be fed a
{13, _, 1 Ï 2 Ï 3 Ï 5 Ï 6 Ï 10 Ï 11} ! 15, {13, 0, 8} ! 15,
range of different inputs had precursors in antiquity in the
{14, _, 6 Ï 10} ! 15, {10, 0 Ï 9 Ï 13, 6 Ï 10} ! 15, {6, _, 6} ! 0,
{_, _, 10} ! 9, {6 Ï 10, 15, 9} ! 14, {_, 6 Ï 10, 9 Ï 14 Ï 15} ! 10, use of letters to denote objects in geometrical constructions,
{_, 6 Ï 10, _} ! 6, {6 Ï 10, 15, _} ! 13, {13 Ï 14, _, 9 Ï 15} ! 14, and in the 1500s in the introduction of symbolic formulas
{13 Ï 14, _, _} ! 13, {_, _, 15} ! 15, {_, _, 9 Ï 14} ! 9, {_, _, _} ! 0} and algebraic variables. But the notion of abstract functions

1109
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

in mathematics reached its modern form only near the end Nevertheless, by the late 1940s, practical computer
of the 1800s. engineering had also been led to the idea of storing
At the beginning of the 1800s practical devices such as the programs—like data—electronically, and in the 1950s it
player pianos and the Jacquard loom were invented that became widely understood that general-purpose practical
could in effect be fed different inputs using analogs of computers could be viewed as universal systems.
punched cards. And in the 1830s Charles Babbage and Ada Many theoretical investigations of universality were made in
Lovelace noted that a similar approach could be used to the 1950s and 1960s, but gradually the emphasis shifted more
specify the mathematical procedure to be followed by a towards issues of languages and algorithms.
mechanical calculating machine (see page 1107). But it was â Universality in Mathematica. As an example of how
somehow assumed that the specification of the procedure different primitive operations can be used to do the same
must be done quite separately from the specification of the computation, the following are a few ways that the factorial
data to which the procedure was to be applied. function can be defined in Mathematica:
Starting in the 1880s attempts to build up both numbers and f [n_] := n!
the operations of arithmetic from logic and set theory began f [n_] := n f [n - 1]; f [1] = 1
to suggest that both data and procedures could potentially be f [n_] := Product[i, {i, n}]
described in common terms. And in the 1920s work by Moses
f [n_] := Module[{t = 1}, Do[t = t i, {i, n}]; t]
Schönfinkel on combinators and by Emil Post on string
f [n_] := Module[{t = 1, i}, For[i = 1, i < n, i ++, t *= i]; t]
rewriting systems provided fairly concrete examples of this.
f [n_] := Apply[Times, Range[n]]
In 1930 Kurt Gödel used the same basic idea to set up Gödel
f [n_] := Fold[Times, 1, Range[n]]
numbers to encode logical and other procedures as numbers.
(Leibniz had in fact already done this for basic logic f [n_] := If [n 2 1, 1, n f [n - 1]]
expressions in 1679.) But Gödel then took the crucial step of f [n_] := Fold[#2[#1] &, 1, Array[Function[t, #1 t] &, n]]
showing that the process of finding outputs from all such f = If [#1 2 1, 1, #1 #0[#1 - 1]] &
procedures could in effect be viewed as equivalent to
following relations of logic and arithmetic—thus establishing
that these relations are in a certain sense universal (see page A Universal Cellular Automaton
784). This fact, however, was embedded inside the rather
â Page 648 · Universal cellular automaton. The rules for the
technical proof of Gödel’s Theorem, and it was at first not at
universal cellular automaton are
all clear how specific it might be to the particular
{{_, 3, 7, 18, _} ! 12, {_, 5, 7 Ï 8, 0, _} ! 12, {_, 3, 10, 18, _} ! 16,
mathematical systems considered. {_, 5, 10 Ï 11, 0, _} ! 16, {_, 5, 8, 18, _} ! 7, {_, 5, 14, 0 Ï 18, _} !
But in 1935 Alonzo Church constructed a system in lambda 12, {_, _, 8, 5, _} ! 7, {_, _, 14, 5, _} ! 12, {_, 5, 11, 18, _} ! 10,
{_, 5, 17, 0 Ï 18, _} ! 16, {_, _, x : (11 Ï 17), 5, _} ! x - 1,
calculus that he showed could be made to emulate any other
{_, 0 Ï 9 Ï 18, x : (7 Ï 10 Ï 16), 3, _} ! x + 1, {_, 0 Ï 9 Ï 18, 12, 3, _} !
system in lambda calculus if given appropriate input, and in 14, {_, _, 0 Ï 9 Ï 18, 7 Ï 10 Ï 12 Ï 16, x : (3 Ï 5)} ! 8 - x,
1936 Alan Turing did the same thing for Turing machines. As {_, _, _, 8 Ï 11 Ï 14 Ï 17, x : (3 Ï 5)} ! 8 - x, {_, 13, 4, _, x : (0 Ï 18)} !
discussed on page 1125, both Church and Turing argued that x, {18, _, 4, _, _} ! 18, {_, _, 18, _, 4} ! 18, {0, _, 4, _, _} ! 0,
{_, _, 0, _, 4} ! 0, {4, _, 0 Ï 18, 1, _} ! 3, {4, _, _, _, _} ! 4,
the systems they set up would be able to perform any
{_, _, 4, _, _} ! 9, {_, 4, 12, _, _} ! 7, {_, 4, 16, _, _} ! 10,
reasonable computation. In both cases, their original {x : (0 Ï 18), _, 6, _, _} ! x, {_, 2, 6, 15, x : (0 Ï 18)} ! x, {_, 12 Ï 16,
motivation was to use this fact to construct an argument that 6, 7, _} ! 0, {_, 12 Ï 16, 6, 10, _} ! 18, {_, 9, 10, 6, _} ! 16,
the so-called decision problem (Entscheidungsproblem) of {_, 9, 7, 6, _} ! 12, {9, 15, 6, 7, 9} ! 0, {9, 15, 6, 10, 9} ! 18,
{9, _, 6, _, _} ! 9, {_, 6, 7, 9, 12 Ï 16} ! 12, {_, 6, 10, 9, 12 Ï 16} !
mathematical logic was undecidable (see page 1136). But
16, {12 Ï 16, 6, 7, 9, _} ! 12, {12 Ï 16, 6, 10, 9, _} ! 16,
Turing in particular gradually realized that his notion of {6, 13, _, _, _} ! 9, {6, _, _, _, _} ! 6, {_, _, 9, 13, 3} ! 9,
universality could be applied to practical computers. {_, 9, 13, 3, _} ! 15, {_, _, _, 15, 3} ! 3, {_, 3, 15, 0 Ï 18, _} ! 13,
{_, 13, 3, _, 0 Ï 18} ! 6, {x : (0 Ï 18), 15, 9, _, _} ! x,
Turing’s results were used in the 1940s—notably in the work
{_, 6, 13, _, _} ! 15, {_, 4, 15, _, _} ! 13, {_, _, _, 15, 6} ! 6,
of Warren McCulloch and Walter Pitts—as a basis for the {_, _, 2, 6, 15} ! 1, {_, _, 1, 6, _} ! 2, {_, 1, 6, _, _} ! 9, {_, 3, 2,
assertion that electric circuit analogs of neural networks _, _} ! 1, {3, 2, _, _, _} ! 3, {_, _, 3, 2, _} ! 3, {_, 1, 9, 1, 6} ! 6,
could achieve the sophistication of brains, and this appears to {_, _, 9, 1, 6} ! 4, {_, 4, 2, _, _} ! 1, {_, _, _, _, x : (3 Ï 5)} ! x,
{_, _, 3 Ï 5, _, x : (0 Ï 18)} ! x, {_, _, x : (1 Ï 2 Ï 7 Ï 8 Ï 9 Ï 10 Ï 11 Ï
have influenced John von Neumann’s thinking about the
12 Ï 13 Ï 14 Ï 15 Ï 16 Ï 17), _, _} ! x, {_, _, 18, 7 Ï 10, 18} ! 18,
general programmability of electronic computers. {_, _, 0, 7 Ï 10, 0} ! 0, {_, _, 0 Ï 18, _, _} ! 9, {_, _, x_, _, _} ! x}

1110
T H E N O T I O N O F C O M P U T A T I O N N O T E S F O R C H A P T E R 1 1

where the numbers correspond to the icons shown in the condition with a single 2 surrounded by 0’s corresponds to
main text according to all cells being white in the mobile automaton.

0 1
â Page 658 · Turing machines. Given any Turing machine
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 with rules in the form used on page 888 and k possible colors
The block in the initial conditions for the universal cellular for each cell, a cellular automaton which emulates it can be
automaton corresponding to a cell with color a is given by constructed using
Flatten[{Transpose[{Join[{4, 18 ( 1 - a), 6}, Table[9, TMToCA[rules_, k_ : 2] :=
{2 2 r+1 - 3}]], 10 - 3 rtab}], Table[{9, 1}, {r}], 9, 13}] Flatten[{Map[g[#, k] &, rules], {_, x_, _} ! x}]
where r is the range of the rule to be emulated (r = 1 for g[{s_, a_} ! {sp_, ap_, d_}, k_] := {If [d 2 1, Identity,
Reverse][{k s + a, x_, _}] ! k sp + x, {_, k s + a, _} ! ap}
elementary rules) and rtab is the list of outcomes for that rule
(starting with the outcome for {1, 1, ( 1) ...} ). In general, there If the Turing machine has s states for its head, then the
are 2 2 r+1 cases in the rule to be emulated; each block in the cellular automaton has k ( s + 1) colors for each cell. An
universal cellular automaton is 2 ( 2 2 r+1 + r + 1) cells wide, initial condition with a single cell of color k surrounded by
and each step in the rule to be emulated corresponds to 0’s corresponds to being in state 1 with a blank tape in the
( 3 r + 2) 2 2 r+1 + 3 r 2 + 7 r + 3 steps in the evolution of the Turing machine.
universal cellular automaton. â Page 659 · Substitution systems. Given a substitution system
â Page 655 · More colors. Given a rule that involves three with rules in the form such as {1 ! {0}, 0 ! {0, 1}} used on
colors and nearest neighbors, the following converts each page 889, the rules for a cellular automaton which emulates it
case of the rule to a collection of cases for a rule with two are obtained from
colors: SSToCA[rules_] := {{b, b, p[x_, _]} ! s[x],
CA3ToCA2[{a_, b_, c_} ! d_] := Union[Flatten[Table[Thread[ {_, s[v : ( 0 Ï 1)], p[x_, _]} ! p[v, x], {_, p[_, y_], _} ! s[y],
Partition[Flatten[{l, a, b, c, r} /. coding], 11, 1]0{2, {_, s[v : ( 0 Ï 1)], _m} ! m[v], {s[0 Ï 1], m[v : ( 0 Ï 1)], _} !
3, 4}1 ! ( d /. coding)], {l, 0, 2}, {r, 0, 2}], 2]] s[v], {b, m[v : ( 0 Ï 1)], _} ! r[v], {_, r[v : ( 0 Ï 1)], _} "
( Replace[v, rules] /. {{x_} ! s[x], {x_, y_} ! p[x, y]}),
coding = {0 ! {0, 0, 0}, 1 ! {0, 0, 1}, 2 ! {0, 1, 1}} {_r, s[v : ( 0 Ï 1)], _} ! r[v], {_r, b, _} ! m[b],
The problem of encoding cells with several colors by blocks {s[0 Ï 1], m[b], _} ! b, {_, v_, _} ! v}
of black and white cells is related to standard problems in where specific values for cells can be obtained from
coding theory (see page 560). One approach is to use {1, 1} to {b ! 0, s[0] ! 1, m[0] ! 2, p[0, 0] ! 3,
indicate the boundary of each block, and then within each r[0] ! 4, p[0, 1] ! 5, p[1, 0] ! 6, r[1] ! 7,
block to use all possible digit sequences which do not contain p[1, 1] ! 8, m[1] ! 9, m[b] ! 10, s[1] ! 11}
{1, 1} , as in the Fibonacci number system discussed on page An initial condition consisting of a single element with color
892. Note that the original rule with k colors and r neighbors i in the substitution system is represented by m[i]
2 r+1
involves Log[2, k k ] bits of information; the two-color rule surrounded by b ’s in the cellular automaton. The specific
2 s+1
that emulates it involves Log[2, 2 2 ] bits. As a result, the definition given above works for neighbor-independent
minimum possible s for k = 3 , r = 1 is about 2.2; in the substitution systems whose elements have two possible
specific example shown in the main text it is 5. colors, and in which each element is replaced at each step by
at most two new elements.

Emulating Other Systems with Cellular Automata â Page 660 · Sequential substitution systems. Given a
sequential substitution system with rules in the form used on
â Page 657 · Mobile automata. Given a mobile automaton with page 893, the rules for a cellular automaton which emulates it
rules in the form used on page 887, a cellular automaton can be obtained from
which emulates it can be constructed using SSSToCA[rules_] := Flatten[{{v[_, _, _], u, _} ! u, {_, v[rn_,
MAToCA[rules_] := x_, _], u} ! r[rn + 1, x], {_, v[_, x_, _], _} ! x, MapIndexed[
Append[Flatten[Map[g, rules]], {_, _, x_, _, _} ! x] With[{rn = #2011, rs = #1011, rr = #1021}, {If [Length[rs] 2
g[{a_, b_, c_} ! {d_, e_}] := {{_, a, b + 2, c, _} ! d, If [e 2 1, 1, {u, r[rn, First[rs]], _} ! q[0, rr], {u, r[rn, First[rs]], _} !
{a, b + 2, c, _, _} ! c + 2, {_, _, a, b + 2, c} ! a + 2]} v[rn, First[rs], Take[rs, 1]]], {u, r[rn, x_], _} ! v[rn, x, {}],
{v[rn, _, Drop[rs, -1]], Last[rs], _} ! q[Length[rs] - 1, rr],
This specific definition assumes that the mobile automaton Table[{v[rn, _, Flatten[{___, Take[rs, i - 1]}]], rs0i1, _} ! v[
has two possible colors for each cell; it yields a cellular rn, rs0i1, Take[rs, i]], {i, Length[rs] - 1, 1, -1}], {v[rn, _, _],
y_, _} ! v[rn, y, {}]}] &, rules /. s ! List], {_, q[0, {x__, _}],
automaton with four possible colors for each cell. An initial

1111
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

_} ! q[0, {x}], {_, q[0, {x_}], _} ! r[1, x], {_, q[0, {}], x_} ! â Continuous systems. See page 1128.
r[1, x], {_, q[_, {___, x_}], _} ! x, {_, q[_, {}], x_} ! x,
â Page 662 · Logic circuits. The rules for the cellular automaton
{_, x_, q[0, _]} ! x, {_, _, q[n_, {}]} ! q[n - 1, {}],
{_, _, q[n_, {x___, _}]} ! q[n - 1, {x}], {q[_, {}], _, _} ! w, shown here are
{q[0, {__, x_}], p[y_, _], _} ! p[x, y], {q[0, {__, x_}], y_, _} ! {{0, 1, 1 Ï 3} ! 1, {0, 3, 3} ! 3, {1, 0, 0 Ï 1 Ï 3} ! 1,
p[x, y], {p[_, x_], p[y_, _], _} ! p[x, y], {p[_, x_], u, _} ! x, {1, 1, 3} ! 4, {1, 3, 0} ! 3, {1, 3, 3} ! 2, {2, 1, 3} ! 3,
{p[_, x_], y_, _} ! p[x, y], {_, p[x_, _], _} ! x, {w, u, _} ! u, {2, 3, 0} ! 2, {2, 0, _} ! 4, {3, 3, 0} ! 3, {4, 0, 0 Ï 1 Ï 2 Ï 4} ! 2,
{w, x_, _} ! w, {_, w, x_} ! x, {_, r[rn_, x_], _} ! x, {4, 3, 3} ! 3, {4, 1, 3} ! 1, {4, 3, 0} ! 4, {_, _, _} ! 0}
{_, u, r[_, _]} ! u, {_, x_, r[rn_, _]} ! r[rn, x], {_, x_, _} ! x}] The initial conditions are given by
The initial condition is obtained by applying the rule Flatten[Block[{And, Or}, Map[{0, 2 ( # + 1)} &, expr, {-1}] //.
s[x_, y__] ! {r[1, x], y} and then padding with u ’s. {! x_ " {0, x, 0}, And[x__] " {0, 0, 1, 0, x, 1, 3, 0, 0},
Or[x__] " {0, 0, 1, 0, x, 0, 1, 3, 0}}]]
â Page 661 · Register machines. Given the program for a and in terms of these initial conditions the cellular automaton
register machine in the form used on page 896, the rules for a must be run for Length[list //. {0, x__} ! {x}] - 1 steps in order
cellular automaton that emulates it can be obtained from to find the result.
g[i[1], p_, m_] :=
â Page 663 · RAM. The rules for the cellular automaton shown
{{_, p, _} ! p + 1, {_, 0, p} ! m + 2, {_, _, p} ! m + 3}
g[i[2], p_, m_] :=
here are
{{_, p, _} ! p + 1, {p, 0, _} ! m + 5, {p, _, _} ! m + 6} {{2, 4 Ï 8, 2 Ï 11, _, _} ! 2, {11 Ï 10, 4 Ï 8, 2 Ï 11, _, _} ! 11,
{2, 4 Ï 8, _, _, _} ! 10, {11 Ï 10, 4 Ï 8, _, _, _} ! 2,
g[d[1, q_], p_, m_] := {{m + 2 Ï m + 3, p, _} ! q, {m + 1,
{2, 0, _, _, _} ! 2, {11, 0, _, _, _} ! 11,
p, _} ! p, {0, p, _} ! p + 1, {_, m + 2 Ï m + 3, p} ! m + 1}
{3 Ï 7 Ï 6, _, 10, _, _} ! 1, {x : (3 Ï 7 Ï 6), _, _, _, _} ! x,
g[d[2, q_], p_, m_] := {{_, p, m + 5 Ï m + 6} ! q, {_, p, {_, _, 6, 4, 10} ! 5, {_, _, 6, 8, 10} ! 9, {_, 3, _, 10, _} ! 4,
m + 4} ! p, {_, p, 0} ! p + 1, {p, m + 5 Ï m + 6, _} ! m + 4} {_, 7, _, 10, _} ! 8, {_, _, 1, _, x : (5 Ï 9)} ! x, {1, _, _, _, _} ! 1,
RMToCA[prog_] := With[{m = Length[prog]}, Flatten[ {_, _, 1, _, _} ! 1, {_, _, _, _, 1} ! 1, {_, _, x : (4 Ï 8 Ï 0), _, _} ! x}
{MapIndexed[g[#1, First[#2], m] &, prog], {{0, 0 Ï m + 1, The initial conditions are divided into two parts: instructions
m + 3} ! m + 2, {0, m + 1, _} ! 0, {0, 0, m + 1} ! 0,
on the left and memory on the right. Given a list of 0 and 1
{_, _, x : ( m + 1 Ï m + 3)} ! x, {_, m + 1 Ï m + 3, _} ! m + 2,
{m + 6, 0 Ï m + 4, 0} ! m + 5, {_, m + 4, 0} ! 0, values for successive memory locations, the right-hand initial
{m + 4, 0, 0} ! 0, {x : ( m + 4 Ï m + 6), _, _} ! x, conditions are Flatten[list /. {1 ! {8, 1}, 0 ! {4, 1}}] . To access
{_, m + 4 Ï m + 6, _} ! m + 5, {_, x_, _} ! x}}]] location n the left-hand initial conditions must contain
If m is the length of the register machine program, then the Flatten[{0, i, IntegerDigits[n, 2] /. {1 ! {0, 11}, 0 ! {0, 2}}}]
resulting cellular automaton has m + 7 possible colors for inserted in a repetitive {0, 1} background. If i is 7 , a 1 will be
each cell. If the initial numbers in the two registers are a written to location n ; if it is 3 , a 0 will be written; and if it is 6 ,
and b , then the initial conditions for the cellular automaton the contents of location n will be read and sent back to the left.
are Join[Table[m + 2, {a}], {1}, Table[m + 5, {b}]] surrounded
by 0’s.
Emulating Cellular Automata with Other Systems
â Page 661 · Multiplication systems. The rules for the cellular
automaton shown here are â Page 664 · Mobile automata. Given the rules for an
{{_, 0, 3 Ï 8} ! 5, {_, 0, 2 Ï 7} ! 8, {_, 1, 4 Ï 9} ! 9, elementary cellular automaton in the form used on page 867, the
{_, 1, 3 Ï 8} ! 4, {_, 1, 2 Ï 7} ! 8, {_, 10, 4 Ï 9} ! 3, following will construct a mobile automaton which emulates it:
{_, 10, 3 Ï 8} ! 7, {_, 10, 2 Ï 7} ! 2, {5 Ï 6, 1, 0} ! 9, vals = {x, p[0], q[0, 0], q[0, 1], q[1, 0], q[1, 1], p[1]}
{5 Ï 6, 10, 0} ! 3, {5 Ï 6, 1, _} ! 6, {5 Ï 6, 10, _} ! 5,
{_, 2 Ï 3 Ï 4 Ï 5, _} ! 10, {_, 6 Ï 7 Ï 8 Ï 9, _} ! 1, {_, x_, _} ! x} CAToMA[rules_] := Table[( # ! Replace[#, {{q[a_, b_], p[c_],
p[d_]} " {q[c, {a, c, d} /. rules], 1}, {q[a_, b_], p[c_], x} "
and the initial condition consists of a single 3 surrounded by
{q[c, {a, c, 0} /. rules], 1}, {q[_, _], x, x} ! {p[0], -1},
0 ’s. The idea used is that multiplication by 3 can be achieved {q[_, _], q[_, a_], p[_]} ! {p[a], -1}, {x, q[_, a_], p[_]} !
by scanning digits from right to left, adding to each digit the {p[a], -1}, {x, x, p[_]} ! {q[0, 0], 1}, {_, _, _} !
value of the digit on its immediate right, as well as a carry {x, 0}}] &)[vals0IntegerDigits[i, 7, 3] + 11], {i, 0, 7 3 - 1}]
that can propagate any distance but cannot be larger than 1. The ordering in vals defines a mapping of symbolic cell
Note that as discussed on page 614 multiplication by some values onto colors. Given a list of initial cell colors for the
multipliers in some bases (such as by 3 in base 6) can be cellular automaton, the initial conditions for the mobile
achieved by a single step in the evolution of a suitable automaton are given by Flatten[{p[0], Map[p, list], p[0]}]
cellular automaton. After t steps, the width of the pattern surrounded by x ’s, with the active cell being placed initially
shown here is about Sqrt[Log[2, 3] t] . (See also page 119.) just before the first p[0] .

1112
T H E N O T I O N O F C O M P U T A T I O N N O T E S F O R C H A P T E R 1 1

â Page 665 · Turing machines. Given the rules for an The initial condition for the symbolic system is given by
elementary cellular automaton in the form used on page 867, Fold[#1[#2] &, r[p][p], init /. {0 ! p, 1 ! q}][p][p][r]
the following will construct a Turing machine which
Step t in the cellular automaton corresponds to step
emulates it:
t ( t + Length[init] + 3) in the symbolic system.
CAToTM[rules_] :=
{{q[a_, b_], c : ( 0 Ï 1)} " {q[b, c], {a, b, c} /. rules, 1}, Note that the succession of states shown here depends on the
{q[_, _], x} ! {p[0], 0, -1}, {p[a_], b : ( 0 Ï 1)} ! detailed order in which rules are applied (see page 898). It is
{p[b], a, -1}, {p[_], x} ! {q[0, 0], 0, 1}} also possible to construct symbolic systems with the so-called
Given a list of initial cell colors for the cellular automaton, the confluence property, in which results from any fixed number
initial tape for the Turing machine consists of of steps of cellular automaton evolution can be found by
Join[{0, 0}, list, {0, 0}] surrounded by x ’s, with the head of applying rules in any possible order (see page 1036).
the Turing machine on the first 0 in state q[0, 0] . â Page 669 · Cyclic tag systems. From a tag system which
For specific cellular automata it is often possible to depends only on its first element, with rules given as in the
construct smaller Turing machines, as on pages 707 and note below, the following constructs a cyclic tag system
1119. By combining identical cases in rules and writing emulating it:
rules as compositions of ones with smaller neighborhoods TS1ToCT [{n_, subs_}] := With[{k = Length[subs]},
one can for example readily construct Turing machines Join[Map[v[Last[#], k] &, subs], Table[{}, {k ( n - 1)}]]]
with 4 states and 3 colors that emulate 166 of the u[i_, k_] := Table[If [ j 2 i + 1, 1, 0], {j, k}]
elementary cellular automata. v[list_, k_] := Flatten[Map[u[#, k] &, list]]
The initial condition for the tag system can be converted
â Page 667 · Sequential substitution systems. Given the rules
using v[list, k] . The list representing the complete history of
for an elementary cellular automaton in the form used on
the resulting cyclic tag system can then be interpreted
page 867, the following will construct a sequential
using
substitution system which emulates it:
Map[Map[Position[#, 1]01, 11 - 1 &, Partition[#, k]] &,
CAToSSS[rules_] := Join[rules /.
Take[history, {1, -1, n k}]]
( {a_, b_, c_} ! d_) ! {1, 2 a, 2 b, 2 c} ! {2 d, 1, 2 b, 2 c},
{{1, 0, 0} ! {0, 0}, {0} ! {1, 0, 0, 0}}] This construction is relevant to the proof of the universality
The initial condition {0, 0, 2, 0, 0} for the sequential of rule 110 starting on page 678.
substitution system corresponds to a single black cell â Page 669 · Multicolor Turing machines. Given rules in the
surrounded by white cells in the cellular automaton. form on page 888 for a Turing machine with s states and k
â Page 667 · Tag systems. Given the rules for an elementary colors the following yields an equivalent Turing machine
cellular automaton in the form used on page 867, the with With[{c = Ceiling[Log[2, k]]}, ( ( 3 2 c ) + 2 c - 7) s] states
following will construct a tag system which emulates it: (always less than 6.03 k s ) and 2 colors:
CAToTS[rules_] := {2, {{s[x_], s[y_]} " TMToTM2[rule_, s_, k_] := ( # /. MapIndexed[
{d[x, y], d[x, y]}, {d[w_, x_], d[y_, z_]} " #1 ! First[#2] &, Union[Map[#01, 11 &, #]]] &)[
{s[{w, x, y} /. rules], s[{x, y, z} /. rules]}, With[{b = Ceiling[Log[2, k]] - 1}, Flatten[Table[
{s[x_], d[y_, z_]} " {s[0], s[0], s[{0, y, z} /. rules]}, {Table[{Table[{{m, i, n, d}, c} ! {{m, Mod[i, 2 n-1 ], n - 1,
{d[x_, y_], s[z_]} " {s[{x, y, 0} /. rules], s[0], s[0]}}} d}, Quotient[i, 2 n-1 ], 1}, {n, 2, b}, {i, 0, 2 n - 1}], Table[
{{m, i, 1, d}, c} ! {{m, -1, 1, d}, i, d}, {i, 0, 1}], Table[
The initial condition for the tag system that corresponds to a {{m, -1, n, d}, c} ! {{m, -1, n + 1, d}, c, d}, {n, b - 1}],
single black cell in the cellular automaton is {{m, -1, b, d}, c} ! {{0, 0, m}, c, d}}, {d, -1, 1, 2}],
Table[{{i, n, m}, c} ! {{i + 2 n c, n + 1, m}, c, -1},
{s[0], s[0], s[1], s[0], s[0]} . Given a list of all steps in the
{n, 0, b - 1}, {i, 0, 2 n - 1}], With[{r = 2 b }, Table[
evolution of the tag system, Cases[list, {__s}] picks out If [i + r c > k, {}, Cases[rule, ( {m, i + r c} ! {x_, y_, z_}) !
successive steps in the cellular automaton evolution. {{i, b, m}, c} ! {{x, Mod[y, r], b, z}, Quotient[y, r],
1}]], {i, 0, r - 1}]]}, {m, s}, {c, 0, 1}]]]]
â Page 668 · Symbolic systems. Given the rules for an
Some of these states are usually unnecessary, and in the
elementary cellular automaton in the form used on page 867
main text such states have been pruned. Given an initial
(with {0, 0, 0} ! 0 ), the following will construct a symbolic
condition {i, list, n} the initial condition for the 2-color
system which emulates it:
Turing machine is
Flatten[{Array[p[x_][#1][#2][#3] !
p[x[{##} /. rules]][#2][#3] &, {2, 2, 2}, 0] /. {0 ! p, 1 ! q}, With[{b = Ceiling[Log[2, k]]},
{r[x_] ! p[r[p][p]][x], p[x_][p][p][r] ! x[p][p][r]}}] {i, Flatten[IntegerDigits[list, 2, b]], b n}]

1113
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

â Page 670 · One-element-dependence tag systems. Writing the registers.) Given the list of successive configurations of the
rule {3, {{0, _, _} ! {0, 0}, {1, _, _} ! {1, 1, 0, 1}}} from page 895 register machine, the steps that correspond to successive
as {3, {0 ! {0, 0}, 1 ! {1, 1, 0, 1}}} the evolution of a tag steps of Turing machine evolution can be obtained from
system that depends only on its first element is obtained from ( Flatten[Partition[Complement[#, # - 1], 1, 2]] &)[
TS1EvolveList[rule_, init_, t_] := Position[list, {_, {_, _, 0}}]]
NestList[TS1Step[rule, #] &, init, t]
The program given above works for Turing machines with any
TS1Step[{n_, subs_}, {}] = {}
number of states, but it requires some simple extensions to
TS1Step[{n_, subs_}, list_] := handle more than two possible colors for each cell. Note that
Drop[Join[list, First[list] /. subs], n]
for a Turing machine with s states, the length of the register
Given a Turing machine in the form used on page 888 the machine program generated is between 34 s and 36 s .
following will construct a tag system that emulates it:
â Register machines with many registers. It turns out that a
TMToTS1[rules_] :=
register machine with any number of registers can always be
{2, Union[Flatten[rules /. ( {i_, u_} ! {j_, v_, r_}) "
{Map[#[i] ! {#[i, 1], #[i, 0]} &, {a, b, c, d}], If [r 2 1, emulated by a register machine with just two registers. The
{a[i, u] ! {a[ j], a[ j]}, b[i, u] ! Table[b[ j], {4}], c[i, u] ! basic idea is to encode the list of values of all the registers in
Flatten[{Table[b[ j], {2 v}], Table[c[ j], {2 - u}]}], the multiregister machine in the single number given by
d[i, u] ! {d[ j]}}, {a[i, u] ! Table[a[ j], {2 - u}],
RMEncode[list_] :=
b[i, u] ! {b[ j]}, c[i, u] ! Flatten[{c[ j], c[ j],
Product[Prime[ j]^list0j1, {j, Length[list]}]
Table[d[ j], {2 v}]}], d[i, u] ! Table[d[ j], {4}]}]}]]}
and then to have this number be the value at appropriate
A Turing machine in state i with a blank tape corresponds to
steps of the first register in the 2-register machine. The
initial condition {a[i], a[i], c[i]} for the tag system. The
program in the multiregister machine can be converted to a
configuration of the tape on each side of the head in the
program for the 2-register machine according to
Turing machine evolution can be obtained from the tag
RMToRM2[prog_] :=
system evolution using Module[{segs, adrs}, segs = MapIndexed[seg, prog];
Cases[history, x : {a[_], ___} " adrs = FoldList[Plus, 1, Map[Length, segs]];
Apply[{#1, Reverse[#2]} &, Map[ MapIndexed[#1 /. {ds[r_, s_] " d[r, adrs0s1],
Drop[IntegerDigits[Count[x, #], 2], -1] &, {_b, _d}]]] dr[r_, j_] " d[r, j + First[#2]]} &, Flatten[segs]]]
â Page 672 · Register machines. Given the rules for a Turing seg[i[r_], {a_}] := With[{p = Prime[r]},
Flatten[{Table[i[2], {p}], dr[1, -p], i[1],
machine in the form used on page 888, a register machine
dr[2, -1], Table[dr[1, 1], {p + 1}]}]]
program to emulate the Turing machine can be obtained by
seg[d[r_, n_], {a_}] := With[{p = Prime[r]}, Flatten[{i[2], dr[
techniques analogous to those used in compilers for practical 1, 5], i[1], dr[2, -1], dr[1, 1], ds[1, n], Table[{If [m 2 p - 1,
computer languages. Here TMCompile creates a program ds[1, a], dr[1, 3 p + 2 - m]], Table[i[1], {p}], dr[2, -p],
segment for each element of the Turing machine rule, and Table[dr[1, 1], {2 p - m - 1}], ds[1, a + 1]}, {m, p - 1}]}]]
TMToRM resolves addresses and links the segments together. The initial conditions for the 2-register machine are given by
TMToRM[rules_] := Module[{segs, adrs}, segs = {1, {RMEncode[list], 0}} and the results corresponding to each
Map[TMCompile, rules]; adrs = Thread[Map[First, rules] ! step in the evolution of the multiregister machine appear whenever
Drop[FoldList[Plus, 1, Map[Length, segs]], -1]];
MapIndexed[#1 /. {dr[r_, n_] " d[r, n + First[#2]], register 2 in the 2-register machine is incremented from 0.
dm[r_, z_] " d[r, z /. adrs]} &, Flatten[segs]]] â Computations with register machines. As an example, the
TMCompile[_ ! z : {_, _, 1}] := f [z, {1, 2}] following program for a 3-register machine starting with
TMCompile[_ ! z : {_, _, -1}] := f [z, {2, 1}] !!!!
initial condition {n, 0, 0} will compute {Round[ n ], 0, 0} :
f [{s_, a_, _}, {ra_, rb_}] := Flatten[{i[3], dr[ra, -1], {d[1, 4], i[1], d[1, 15], i[2], d[1, 6], d[1, 11], i[1],
dr[3, 3], i[ra], i[ra], dr[3, -2], If [a 2 1, i[ra], {}], i[3], d[2, 7], d[3, 7], d[1, 15], d[3, 4], i[3], d[2, 12], d[3, 4]}
dr[rb, 5], i[rb], dr[3, -1], dr[rb, 1], dm[rb, {s, 0}],
â Page 673 · Arithmetic systems. Given the program for a
dr[rb, -6], i[rb], dr[3, -1], dr[rb, 1], dm[rb, {s, 1}]}]
register machine with nr registers in the form on page 896, an
A blank initial tape for the Turing machine corresponds to arithmetic system which emulates it can be obtained from
initial conditions {1, {0, 0, 0}} for the register machine. RMToAS[prog_, nr_] := With[{p = Length[prog], g =
(Assuming that the Turing machine starts in state 1, with a 0 Product[Prime[ j], {j, nr}]}, {p g, Sort[Flatten[MapIndexed[
under its head, other initial conditions can be encoded just by With[{n = First[#2] - 1}, #1 /. {i[r_] " Table[n + j p !
taking the values of cells on the left and right to give the ( 1 + n + Prime[r] ( -n + #) &), {j, 0, g - 1}], d[r_, k_] "
Table[n + j p ! If [Mod[ j, Prime[r]] 2 0, -1 + k + ( -n +
digits of the numbers that are initially in the first two #)/ Prime[r] &, # + 1 &], {j, 0, g - 1}]}] &, prog]]]}]

1114
T H E N O T I O N O F C O M P U T A T I O N N O T E S F O R C H A P T E R 1 1

The rules for the arithmetic system are represented so that the a 17-color cellular automaton that he believed was universal.)
system from page 122 becomes for example But without any particular reason to think it would be
{2, {0 " ( 3 # / 2 &), 1 " ( 3 ( # + 1)/ 2 &)}} . If the register machine interesting, almost nothing was done on finding simpler
starts at instruction n with values regs in its registers, then the universal 1D cellular automata. In 1984 I suggested that
corresponding arithmetic system starts with the number cellular automata showing what I called class 4 behavior
n + Table[Prime[i]^reg0i1, {i, nr}] p - 1 where p = Length[prog] . should be universal—and I identified some simple rules
The evolution of the arithmetic system is given by (such as k = 2 , r = 2 totalistic code 20) as explicit candidates.
ASEvolveList[{n_, rules_}, init_, t_] := A piece published in Scientific American in 1985 describing
NestList[( Mod[#, n] /. rules)[#] &, init, t] my interest in finding simple 1D universal cellular automata
Given a value m obtained in the evolution of the arithmetic led me to receive a large number of proofs of the fact (already
system, the state of the register machine to which it well known to me) that 1D cellular automata can in principle
corresponds is emulate Turing machines. In 1989 Kristian Lindgren and
{Mod[m, p] + 1, Map[Last, FactorInteger [ Mats Nordahl constructed a 7-color nearest-neighbor cellular
Product[Prime[i], {i, nr}] Quotient[m, p]]] - 1} automaton that could emulate Minsky’s 7,4 universal Turing
Note that it is possible to have each successive step involve machine, and showed that in general a rule with s + k + 2
only multiplication, with no addition, at the cost of using colors could emulate an s -state k -color Turing machine
considerably larger numbers overall. (compare page 658). Following my ideas about class 4
cellular automata I had come by 1985 to suspect that rule 110
â History. The correspondence between arithmetic systems and
must be universal. And when I started working on the
register machines was established (using a slightly different
writing of this book in 1991, I decided to try to establish this
approach) by Marvin Minsky in 1962. Additional work was
for certain. The general outline of what had to be done was
done by John Conway, starting around 1971. Conway
fairly clear—but there were an immense number of details to
considered fraction systems based on rules of the form
be handled, and I asked a young assistant of mine named
FSEvolveList[fracs_, init_, t_] :=
Matthew Cook to investigate them. His initial results were
NestList[First[Select[fracs #, IntegerQ, 1]] &, init, t]
encouraging, but after a few months he became increasingly
With the choice
convinced that rule 110 would never in fact be proved
fracs = {17 / 91, 78 / 85, 19 / 51, 23 / 38, 29 / 33, 77 / 29, 95 /
23, 77 / 19, 1/ 17, 11/ 13, 13 / 11, 15 / 14, 15 / 2, 55 / 1} universal. I insisted, however, that he keep on trying, and
starting at 2 the result for Log[2, list] is as shown below, over the next several years he developed a systematic
where Rest[Log[2, Select[list, IntegerQ[Log[2, #]] &]]] gives computer-aided design system for working with structures in
exactly the primes. rule 110. Using this he was then in 1994 successfully able to
find the main elements of the proof. Many details were filled
40 in over the next year, some mistakes were corrected in 1998,
20 and the specific version in the note below was constructed in
0
2001. Like most proofs of universality, the final proof he
0 200 400 600 800 1000 found is conceptually quite straightforward, but is filled with
(Compare the discussion of universality in integer equations many excruciatingly elaborate details. And among these
on page 786.) details it is certainly possible that a few errors still remain.
But if so, I believe that they can be overcome by the same
â Multiway systems. It is straightforward to emulate a k -color
general methods that have been used in the proof so far.
multiway system with a 2-color one, just by encoding
Quite probably a somewhat simpler proof can be given, but
successive colors by strings like "AAABBB" , "AAABAB" and
as discussed on page 722 it is essentially inevitable that
"AABABB" that have no overlaps. (Compare page 1033.)
proofs of universality must be at least somewhat
complicated. In the future it should be possible to give a
The Rule 110 Cellular Automaton proof in a form that can be checked completely by computer.
(The initial conditions in the note below quite soon become
â History. The fact that 1D cellular automata can be universal too large to run explicitly on any existing computer.) And in
was discussed by Alvy Ray Smith in 1970—who set up an 18- addition, with sufficient effort, I believe one should be able to
color nearest-neighbor cellular automaton rule capable of construct an automated system that will allow many
emulating Marvin Minsky’s 7-state 4-color universal Turing universality proofs of this general kind to be found almost
machine (see page 706). (Roger Banks also mentioned in 1970 entirely by computer (compare page 810).

1115
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

â Page 683 · Initial conditions. The following takes the rules struct[{x_, y_, pl_, pr_, b_, bl_}, p_Integer : 1] := Module[
for a cyclic tag system in the form used on page 895 (with the {gr = s[d[x, y], pl, pr, IntegerDigits[b, 2, bl]], p2 = p + 1},
Drop[NestWhile[Append[#, ev[Last[#]]] &, {gr},
restrictions in the note below), together with the initial
If [Rest[Last[#]] === Rest[gr], p2 --]; p2 > 0 &], -1]]
conditions for the tag system, and yields a specification of
sadd[{d[x_, y_], b_}, {d[dx_, dy_], st_}] :=
initial conditions in rule 110 which will emulate it. This Module[{x1 = dx - x, y1 = dy - y, b2, x2, y2}, While[y1 > 0,
specification gives a list of three blocks {b1 , b2 , b3 } and the {x1, y1} += If [Length[st] 2 30, {8, -30}, {-2, -3}]];
final initial conditions consist of an infinite repetition of b1 b2 = First[Cases[st, s[d[x3_, -y1], pl_, _, sb_] "
Join[bg[pl - x1 - x3, x1 + x3], x2 = x3 + Length[sb];
blocks, followed by b2 , followed by an infinite repetition of
y2 = -y1; sb]]]; {d[x2, y2], Join[b, b2]}]
b3 blocks. The b1 blocks act like “clock pulses”, b2 encodes
the initial conditions for the tag system and the b3 blocks CTToR110[{{}}, {1}] yields blocks of lengths {7204, 1873, 7088} .
encode the rules for the tag system. But even CTToR110[ {{0, 0, 0, 0, 0, 0}, {}, {1, 1, 1, 1, 1, 1}, {}}, {1}]
CTToR110[rules_ /; already yields blocks of lengths {105736, 34717, 95404} . The
Select[rules, Mod[Length[#], 6] 9 0 &] 2 {}, init_] := picture below shows what happens if one chops these blocks
Module[{g1, g2, g3, nr = 0, x1, y1, sp}, g1 = Flatten[ into rows and arranges these in 2D arrays. In the first two
Map[If [# === {}, {{{2}}}, {{{1, 3, 5 - First[#]}}, Table[
blocks, much of what one sees is just padding to prevent clock
{4, 5 - #0n1}, {n, 2, Length[#]}]}] &, rules] /. a_Integer "
Map[{d[#011, #021], s[#031]} &, Partition[c[a], 3]], 4]; pulses on the left from hitting data in the middle too early on
g2 = g1 = MapThread[If [#1 === #2 === {d[22, 11], s3}, {d[ any given step. The part of the middle block that actually
20, 8], s3}, #1] &, {g1, RotateRight[g1, 6]}]; While[Mod[ encodes an initial condition grows like 180 Length[init] . The
Apply[Plus, Map[#01, 21 &, g2]], 30] 9 0, nr ++; g2 = Join[
core of the right-hand block grows approximately like
g2, g1]]; y1 = g201, 1, 21 - 11; If [y1 < 0, y1 += 30]; Cases[
Last[g2]021, s[d[x_, y1], _, _, a_] " ( x1 = x + Length[a])]; 500 ( Length[Flatten[rules]] + Length[rules]) , but to make a
g3 = Fold[sadd, {d[x1, y1], {}}, g2]; sp = Ceiling[5 Length[ block that can just be repeated without shifts, between 1 and
g3021]/ ( 28 nr) + 2]; {Join[Fold[sadd, {d[17, 1], {}}, 30 repeats of this core can be needed.
Flatten[Table[{{d[sp 28 + 6, 1], s[5]}, {d[398, 1], s[5]},
{d[342, 1], s[5]}, {d[370, 1], s[5]}}, {3}], 1]]021, bg[
4, 11]], Flatten[Join[Table[bgi, {sp 2 + 1 + 24 Length[init]}],
init /. {0 ! init0, 1 ! init1}, bg[1, 9], bg[6, 60 - g201, 1, 11 +
g301, 11 + If [g201, 1, 21 < g301, 21, 8, 0]]]], g3021}]

s[1] = struct[ {3, 0, 1, 10, 4, 8}, 2 ];


s[2] = struct[ {3, 0, 1, 1, 619, 15}, 2 ];
s[3] = struct[ {3, 0, 1, 10, 4956, 18}, 2 ];
s[4] = struct[ {0, 0, 9, 10, 4, 8}]; â Page 689 · Tag systems. The discussion in the main text and
s[5] = struct[ {5, 0, 9, 14, 1, 1}]; the construction above require a cyclic tag system with
{c[1], c[2]} = Map[Join[ {22, 11, 3, 39, 3, 1}, #] &, blocks that are a multiple of 6 long, and in which at least
{{63, 12, 2, 48, 5, 4, 29, 26, 4, 43, 26, 4, 23, 3, 4, 47, 4, 4}, one block is added at some point in each complete cycle. By
{87, 6, 2, 32, 2, 4, 13, 23, 4, 27, 16, 4}}]; inserting k = 6 Ceiling[Length[subs]/ 6] in the definition of
{c[3], c[4], c[5]} = Map[Join[#, {4, 17, 22, 4, TS1ToCT from page 1113 one can construct a cyclic tag
39, 27, 4, 47, 4, 4}] &, {{17, 22, 4, 23, 24, 4, 31, 29},
{17, 22, 4, 47, 18, 4, 15, 19}, {41, 16, 4, 47, 18, 4, 15, 19}}]
system of this kind to emulate any one-element-dependence
{init0, init1} = Map[IntegerDigits[216 ( # + 432 10 49 ), 2] &, tag system.
{246005560154658471735510051750569922628065067661,
1043746165489466852897089830441756550889834709645 }]
Class 4 Behavior and Universality
bgi = IntegerDigits[9976, 2]
bg[s_, n_] := Array[bgi01 + Mod[# - 1, 14]1 &, n, s] â 2-neighbor rules. Among 3-color 2-neighbor rules class 4
ev[s[d[x_, y_], pl_, pr_, b_]] := Module[{r, pl1, pr1}, r = behavior seems to be comparatively rare; the picture at the top
Sign[BitAnd[2 ^ListConvolve[{1, 2, 4}, Join[bg[pl - 2, 2], b, of the facing page shows an example with rule number 2144.
bg[pr, 2]]], 110]]; pl1 = ( Position[r - bg[pl + 3, Length[r]],
1 Ï -1] /. {} ! {{Length[r]}})01, 11; pr1 = Max[pl1,
( Position[r - bg[pr + 5 - Length[r], Length[r]], 1 Ï -1] /. {} !
{{1}})0-1, 11]; s[d[x + pl1 - 2, y + 1], pl1 + Mod[pl + 2, 14],
1 + Mod[pr + 4, 14] + pr1 - Length[r], Take[r, {pl1, pr1}]]]

1116
T H E N O T I O N O F C O M P U T A T I O N N O T E S F O R C H A P T E R 1 1

only a fixed number of elements on their tape, which is not


sufficient for universality. Extending constructions is often
very tricky; much as in rule 110 it is easy for there to be subtle
bugs associated with rare mismatches in the placement of
structures and timing of interactions. The pictures below
nevertheless show a rather simple implementation of a NAND
gate in Life. The input comes from the left encoded as the
presence or absence of spaceships 92 cells apart. The
spaceships are converted to gliders. When only one glider is
present, a new spaceship emerges on the right as the output.
But when two gliders are present, their collision forms a wall,
â Totalistic rules. It is straightforward to show that totalistic which prevents output of the spaceship.
cellular automata can be universal. Explicit simple
candidates include k = 2 , r = 2 rules with codes 20 and 52, as
well as the various k = 3 , r = 1 class 4 rules shown in
Chapter 3.
â Page 693 · 2D cellular automata. Universality was essentially
built in explicitly to the underlying rules for the 2D cellular
automaton constructed by John von Neumann in 1952 as a
model for self-reproduction. For among the 29 possible states
allowed for each cell were ones set up to behave quite
directly like components for practical electronic computers
like the EDVAC—as well as to grow new memory areas and
so on. In the mid-1960s Edgar Codd showed that a system
similar to von Neumann’s could be constructed with only 8
possible states for each cell. Then in 1970 Roger Banks
managed to show that the 2-state 5-neighbor symmetric 2D
rule 4005091440 was able to reproduce all the same logical
elements. (This system, like rule 110, requires an infinite
repetitive background in order to support universality.)
If one considers rules with more than two colors, it becomes
Following the invention of the Game of Life, considerable
straightforward to emulate standard logic circuits. The
work was done in the early 1970s to identify structures that
pictures below show how 1D cellular automata can be
could be used to make the analog of logic circuits. John
implemented in the 4-color WireWorld cellular automaton of
Conway worked on an explicit proof of universality based on
Brian Silverman from 1987, whose rules find the new value of
emulating register machines, but this was apparently never
a cell from its old value a and the number u of its 8 neighbors
completed. Yet by the 1980s it had come to be generally
that are 1’s according to
believed that the Game of Life had in fact been proved
a /. {0 ! 0, 1 ! 2, 2 ! 3, 3 " If [0 < u < 3, 1, 3]}
universal. No particularly rigorous treatments of the system
were given, and the mere existence of configurations that can
act for example like logic gates was often assumed
immediately to imply universality. From the discoveries I
have made, I have no doubt at all that the Game of Life is in
the end universal, and indeed I believe that the kind of
rule 30
elaborate behavior needed to support various components is
in fact good evidence for this. But the fact remains that a
complete and rigorous proof of universality has apparently
still never been given for the Game of Life. Particularly in
recent years elaborate constructions have been made of for
rule 90 rule 110
example Turing machines. But so far they have always had

1117
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

The Threshold of Universality in Cellular Automata the range r = 1 for elementary rules). It is also possible to set
up emulations where this equality does not hold—and
â Claims of non-universality. Over the years, there have been
indeed some of the cases listed in the main text and shown in
a few erroneous claims of proofs that universality is
the picture above are of this type. In those where r t < b there
impossible in particular kinds of simple cellular automata.
are more cells that are in principle determined by a given set
The basic mistake is usually to make the implicit assumption
of initial blocks—but the outermost of these cells are ignored
that computation must be done in some rather specific way—
when the outcome for a particular cell is deduced. In cases
that does not happen to be consistent with the way we have
where r t > b there are more initial cells whose values are
for example seen that it can be done in rule 110.
specified—but the outermost of these turn out to be
â Page 700 · Rule 73. on a white background yields a irrelevant in determining the outcome for a particular cell.
pattern that contains the last structure shown here. This lack of dependence makes it somewhat inevitable that
â Page 700 · Rule 30. For the first background shown, no initial the only rules that end up being emulated in this way are
region up to size 25 yields a truly localized structure, though ones with very simple behavior.
for example starts off growing quite slowly. In any 1D cellular automaton the color of a particular cell can
â Rule 41. Various rules like rule 41 below can perhaps be always be determined from the colors t steps back of a block
viewed as having localized structures—though ones that of 2 r t + 1 cells (compare pages 605 and 960). But such a block
apparently always travel in the same direction at the same corresponds in a sense to a horizontal slice through the cone
speed. None of the first million initial conditions for rule 41 of previous cell colors. And it turns out also to be possible to
yield unbounded growth, though some can still generate determine the color of a particular cell from slices at
fairly wide patterns, as in the pictures below. (The initial essentially any rational angle corresponding to a propagation
condition consisting repeated, followed by , speed less than r . So this means that one can consider
followed by repeated nevertheless yields a region encodings based on blocks that have a kind of staircase
that grows forever.) shape—as in the rule 45 example shown.
â Encodings. Generalizing the setup in the main text one can say
that a cellular automaton i can emulate j if there is some
encoding function f that encodes the initial conditions a j for j
as initial conditions for i , and which has an inverse that decodes
1 73 1097 7407 the outcome for i to give the outcome for j . With evolution
functions fi and f j the requirement for the emulation to work is
â Page 702 · Rule emulations. The network below shows
f j [a j ] 2 InverseFunction[f][fi [f[a j ]]]
which quiescent symmetric elementary rules can emulate
which with blocks of length 8 or less. (Compare page 269.) In the main text the encoding function is taken to have the form
Flatten[a /. rules] —where rules are say {1 ! {1, 1}, 0 ! {0, 0}} —
with the result that the decoding function for emulations that
0
work is Partition[a" , b] /. Map[Reverse, rules] .
36
72 108
76
200 22 An immediate generalization is to allow rules to have a form
4
like {1 ! {1, 1}, 1 ! {1, 0}, 0 ! {0, 0}} in which several blocks
104
132
146
are in effect allowed to serve as possible encodings for a
232
18
204 single cell value. Another generalization is to allow blocks at
126
122
128
a variety of angles (see above). In most cases, however,
164
90
introducing these kinds of slightly more complicated
94
178
150 encodings does not fundamentally seem to expand the set of
50

160
54 rules that a given rule can emulate. But often it does allow the
32
emulations to work with smaller blocks. And so, for example,
with the setup shown in the main text, rule 54 can emulate
In all cases things are set up so that several steps in one rule
rule 0 only with blocks of length b = 6 . But if either multiple
emulate a single step in another. The examples shown in
blocks or d = 1 are allowed, b can be reduced to 4, with rules
detail in the main text all have the feature that the block size
being {1 ! {1, 1, 1, 1}, 0 ! {0, 0, 0, 0}, 0 ! {0, 1, 1, 1}} and
b and number of steps t are matched, so that r t = b (where
{0 ! {0, 1, 0, 0}, 1 ! {0, 0, 1, 0}} in the two cases.

1118
T H E N O T I O N O F C O M P U T A T I O N N O T E S F O R C H A P T E R 1 1

Various questions about encoding functions f have been head of the Turing machine scan as far to the left as it needs
studied over the past several decades in coding theory. The to get to the case of the tag system rule that applies—then
block-based encodings discussed so far here correspond to copy the appropriate elements to the end of the sequence on
block codes. Convolutional codes (related to sequential the right. Note that although the Turing machine can emulate
cellular automata) are the other major class of codes studied any number of colors in the tag system, it can only emulate
in coding theory, but in their usual form these do not seem directly rules that delete exactly 2 elements at each step. But
especially useful for our present purposes. since we know that at least with sufficiently many colors
In the most general case the encoding function can involve an such tag systems are universal, it follows that the Turing
arbitrary terminating computation (see page 1126). But types of machine is also universal.
encoding functions that are at least somewhat powerful yet can â History. Alan Turing gave the first construction for a
realistically be sampled systematically may perhaps include universal Turing machine in 1936. His construction was
those based on neighbor-dependent substitution systems, and complicated and had several bugs. Claude Shannon showed
on formal languages (finite automata and generalizations). in 1956 that 2 colors were sufficient so long as enough states
â Logic operations and universality. Knowing that the circuits
were used. (See page 669; conversion of Minsky’s machine
in practical computers use only a small set of basic logic using this method yields a {43, 2} machine.) After Minsky’s
operations—often just Nand —it is sometimes assumed that if 1962 result, comparatively little more was published about
a particular system could be shown to emulate logic small universal Turing machines. In the 1980s and 1990s,
operations like Nand , then this would immediately establish however, Yurii Rogozhin found examples of universal Turing
its universality. But at least on the face of it, this is not correct. machines for which the number of states and number of
For somehow there also has to be a way to store arbitrarily colors were: {24, 2} , {10, 3} , {7, 4} , {5, 5} , {4, 6} , {3, 10} , and
{2, 18} . The smallest product of these numbers is 24
large amounts of data—and to apply suitable combinations
of Nand operations to it. Yet while practical computers have (compare note below), and the rule he gave in this case is:
elaborate circuits containing huge numbers of Nand
operations, we now know that for example simple cellular Note that these results concern Turing machines which can
automata that can be implemented with just a few Nand halt (see page 1137); the Turing machines that I consider do
operations (see page 619) are enough. And from what I have not typically have this feature.
discovered in this book, it may well be that in fact most â Page 707 · Rule 110 Turing machines. Given an initial
systems capable of supporting even a single Nand operation condition for rule 110, the initial condition for the Turing
will actually turn out to be universal. But the point is that in machine shown here is obtained as Prepend[4 list, 0] with 1 ’s
any particular case this will not normally be an easy matter to
on the left and 0 ’s on the right. The Turing machine
demonstrate. (Compare page 807.) {{1, 2} ! {2, 2, -1}, {1, 1} ! {1, 1, -1}, {1, 0} ! {3, 1, 1},
{2, 2} ! {4, 0, -1}, {2, 1} ! {1, 2, -1}, {2, 0} ! {2, 1, -1},
{3, 2} ! {3, 2, 1}, {3, 1} ! {3, 1, 1}, {3, 0} ! {1, 0, -1},
Universality in Turing Machines and Other Systems {4, 2} ! {2, 2, 1}, {4, 1} ! {4, 1, 1}, {4, 0} ! {2, 2, -1}}
with s = 4 states and k = 3 possible colors also emulates rule
â Page 706 · Minsky’s Turing machine. The universal Turing
110 when started from Prepend[list + 1, 1] surrounded by 0 ’s.
machine shown was constructed by Marvin Minsky in 1962.
The s = 3 , k = 4 Turing machine
If the rules for a one-element-dependence tag system are
{{1, 0} ! {1, 2, 1}, {1, 1} ! {2, 3, 1},
given in the form {2, {{0, 1}, {0, 1, 1}}} (compare page 1114), {1, 2} ! {1, 0, -1}, {1, 3} ! {1, 1, -1}, {2, 0} ! {1, 3, 1},
the initial conditions for the Turing machine are {2, 1} ! {3, 3, 1}, {3, 0} ! {1, 3, 1}, {3, 1} ! {3, 2, 1}}
TagToMTM[{2, rule_}, init_] := started from Append[list, 0] with 0 ’s on the left and 2 ’s on
With[{b = FoldList[Plus, 1, Map[Length, rule] + 1]}, the right generates a shifted version of rule 110. Note that this
Drop[Flatten[{Reverse[Flatten[{1, Map[{Map[
Turing machine requires only 8 out of the 12 possible cases in
{1, 0, Table[0, {b0# + 11}]} &, #], 1} &, rule], 1}]],
0, 0, Map[{Table[2, {b0# + 11}], 3} &, init]}], -1]] its rules to be specified.
surrounded by 0 ’s, with the head on the leftmost 2 , in state â Rule 60 Turing machines. One can emulate rule 60 using
1 . An element -1 in the tag system corresponds to halting of the 8-case s = 3 , k = 3 Turing machine (with initial condition
the Turing machine. The different cases in the rules for the Append[list + 1, 1] surrounded by 0 ’s)
tag system are laid out on the left in the Turing machine. Each {{1, 2} ! {2, 2, 1}, {1, 1} ! {1, 1, 1},
step of tag system evolution is implemented by having the {1, 0} ! {3, 1, -1}, {2, 2} ! {2, 1, 1}, {2, 1} ! {1, 2, 1},
{3, 2} ! {3, 2, -1}, {3, 1} ! {3, 1, -1}, {3, 0} ! {1, 0, 1}}

1119
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

or by using the 6-case s = 2 , k = 4 Turing machine (with NestList[Join[{0}, Mod[1 + Rest[FoldList[Plus, 0, #]], 2],
initial condition Append[3 list, 0] with 0 ’s on the left and 1 ’s {{0}, {1, 1, 0}}0Mod[Apply[Plus, #], 2] + 11] &, init, t]
on the right) Inside the right-hand part of this pattern the cell values can
{{1, 3} ! {2, 2, 1}, {1, 2} ! {1, 3, -1}, {1, 1} ! {1, 0, -1}, then be obtained from an upside-down version of the rule 60
{1, 0} ! {1, 1, 1}, {2, 3} ! {2, 1, 1}, {2, 0} ! {1, 2, 1}} additive cellular automaton, and starting from a sequence of
This second Turing machine is directly analogous to the one 1 ’s the picture below shows that a typical rule 60 nested
for rule 110 on page 707. Random searches suggest that pattern can be produced, at least in a limited region.
among s = 3 , k = 3 Turing machines roughly one in 25 million
reproduce rule 60 in the same way as the machines discussed
here. (See also page 665.)
â Turing machine enumeration. Of the 4096 s = 2 , k = 2 Turing
machines (see page 888) 560 are distinct after taking account
of obvious symmetries and equivalences. Ignoring machines
which cannot escape from one of their possible states or The presence of glitches on the right-hand edge of the whole
which yield motion in only one direction or cells of only one pattern means, however, that overall there is nothing as
color leaves a total of 237 cases. If one now ignores machines simple as nested behavior—making it conceivable that
that do not allow the head to move more than one step in one (possibly with analogies to tag systems) behavior complex
of the two directions, that always yield the same color when enough to support universality can occur. The plot below
moving in a particular direction, or that always leave the tape shows the distances between successive outward glitches on
unchanged, one is finally left with just 25 distinct cases. the right-hand side; considerable complexity is evident.
Of the 2,985,984 s = 3 , k = 2 machines, 125,294 survive after 25
taking account of obvious symmetries and equivalences, 20
15
while imposing analogs of the other conditions above yields 10
5
in the end 16,400 distinct cases. For s = 2 , k = 3 machines, the 0
50 100 150 200 250 300 350
first two numbers are the same, but the final number of
distinct cases is 48,505. â Page 710 · s=3, k=2 Turing machines. Compare page 763 and

â States versus colors. The total number of possible Turing


particularly the discussion of machine 600720 on page 1145.
machines depends on the product s k . The number of distinct â Tag systems. Marvin Minsky showed in 1961 that one-
machines that need to be considered increases as k increases element-dependence tag systems (see page 670) can be
for given s k (see note above). s = 1 or k = 1 always yield universal. Hao Wang in 1963 constructed an example that
trivial behavior. The fraction of machines that show non- deletes just 2 elements at each step and adds at most 3
repetitive behavior seems to increase roughly like elements—but has a large number of colors. I suspect that
( s - 1) ( k - 1) (see page 888). More complex behavior—and universal examples with blocks of the same size exist with
presumably also universality—seems however to occur just 3 colors.
slightly more often with larger k than with larger s . â Encoding sequences by integers. In many constructions it is
â s=2, k=2 Turing machines. As illustrated on page 761, even useful to be able to encode a list of integers of any length by a
extremely simple Turing machines can have behavior that single integer. (See e.g. page 1127.) One way to do this is by using
depends in a somewhat complicated way on initial the Gödel number Product[Prime[i]^list0i1, {i, Length[list]}] .
conditions. Thus, for example, with the rule An alternative is to use the Chinese Remainder Theorem. Given
{{1, 0} ! {1, 1, -1}, {1, 1} ! {2, 1, 1}, p = Array[Prime, Length[list], PrimePi[Max[list]] + 1] or any list
{2, 0} ! {1, 0, -1}, {2, 1} ! {1, 0, 1}} of integers that are all relatively prime and above Max[list] (the
the head moves to the right whenever the initial condition integers in list are assumed positive)
consists of odd-length blocks of 1’s separated by single 0’s; CRT [list_, p_] :=
otherwise it stays in a fixed region. With[{m = Apply[Times, p]}, Mod[Apply[Plus,
MapThread[#1 ( m/ #2) ^EulerPhi[#2] &, {list, p}]], m]]
â Page 709 · Machine 596440. For any list of initial colors init ,
yields a number x such that Mod[x, p] 2 list . Based on this
it turns out that successive rows in the first t steps of the
LE[list_] := Module[{n = Length[list], i = Max[MapIndexed[
compressed evolution pattern turn out to be given by
#1 - #2 &, PrimePi[list]]] + 1}, CRT [PadRight[
list, n + i], Join[Array[Prime[i + #] &, n], Array[Prime, i]]]]

1120
T H E N O T I O N O F C O M P U T A T I O N N O T E S F O R C H A P T E R 1 1

will yield a number x that can be decoded into a list of length MapIndexed[c[r[z, c[r[p[1], p[4]], p[2], p[3], p[4]]], c[r[z,
n using essentially the so-called Gödel Β function r[c[s, z], c[r[c[s, c[s, z]], z], p[2]]]], p[Length[#2] + 1]], #
Mod[x, Prime[Rest[NestList[NestWhile[# + 1 &, 1011, #1021] &, Nest[Partition[#, 2] &, Table[Nest[c[s, #] &
# + 1, Mod[x, Prime[#]] 2 0 &] &, 0, n]]]] z, FromDigits[Reverse[IntegerDigits[i, 2, n] /. rule] + 1, 3]],
{i, 0, 2n - 1}], n - 1], {0, n - 1}]], Range[n, 1, -1]]
â Register machines. The results of page 100 suggest that with
(For tag system (a) from page 94 this yields a primitive
2 registers and up to 8 instructions no universal register
recursive function of size 325.) The result of t steps of
machines (URMs) exist. Using the method of page 672 one
evolution is in general given in terms of this function f by
can construct a URM with 3 registers and 175 instructions (or
Nest[f , init, t] , or equivalently r[p[1], f ][t, init] . Any fixed
2 registers and 4694 instructions) that emulates the universal
number of steps of evolution can thus be emulated by
Turing machine on page 706. Using work by Ivan Korec from
applying a primitive recursive function. But if one wants to
the 1980s and 1990s one can also construct URMs which
find out what happens after an arbitrarily large number of
directly emulate other register machines. An example with 8
steps, one needs to use the Μ operator, yielding a general
registers and 41 instructions is:
recursive function. (So for example m[r[p[1], f ]][init] returns
the smallest t for which the tag system reaches state {} —and
never returns if the tag system does not halt.) Note that the
same basic approach can be used to emulate Turing machines
with recursive functions; the Turing machine configuration
or {s, list, n} can be encoded by a integer such as
{d[4, 40], i[5], d[3, 9], i[3], d[7, 4], d[5, 14], i[6], 2 ^FromDigits[Reverse[Take[list, n - 1]]]
d[3, 3], i[7], d[6, 2], i[6], d[5, 11], d[6, 3], d[4, 35], 3 ^FromDigits[Take[list, {n + 1, -1}]] 5 ^list0n1 7 s
d[6, 15], i[4], d[8, 16], d[5, 21], i[1], d[3, 1], d[5, 25], â Lambda calculus. Formulations of recursive function theory
i[2], d[3, 1], i[6], d[5, 32], d[1, 28], d[3, 1], d[4, 28],
i[4], d[6, 29], d[3, 1], d[5, 24], d[2, 28], d[3, 1], from the 1920s and before tended to be based on making explicit
i[8], i[6], d[5, 36], i[6], d[3, 3], d[6, 40], d[4, 3]} definitions like those in the note above. But in the so-called
Given any register machine, one first applies the function lambda calculus of Alonzo Church from around 1930 what were
RMToRM2 from page 1114, then takes the resulting program instead used were pure functions such as s = Function[x, x + 1]
and initial condition and finds an initial condition for the and plus = Function[{x, y}, If [x 2 0, y, s[plus[x - 1, y]]]] —of
URM using just the kind now familiar from Mathematica. Note that the
R2ToURM[prog_, init_] := Join[init, With[ explicit names of (“bound”) variables in such pure functions are
{n = Length[prog]}, {1 + LE[Reverse[prog] /. {i[x_] ! x, never significant—which is why in Mathematica one can for
d[x_, y_] ! 4 + 2 n + x - 2 y}], n + 1, 0, 0, 0, 0}]] example use s = # + 1 & . (See page 907.)
For the first example on page 98 this gives
The definitions in the note above involve both symbolic
{0, 0, 211680, 3, 0, 0, 0, 0} . The process of emulation is quite
functions and literal integers. In the so-called pure lambda
slow, with each emulated step in this example taking about
calculus integers are represented by symbolic expressions.
20 million URM steps.
The typical way this is done is to say that a function fn
â Recursive functions. The general recursive functions from corresponds to an integer n if fn [a][b] yields Nest[a, b, n]
page 907 provided an early example of universality (see page (see note below).
907). That such functions are universal can be demonstrated
â Page 711 · Combinators. After it became widely known in
by showing for example that they can emulate any tag
the 1910s that Nand could be used to build up any expression
system. With the state of a 2-color tag system encoded as an
in basic logic (see page 1173) Moses Schönfinkel introduced
integer according to FromDigits[Reverse[list] + 1, 3] the
combinators in 1920 with the idea of providing an analogous
following takes the rule for any such tag system (in the first
way to build up functions—and to remove any mention of
form from page 894) and yields a primitive recursive function
variables—particularly in predicate logic (see page 898).
that emulates a single step in its evolution:
Given the combinator rules
TSToPR[{n_, rule_}] := Fold[Apply[c, Flatten[{#1, Array[p, #
2], c[r[z, c[r[p[1], s], c[r[z, p[2]], c[r[z, r[c[s, z], c[r[c[s, crules = {[x_][y_][z_] ! x[z][y[z]], [x_][y_] ! x}
c[s, z]], z], p[2]]]], p[2]]], p[1]]], p[#2]]}]] &, c[c[r[p[1], the setup was that any function f would be written as some
s], p[1], c[r[p[1], r[z, c[s, c[s, s]]]], c[c[r[z, c[r[p[1], s], combination of  and  —which Schönfinkel referred to
c[r[z, c[s, z]], c[r[p[1], r[z, c[r[p[1], s], c[r[z, p[2]], c[ respectively as “fusion” and “constancy”—and then the
r[z, r[c[s, z], c[r[c[s, c[s, z]], z], p[2]]]], p[2]]], p[1]]]],
p[2], p[3]]], p[1]]], p[1], p[1]], p[1]], p[2]]], p[n + 1],
result of applying the function to an argument x would be

1121
S T E P H E N W O L F R A M A N E W K I N D O F S C I E N C E

given by f [x] //. crules . (Multiple arguments were handled represented just by Nest[, , n] . And one can then convert
for example as f [x][y][z] in what became known as any Church numeral x to this representation by applying
“currying”.) A very simple example of a combinator is [[[][]][[]]][[]] . To go the other way, one uses the
id = [][] , which corresponds to the identity function, since result that for all Church numerals x and y ,
id[x] //. crules yields x for any x . (In general any combinator Nest[, , n][x][y] is also a Church numeral—as can be seen
of the form [][_] will also work.) Another example of a recursively by noting its equality to Nest[, , n - 1][y][x[y]] ,
combinator is b = [[]][] , for which b[x][y][z] //. crules where as above x[y] is power[y][x] . And from this it follows
yields x[y[z]] . that Nest[, , n] can be converted to the Church numeral for
With the development of lambda calculus in the early 1930s it n by applying
[[[[[][]][[[[[]][]][[][]]]]][
became clear that given any expression expr such as [[[[]][]][[[[]][]][[][]]]]]][[[[]][
x[y[x][z]] with a list of variables vars such as {x, y, z} one can [[[]][[[[[[[[[[][]][[]]][[]]][[[[
always find a combinator equivalent to a lambda function []][]][[][]]]]][[[[[]][]][[[[]][]][[][
such as Function[x, Function[y, Function[z, x[y[x][z]]]]] , and ]]]]]][[[[[[][]][[[[[]][[[[[][]]]][[
[]][[[[[[]][]]]][[[][]][[]]]]]]][[[]][[
it turns out that this can be done simply using
[][]][[]]]]]]][[[[[][]][[[]]]][[[]]]]]][
ToC[expr_, vars_] := Fold[rm, expr, Reverse[vars]] [[]]]]]]]][[[]][[[[][]][[[[[]][]][[][
rm[v_, v_] = id ]]]]][[[[[]][]][[[[]][]][[][]]]]]]]]][
[[[]][[[[]][]]]]]]][[[][]]]]][[[]]]
rm[f _[v_], v_] /; FreeQ[f , v] = f
Using this one can find from the corresponding results for
rm[h_, v_] /; FreeQ[h, v] = [h]
Church numerals combinator expressions for plus , times
rm[f _[g_], v_] := [rm[f , v]][rm[g, v]] and power —with sizes 377, 378 and 382 respectively. It
So this shows that any lambda function can in effect be written seems certain that vastly simpler combinator expressions
in terms of combinators, without anything analogous to will also work, but searches indicate that if inc has size less
variables ever explicitly having to be introduced. And based than 4, plus must have size at least 8. (Searches based on
on the result that lambda functions can represent recursive other representations for integers have also not yielded
functions, which can in turn represent Turing machines (see much. With n represented by Nest[, [][], n] , however,
note above), it has been known since the mid-1930s that [[[]][]][] serves as a decrement function, and with n
combinators are universal. The rule 110 combinator on page represented by Nest[[], [], n] , [[][]][[[[]]]]
713 provides however a much more direct proof of this. serves as a doubling function.
The usual approach to working with combinators involves â Page 712 · Combinator properties. The size of a combinator
building up arithmetic constructs from them. This typically expression is conveniently measured by its LeafCount . If the
begins by using so-called Church numerals (based on work evolution of a combinator expression reaches a fixed point,
by Alonzo Church on lambda calculus), and defining a then the expression generated is always the same (Church-
combinator en to correspond to an integer n if Rosser property). But the behavior in the course of the
en [a][b] //. crules yields Nest[a, b, n] . (The − on page 103 evolution can depend on how the combinator rules are
can thus be considered a Church numeral for 2 since applied; here expr /. crules is used at each step, as in the
−[a][b] is a[a[b]] .) This can be achieved by taking en to be symbolic systems of page 896. The total number of
Nest[inc, zero, n] where combinator expressions of successively greater sizes is
zero = [] {2, 4, 16, 80, 448, 2688, 16896, 109824, ?} (or in general
inc = [[[]][]] 2 n Binomial[2 n - 2, n - 1]/ n ; see page 897). Of these,
With this setup one then finds {2, 4, 12, 40, 144, 544, 2128, 8544, ?} are themselves fixed
plus = [[]][[[[[]]]][[[]]]] points. Of combinator expressions up to size 6 all evolve to
times = [[]][] fixed points, in at most {1, 1, 2, 3, 4, 7} steps respectively
power = [[[[][]]]][] (compare case (a)); the largest fixed points have sizes
(Note that power[x][y] //. crules is y[x] , and that by analogy {1, 2, 3, 4, 6, 10} (compare case (b)). At size 7, all but 2 of the
2 x
x[x[y]] corresponds to y x , x[y[x]] to x x y , x[y][x] to x y , 16,896 possible combinator expressions evolve to fixed
and so on.) points, in at most 12 steps (case (c)). The largest fixed point
has size 41 (case (d)). [[]][][][][] (case (e)) and
Another approach involves representing integers directly as
[][][[]][][] lead to expressions that grow like 2 t/2 .
combinator expressions. As an example, one can take n to be
The maximum number of levels in these expressions (see

1122
T H E N O T I O N O F C O M P U T A T I O N N O T E S F O R C H A P T E R 1 1

page 897) grows roughly linearly, although Depth[expr] where


reaches 14 after 26 and 25 steps, then stays there. At size 8, p = ToC[z[y][x], {x, y, z}] //. crules
out of all 109,824 combinator expressions it appears that 49 The resulting combinator has size 61, but for specific rules
show exponential growth, and many more show roughly somewhat smaller combinators can be found—an example
linear growth. [][][[[]][]][] goes to a fixed point of for rule 90 is [[]][[][[[[[][]][[[]]]][[]]]]]
size 80. [[]][][][][[]] (case (i)) increases rapidly to with size 16.
size 7050 but then repeats with period 3.
To emulate cellular automaton evolution one starts by
[[[][]]][][][] (case (j)) grows to a maximum size of
encoding a list of cell values by the single combinator
1263, but then after 98 steps evolves to a fixed point of size
p[num[Length[list]]][
17. For [][][[[][]]][] (case (k)) the size at step t - 7 is Fold[p[Nest[, , #2]][#1] &, p[][], list]] //. crules
given by where
h[1] = h[2] = h[3] = 12 num[n_] := Nest[inc, [], n]
h[t_] := If [Mod[t, 4] 2 2, 2, 1] ( h[Ceiling[t / 2] - 1] + t) + inc = [[[]][]]
{3, 5, -7, -1}0Mod[t, 4] + 11
One can recover the original list by using
Examples with similar behavior are [[][]][][[][]] ,
Extract [expr, Map[Reverse[IntegerDigits[#, 2]] &,
[[]][][[][]][] and [[][]][][[][]] . Among 3 + 59 / 15 ( 16 ^Range[Depth[expr[[]][][] //. crules] -
those with roughly exponential growth but seemingly 1, 1, -1] - 1)]] /. { ! 0, [] ! 1}
random fluctuations are [[[]]][][][][] ,
In terms of the combinator f a single complete step of cellular
[[]][][[][]][] and [[[]][][]][][] .
automaton evolution can be represented by
â Single combinators. As already noted by Moses Schönfinkel w = cr[p[inc[inc[x[[]]]]][
in 1920, it is possible to set up combinator systems with just a inc[x[[]]][cr[p[y[[]][]][p[y[[]][[]]][y[]]],
single combinator. In such cases, combinator expressions can {y}]][p[x[[]][cr[p[p[f [y[][][][[]]][
y[][][[]]][y[][[]]]][y[[]]]][y[][]], {y}]][
be viewed as binary trees without labels, equivalent to p[p[][]][p[][x[]]]][[]]][p[][p[][]]]][]], {x}]
balanced strings of parentheses (see page 989) or sequences cr[expr_, vars_] := ToC[expr //. crules, vars]
of 0’s and 1’s. One example of a single combinator system can where there is padding with 0 on either side. With this setup
be found using { ! [],  ! [[]]} , and has combinator t steps of evolution are given simply by Nest[w, init, t] . With
rules (whose order matters): an initial condition of n cells, this then takes roughly
{[][x_][y_][z_] ! x[z][y[z]], [[]][x_][y_] ! x} ( 100 + 35 n) t + 33 t 2 steps of combinator evolution.
The smallest initial conditions in this case that lead to
â Testing universality. One can tell that a symbolic system is
unbounded growth are of size 14; two are versions of those
universal if one can find expressions that act like the  and 
for  ,  combinators above, while the third is
combinators, so that, for example, for some expression e ,
[][[]][[]][[][[][]]][[][]] .
e[x][y][z] evolves to x[z][y[z]].
The forms [] and [[]] appear to be the simplest that can
â Criteria for universality. See page 1126.
be used for  and  ;  and [] , for example, do not work.
â Classes of systems. This chapter has shown that various
â Page 714 · Cellular automaton combinators. With  and
individual systems with fixed rules exhibit universality when
[] representing respectively cell values 0 and 1 , a
suitable initial conditions are chosen. One can also consider
combinator f for which f [a-1 ][a0 ][a1 ] gives the new value of
whole classes of systems in which rules as well as initial
a single cell in an elementary cellular automaton with rule
conditions can be chosen. And then one can say for example
number m can be constructed as
that as a class of systems cellular automata are universal, but
Apply[p[p[p[#1][#2]][p[#3][#4]]][p[p[#5][#6]][p[#7][
#8]]] /. {0 ! , 1 ! []} &, IntegerDigits[m, 2, 8]] //. crules neighbor-independent substitution systems are not.

1123

You might also like