Binary Replicator CA



Binary Numbers
and the "Replicator" Ruleset
2d Cellular Automata

The "Binary Carpet Ruleset" (also known as "Replicator") is a two dimensional, totalistic cellular automata (2d CA) of a type similar to John Conway's "Game of Life". Its rules are 1357/1357 (S1357/B1357).

In layman's terms, a 2d CA is a grid of pixels or "cells" that evolves over time according to set rules. In this case, a pixel will turn on or stay on if an odd number of its eight immediate neighbors are on, and turn off otherwise.

If you start with a blank grid, it will always stay blank. But if you start with a single "on" pixel, you get the following series of shapes.




These shapes have several interesting qualities.

  1. First of all, some of them are fractal, with versions of the same general shape appearing at many different levels. This is not unusual for cellular automata.

  2. Second, these shapes are additive, which means that two overlapping shapes in this ruleset will evolve in the exact same way as if the shapes were entirely independent (with the exception that two overlapping "on" pixels will appear as an "off" pixel). This is an uncommon, but not unheard-of property for CAs.

  3. The most unusual and unique property of these shapes is that they have a clear and striking structural one-to-one relationship with binary numbers.

    If you take the first pixel and number it "0" and the next shape as "1" then each successive interation of the CA will correspond to a binary number.

    Once that has been done, correspondences can be seen between the numbers and the shapes. For instance, every number composed of a single "1" followed by a string of zeros (that is to say, a integer power of the number "two" as expressed in binary) will consist of a ring of nine pixels arranged around the perimeter of a square. The distance between the pixels will be proportional to the number of zeros.

    Similarly, any shape corresponding to a given number will reappear at a more spread-out scale (but composed of the same number of "on" pixels) if you add zeros to the end of its binary representation (i.e. multiply it by a power of two).

    Nor do the correspondences end there. If a large shape has a binary number that ends in a sequence corresponding to a smaller shape, then the larger shape will be composed of copies of the small shape.

    In general, the shape matching a number can be described at the largest level of scale by starting at the left end of the binary representation, and at the smallest level of scale by starting at the right end of the binary representation.

    For example, the number 10101 describes a large version of shape "1" made up of medium sized copies of shape "1" which in turn are made of small copies of shape "1".



    The shape 111010 can be seen as shape "111" made up of small copies of "10".


    Image size reduced

    The shape "101011" can be viewed as "a big shape '10' made of little '1011's" or "a big '1010' made of little '11's" with equal validity. It can also be seen as "a big '10' made of medium '10's made of small '11's"



    Because of this property, the binary carpet shapes serve as a great example of a phenomena that can be interpreted at many different levels simultaneously.

NOTES:

As a resource for Cellular Automata on the web, I highly recommend Mirek's Cellebration. All the images on this page were generated using his MJCell Java Applet.

Another place to study CAs is Stephen Wolfram's "A New Kind of Science". Wolfram has done a lot of work connecting CAs and fundamental physics.

Although I discovered this ruleset independently (about twelve or so years ago) I found out from Mirek's site that this is a well-known ruleset generally called "Replicator".

It is closely related to a set of replicating rules discovered by Edward Fredkin. In particular, I believe that the Fredkin 3 ruleset for the Von Neumann space
30121202011202010122010121201202010122010121200121202012010121200121202011202 010121202010122010121200121202012010121200121202011202010120121202011202010122 010121202010121200121202011202010120121202011202010122010121201202010122010121 20012120201
is an analogue of the replicator ruleset, but with regards to base-3 numbers. It raises the possibility that there are replicator-type cellular automata corresponding to each different number base.

Addendum:

In Wolfram's book (referenced above) he mentions the ability of some CAs to simulate or mimic the behavior of others. In particular, he introduces a "Universal Simulator" able to reproduce the behavior of any other CA (within limits) simply by the configuation of initial cells.

The "Replicator" is a simulator as well, of a more limited but very interesting kind. It simulates itself, but at a larger level of scale. Each time the CA goes through its complete repertoire of four basic shapes, it counts as one iteration of a larger cycle at a higher order of magnitude in time and space. And since that larger version shares all the same properties of its smaller progenitor, it simulates a yet larger version of itself and so forth, ad infinitum.

It may even be the case that every CA that produces fractal shapes could be considered a self-simulator in this sense.

Addendum 2:

