# 5.17 Foliations of the Multiway Graph and the Structure of Branchial Space

Just as states that occur at successive steps in the evolution of our underlying systems can be thought of as associated with successive slices in a foliation of the causal graph, so also branchial graphs can be thought of as being associated with successive slices in a foliation of the multiway graph.

As we discussed above, different foliations of the causal graph define different relative orderings of updating events within our underlying system. But we can now think about this at a higher level and consider foliations of the multiway graph, that in effect define different relative orders of updating events on different branches of the multiway system. A foliation of the causal graph in effect defines how we should line up our notion of “time” for events in different parts of our underlying system; a foliation of the multiway graph now also defines how we should line up our notion of “time” for events on different branches of the multiway system.

For example, with the rule

{"A" -> "AB"}

starting from AA, we can define the following foliation of the multiway graph:

Graph[ResourceFunction["MultiwaySystem"][{"A" -> "AB"}, "AA", 7, "EvolutionGraph"], GraphLayout -> "LayeredDigraphEmbedding", AspectRatio -> 1/2, Epilog -> {ResourceFunction["WolframPhysicsProjectStyleData"][ "BranchialGraph", "EdgeStyle"], AbsoluteThickness[1.5], Table[Line[{{-10, i}, {9, i}}], {i, 1/2, 6 + 1/2}]}]

This yields the branchial graphs:

Prepend[Table[ Graph[ResourceFunction["MultiwaySystem"][{"A" -> "AB"}, "AA", t, "BranchialGraph"], ImageSize -> {600, 30}], {t, 2, 7}], Framed[Graph[ ResourceFunction["MultiwaySystem"][{"A" -> "AB"}, "AA", 1, "BranchialGraph"], ImageSize -> Scaled[1]], ImageSize -> {600, 30}, FrameStyle -> None, FrameMargins -> None]] // Column

Just as the causal graph defines a partial order for events, so now the multiway graph defines a partial order for states. And so long as it is consistent with this partial order, we can pick any total order for the states. And we can parametrize some of these total orders as foliations.

For the particularly simple case shown here, an alternative foliation consistent with the partial order defined by the multiway system is:

