The Last Theory
The Last Theory
The Last Theory
15 September 2022

# What is a hypergraphin Wolfram Physics?

Thanks for subscribing to The Last Theory newsletter

Check your inbox for an email to confirm your subscription

Oh no, something went wrong, and I was unable to subscribe you!

Please refresh your browser and try again

In previous articles, I’ve been simulating Wolfram Physics using graphs, like this one: But you may have come across simulations of Wolfram Physics using hypergraphs, like this one: What’s the difference?

What is a hypergraph?

## What is a graph?

Let’s go back to what a graph is.

A graph is a collection of nodes and edges, where each edge goes from one node to another node: Remember that the direction of an edge matters. An edge from node 1 to node 2 is not the same as an edge from node 2 to node 1:  It’s important to keep in mind that what I’m showing you when I’m showing you a graph is a visualization of an abstract mathematical construct.

In this visualization, for example, I’ve chosen to represent the nodes as white dots and the edge as a white arrow: But I might have chosen instead to represent the nodes as brown crabs and the edge as a pink snake: These crabs and snakes aren’t real. They’re just my way of visualizing the nodes and edges of the graph.

Same goes for the dots and arrows. They’re not real. They’re just my way of visualizing the nodes and edges of the graph.

So what is real? What, when it comes down to it, is a graph?

## Ways of seeing

Well, I’ve said it already: a graph is a collection of nodes and edges, where each edge goes from one node to another node.

It might help to lose the crabs and snakes, lose the dots and arrows even, lose the visualization entirely, and represent the graph using numbers instead. That edge from node 1 to node 2: could be represented as the number 1 followed by the number 2, separated by a comma, in curly brackets:

{1, 2}

Again, the direction of an edge matters. An edge from node 2 to node 1: could be represented as the number 2 followed by the number 1, again, separated by a comma, again, in curly brackets:

{2, 1}

Using this numerical notation, the edges in a complex graph like this one: could be represented as a long list of pairs of numbers in curly brackets:

