受到mathe的手工求解的启发。我也写了一个程序, 耗时的地方主要是整数的拆分
- Flatten[Table[Select[Flatten[Table[Table[Table[{tmp={s[[1]],k,S-2MovingAverage[PadRight[k,7,First[k]],2],S-s[[1]]-k};{S,s[[1]],k},Union[Flatten[tmp]]},{k,Flatten[Table[Join[c,cc],{c,Flatten[List[First[t],#]]&/@Subsets[Rest[t],{2}]},{cc,Permutations[Complement[t,c]]}],1]}],{t,s[[2]]}],{s,Table[{2i,Select[IntegerPartitions[6S-Binomial[20,2]/2-5i,{6}],Length[Union[#]]==6 &&Not@MemberQ[#,2i]&&Max[#]<20&]},{i,(6S-Binomial[20,2]/2-Binomial[7,2])/5}]}],2],Length[Last[#]]==19&&Min[Last[#]]==1&][[All,1]],{S,22,31}],1]
复制代码
- {22,4}
- {23,2}
- {24,6}
- {25,8}
- {26,3}
- {27,7}
- {28,1}
- {29,4}
- {30,0}
- {31,4}
- {32,3}
- {33,8}
- {34,3}
- {35,6}
- {36,4}
- {37,1}
- {38,6}
复制代码
数据结构是中心数A,六个顶点的数【按照逆(顺)时针排列】。
为了消除旋转对称性,约定六个顶点中最大的数字是1号位。为了消除纸内纸外的翻转对称性,约定2号位比3号位要大。计算结果如下:
- {22,2,{11,5,3,1,8,4}}
- {22,2,{9,8,4,3,1,7}}
- {22,2,{9,7,1,3,4,8}}
- {22,4,{10,3,1,2,6,5}}
- {23,6,{10,8,4,2,3,1}}
- {23,6,{10,8,3,1,4,2}}
- {24,2,{15,8,4,9,5,3}}
- {24,4,{12,11,6,5,3,2}}
- {24,4,{12,11,3,2,6,5}}
- {24,6,{13,3,2,4,11,1}}
- {24,8,{12,5,1,6,2,3}}
- {24,8,{12,3,2,6,1,5}}
- {25,2,{16,8,4,11,5,6}}
- {25,2,{16,6,5,11,4,8}}
- {25,4,{16,8,3,10,6,2}}
- {25,4,{14,10,6,2,5,8}}
- {25,4,{14,8,5,2,6,10}}
- {25,8,{14,7,5,1,6,2}}
- {25,8,{12,10,1,6,2,4}}
- {25,8,{12,4,2,6,1,10}}
- {26,4,{16,8,3,5,10,9}}
- {26,8,{14,11,6,3,5,2}}
- {26,8,{14,11,5,2,6,3}}
- {27,2,{17,7,6,10,13,9}}
- {27,6,{19,7,4,10,9,3}}
- {27,6,{19,5,4,8,9,7}}
- {27,8,{18,6,2,9,7,5}}
- {27,8,{17,9,7,5,3,6}}
- {27,8,{17,6,3,5,7,9}}
- {27,8,{15,9,2,6,14,1}}
- {28,4,{16,11,5,6,15,10}}
- {29,4,{18,10,6,11,16,8}}
- {29,10,{18,7,3,11,13,2}}
- {29,12,{16,11,3,7,4,8}}
- {29,12,{16,8,4,7,3,11}}
- {31,8,{17,9,4,12,16,13}}
- {31,10,{19,8,6,14,16,3}}
- {31,16,{14,10,2,12,4,9}}
- {31,16,{14,9,4,12,2,10}}
- {32,16,{15,14,10,5,9,4}}
- {32,16,{15,14,5,10,4,9}}
- {32,16,{15,9,4,10,5,14}}
- {33,12,{18,14,2,15,13,11}}
- {33,12,{17,15,13,11,3,14}}
- {33,12,{17,14,3,11,13,15}}
- {33,14,{17,11,10,16,13,1}}
- {33,14,{16,15,1,13,11,12}}
- {33,14,{16,12,11,13,1,15}}
- {33,18,{14,13,3,11,7,10}}
- {33,18,{14,10,7,11,3,13}}
- {34,12,{18,15,9,6,17,14}}
- {34,16,{17,15,10,11,4,12}}
- {34,16,{17,12,4,11,10,15}}
- {35,12,{19,10,8,16,18,14}}
- {35,12,{19,15,13,6,18,14}}
- {35,16,{18,14,10,17,12,4}}
- {35,16,{18,15,12,6,10,14}}
- {35,16,{18,14,10,6,12,15}}
- {35,18,{16,12,4,14,15,9}}
- {36,12,{19,15,8,17,18,14}}
- {36,16,{18,17,15,14,9,8}}
- {36,16,{18,17,9,8,15,14}}
- {36,18,{17,15,11,16,12,5}}
- {37,14,{19,17,12,10,18,16}}
- {38,16,{19,18,14,15,10,17}}
- {38,16,{19,17,10,15,14,18}}
- {38,18,{19,17,15,13,16,8}}
- {38,18,{19,17,15,9,16,12}}
- {38,18,{19,17,16,12,11,13}}
- {38,18,{19,13,11,12,16,17}}
复制代码 |