# 3.6 Rules Depending on One Ternary Relation

There are 9373 inequivalent left-connected 13 23 rules. Here are typical examples of their behavior after 5 steps, starting from a single ternary self-loop:

GraphicsGrid[ Partition[ ParallelMap[ ResourceFunction["WolframModel"][#, {{0, 0, 0}}, 5, "FinalStatePlot"] &, {{{1, 1, 1}} -> {{1, 1, 1}, {1, 1, 1}}, {{1, 1, 2}} -> {{1, 2, 1}, {1, 2, 3}}, {{1, 1, 2}} -> {{1, 1, 3}, {2, 3, 2}}, {{1, 1, 2}} -> {{2, 2, 3}, {3, 2, 3}}, {{1, 1, 2}} -> {{2, 2, 3}, {1, 4, 2}}, {{1, 1, 2}} -> {{1, 2, 3}, {4, 5, 3}}, {{1, 1, 2}} -> {{3, 3, 1}, {3, 3, 2}}, {{1, 1, 2}} -> {{3, 3, 1}, {3, 1, 4}}, {{1, 1, 2}} -> {{3, 3, 2}, {4, 1, 2}}, {{1, 1, 2}} -> {{3, 3, 4}, {3, 1, 1}}, {{1, 1, 2}} -> {{3, 4, 1}, {1, 2, 4}}, {{1, 2, 1}} -> {{2, 2, 2}, {1, 3, 2}}, {{1, 2, 2}} -> {{1, 2, 1}, {3, 1, 2}}, {{1, 2, 2}} -> {{1, 1, 3}, {1, 3, 3}}, {{1, 2, 1}} -> {{1, 3, 1}, {3, 2, 1}}, {{1, 2, 2}} -> {{1, 3, 3}, {3, 1, 2}}, {{1, 2, 2}} -> {{1, 3, 3}, {1, 3, 4}}, {{1, 2, 2}} -> {{1, 3, 1}, {1, 4, 4}}, {{1, 2, 1}} -> {{2, 3, 2}, {4, 1, 3}}, {{1, 2, 2}} -> {{1, 3, 4}, {4, 2, 1}}, {{1, 2, 1}} -> {{3, 2, 3}, {3, 2, 3}}, {{1, 2, 2}} -> {{3, 2, 2}, {2, 1, 1}}, {{1, 2, 1}} -> {{3, 2, 3}, {2, 1, 4}}, {{1, 2, 1}} -> {{3, 2, 3}, {3, 4, 1}}, {{1, 2, 1}} -> {{3, 1, 3}, {4, 2, 1}}, {{1, 2, 2}} -> {{3, 2, 3}, {4, 2, 2}}, {{1, 2, 1}} -> {{3, 4, 3}, {2, 3, 4}}, {{1, 2, 2}} -> {{3, 4, 4}, {1, 4, 3}}, {{1, 2, 1}} -> {{3, 4, 3}, {2, 5, 4}}, {{1, 2, 3}} -> {{1, 2, 1}, {2, 3, 4}}, {{1, 2, 3}} -> {{2, 1, 1}, {3, 2, 4}}, {{1, 2, 3}} -> {{2, 3, 3}, {1, 3, 4}}, {{1, 2, 3}} -> {{3, 2, 3}, {2, 3, 4}}, {{1, 2, 3}} -> {{1, 2, 1}, {2, 4, 3}}, {{1, 2, 3}} -> {{2, 1, 1}, {2, 4, 1}}, {{1, 2, 3}} -> {{2, 3, 1}, {1, 4, 3}}, {{1, 2, 3}} -> {{3, 2, 2}, {1, 4, 3}}, {{1, 2, 3}} -> {{1, 2, 1}, {2, 4, 5}}, {{1, 2, 3}} -> {{3, 2, 1}, {3, 4, 5}}, {{1, 2, 3}} -> {{1, 2, 2}, {4, 2, 1}}, {{1, 2, 3}} -> {{2, 2, 1}, {4, 2, 3}}, {{1, 2, 3}} -> {{3, 1, 3}, {4, 1, 3}}, {{1, 2, 3}} -> {{3, 3, 2}, {4, 3, 1}}, {{1, 2, 3}} -> {{3, 2, 2}, {4, 2, 5}}, {{1, 2, 3}} -> {{3, 3, 3}, {4, 5, 3}}, {{1, 2, 3}} -> {{1, 2, 4}, {1, 3, 4}}, {{1, 2, 3}} -> {{2, 1, 4}, {1, 4, 2}}, {{1, 2, 3}} -> {{2, 2, 4}, {4, 2, 1}}, {{1, 2, 3}} -> {{3, 2, 4}, {2, 1, 4}}, {{1, 2, 3}} -> {{3, 3, 4}, {4, 1, 2}}, {{1, 2, 3}} -> {{2, 1, 4}, {4, 3, 5}}, {{1, 2, 3}} -> {{1, 2, 4}, {4, 5, 3}}, {{1, 2, 3}} -> {{3, 3, 4}, {1, 5, 4}}, {{1, 2, 3}} -> {{2, 3, 4}, {5, 3, 1}}, {{1, 2, 3}} -> {{1, 4, 1}, {2, 3, 2}}, {{1, 2, 3}} -> {{1, 4, 3}, {3, 2, 4}}, {{1, 2, 3}} -> {{2, 4, 1}, {2, 1, 3}}, {{1, 2, 3}} -> {{2, 4, 2}, {4, 3, 1}}, {{1, 2, 3}} -> {{2, 4, 4}, {4, 3, 1}}, {{1, 2, 3}} -> {{3, 4, 3}, {2, 4, 1}}, {{1, 2, 3}} -> {{1, 4, 1}, {2, 4, 5}}, {{1, 2, 3}} -> {{2, 4, 1}, {4, 3, 5}}, {{1, 2, 3}} -> {{1, 4, 3}, {2, 5, 3}}, {{1, 2, 3}} -> {{3, 4, 3}, {4, 5, 3}}, {{1, 2, 3}} -> {{2, 4, 3}, {5, 4, 3}}, {{1, 2, 3}} -> {{1, 4, 5}, {3, 4, 5}}, {{1, 2, 3}} -> {{1, 4, 5}, {2, 4, 6}}, {{1, 2, 3}} -> {{4, 1, 2}, {2, 3, 1}}, {{1, 2, 3}} -> {{4, 1, 4}, {4, 2, 1}}, {{1, 2, 3}} -> {{4, 2, 2}, {4, 1, 3}}, {{1, 2, 3}} -> {{4, 2, 4}, {4, 1, 2}}, {{1, 2, 3}} -> {{4, 3, 3}, {2, 3, 1}}, {{1, 2, 3}} -> {{4, 4, 1}, {2, 3, 1}}, {{1, 2, 3}} -> {{4, 4, 2}, {3, 2, 3}}, {{1, 2, 3}} -> {{4, 4, 3}, {3, 4, 2}}, {{1, 2, 3}} -> {{4, 1, 4}, {4, 2, 5}}, {{1, 2, 3}} -> {{4, 3, 1}, {2, 1, 5}}, {{1, 2, 3}} -> {{4, 2, 3}, {3, 5, 2}}, {{1, 2, 3}} -> {{4, 4, 3}, {3, 5, 3}}, {{1, 2, 3}} -> {{4, 3, 4}, {5, 2, 4}}, {{1, 2, 3}} -> {{4, 1, 5}, {1, 3, 2}}, {{1, 2, 3}} -> {{4, 3, 5}, {3, 2, 1}}, {{1, 2, 3}} -> {{4, 5, 2}, {2, 3, 1}}, {{1, 2, 3}} -> {{4, 5, 3}, {4, 6, 3}}}], UpTo[14]], ImageSize -> Full]

Here are results from a few of these rules after 10 steps:

ParallelMap[ Labeled[ResourceFunction["WolframModel"][#, {{0, 0, 0}}, 10, "FinalStatePlot"], RulePlot[ResourceFunction["WolframModel"][#]], ImageSize -> {200, 150}] &, {{{1, 2, 3}} -> {{4, 5, 1}, {2, 1, 3}}, {{1, 2, 3}} -> {{4, 4, 2}, {4, 1, 3}}, {{1, 2, 3}} -> {{3, 4, 2}, {4, 3, 1}}}]

The number of relations in the evolution of 13 23 rules can grow in a slightly more complicated way than for 12 n2 rules. In addition to linear and 2t growth, there is also, for example, quadratic growth: in the rule

{{x, x, y}} -> {{y, y, z}, {x, y, x}}
RulePlot[ResourceFunction[ "WolframModel"][{{x, x, y}} -> {{y, y, z}, {x, y, x}}]]

each existing “arm” effectively grows by one element each step, and there is one new arm generated, yielding a total size of = :

ResourceFunction["WolframModelPlot"][#, ImageSize -> Tiny] & /@ ResourceFunction[ "WolframModel"][{{1, 1, 2}} -> {{2, 2, 3}, {1, 2, 1}}, {{0, 0, 0}}, 6, "StatesList"]

The rule

{{x, x, y}} -> {{y, y, y}, {x, y, z}}
RulePlot[ResourceFunction[ "WolframModel"][{{x, x, y}} -> {{y, y, y}, {x, y, z}}]]

yields a Fibonacci tree, with size Fibonacci[t+2]1 :

ResourceFunction["WolframModelPlot"][#, ImageSize -> Tiny] & /@ ResourceFunction[ "WolframModel"][{{x, x, y}} -> {{y, y, y}, {x, y, z}}, {{0, 0, 0}}, 6, "StatesList"]

13 23 rules can produce results that look fairly complex. But it is a consequence of their dependence only on a single relation that once such rules have established a large-scale structure, later updates (which are necessarily purely local) can in a sense only embellish it, not fundamentally change it:

ResourceFunction["WolframModelPlot"][#, ImageSize -> Tiny] & /@ ResourceFunction[ "WolframModel"][{{1, 2, 3}} -> {{4, 4, 2}, {4, 1, 3}}, {{0, 0, 0}}, 10, "StatesList"]

There are 637,568 inequivalent left-connected 13 33 rules; here are samples of their behavior:

GraphicsGrid[ Partition[ ParallelMap[ ResourceFunction["WolframModel"][#, {{0, 0, 0}}, 4, "FinalStatePlot"] &, {{{1, 2, 2}} -> {{3, 3, 2}, {3, 1, 3}, {4, 4, 3}}, {{1, 2, 2}} -> {{3, 4, 3}, {4, 5, 2}, {1, 3, 2}}, {{1, 1, 2}} -> {{3, 4, 3}, {3, 5, 6}, {5, 2, 7}}, {{1, 1, 2}} -> {{3, 4, 3}, {5, 3, 6}, {2, 5, 3}}, {{1, 2, 1}} -> {{2, 2, 3}, {1, 3, 1}, {4, 2, 5}}, {{1, 2, 1}} -> {{3, 4, 2}, {4, 3, 2}, {3, 1, 4}}, {{1, 2, 3}} -> {{4, 3, 4}, {1, 3, 4}, {1, 5, 2}}, {{1, 2, 2}} -> {{2, 1, 2}, {3, 4, 1}, {5, 4, 6}}, {{1, 2, 2}} -> {{3, 1, 1}, {3, 4, 1}, {5, 1, 3}}, {{1, 1, 2}} -> {{3, 3, 4}, {4, 5, 3}, {5, 1, 2}}, {{1, 2, 1}} -> {{2, 3, 1}, {1, 3, 4}, {1, 5, 2}}, {{1, 2, 3}} -> {{4, 4, 1}, {5, 6, 4}, {3, 6, 1}}, {{1, 2, 3}} -> {{2, 4, 5}, {4, 2, 6}, {1, 2, 6}}, {{1, 2, 3}} -> {{3, 4, 3}, {4, 2, 5}, {1, 5, 5}}, {{1, 2, 3}} -> {{3, 3, 4}, {3, 1, 5}, {1, 2, 6}}, {{1, 2, 2}} -> {{3, 4, 1}, {1, 4, 5}, {6, 5, 3}}, {{1, 2, 3}} -> {{1, 3, 1}, {4, 1, 3}, {1, 4, 2}}, {{1, 2, 3}} -> {{3, 4, 2}, {4, 5, 2}, {6, 3, 1}}, {{1, 2, 2}} -> {{3, 1, 2}, {3, 4, 5}, {2, 6, 4}}, {{1, 2, 2}} -> {{3, 4, 4}, {4, 2, 3}, {3, 5, 6}}, {{1, 2, 2}} -> {{2, 3, 3}, {3, 1, 2}, {1, 1, 4}}, {{1, 2, 1}} -> {{3, 3, 1}, {1, 3, 1}, {3, 2, 4}}, {{1, 2, 1}} -> {{2, 2, 1}, {1, 3, 3}, {3, 2, 1}}, {{1, 2, 1}} -> {{3, 4, 2}, {5, 2, 4}, {1, 6, 4}}, {{1, 2, 2}} -> {{3, 4, 3}, {4, 3, 2}, {4, 5, 4}}, {{1, 2, 3}} -> {{4, 2, 4}, {4, 3, 5}, {2, 1, 3}}, {{1, 2, 2}} -> {{3, 4, 4}, {5, 6, 4}, {5, 6, 2}}, {{1, 1, 2}} -> {{1, 2, 2}, {3, 1, 4}, {4, 5, 6}}, {{1, 2, 1}} -> {{1, 1, 3}, {4, 1, 3}, {4, 1, 4}}, {{1, 2, 1}} -> {{3, 4, 3}, {2, 3, 4}, {5, 2, 4}}, {{1, 2, 2}} -> {{3, 4, 5}, {6, 4, 1}, {2, 5, 7}}, {{1, 2, 3}} -> {{4, 1, 1}, {4, 1, 5}, {5, 3, 2}}, {{1, 2, 3}} -> {{3, 3, 1}, {2, 1, 1}, {3, 4, 2}}, {{1, 2, 3}} -> {{3, 3, 1}, {2, 1, 2}, {4, 5, 1}}, {{1, 2, 3}} -> {{4, 4, 5}, {3, 4, 2}, {3, 5, 1}}, {{1, 1, 2}} -> {{3, 4, 3}, {3, 4, 3}, {2, 3, 5}}, {{1, 2, 3}} -> {{1, 4, 2}, {4, 2, 1}, {1, 4, 5}}, {{1, 2, 3}} -> {{2, 4, 1}, {4, 1, 2}, {3, 5, 1}}, {{1, 1, 2}} -> {{2, 2, 3}, {2, 3, 1}, {4, 1, 5}}, {{1, 2, 3}} -> {{4, 4, 3}, {4, 3, 2}, {2, 1, 4}}, {{1, 2, 1}} -> {{3, 4, 3}, {1, 3, 4}, {1, 3, 5}}, {{1, 2, 1}} -> {{1, 2, 1}, {2, 3, 4}, {5, 3, 1}}, {{1, 2, 1}} -> {{2, 2, 1}, {3, 2, 3}, {3, 4, 2}}, {{1, 2, 1}} -> {{3, 1, 2}, {4, 1, 5}, {6, 2, 7}}, {{1, 1, 2}} -> {{3, 1, 3}, {3, 4, 1}, {5, 4, 5}}, {{1, 1, 2}} -> {{3, 4, 3}, {2, 4, 1}, {1, 5, 2}}, {{1, 2, 3}} -> {{4, 1, 4}, {2, 4, 3}, {3, 5, 6}}, {{1, 2, 3}} -> {{4, 2, 2}, {2, 1, 4}, {4, 1, 3}}, {{1, 1, 2}} -> {{1, 3, 1}, {2, 3, 3}, {3, 4, 5}}, {{1, 2, 3}} -> {{3, 1, 1}, {3, 4, 4}, {1, 4, 3}}, {{1, 2, 3}} -> {{4, 5, 5}, {5, 1, 3}, {2, 6, 4}}, {{1, 1, 1}} -> {{2, 3, 4}, {3, 1, 5}, {6, 7, 2}}, {{1, 2, 3}} -> {{1, 4, 4}, {1, 5, 5}, {3, 4, 4}}, {{1, 2, 3}} -> {{2, 2, 4}, {4, 3, 2}, {3, 5, 2}}, {{1, 1, 2}} -> {{3, 4, 3}, {4, 2, 5}, {6, 1, 7}}, {{1, 2, 3}} -> {{3, 1, 2}, {1, 2, 4}, {5, 1, 2}}, {{1, 2, 3}} -> {{4, 1, 4}, {2, 1, 4}, {2, 1, 1}}, {{1, 1, 2}} -> {{1, 3, 4}, {3, 1, 5}, {6, 4, 3}}, {{1, 2, 3}} -> {{3, 3, 4}, {2, 4, 5}, {6, 1, 4}}, {{1, 1, 2}} -> {{2, 3, 2}, {2, 1, 3}, {3, 4, 1}}, {{1, 1, 2}} -> {{3, 1, 2}, {3, 2, 4}, {4, 1, 2}}, {{1, 2, 3}} -> {{3, 1, 2}, {3, 2, 4}, {2, 5, 1}}, {{1, 1, 2}} -> {{3, 2, 2}, {4, 2, 1}, {5, 2, 1}}, {{1, 2, 1}} -> {{3, 4, 4}, {3, 5, 6}, {2, 5, 1}}, {{1, 2, 1}} -> {{3, 3, 2}, {2, 4, 5}, {1, 6, 2}}, {{1, 1, 2}} -> {{1, 3, 4}, {4, 5, 6}, {7, 8, 6}}, {{1, 2, 3}} -> {{1, 1, 4}, {2, 3, 4}, {3, 5, 6}}, {{1, 2, 1}} -> {{2, 3, 4}, {5, 6, 4}, {7, 8, 4}}, {{1, 2, 3}} -> {{2, 1, 1}, {4, 1, 3}, {5, 3, 6}}, {{1, 2, 3}} -> {{4, 4, 3}, {3, 4, 3}, {1, 4, 2}}, {{1, 2, 3}} -> {{1, 4, 4}, {5, 4, 2}, {3, 2, 4}}, {{1, 2, 3}} -> {{1, 4, 1}, {2, 3, 4}, {2, 5, 3}}, {{1, 2, 1}} -> {{3, 2, 3}, {3, 1, 1}, {2, 1, 3}}, {{1, 2, 3}} -> {{2, 3, 4}, {3, 1, 4}, {5, 6, 1}}, {{1, 2, 3}} -> {{2, 4, 2}, {1, 4, 1}, {2, 1, 5}}, {{1, 2, 3}} -> {{4, 1, 1}, {4, 2, 3}, {3, 5, 1}}, {{1, 1, 2}} -> {{2, 2, 1}, {2, 3, 1}, {2, 4, 4}}, {{1, 2, 2}} -> {{3, 2, 4}, {4, 1, 3}, {5, 6, 2}}, {{1, 2, 3}} -> {{2, 3, 2}, {2, 4, 1}, {5, 3, 6}}, {{1, 2, 2}} -> {{2, 1, 1}, {1, 2, 3}, {3, 1, 1}}, {{1, 2, 2}} -> {{1, 1, 3}, {3, 4, 5}, {3, 4, 6}}, {{1, 1, 2}} -> {{2, 3, 3}, {3, 1, 1}, {4, 2, 5}}, {{1, 1, 2}} -> {{3, 3, 4}, {2, 3, 5}, {2, 1, 2}}, {{1, 2, 3}} -> {{4, 2, 5}, {4, 1, 6}, {2, 7, 6}}}], UpTo[14]], ImageSize -> Full]

The results can be more elaborate than for 13 23 rulesas the following examples illustratebut remain qualitatively similar:

ParallelMap[ Labeled[ResourceFunction["WolframModel"][#, {{0, 0, 0}}, 7, "FinalStatePlot"], RulePlot[ ResourceFunction["WolframModel"][#]]] &, {{{1, 2, 3}} -> {{4, 2, 5}, {4, 5, 1}, {5, 1, 3}}, {{1, 2, 3}} -> {{4, 5, 3}, {2, 3, 5}, {6, 5, 1}}}]

One notable 13 33 rule (that we will discuss below) in a sense directly implements the recursive formation of a nested Sierpiński pattern:

{{x, y, z}} -> {{x, u, v}, {z, v, w}, {y, w, u}}
RulePlot[ResourceFunction[ "WolframModel"][{{x, y, z}} -> {{x, u, v}, {z, v, w}, {y, w, u}}]]
ResourceFunction["WolframModelPlot"][#, ImageSize -> Tiny] & /@ ResourceFunction[ "WolframModel"][{{x, y, z}} -> {{x, u, v}, {z, v, w}, {y, w, u}}, {{1, 2, 3}}, 5, "StatesList"]