# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

Generate the causal graph produced by combining an unperturbed and perturbed WolframModelEvolutionObject

Contributed by:
William Yam

ResourceFunction["PerturbedCausalGraph"][ ]wm_{1}combines the causal graphs of |

ResourceFunction["PerturbedCausalGraph"] tries to find differences between the final state of *wm*_{0} and the initial state of *wm*_{1}* *in the form of insertions, deletions and replacements as a way of identifying causally connected edges.

A replacement is considered to be a combination of a deletion and an insertion. The replaced edges do not share the same causal connections as their predecessors.

Edges in the initial state of *wm*_{1}* *that are not contained in the final state of *wm*_{0} are assumed to be insertions with no prior causal connections.

The ordering of edges is important and swapping pairs of edges is equivalent to pairs of replacements.

Attempting to combine graphs which share no common edges will result in a disconnected causal graph.

Compute a WolframModel evolution over 200 steps:

In[1]:= |

Out[2]= |

After the 200 steps, add a self-loop as a perturbation and evolve for a further 50 steps:

In[3]:= |

Out[4]= |

Use PerturbedCausalGraph to show the difference caused by the perturbation:

In[5]:= |

Out[5]= |

Compute 200 steps of the evolution of a WolframModel:

In[6]:= |

Plot the final state:

In[7]:= |

Out[7]= |

Delete 10 random edges in the spatial hypergraph after 200 steps before evolving further:

In[8]:= |

In[9]:= |

Out[9]= |

Show the perturbed causal graph:

In[10]:= |

Out[10]= |

Use the output of one rule as the input for a different rule:

In[11]:= |

Out[12]= |

In[13]:= |

In[14]:= |

Out[14]= |

In[15]:= |

Out[15]= |

- 3.0.0 – 17 September 2020
- 2.0.0 – 17 July 2020
- 1.0.0 – 16 July 2020

This work is licensed under a Creative Commons Attribution 4.0 International License