{1, 34}, {1, 29}, {2, 4}, {3, 4}, {4, 126}, {3, 171}, {5, 21}, {3, 54}, {6, 65}, {3, 108}, {6, 11}, {5, 8}, {8, 118}, {7, 128}, {7, 105}, {4, 129}, {9, 11}, {7, 61}, {7, 101}, {11, 178}, {10, 42}, {4, 63}, {5, 75}, {13, 91}, {13, 102}, {14, 195}, {6, 16}, {8, 133}, {13, 17}, {8, 184}, {5, 46}, {8, 179}, {18, 19}, {8, 185}, {17, 146}, {18, 177}, {16, 113}, {14, 152}, {14, 53}, {19, 22}, {10, 23}, {11, 23}, {20, 167}, {4, 51}, {12, 173}, {11, 106}, {16, 26}, {9, 26}, {9, 155}, {26, 27}, {22, 74}, {21, 163}, {3, 176}, {7, 77}, {15, 112}, {14, 187}, {8, 134}, {4, 156}, {22, 32}, {21, 120}, {9, 130}, {23, 72}, {7, 38}, {29, 149}, {19, 143}, {32, 35}, {31, 199}, {17, 157}, {19, 37}, {17, 140}, {34, 38}, {23, 97}, {18, 201}, {31, 162}, {30, 40}, {21, 166}, {27, 41}, {26, 41}, {13, 43}, {23, 93}, {42, 43}, {14, 193}, {20, 186}, {39, 159}, {14, 83}, {31, 104}, {35, 46}, {21, 123}, {40, 47}, {32, 161}, {10, 48}, {15, 48}, {28, 49}, {46, 49}, {26, 50}, {36, 50}, {24, 51}, {48, 51}, {32, 52}, {49, 52}, {28, 53}, {15, 53}, {31, 54}, {24, 54}, {15, 168}, {48, 55}, {21, 90}, {43, 71}, {36, 57}, {37, 57}, {55, 58}, {45, 150}, {56, 59}, {43, 115}, {31, 76}, {58, 89}, {11, 172}, {38, 127}, {30, 62}, {17, 145}, {58, 63}, {51, 154}, {39, 64}, {54, 64}, {12, 87}, {11, 68}, {60, 66}, {64, 66}, {33, 124}, {11, 67}, {65, 68}, {12, 68}, {12, 160}, {23, 69}, {47, 70}, {52, 175}, {56, 71}, {59, 131}, {33, 72}, {38, 119}, {43, 73}, {45, 73}, {28, 96}, {32, 122}, {32, 79}, {46, 75}, {66, 76}, {64, 76}, {29, 77}, {61, 189}, {42, 78}, {38, 78}, {75, 79}, {74, 79}, {73, 80}, {53, 80}, {29, 81}, {39, 81}, {60, 82}, {51, 82}, {45, 153}, {53, 83}, {59, 98}, {80, 84}, {23, 165}, {77, 85}, {48, 86}, {51, 147}, {65, 87}, {25, 87}, {84, 88}, {71, 142}, {60, 89}, {63, 89}, {56, 90}, {70, 90}, {14, 91}, {17, 91}, {36, 92}, {50, 92}, {78, 93}, {38, 174}, {25, 94}, {69, 94}, {50, 95}, {41, 95}, {74, 96}, {49, 96}, {38, 97}, {93, 97}, {88, 98}, {71, 98}, {95, 99}, {17, 99}, {45, 192}, {51, 181}, {25, 101}, {85, 101}, {62, 138}, {43, 102}, {67, 110}, {26, 200}, {45, 104}, {64, 197}, {85, 105}, {101, 105}, {25, 106}, {67, 106}, {100, 107}, {51, 190}, {24, 108}, {81, 108}, {40, 109}, {15, 170}, {103, 202}, {106, 110}, {47, 111}, {74, 111}, {30, 137}, {53, 112}, {21, 113}, {26, 114}, {113, 114}, {41, 114}, {59, 115}, {71, 115}, {62, 116}, {20, 116}, {93, 117}, {97, 117}, {41, 118}, {92, 118}, {72, 158}, {61, 119}, {52, 120}, {90, 120}, {69, 121}, {94, 183}, {74, 122}, {79, 122}, {46, 148}, {120, 123}, {67, 124}, {72, 144}, {86, 125}, {51, 188}, {107, 126}, {82, 126}, {61, 127}, {119, 127}, {33, 128}, {105, 128}, {125, 129}, {51, 129}, {103, 130}, {26, 130}, {71, 131}, {115, 131}, {125, 132}, {100, 132}, {99, 133}, {18, 133}, {92, 134}, {17, 198}, {123, 135}, {75, 135}, {82, 136}, {126, 136}, {112, 137}, {62, 137}, {102, 138}, {137, 138}, {103, 139}, {50, 139}, {37, 140}, {20, 140}, {132, 141}, {129, 141}, {88, 203}, {131, 142}, {35, 143}, {22, 143}, {124, 144}, {119, 144}, {116, 145}, {57, 145}, {20, 146}, {140, 146}, {86, 147}, {82, 147}, {135, 148}, {49, 148}, {34, 149}, {77, 149}, {58, 150}, {100, 150}, {119, 151}, {144, 151}, {84, 152}, {109, 152}, {83, 153}, {73, 153}, {63, 154}, {100, 154}, {27, 155}, {26, 169}, {136, 156}, {63, 156}, {57, 157}, {146, 157}, {151, 158}, {144, 158}, {44, 159}, {81, 159}, {121, 160}, {68, 160}, {111, 161}, {79, 161}, {64, 162}, {76, 162}, {49, 163}, {123, 163}, {36, 164}, {76, 164}, {85, 165}, {97, 165}, {70, 166}, {123, 166}, {24, 194}, {146, 167}, {55, 168}, {53, 168}, {155, 169}, {50, 169}, {109, 170}, {48, 170}, {39, 171}, {54, 171}, {61, 172}, {67, 172}, {94, 173}, {87, 173}, {117, 174}, {97, 174}, {70, 175}, {120, 175}, {81, 176}, {54, 176}, {44, 191}, {19, 177}, {69, 178}, {106, 178}, {18, 179}, {134, 179}, {134, 180}, {91, 180}, {100, 181}, {82, 181}, {44, 182}, {140, 182}, {121, 183}, {173, 183}, {17, 184}, {179, 184}, {37, 185}, {179, 185}, {182, 186}, {167, 186}, {109, 187}, {53, 187}, {141, 188}, {154, 188}, {77, 189}, {119, 189}, {107, 190}, {129, 190}, {177, 191}, {159, 191}, {100, 192}, {153, 192}, {80, 193}, {83, 193}, {167, 194}, {108, 194}, {15, 196}, {152, 195}, {195, 196}, {170, 196}, {104, 197}, {66, 197}, {180, 198}, {146, 198}, {164, 199}, {76, 199}, {139, 200}, {41, 200}, {39, 201}, {177, 201}, {110, 202}, {139, 202}, {142, 203}, {98, 203}

