WOLFRAM NOTEBOOK

Reading Results

In[]:=
$PhysicsDataDirectory
Out[]=
/Users/sw/Dropbox/Physics/Data
In[]:=
allres1=Table[Import["/Users/sw/Dropbox/Physics/Data/MWCausalInvariance/"<>ToString[n]<>".wxf"],{n,12}];
In[]:=
allres2=Table[Import["/Users/sw/Dropbox/Physics/Data/MWCausalInvariance2/"<>ToString[n]<>".wxf"],{n,12}];

Analyzing Summaries

In[]:=
totals1=Counts/@Map[Last/@#&,GatherBy[{StringLength[StringJoin[Level[First[#],{-1}]]],#[[2]]}&/@Catenate[Catenate[allres1]],First]]
Out[]=
In[]:=
totals2=Counts/@Map[Last/@#&,GatherBy[{StringLength[StringJoin[Level[First[#],{-1}]]],#[[2]]}&/@Catenate[Catenate[allres2]],First]]
Out[]=
In[]:=
KeySelect[#,IntegerQ]&/@totals1
Out[]=
In[]:=
KeySelect[#,IntegerQ]&/@totals2
Out[]=
Conclusion: most of the $Aborted should be assigned to Null, though not quite all....
In[]:=
ctotals=MapThread[Merge[{#1,#2},Identity]&,{totals1,totals2}]
Out[]=
In[]:=
totals=Association/@(KeyValueMap[If[IntegerQ[#1]||#1===Null,#1->Max[#2],#1Min[#2]]&,#]&/@ctotals)
Out[]=
In[]:=
totals={12,15,Null1,122,Null4,145,Null19,$Aborted0,1186,Null72,22,$Aborted0,1397,Null284,$Aborted3,34,216,11412,Null970,$Aborted18,410,2128,322,13086,Null3630,$Aborted110,459,535,3127,2521,614,72,19556,Null11664,$Aborted705,4278,5115,677,22268,3648,733,810,96,120645,Null39766,$Aborted3775,41165,5587,32388,7156,28099,6342,1028,896,1110,947,123,142,160897,Null123343,$Aborted18996,44556,52133,310697,230775,61073,7523,8242,9129,1086,1238,1158,1314,146,161,151};

Causal Invariant Cases

In[]:=
causals=Cases[Catenate[#],(x__Integer)x]&/@allres2;
In[]:=
Export["/Users/sw/Dropbox/Physics/Data/MWCausalInvariantSamples/samples-01.wxf",causals]
Out[]=
/Users/sw/Dropbox/Physics/Data/MWCausalInvariantSamples/samples-01.wxf
In[]:=
causals[[4]]
Out[]=
In[]:=
Table[Counts[ResourceFunction["StringOverlapsQ"][First/@#]&/@causals[[n]]],{n,8}]
Out[]=
{,False2,False4,True1,False15,True7,False29,True16,False90,True98,False196,True221,False580,True992}
In[]:=
Table[Counts[(ResourceFunction["StringOverlapsQ"][First/@#]||AnyTrue[First/@#,ResourceFunction["StringOverlapsQ"]])&/@causals[[n]]],{n,8}]
Out[]=
{,False2,False4,True1,False15,True7,False29,True16,False90,True98,False196,True221,False580,True992}
In[]:=
Table[Echo@Counts[ResourceFunction["StringOverlapsQ"][First/@#]&/@causals[[n]]],{n,16}]
»
»
False2
»
False4,True1
»
False15,True7
»
False29,True16
»
False90,True98
»
False196,True221
»
False580,True992
»
False1335,True2509
»
False3790,True9201
»
False9062,True24506
»
False25000,True86229
Part
:Part 13 of {{}, <<10>>, {{A -> AAAAAAAAAAA}, {A -> AAAAAAAAAAB}, {A -> AAAAAAAAABA}, <<111224>>, {A -> B, B -> B, <<3>>, B -> A}, {A -> B, B -> B, B -> B, B -> B, B -> B, B -> B}}} does not exist.
First
:{} has zero length and no first element.
Part
:The expression
[]
StringOverlapsQ
[13] cannot be used as a part specification.
Counts
:The argument
[]
StringOverlapsQ
[{First[{}],{AA},{AAA},{AAAA},{AAAAA},{AAAAAA},{AAAAAAA},{AAAAAAAA},{AAAAAAAAA},{AAAAAAAAAA},{AAAAAAAAAAA},{AAAAAAAAAAAA}}]
[]
StringOverlapsQ
[13] is not a list.
»
Counts
[]
StringOverlapsQ
[{First[{}],{AA},{AAA},{AAAA},{AAAAA},{AAAAAA},{AAAAAAA},{AAAAAAAA},{AAAAAAAAA},{AAAAAAAAAA},{AAAAAAAAAAA},{AAAAAAAAAAAA}}]
[]
StringOverlapsQ
[13]
Part
:Part 14 of {{}, <<10>>, {{A -> AAAAAAAAAAA}, {A -> AAAAAAAAAAB}, {A -> AAAAAAAAABA}, <<111224>>, {A -> B, B -> B, <<3>>, B -> A}, {A -> B, B -> B, B -> B, B -> B, B -> B, B -> B}}} does not exist.
First
:{} has zero length and no first element.
Part
:The expression
[]
StringOverlapsQ
[14] cannot be used as a part specification.
Counts
:The argument
[]
StringOverlapsQ
[{First[{}],{AA},{AAA},{AAAA},{AAAAA},{AAAAAA},{AAAAAAA},{AAAAAAAA},{AAAAAAAAA},{AAAAAAAAAA},{AAAAAAAAAAA},{AAAAAAAAAAAA}}]
[]
StringOverlapsQ
[14] is not a list.
»
Counts
[]
StringOverlapsQ
[{First[{}],{AA},{AAA},{AAAA},{AAAAA},{AAAAAA},{AAAAAAA},{AAAAAAAA},{AAAAAAAAA},{AAAAAAAAAA},{AAAAAAAAAAA},{AAAAAAAAAAAA}}]
[]
StringOverlapsQ
[14]
Part
:Part 15 of {{}, <<10>>, {{A -> AAAAAAAAAAA}, {A -> AAAAAAAAAAB}, {A -> AAAAAAAAABA}, <<111224>>, {A -> B, B -> B, <<3>>, B -> A}, {A -> B, B -> B, B -> B, B -> B, B -> B, B -> B}}} does not exist.
General
:Further output of Part::partw will be suppressed during this calculation.
First
:{} has zero length and no first element.
General
:Further output of First::nofirst will be suppressed during this calculation.
Part
:The expression
[]
StringOverlapsQ
[15] cannot be used as a part specification.
General
:Further output of Part::pkspec1 will be suppressed during this calculation.
Counts
:The argument
[]
StringOverlapsQ
[{First[{}],{AA},{AAA},{AAAA},{AAAAA},{AAAAAA},{AAAAAAA},{AAAAAAAA},{AAAAAAAAA},{AAAAAAAAAA},{AAAAAAAAAAA},{AAAAAAAAAAAA}}]
[]
StringOverlapsQ
[15] is not a list.
General
:Further output of Counts::invl will be suppressed during this calculation.
»
Counts
[]
StringOverlapsQ
[{First[{}],{AA},{AAA},{AAAA},{AAAAA},{AAAAAA},{AAAAAAA},{AAAAAAAA},{AAAAAAAAA},{AAAAAAAAAA},{AAAAAAAAAAA},{AAAAAAAAAAAA}}]
[]
StringOverlapsQ
[15]
»
Counts
[]
StringOverlapsQ
[{First[{}],{AA},{AAA},{AAAA},{AAAAA},{AAAAAA},{AAAAAAA},{AAAAAAAA},{AAAAAAAAA},{AAAAAAAAAA},{AAAAAAAAAAA},{AAAAAAAAAAAA}}]
[]
StringOverlapsQ
[16]
Out[]=
In[]:=
noncausals=Cases[Catenate[#],(x_Null)x]&/@allres2;

Finding Rules

In[]:=
allres2[[2]]
Out[]=
{{{AA}1,{AB}1}}
In[]:=
InteractiveListSelectorSW[PopupWindow[SubstitutionSystemCausalGraph[#,"A",3],#]#&/@causals[[2]]]
Out[]=
In[]:=
InteractiveListSelectorSW[PopupWindow[SubstitutionSystemCausalGraph[#,"A",3],#]#&/@causals[[3]]]
Out[]=
In[]:=
InteractiveListSelectorSW[PopupWindow[SubstitutionSystemCausalGraph[#,"A",3],#]#&/@causals[[4]]]
Out[]=
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.