Chapter 9: Fundamental Physics

Section 7: Space as a Network

Implementation [of network properties]

Networks are conveniently represented by assigning a number to each node, then having lists of rules which specify what nodes the connection from a particular node go to. The tetrahedron network from page 476 is for example given in this representation by


The list of nodes reached by following up to n connections from node i are then given by


The network distance corresponding to the length of the shortest path between two nodes is given by

Distance[g_,{i_,j_}]:=Length[NestWhileList[Union[Flatten[# /. g]] &, {i}, ! MemberQ[#, j] &]] - 1

Image Source Notebooks:

From Stephen Wolfram: A New Kind of Science [citation]