In traditional Boolean logic substitution rules for AND and OR, in this De Morgan context, partition the system of ECA rule numbers. That is, each rule number is used once for the AND substitute and each is used once for the OR substitute.

And the results for each AND substitute taken with its particular set of 16 OR substitutes is always the same. Also the results for each OR substitute taken with its particular set of 16 AND substitutes is always the same.

Moreover, all of 256 rule numbers in the system are used for the AND and the OR substitutes. Not one is missing.

However, the results do not account for all of the rule numbers. Rather when the AND substitute is taken with its 16 OR substitutes results are confined to the set:

Here are all of the OR[p, r] substitution rules blocked out to highlight the pattern.

In addition to the difference pattern in the rows, notice that rule numbers are dealt out four rows of four columns at a time by incrementing by 1. This block of OR[p, r] distribution rules is repeated to complete the graphic input .

And the results for each AND[p, r] substitute taken with its particular set of 16 OR[p, r] substitutes is always the same. Also the results for each OR[p, r] substitute taken with its particular set of 16 AND[p, r] substitutes is always the same.

Moreover, all of 256 rule numbers in the system are used for the AND[p, r] and the OR[p, r] substitutes. Not one is missing.

However, the results do not account for all of the rule numbers. Rather when the AND[p, r] substitute is taken with its 16 OR[p, r] substitutes results are confined to the set:

If you compare this list with the one in the previous post for AND[p, q] and OR[p, q], you will see that they are the same expressions except for here, wherever there is a letter r, in the previous list it is a letter q. Of course, the rule numbers have changed.

A generalization of De Morgan's Laws reveals that, for traditional Boolean logic in three variables, there are 4096 combinations of AND and OR substitutions with variables p and q for which the laws hold true.

All three sets have rule numbers {0, 255} in common.
These are rule numbers for the identities, 0 and 1.

Sets {p, q} and {p, r} have rules {0, 15, 240, 255} in common.
These are rule numbers for the identities {0, 1} and variables Not[p] and p.

Sets {p, q} and {q, r} have rules {0, 51, 204, 255} in common.
These are rule numbers for the identities {0, 1} and variables Not[q] and q.

Sets {p, r} and {q, r} have rules {0, 85, 170, 255} in common.
These are rule numbers for the identities {0, 1} and variables Not[r] and r.

These three sets are closed under the map function introduced earlier. That is, when the members of a set are taken as operator and operands in the map function, the results are always a member of the set.

However, this is not the case for the union of the three sets.
The union of the three sets is not closed under the map function.
It introduces another 194 rule numbers.

In fact this union of all three sets has products for all but these 24 rule numbers:

On page 231 in the NKS book, Wolfram categorizes rules and their CA behavior into four classes of increasing complexity. There he describes as “quite remarkable” the fact that different rules could generate similar patterns. I am sure that many, including myself, have shared this sense of wonder.

But in this context of De Morgan generalization I find “quite remarkable” a different categorization of the ECA rules, one based on the increasing complexity of their structure rather than on their behavior.

And where Wolfram’s sense of wonder arose out of the discovery of many rules having similar patterns of behavior, here one is surprised that rules with similar expressions manifest such different structure.

To see what I mean, recall that the expressions for the three sets of 16 rules have similar syntax such that to change from one set of expressions to another all that is necessary is to drop in the correct variables, be they {p, q}, {p, r}, or {q, r}.

But when these are used to generate plots of 4096 pairs of rules expressing the De Morgan Laws, we unexpectedly see different structures of increasing complexity.

The graphic for set {q, r} is the most uniform of the three. Followed by {p, r} with its clustered structure, and finally {p, q}.

Quite frankly, based on the discussion at the top of this thread, I expected to find left-right symmetry between {p, q} and {q, r}. To quote myself:

“An inspection of the rules on page 883 of the NKS book and their expressions listed on page 884 show a definite pattern. For example, rules 2 and 16 have these expressions: 2:
And[Not[p], Not[q], r] and 16: And[p, Not[q], Not[r]. The graphs for these rules found on page 55 show opposing diagonal lines. They are left-right vertical reflections of each other. Notice that the expressions are very much alike. The only difference is where the Not operator is with reference to the operands p and r. Rule 2 has the Not operator applied to the variable p and rule 16 has it applied to variable r. It is this arrangement that makes the two rules produce cellular automaton graphs that are left-right reflections of each other.”

In an effort to amplify this distinction of structures, we will examine the different characteristics of plots for the three sets of 16 outer products of {p, q}, {p, r}, and {q, r} using the map function.

In the next post we begin with an analysis of the map functions for 16 outer products of the set for {p, q}:

We will take these triples as input to the map function and generate 16 projections one for each member of pqouterproduct. This will be input to a cube shaped plot as layers along the z-axis. Each layer will have (16 by 16) = 256 rule numbers, the results of the map function.

Prior to this we make sure there will be no surprises by checking for closure.

This affirms that every execution of the map function takes its operation and two operands from the set {p, q} and then returns a result also from the set {p, q}.

As one example of this, the third cube in the first row of figure 1b plots a set of 4 clusters in each of 3 corners of the floor of the cube together with another set of 4 clusters found in the corresponding 4th corner of the ceiling.

Eight of the 16 cubes in Figure 1b have this configuration.

In the same figure, in the third cube in the second row, there are a pair of 4-set clusters in opposite corners on the ceiling and also on the floor. But the corners on the ceiling and the floor are also opposite one another.

Two of the 16 cubes in Figure 1b have this configuration.

In Figure 1b there are also cubes with the sets of clusters confined to the diagonal planes.

Four of the 16 cubes in Figure 1b have this configuration.

Finally, the ceiling and the floor each have a configuration of 4-set clusters in the corners.

In summary: This structure manifests a variety of clusters, complex and highly ordered, sometimes confined to a plane, but other times traversing planes. As such it is not anchored to any one axis window of the cube.

Set {p, r} has 4 sets of 16 distinct clusters of rules within the cube.

One set is on the ceiling. Another is on the floor. Then there is one set on each diagonal plane as viewed through the x-axis window of the cube. See Figure 2a. Mappings are repetitious as can be seen in Figure 2b.

In summary: This structure manifests no variety in the clusters. They are very ordered and simple. They are uniformly spaced within the planes to which they are confined. There is repetitious mapping. The structure itself is anchored in the x-axis window of the cube.

Figure 4a, 4b, and 4c show combinations of the plots for the three sets: {p, q}, {p, r}, and {q, r}. There are three views. Each intended to highlight the presence of one of the three sets.

This inquiry into De Morgan’s Laws and their generalization led to the discovery of three sets of ECA rules based on AND[p, q] and OR[p, q], AND[p, r] and OR[p, r], and AND[q, r] and OR[q, r].

We found that each of these sets of ECA rules has distinct structural characteristics when viewed in the context of their outer products and projections in three-space using the map function.

This leads to the conclusion that the ECA rules submit to a categorization according to structural properties just as much as they do to the NKS class categorization according to behavioral properties of cellular automata.

The question now arises: What effect, if any, do structural characteristics have on the behavior of ECA rules at each step of a CA run?

Will rules dominated by the influence of AND[p, q] and OR[p, q] manifest their structural characteristics in some regular and detectable way?

For example, we saw that one of the structural characteristics of the {p, q} set is that it is not confined to a plane. Will this manifest itself in some consistent behavioral way during the execution of cellular automata with rules dominated by an influence of the {p, q} set?

Whatever the answer, it is not an obvious one. Perhaps this is due to a major difference between the dynamics in projections of outer products using the map function and the operation of the CellularAutomaton command.

The CellularAutomaton command cycles its output back in as input. The map function in this context does not.

Certainly the parallels between NKS class characteristics and structural characteristics of the ECAs that we have examined are intriguing.

For instance, to suggest that there would only be 19683 sets of AND[p, q] and OR[p, q] substitution rules in a system with 7.6 trillion rules is unimaginable.

The confusion arose from failing to realize that De Morgan’s laws are characteristic of traditional Boolean logic, not logic in general. So, if we expect to see similar characteristics in three valued logic, it will have to be the way we see ECA behavior in three and higher valued logics. That is, we should expect to find it emulated in clusters all along three space.

Indeed, if you start executing a test for De Morgan’s laws in three space starting with 0 as the AND substitution rule and 7625597484986 as the OR substitution rule, you will find that there are billions of pairs of substitution rules that pass De Morgan’s laws tests.

These rule numbers have a difference pattern, the union of which includes at least:

And just as the ECAs for AND and OR have emulated cellular automaton behavior billions of times in three space, so expect to see similar emulations of the results of combining AND and OR substitution rules in the De Morgan formulations.

If there is an analog to De Morgan’s laws native to three valued logic, anticipate that it will be limited to 19683 sets of triples of operations instead of pairs. Two of the operations will be AND and OR. But the third operation will be an, as yet, unidentified operation.

One clue behind this conjecture is the parallel between traditional Boolean logic’s 16 pairs of AND and OR rows each with 16 substitution rules and three valued logic having 19683 triples of rows each with 19683 substitution rules. Just as 16^2 accounts for all 256 rules in traditional Boolean logic, 19683^3 accounts for all 7625597484987 rules in three valued logic.

It is possible to construct a compound expression using three color rules that relates the components to each other in a way analogous to the way in Boolean logic that De Morgan’s laws relate lattice complements of two variables to expressions using the rules for AND and OR.

De Morgan’s laws state the relation for variables {p, q} this way:

NOT[AND[p, q] == OR[NOT[p], NOT[q]] &&

AND[NOT[p], NOT[q]] == NOT[OR[p, q]

The three color analog states the relation this way:

NOT[sAND][p, q, r] == POS[sOR][p, q, r] == NEG[sOP][p, q, r] &&

NEG[sAND][p, q, r] == NOT[sOR][p, q, r] == POS[sOP][p, q, r] &&

POS[sAND][p, q, r] == NEG[sOR][p, q, r] == NOT[sOP][p, q, r]

Notes:

All three variables are used. However they may be any rule number so long as the rule number chosen is the same for each occurrence of variable p, q, or r. Indeed, even if the same rule is used consistently in place of more than one variable, the relation holds true.

Lattice complements of the variables are not the subject of the relation. In fact sAND, sOR, and sOP give the same results whether the variables are {p, q, r} or {NOT[p], NOT[q], NOT[r]}.

Rules are prefaced with the letter “s”.
This seems appropriate for two reasons:

(1) Base three digits of the rule numbers are symmetric, as shown below where a single digit at the center of the list breaks the pattern of like digits on each side.

(2) Cellular automata for the analog to De Morgan's laws appear to always be simply class 1. (But see note at end of post.)

Here are the rule numbers together with their digit lists:

sAND = 1594323

{0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0}

sOR = 7625594296340

{2,2,2,2,2,2,2,2,2,2,2,2,2,0,2,2,2,2,2,2,2,2,2,2,2,2,2}

sOP = 3812800336816

{1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1}

The third rule, for lack of a name, is simple called sOP for operation.

Complements are expressed by NOT, POS, and NEG.

NOT identifies the lattice complement. It is the complement with respect to negative multiplicative identity which is rule 7625597484986.

POS identifies the complement with respect to positive multiplicative identity which is rule 3812798742493.

NEG identifies the negative. It is the complement with respect to additive identity which is rule 0.

Attached is a notebook set up to demonstrate this analog and display cellular automata associated with its component expressions.

This note added June 4, 2007:

This is not to say that only class 1 CAs result from these De Morgan analog expressions.