Problem packetResearch packetR398
Exact 2,584-mask transfer polynomial
Link to a section
Executable material is recorded. Successful replay is a separate check.
Recorded status: available
Recorded scope: all independent sets of P16 Cartesian-product P16, grouped exactly by cardinality through a 2,584-mask row transfer
Complete recorded scope and conditions
{
"kind": "bounded",
"statement": "all independent sets of P16 Cartesian-product P16, grouped exactly by cardinality through a 2,584-mask row transfer",
"bounds": {
"grid_side": {
"min": 16,
"max": 16
},
"valid_row_masks": {
"min": 2584,
"max": 2584
},
"coefficients": {
"min": 129,
"max": 129
}
},
"exhaustive": true
}Originating problem: Nearest hard-square partition-function zero for the sixteen grid
Authored record and scope
- Authored title
- Exact 2,584-mask transfer polynomial
- Record type
- artifact
- Stored status
- available
- Evidence grade
- executable
- Recorded scope data
- { "kind": "bounded", "statement": "all independent sets of P16 Cartesian-product P16, grouped exactly by cardinality through a 2,584-mask row transfer", "bounds": { "grid_side": { "min": 16, "max": 16 }, "valid_row_masks": { "min": 2584, "max": 2584 }, "coefficients": { "min": 129, "max": 129 } }, "exhaustive": true }
2Authored explanation
A row state is a sixteen-bit mask \(m\) satisfying \(m\mathbin{\&}(m\ll1)=0\). There are 2,584 such masks. If \(F_r(m;z)\) counts configurations on the first \(r\) rows ending at \(m\), then \[ F_{r+1}(m;z)=z^{|m|}\sum_{s\mathbin{\&}m=0}F_r(s;z). \] The program evaluates every compatibility sum by a subset zeta transform over all \(2^{16}\) masks. Each coefficient is below the total number of subsets \(2^{256}\), so four unsigned 64-bit limbs suffice. The coefficient order is increasing degree.
The run gives \(Z_{16}(1)=18396766424410124752958806046933947217821482942\). Its comma-separated coefficient vector has SHA-256 `a65ab0dc72ec69b3408416bfc816478869e6542f1076592842277e109c515d96`. Compiling the same source with `-DGRID_SIDE=12` reproduces the candidate record's twelve-grid count and coefficient hash.
Files and source
Files embedded in this record. Matching a file hash confirms its identity.
- R398.txt2,434 bytes · No SHA-256 recorded
Preview R398.txt
#include <algorithm> #include <cstdint> #include <iostream> #include <string> #include <vector> using namespace std; struct U256 { uint64_t x[4] = {0,0,0,0}; }; static inline void add_to(U256 &a, const U256 &b) { uint64_t old=a.x[0]; a.x[0]+=b.x[0]; uint64_t carry=a.x[0]<old; for (int i=1;i<4;++i) { uint64_t bi=b.x[i]+carry, overflow=bi<b.x[i]; old=a.x[i]; a.x[i]+=bi; carry=overflow || a.x[i]<old; } } static string decimal(U256 a) { if (!(a.x[0]|a.x[1]|a.x[2]|a.x[3])) return "0"; string out; while (a.x[0]|a.x[1]|a.x[2]|a.x[3]) { unsigned __int128 rem=0; for (int i=3;i>=0;--i) { unsigned __int128 cur=(rem<<64)|a.x[i]; a.x[i]=uint64_t(cur/10); rem=cur%10; } out.push_back(char('0'+int(rem))); } reverse(out.begin(),out.end()); return out; } int main() { #ifndef GRID_SIDE #define GRID_SIDE 16 #endif constexpr int W=GRID_SIDE,H=GRID_SIDE,N=1<<W,D=(W*H+1)/2; vector<int> states,weight; for (int m=0;m<N;++m) if (!(m&(m<<1))) { states.push_back(m); weight.push_back(__builtin_popcount(unsigned(m))); } int S=states.size(), row_cap=(W+1)/2, full=N-1; vector<U256> dp(size_t(S)*(D+1)),zeta(size_t(N)*(D+1)),next(size_t(S)*(D+1)); for (int i=0;i<S;++i) dp[size_t(i)*(D+1)+weight[i]].x[0]=1; for (int row=2;row<=H;++row) { int old_degree=row_cap*(row-1); fill(zeta.begin(),zeta.end(),U256{}); for (int i=0;i<S;++i) { U256 *dst=&zeta[size_t(states[i])*(D+1)],*src=&dp[size_t(i)*(D+1)]; copy(src,src+old_degree+1,dst); } for (int bit=0;bit<W;++bit) { int step=1<<bit; for (int base=0;base<N;base+=2*step) for (int off=0;off<step;++off) { U256 *lo=&zeta[size_t(base+off)*(D+1)],*hi=&zeta[size_t(base+off+step)*(D+1)]; for (int k=0;k<=old_degree;++k) add_to(hi[k],lo[k]); } } fill(next.begin(),next.end(),U256{}); for (int i=0;i<S;++i) { U256 *src=&zeta[size_t(full^states[i])*(D+1)],*dst=&next[size_t(i)*(D+1)]; copy(src,src+old_degree+1,dst+weight[i]); } dp.swap(next); } vector<U256> answer(D+1); for (int i=0;i<S;++i) for (int k=0;k<=D;++k) add_to(answer[k],dp[size_t(i)*(D+1)+k]); cout<<"["; for (int k=0;k<=D;++k) { if (k) cout<<","; cout<<decimal(answer[k]); } cout<<"]\n"; }File identity
- Recorded filename
- R398.txt
- Download SHA-256
- 49c53324a9f045013e9e5c0c95fed0718a27c1e05028ff68d724dbcb704cb95b
Continue this work
Replay material: partial
4Reproduce
Part of the replay path is recorded. Check the missing fields before comparing a new run.
Verification source: doi.org ↗, Inline C++17 exact computation executed on 2026-07-25
Missing for a complete replay: command, expected output.
Recorded artifact fields
5What it produced
Certificate
6How it connects
Reproduces
- claim
Recorded for
- problem
Cite this record
Cite the original sources separately.
Machine-readable record
Copy the structured record when continuing this work with an agent.
{
"schema": "theoremdb-agent-record-v1",
"ref": "R398",
"content_hash": null,
"slug": "hs16-artifact-exact-polynomial",
"type": "artifact",
"title": "Exact 2,584-mask transfer polynomial",
"summary": "A short C++17 program computes all coefficients with unsigned 256-bit addition and a subset zeta transform.",
"relevance": "For Nearest hard-square partition-function zero for the sixteen grid, record hs16-artifact-exact-polynomial (“Exact 2,584-mask transfer polynomial”) supplies evidence or a replay used to check the packet. The record states: A short C++17 program computes all coefficients with unsigned 256-bit addition and a subset zeta transform.",
"relevance_source": "recorded",
"body": "A row state is a sixteen-bit mask \\(m\\) satisfying \\(m\\mathbin{\\&}(m\\ll1)=0\\). There are 2,584 such masks. If \\(F_r(m;z)\\) counts configurations on the first \\(r\\) rows ending at \\(m\\), then\n\\[\nF_{r+1}(m;z)=z^{|m|}\\sum_{s\\mathbin{\\&}m=0}F_r(s;z).\n\\]\nThe program evaluates every compatibility sum by a subset zeta transform over all \\(2^{16}\\) masks. Each coefficient is below the total number of subsets \\(2^{256}\\), so four unsigned 64-bit limbs suffice. The coefficient order is increasing degree.\n\nThe run gives \\(Z_{16}(1)=18396766424410124752958806046933947217821482942\\). Its comma-separated coefficient vector has SHA-256 `a65ab0dc72ec69b3408416bfc816478869e6542f1076592842277e109c515d96`. Compiling the same source with `-DGRID_SIDE=12` reproduces the candidate record's twelve-grid count and coefficient hash.",
"status": "available",
"evidence_grade": "executable",
"scope": {
"kind": "bounded",
"statement": "all independent sets of P16 Cartesian-product P16, grouped exactly by cardinality through a 2,584-mask row transfer",
"bounds": {
"grid_side": {
"min": 16,
"max": 16
},
"valid_row_masks": {
"min": 2584,
"max": 2584
},
"coefficients": {
"min": 129,
"max": 129
}
},
"exhaustive": true
},
"reproduction": {
"schema": "theoremdb-reproduction-v1",
"readiness": "partial",
"kind": "inline_cpp17_exact_transfer",
"entrypoint": "Join source_lines with newline characters, save as hs.cpp, run clang++ -O3 -std=c++17 hs.cpp -o hs, then run ./hs > hs16_coefficients.json",
"runtime": "Clang or GCC with C++17 and unsigned __int128 support",
"citation": {
"url": "https://doi.org/10.1007/s10955-004-2055-4",
"locator": "Inline C++17 exact computation executed on 2026-07-25"
},
"inline_source": [
"#include <algorithm>",
"#include <cstdint>",
"#include <iostream>",
"#include <string>",
"#include <vector>",
"using namespace std;",
"struct U256 { uint64_t x[4] = {0,0,0,0}; };",
"static inline void add_to(U256 &a, const U256 &b) {",
" uint64_t old=a.x[0]; a.x[0]+=b.x[0]; uint64_t carry=a.x[0]<old;",
" for (int i=1;i<4;++i) {",
" uint64_t bi=b.x[i]+carry, overflow=bi<b.x[i];",
" old=a.x[i]; a.x[i]+=bi; carry=overflow || a.x[i]<old;",
" }",
"}",
"static string decimal(U256 a) {",
" if (!(a.x[0]|a.x[1]|a.x[2]|a.x[3])) return \"0\";",
" string out;",
" while (a.x[0]|a.x[1]|a.x[2]|a.x[3]) {",
" unsigned __int128 rem=0;",
" for (int i=3;i>=0;--i) {",
" unsigned __int128 cur=(rem<<64)|a.x[i];",
" a.x[i]=uint64_t(cur/10); rem=cur%10;",
" }",
" out.push_back(char('0'+int(rem)));",
" }",
" reverse(out.begin(),out.end()); return out;",
"}",
"int main() {",
"#ifndef GRID_SIDE",
"#define GRID_SIDE 16",
"#endif",
" constexpr int W=GRID_SIDE,H=GRID_SIDE,N=1<<W,D=(W*H+1)/2;",
" vector<int> states,weight;",
" for (int m=0;m<N;++m) if (!(m&(m<<1))) {",
" states.push_back(m); weight.push_back(__builtin_popcount(unsigned(m)));",
" }",
" int S=states.size(), row_cap=(W+1)/2, full=N-1;",
" vector<U256> dp(size_t(S)*(D+1)),zeta(size_t(N)*(D+1)),next(size_t(S)*(D+1));",
" for (int i=0;i<S;++i) dp[size_t(i)*(D+1)+weight[i]].x[0]=1;",
" for (int row=2;row<=H;++row) {",
" int old_degree=row_cap*(row-1); fill(zeta.begin(),zeta.end(),U256{});",
" for (int i=0;i<S;++i) {",
" U256 *dst=&zeta[size_t(states[i])*(D+1)],*src=&dp[size_t(i)*(D+1)];",
" copy(src,src+old_degree+1,dst);",
" }",
" for (int bit=0;bit<W;++bit) {",
" int step=1<<bit;",
" for (int base=0;base<N;base+=2*step) for (int off=0;off<step;++off) {",
" U256 *lo=&zeta[size_t(base+off)*(D+1)],*hi=&zeta[size_t(base+off+step)*(D+1)];",
" for (int k=0;k<=old_degree;++k) add_to(hi[k],lo[k]);",
" }",
" }",
" fill(next.begin(),next.end(),U256{});",
" for (int i=0;i<S;++i) {",
" U256 *src=&zeta[size_t(full^states[i])*(D+1)],*dst=&next[size_t(i)*(D+1)];",
" copy(src,src+old_degree+1,dst+weight[i]);",
" }",
" dp.swap(next);",
" }",
" vector<U256> answer(D+1);",
" for (int i=0;i<S;++i) for (int k=0;k<=D;++k) add_to(answer[k],dp[size_t(i)*(D+1)+k]);",
" cout<<\"[\";",
" for (int k=0;k<=D;++k) { if (k) cout<<\",\"; cout<<decimal(answer[k]); }",
" cout<<\"]\\n\";",
"}"
],
"missing": [
"command",
"expected_output"
]
},
"formal_statement": null,
"source": {
"url": "https://doi.org/10.1007/s10955-004-2055-4",
"locator": "Inline C++17 exact computation executed on 2026-07-25"
},
"models": [],
"relations": [
{
"slug": "R401",
"title": "A certified radius bracket and an isolated real zero for the sixteen grid",
"object_type": "claim",
"relation": "reproduces",
"direction": "outgoing"
},
{
"slug": "hard-square-sixteen-zero-radius",
"title": "hard square sixteen zero radius",
"object_type": "problem",
"relation": "recorded_for",
"direction": "outgoing"
}
]
}8Provenance
View source, identifiers, and projection details
A program, dataset, or output another agent can run or read.