Kovas Boguta, a member of the Wolfram Science Group, referred me to the following page in Wolfram's book. In it, he discusses two self-simulating 1d patterns that behave in a similar manner to the Replicator. Interestingly, both can be derived from the Replicator in the following manner: The "Rule 90" shape, which produces a Sierpinski Gasket, can be produced by looking at only the horizontal 1d strip that passes through the original start pixel, and the "Rule 150" shape can be produced by looking at the 1d strip that always corresponds to the bottommost line of pixels in the Replicator CA.

Accordingly, the the "Rule 90" shape has the same property of corresponding to a binary sequence as the Replicator, although in a less visually striking, but more easily traceable way. The number of pixels in a given iteration will always be 2 to the power of the number of bits that are "1"s in the binary numbering of the iterations since the start, and the gaps in the pattern will roughly correspond with the zeros in the numbering. Also, 1's near the end of the numbering will mean closely spaced pixels, 0s will mean a wide spacing.

Binary Carpet Fractal Addendum 3

8/20/04

Responding to a request for further research, the Sluggy.net Forums' Casey Callaghan ("ccc") and Chris Clark ("BobTheSpirit") came up with a number of additional results. I haven't fully digested all of it yet, but I'll add them to the page as time and cognition permits.

This first set of results is from Casey Callaghan.

He found that it is possible to extrapolate this pattern to a generalized CA with "n" possible states, which will be related to modulo-n numbers in the same way as the original "Replicator" is to binary (mod 2) numbers.

To put it another way, he has shown that all patterns of this type are reductions of a "master-pattern" with an unlimited number of states.


The master pattern is simple to construct.

Start with an empty grid, and fill the center cell only with the number 1.

1
1   1   1
1 1
1 1 1
1   2   3   2   1
2 2 4 2 2
3 4 8 4 3
2 2 4 2 2
1 2 3 2 1
Iteration 0 Iteration 1 Iteration 2
1   3   6   7   6   3   1
3 6 12 12 12 6 3
6 12 27 27 27 12 6
7 12 27 24 27 12 7
6 12 27 27 27 12 6
3 6 12 12 12 6 3
1 3 6 7 6 3 1
1    4    10   16   19   16   10   4    1
4 12 28 40 48 40 28 12 4
10 28 70 100 124 100 70 28 10
16 40 100 132 168 132 100 40 16
19 48 124 168 216 168 124 48 19
16 40 100 132 168 132 100 40 16
10 28 70 100 124 100 70 28 10
4 12 28 40 48 40 28 12 4
1 4 10 16 19 16 10 4 1
Iteration 3 Iteration 4

For each successive iteration, a given cell will equal the sum of all neighboring cell (using the "Moore neighborhood," which is the square of neighbors formed by eight adjacent cells).

The result is closely analogous to Pascal's Triangle.

In fact, if you stack the cells from successive iterations on top of each other, you produce what we might call a Pascal's Tetrahedron (although internet research suggests that there is already a different mathematical shape of that name, similar to this one, but with triangular cross-sections).

The master pattern can be reduced to a modulo-n Replicator-type pattern by placing each number in modulo-n and then assigning a different state (color) to each number.

Callaghan hypothesizes that all and only prime numbered moduli will demonstrate the characteristic behavior of the originator "Replicator" CA. In other words each prime numbered modulus will reduce the master pattern to:
  1. A grid that is empty except for a square of eight state-1 cells for iterations corresponding to 1mod-n, 10mod-n, and all other powers of 10mod-n (state-zero-mod-n cells are considered empty).
  2. A shape for iteration x that corresponds, at larger levels of scale, to the shapes for iterations of the form x * 10 mod - n.
  3. Shapes that can be described at increasing levels of detail by reading their iteration number from the left, and at increasing levels of scale by reading their iteration number from the right.
He has also shown that IF the above hypothesis is true for all primes, then it is cannot be true for any composite number that is the product of at least two different primes (i.e. not an integer power of a prime) via the following proof.
Proof:

Assume that x = kpq, where p, q are different primes (not 1), and k is an integer.

The number x in base p is not of the form 100... (one followed by only zeros), which is another way of saying that x is not an integer power of p.

Since p is factor of x
(y mod x) mod p = y mod p
for all y.


Which means that (x mod x) mod p = x mod p

That means that x mod x cannot show the so-called "expanded square" (eight state-one cells arranged in a square of some size) because if it did, it would reduce to an expanded square in mod p, and we already know it doesn't, because only numbers of the form 100... show the expanded square pattern in mod p (at least according to our supposition).




©2004 Christopher Sunami. All Rights Reserved. Cannot be reproduced without permission.

Comment on this Page or Read Guestbook