All those numbers in the list, between 1 and 203, represent the 203 nodes in this graph.

And all those pairs of numbers in curly brackets, such as {1, 34} and {98, 203}, represent the 402 edges in the graph, such as the edge from node 1 to node 34 and the edge from node 98 to node 203.

It’s much easier to see what’s going on in this graph if we visualize it with dots and arrows, but that list of pairs of numbers in curly brackets is just as good a representation of the graph.

## The numbers don’t lie

In some ways, the numbers are a better represention of the graph than the dots and arrows.

I made many arbitrary decisions when I created that visualization: I’m not just talking about using dots and arrows rather than crabs and snakes. I made some far more pernicious decisions than that.

For example, I decided to lay out the nodes in a two-dimensional space.

In a way, this was just a matter of convenience: the screen or paper on which you’re reading this article is two-dimensional, so it made sense to visualize the graph in two dimensions.

But as we’ve seen, this graph is not two-dimensional. It might be 2½-dimensional, or 3.37-dimensional, or 9-dimensional instead.

By laying out the nodes in two-dimensional space, I imposed on you, the viewer of the visualization, an assumption – an incorrect assumption, as it turns out – about the dimensionality of the graph.

Perhaps even more pernicious were my decisions as to precisely where to position each of the nodes in this two-dimensional space.

Again, in a way, it was just a matter of convenience: I wanted the visualization to be as clear as possible, so I spread the nodes as evenly as possible over the space available, and I tried to make each of the edges about the same length.

But as we’ve seen, nodes don’t have positions and edges don’t have lengths in some putative space outside of the graph. Rather, the graph is space.

Check out What is space? the where and the how far and The expanse: dimension, separation & explosion for more on this.

Again, by positioning the nodes as I did, I imposed on you, the viewer of the visualization, assumptions – deeply misleading assumptions – about the nature of space itself.

That list of pairs of numbers in curly brackets might not be so helpful when it comes to seeing what’s going on in this graph, but at least it doesn’t misrepresent the universe.

## Two’s company, three’s a crowd

So let’s do an experiment.

If the numbers are a better represention of the graph than the dots and arrows, then let’s take the numbers seriously.

If pairs of numbers in curly brackets, such as {1, 34} and {98, 203}, are a true representation of the universe, then I have a question.

Why pairs of numbers?

Why are there always two numbers in curly brackets? Why not three?

This question might never have occurred to us if we’d gone on visualizing graphs using dots and arrows. But now that we’re using pairs of numbers in curly brackets to represent the graph, it’s an obvious thing to ask.

So let’s put three numbers in each set of curly brackets and see what happens.

We’ve been visualizing a pair of numbers in curly brackets:

