A basic transition automaton of ECA 30

138 Views Asked by At

I am reading this thesis, which on page no 14 talks about modeling. It also says in page no 15 that:

The automata we construct to model the basic transition scan words over $\Sigma^2$, where $\Sigma$ is the alphabet of the cellular automaton $\rho$ that we are modeling.

Then at the end of the modeling section, they refer to figure 3.1 and say:

An example of the basic transition automaton for the elementary cellular automaton described by Wolfram’s Rule 30, assuming one-way infinite boundary conditions is shown in Figure 3.1.

and

In all cases, the transition automaton scans the infinite word corresponding to a pair of configurations (referred to below as tracks), and recognizes the word if the second configuration is a successor of the first under the global map of $\rho$.

enter image description here

CA rule 30 as per Wikipedia.

current pattern            111  110 101 100 011 010 001 000
new state for center cell   0   0   0   1   1   1   1   0

I am unable to understand how the above rule from Wikipedia is converted into the basic transition automaton since it requires to read 3 values to produce output.

1

There are 1 best solutions below

6
On BEST ANSWER

It does basically what the paragraph you're quoted says.

Basically, let's say we have two lines of ones and zeros, something like this:

00110010000101110010011011101111001100100...
01101111001101001111110010001000111011110...

and we want to know whether the second line is the result of applying rule 30 to the first line.

We can check that by going over each line from left to right and, for each consecutive group of three cells on the first line, checking that the cell on the second line under the middle cell of the group matches what the transition table of rule 30 says it should be.

We can also formalize this process as a DFA that reads the two input lines from left to right in parallel, one (pair of) cell state(s) at a time. On the $k$ step, the input to the DFA will thus be a pair consisting of the $k$-th values on each line. For the two example lines shown above, the first input to the DFA will thus be (0,0), the next input will be (0,1), then (1,1), then (1,0), then (0,1), then (0,1) again, etc.


What should the internal state of this DFA look like, then? Well, clearly, in order to be able to check that the most recent triplet of cells it has seen on the first line is consistent with the corresponding middle cell on the second line, it must remember at least the two previous cell states from the first line and one previous cell from the second line.

For example, let's say that the DFA has already processed the first four pairs of cells on the two example lines above, and is now processing the fifth:

  ,------- The DFA has previously read these pairs of cells.
  |  ,---- This pair of cells is the current input to the DFA.
  v  v v-- These cells have not been processed yet.
0011 0 010000101110010011011101111001100100...
0110 1 111001101001111110010001000111011110...
     ^  
     `---- We want to check whether this cell is the result of rule 30.

To be able to check whether the fifth cell on the second line is the result of applying rule 30 to the fourth, fifth and sixth cells on the first line, the DFA must remember the values of at least three cells from its past input — the last two on the first line, and the last one on the second line. So, from the DFA's viewpoint, the minimum knowledge it needs to have in order to do its job looks like this:

 ,--------- The DFA has already checked and forgotten these cells marked with "?".
 |  ,------ The DFA must remember the values of these three cells.
 |  | ,---- This pair of cells is the current input to the DFA.
 v  v v v-- The DFA hasn't seen these cells yet, and knows nothing about them.
?? 11 0 ????????????????????????????????????...
??? 0 1 ????????????????????????????????????...

Now the DFA can check whether the result of applying rule 30 to the triplet 110 yields the cell state 0 on the second line. If it does, it moves on to the next step, forgetting the oldest remembered cell on each line and adding the current input to its memory; if it doesn't, it can either immediately stop and reject the input or, depending on the kind of DFA model you're using, transition to a "reject" state where it will remain until the input ends.

So the DFA, in general, needs to remember three bits of its past input. Thus, it needs $2^3 = 8$ distinct (accepting) states to encode those three bits. If you don't allow the DFA to stop and reject the input early (e.g. by having no transition for the state and input pair it encounters) then you'll also need one extra non-accepting state that the DFA cannot leave after entering it.

(Of course, a similar DFA can be constructed for CA rules with more states and/or a larger neighborhood, too. In general, for a CA with $n$ states and a $k$ cell neighborhood, the DFA will need to remember the last $k-1$ cells from the first line and the last $(k-1) \mathbin/ 2$ cells from the second line, for a total of $n^{3(k-1) \mathbin/ 2}$ accepting states.)

However, depending on the specific rule being checked, it may also be possible to optimize the DFA by merging some equivalent states together, or even to entirely eliminate states that are not reachable via any accepted sequence of inputs. Since the DFA depicted in the diagram you've quoted has only seven states, presumably something like this must've been done to it.

Also, the diagram does not appear to contain any non-accepting states, nor are there any transitions to such a state on incorrect input. Thus, it seems that the authors of are following the (quite reasonable) convention where a DFA may have missing transitions, and where encountering an input symbol with no corresponding transition causes the input to be immediately rejected.


The diagram is a little bit hard to make sense of because the states are labelled with seemingly arbitrary numbers instead of something informative, like the previously seen cells that the state encodes. But if we want, we can look at the transitions and try to figure out which previous cells each state must correspond to.

The easy states to identify are the ones with self-loops. For example, state 0 in the diagram transitions to itself on the input (0,0), so it must correspond to the case where all the remembered cells are in state 0. Similarly, state 6 in the diagram has a self-loop for the input (1,0), so it must correspond to the case where both remembered cells on the first line are in state 1, and the remembered cell on the second line is in state 0.

From these starting points, we can proceed to decode the rest of the states. For example, state 2 in the diagram is reached from state 1 on the input (0,1), so it must correspond to the most recently seen cells being 00 on the first line and 1 on the second line. From state 2 we can get to state 3 with the input (1,1), so state 3 must correspond to 01 on the first line and 1 on the second line. Following the transitions step by step like this, we can build a table like the following:

$$\begin{array}{|r|c|c|c|c|c|c|c|} \hline \text{state} & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ \hline \text{1st line} & 00 & 00 & 01 & 10 & 10 & 11 & ?0 \\ \hline \text{2nd line} &\ 0 &\ 1 &\ 1 &\ 0 &\ 1 &\ 0 &\ ? \\ \hline \end{array}$$

State 7 in the diagram, however, is a bit of a mystery. It has no incoming transitions from any other state, but appears to be the initial state of the automaton before any input is read. Looking at its outgoing transitions, it would seem that it must correspond to a 1st-line pattern ending in 0 — but all such patterns are already accounted for by states 1, 2, 4 and 5!

On the other hand, state 7 clearly cannot correspond to the patterns (01, 0) or (11, 1), which are the only ones with no matching states in the diagram. Indeed, looking at the rule 30 transition table shown in your question, it's clear why those patterns are missing: the triplets 01$x$ and 11$x$ yield 1 and 0 respectively, regardless of the state of the cell $x$. Thus, as soon as the DFA sees 01 on the first line and 0 on the second line, or 11 on the first line and 1 on the second line, it can immediately reject the input without waiting to read the next input pair.

So what is the mysterious DFA state 7, then? My best guess is that it must have something to do with the boundary conditions of the cell lattice, which are described in the paper as "one-way infinite". Perhaps this means that the lattice is bounded on the left, with the cells to the left of the boundary treated as if they were fixed in state 0 regardless of the CA rule. That would at least explain the DFA.