Function Repository Resource:

# PerturbedCausalGraph

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

Contributed by: William Yam
 ResourceFunction["PerturbedCausalGraph"][wm0,wm1] combines the causal graphs of wm0 and wm1 and returns a graph object.

## Details and Options

ResourceFunction["PerturbedCausalGraph"] tries to find differences between the final state of wm0 and the initial state of wm1 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 wm1 that are not contained in the final state of wm0 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.

## Examples

### Basic Examples

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]=

### Scope

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]=