{1, 2}

as edge from node 1 to node 2: So if we’re going to put three numbers in curly brackets:

{1, 2, 3}

how would we visualize that?

Well, we can still interpret the numbers 1, 2 and 3 as nodes, and visualize them as white dots: And, well, since there’s still an order to the numbers, we can still visualize the relationship between these nodes as white arrows, though we’ll now need two of them, an arrow from node 1 to node 2, and another arrow from node 2 to node 3: But we’re not quite there yet. The trouble with these two arrows is that they look like two edges, one from node 1 to node 2, and another from node 2 to node 3:

{1, 2}, {2, 3}

We need some way of showing that we’re not looking at two relationships, one between nodes 1 and 2, and another between nodes 2 and 3, but a single relationship between nodes 1, 2 and 3:

{1, 2, 3}

We can do that by joining the three white dots and the two white arrows with a transparent white web: So what should we call this relationship between three nodes, represented by three numbers in curly brackets and visualized as three white dots, two white arrows and a transparent white web?

Well, what have we been calling a relationship between a pair of nodes, represented by a pair of numbers in curly brackets and visualized as two white dots and a white arrow?

We’ve been calling it an edge: So let’s call this relationship between three nodes a hyperedge: ## Rules are rules

We can apply rules to hyperedges in exactly the same way as we apply rules to edges.

Here’s the rule I used to generate the graph at the top of this article: It’s the rule I’ve used many times before, where we find two edges from the same node, delete one of them, and create three new edges from the three existing nodes to a new node.

A quick note for the algebraically-minded, now that I’ve introduced the numerical notation for edges. That rule can also be written:

{x, y}, {x, z} → {x, z}, {x, w}, {y, w}, {z, w}

And here’s the rule I used to generate the hypergraph at the top of this article: To apply this rule, we find a hyperedge, delete it, and create three new hyperedges from the three existing nodes, each to two of three new nodes.

Again, the rule can be written algebraically:

{x, y, z} → {x, u, v}, {z, v, w}, {y, w, u}

Apply the rule over and over, and a beautifully bubbly hypergraph emerges:         ## Hyperquestions

So there you have it.

An edge joins two nodes; a hyperedge joins three nodes.

A graph is a collection of nodes and edges; a hypergraph is a collection of nodes and hyperedges.

With this, we’ve dramatically expanded the repertoire of rules we can apply in Wolfram Physics: as well as applying rules involving edges to evolve graphs, we can apply rules involving hyperedges to evolve hypergraphs.

In future articles, that’s precisely what I’ll be doing.

So this is good, right?

Except that this expansion from graphs to hypergraphs raises more questions than it answers.

Here’s one question.

Can we mix edges and hyperedges in the same graph or hypergraph?

Here’s another.

If we can put two or three numbers in each set of curly brackets, then why not one or four or seventeen?

In other words, if an edge joins two nodes and a hyperedge joins three nodes, then what joins one or four or seventeen nodes?

And here’s a more fundamental question.

Using graphs of nodes and edges to represent the universe seemed like a good idea when we started exploring Wolfram Physics. These graphs look a bit like space; applying rules to evolve these graphs looks a bit like the evolution of the universe over time.

Using hypergraphs of nodes and hyperedges to represent the universe seems similarly promising. Again, these hypergraphs look a bit like space; and again, applying rules to evolve these hypergraphs looks a bit like the evolution of the universe over time.

But it’s all starting to seem a little arbitrary. Which is it? Is the universe a graph or is it a hypergraph? Or something else entirely? Maybe it’s a hyper-hyper-hyper-hypergraph of nodes and hyper-hyper-hyper-hyperedges?

With all these abstract mathematical constructs looking a bit like our universe, how do we choose one over any other?

Thanks for subscribing to The Last Theory newsletter

Check your inbox for an email to confirm your subscription

Oh no, something went wrong, and I was unable to subscribe you!

Please refresh your browser and try again