WOLFRAM NOTEBOOK

{{1,2,3},{4,5,6},{1,4}}{{2,7,8},{3,9,10},{5,11,12},{6,13,14},
permutations of RHS 3-edges
pick 2-edges, with different elements from different 3 edges
In[]:=
map2s=Catenate[MapIndexed[#2#1&,{{7,8},{9,10},{11,12},{13,14}},{2}]]
Out[]=
{{1,1}7,{1,2}8,{2,1}9,{2,2}10,{3,1}11,{3,2}12,{4,1}13,{4,2}14}
{{1,1},{2,1}}
In[]:=
all2s=Cases[Tuples[Catenate[Table[{i,j},{i,4},{j,2}]],2],{{a_,_},{b_,_}}/;ab]/.map2s
Out[]=
In[]:=
Length[%]
Out[]=
48
In[]:=
Tuples[all2s,4];
In[]:=
Length[%]
Out[]=
5308416
In[]:=
RandomSample[all2s,4]
Out[]=
{{11,8},{13,12},{14,8},{13,9}}
In[]:=
alld=Select[Tuples[all2s,4],Length[Union[Flatten[#]]]8&];
In[]:=
Length[alld]
Out[]=
23040
In[]:=
rr=Table[{{1,2,3},{4,5,6},{1,4}}Join[#[[RandomSample[Range[3]]]]&/@{{2,7,8},{3,9,10},{5,11,12},{6,13,14}},RandomChoice[alld]],20]
Out[]=
In[]:=
Join[Table[0,3,2],Table[0,2,3]]
Out[]=
{{0,0},{0,0},{0,0},{0,0,0},{0,0,0}}
In[]:=
res=ParallelMapMonitored[WolframModelTest[#,Automatic]&,rr];
In[]:=
MakePictures[res]
Out[]=
In[]:=
res=ParallelMapMonitored[WolframModelTest[#,Join[Table[0,3,2],Table[0,2,3]]]&,rr];
In[]:=
MakePictures[res]
Out[]=

Symmetrical Connections

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.