In[]:=
ResourceFunction["WolframModelPlot"][#,VertexLabels->Automatic]&/@{{{a,b,lx}},{{lx,b}}}
Out[]=
,
We want rules that are combinations of hyperedges
We want rules that are combinations of hyperedges
Alternative view of strings
Alternative view of strings
"A"->"AB"
{"Ax","xAB"}
In[]:=
ResourceFunction["EnumerateWolframModelRules"][{{1,2}->{1,2}}]
Out[]=
In[]:=
ResourceFunction["EnumerateWolframModelRules"][{{1,2}}->{{1,2}}]//Quiet
Out[]=
{{{1,1}}{{1,1}},{{1,1}}{{1,2}},{{1,1}}{{2,1}},{{1,2}}{{1,1}},{{1,2}}{{1,2}},{{1,2}}{{2,1}},{{1,2}}{{2,2}},{{1,2}}{{1,3}},{{1,2}}{{2,3}},{{1,2}}{{3,1}},{{1,2}}{{3,2}}}
End result: token-event analog of this
End result: token-event analog of this
In[]:=
ResourceFunction["WolframModel"][{{1,2}}{{1,3}},{{1,2}},1,"FinalState"]
Out[]=
{{1,3}}
In[]:=
ResourceFunction["WolframModel"][{{1,2}}{{1,3}},{{1,2}},1,"FinalState","EventSelectionFunction"->None]
Out[]=
{{1,3}}
SubsetReplace
Basic setup: TEG [ rule1, rule2 ] ⟶ rules
Basic setup: TEG [ rule1, rule2 ] ⟶ rules
In[]:=
Last[ResourceFunction["MultiwaySystem"]["WolframModel"->{{{1,2}}{{1,3}}},{{{1,2}}},1]]
Out[]=
{{{1,2}}}
In[]:=
WMReplaceList[state_,rule_]:=Last[ResourceFunction["MultiwaySystem"]["WolframModel"->{rule},{state},1]]
Need to track how variables on the two sides of the rule relate.....
Need to track how variables on the two sides of the rule relate.....
In[]:=
WMApply[lhs1_<->rhs1_,lhs2_<->rhs2_]:=TwoWayRule@@@Join[{{lhs2,rhs2}},{#,rhs2}&/@WMReplaceList[lhs2,lhs1->rhs1],{lhs2,#}&/@WMReplaceList[rhs2,lhs1->rhs1],{#,rhs2}&/@WMReplaceList[lhs2,rhs1->lhs1],{lhs2,#}&/@WMReplaceList[rhs2,rhs1->lhs1]]
In[]:=
RandomSample[{{{1,1}}{{1,1}},{{1,1}}{{1,2}},{{1,1}}{{2,1}},{{1,2}}{{1,1}},{{1,2}}{{1,2}},{{1,2}}{{2,1}},{{1,2}}{{2,2}},{{1,2}}{{1,3}},{{1,2}}{{2,3}},{{1,2}}{{3,1}},{{1,2}}{{3,2}}},2]
Out[]=
{{{1,2}}{{1,3}},{{1,1}}{{2,1}}}
In[]:=
WMApply[{{1,2}}<->{{1,3}},{{1,1}}<->{{2,1}}]
Out[]=
{{{1,1}}{{2,1}},{{1,2}}{{2,1}},{{1,1}}{{1,2}},{{1,2}}{{2,1}},{{1,1}}{{1,2}}}
In[]:=
ResourceFunction["TokenEventGraph"][{{r1_,r2_}:>WMApply[r1,r2]},{{{1,2}}<->{{1,3}}},3,"TokenMultiplicity"->Automatic,"EventDeduplication"->True,"TokenLabeling"->True]
Out[]=
In[]:=
ResourceFunction["EnumerateWolframModelRules"][{{1,2}}->{{1,2}}]//Quiet
Out[]=
{{{1,1}}{{1,1}},{{1,1}}{{1,2}},{{1,1}}{{2,1}},{{1,2}}{{1,1}},{{1,2}}{{1,2}},{{1,2}}{{2,1}},{{1,2}}{{2,2}},{{1,2}}{{1,3}},{{1,2}}{{2,3}},{{1,2}}{{3,1}},{{1,2}}{{3,2}}}
In[]:=
ResourceFunction["TokenEventGraph"][{{r1_,r2_}:>WMApply[r1,r2]},{#},3,"TokenMultiplicity"->Automatic,"EventDeduplication"->True,"TokenLabeling"->True]&/@(%449/.Rule->TwoWayRule)
Out[]=
,
,
,
,
,
,
,
,
,
,