CloudGet["https://wolfr.am/KXgcRNRJ"] \ Graph[ ResourceFunction["MultiwaySystem"][{"A" -> "AB"}, "AA", 7, "EvolutionGraph"], GraphLayout -> "LayeredDigraphEmbedding", AspectRatio -> 1/2, Epilog -> {AbsoluteThickness[1.5], straightFoliationLines[{1, 0}, {0.3, 0}, # &, {0, 0}, ResourceFunction["WolframPhysicsProjectStyleData"][ "BranchialGraph", "EdgeStyle"]]}]

And if we use this foliation, we get a different sequence of branchial graphs, now no longer connected:

Rest[Framed[ Subgraph[ ResourceFunction["MultiwaySystem"][{"A" -> "AB"}, VertexList[ ResourceFunction["MultiwaySystem"][{"A" -> "AB"}, {"AA"}, 7, "StatesGraph"]], 1, "BranchialGraph"], #, ImageSize -> {200, 80}], FrameStyle -> LightGray] & /@ { {"AA"}, {"ABA", "AAB", "ABBA"}, {"ABAB", "AABB", "ABBBA"}, {"ABBAB", "ABABB", "ABBBBA", "ABBBAB", "ABBBBBA"}, {"AABBB", "ABBABB", "ABBBBAB", "ABBBBBBA", "ABBBBBAB"}, {"ABABBB", "AABBBB", "ABBBABB", "ABBABBB", "ABBBBABB", "ABBBBBBBA", "ABBBBBBAB"}, {"ABABBBB", "ABBBABBB", "ABBBBBABB"}, {"AABBBBB", "ABBABBBB", "ABABBBBB", "ABBBBABBB", "ABBBABBBB"}, {"AABBBBBB", "ABBABBBBB"}, {"ABABBBBBB", "AABBBBBBB"} }]

This example is particularly obvious in its analogy with the causal graphs we discussed above. But what makes this work is a special feature of the branchial graphs in this case: the fact that the states that appear in them can in effect be assigned simple 1D “coordinates”. In the original foliation with unslanted (“one event per slice”) slices, the “coordinate” is effectively just the position of the second A in the string. And with respect to the “space” defined by this “coordinate”, the branchial graphs can readily be laid out in one dimension, and we can readily set up “slanted” foliations, just like we did for causal graphs.

With the underlying systems we are discussing in this section being based on strings of elements, it is inevitable that there will be 1D coordinates that can be assigned to the events that occur in the causal graph. But nothing like this need be true of the branchial graph, and indeed most branchial graphs have a significantly more complex structure.

Consider the same rule as above, but now started from AAA. The multiway graph in this casewith a foliation indicatedis then:

Show[ResourceFunction["LayeredGraphPlot3D"][ ResourceFunction["MultiwaySystem"][{"A" -> "AB"}, "AAA", 7, "EvolutionGraphStructure"], FaceGrids -> "Layers", EdgeStyle -> Directive[Hue[0.62, 0.05, 0.55], Opacity[.6]]], BoxRatios -> {1, 1, .8}, FaceGridsStyle -> ResourceFunction["WolframPhysicsProjectStyleData"]["BranchialGraph", "EdgeStyle"]]

The branchial graphs now have a two-dimensional structurewith the positions of the second and third As in each string providing potential “coordinates”:

Table[Graph[ ResourceFunction["MultiwaySystem"][{"A" -> "AB"}, "AAA", t, If[t < 4, "BranchialGraph", "BranchialGraphStructure"]], If[t > 3, ImageSize -> Tiny, {}]], {t, 2, 7}]

But consider now the rule

{"BA" -> "AB"}

started from BABABABA. The multiway graph in this case is:

ResourceFunction["LayeredGraphPlot3D"][ ResourceFunction["MultiwaySystem"][{"BA" -> "AB"}, StringJoin[Table["BA", 4]], 9, "EvolutionGraphStructure"], FaceGrids -> "Layers", FaceGridsStyle -> ResourceFunction["WolframPhysicsProjectStyleData"]["BranchialGraph", "EdgeStyle"], EdgeStyle -> Directive[Hue[0.62, 0.05, 0.55], Opacity[.6]]]

And the sequence of branchial graphs based on the foliation above is now:

Table[Graph[ ResourceFunction["MultiwaySystem"][{"BA" -> "AB"}, StringJoin[Table["BA", 4]], t, "BranchialGraphStructure"], ImageSize -> Tiny], {t, 7}]

But here it is already much less clear how to assign “coordinates” in “branchial space”, or how to create a meaningful family of foliations of the multiway graph.

In thinking about multiway graphs and their foliations there is another complication that can arise for some rules. Consider two versions of the multiway graph for the rule:

{"AB" -> "BAB", "BA" -> "A"}
{Graph[ResourceFunction["MultiwaySystem"][{"AB" -> "BAB", "BA" -> "A"}, "ABA", 4, "StatesGraph"], ImageSize -> {Automatic, 250}, GraphLayout -> {"LayeredEmbedding", "RootVertex" -> "ABA"}], LayeredGraphPlot[ ResourceFunction["MultiwaySystem"][{"AB" -> "BAB", "BA" -> "A"}, "ABA", 4, "EvolutionGraph"], ImageSize -> {Automatic, 250}]}

In the first version, every distinct state is shown only once. But in the second case, the evolution is “partially unrolled” to show separately different instances of the same state, produced after different numbers of updating events. With a foliation whose slices correspond to the layers in the renderings above, the first version of the multiway system yields the branchial graphs:

Table[Graph[ ResourceFunction["MultiwaySystem"][{"AB" -> "BAB", "BA" -> "A"}, "ABA", t, "BranchialGraph"], ImageSize -> 120], {t, 4}]

The second version, however, yields different branchial graphs:

Table[ResourceFunction["MultiwaySystem"][{"AB" -> "BAB", "BA" -> "A"}, "ABA", t, "EvolutionBranchialGraph"], {t, 4}]

To some extent this difference is just like taking a different foliation. But there is more to it, because the second version of the multiway graph actually defines different ordering constraints than the first one. In the second version, there is a true partial ordering, defined by the directed edges in the multiway graph. But in the first version, there can be loops, and so no strict partial order is defined. (We will discuss this phenomenon more in 6.9.)