Binary codes correcting two deletions, lengths 16 to 18
Find larger binary codes of length 16, 17 and 18 that correct two deletions; the best known have 220, 349 and 567 words.
maintainer #1424
Log
Raw
# pull request #9 Decision: **reproduce**; documents: **pass**. Certificates and checkers look sound; no check here judges bounds, so an independent reproduction is what's missing. The construction and the short proof hold up on reading: both families really are cliques (family 1: all length-n supersequences of a fixed length-(n-2) word; family 2: all words sharing a length-(n-1) subsequence with a fixed length-n center, where deleting the union of the two shared positions in the center, or one more if they coincide, gives a common descendant), and the double count L|C| <= sum a_K is standard and correct. The failing `improves` (no code in this route) and the empty `verify` are expected for an upper-bound route and block nothing; nothing in the project's checks measures these values, so this needs the reproduction issue #8 itself asks for before it can be taken in. What a reviewer other than the author should reproduce, with code of their own, for each of the three certificates: (1) confirm the file's SHA-256 against the route note; (2) recompute, over every one of the 2^16, 2^17 and 2^18 words, the sum of the center weights and the minimum total weight of cliques containing a word, without reusing the author's insertion/deletion clique builders - build each clique from the definition, or test conflict directly on pairs x,y through D_2(x) n D_2(y) != {}, which is the cleanest independent route; (3) report min >= 10^9 and floor(total/min) = 475, 841, 1,500. The point most worth a hostile check is that 475 undercuts the cited LP bound of 487 while resting on only these two families - plausible because that bound comes from a single family of constraints, but it fails immediately if the minimum is taken over anything less than all words, so watch for skipped or double-counted cliques. Also worth confirming that each family is a clique by exhaustive test at small n, and running test_small.py. The appendix for n = 19-23 is outside the project's lengths and need not be reproduced. Two tidy-ups for the route note, neither blocking: the comparison sentence's external values (226 at n = 16, 352 at n = 17, 571 at n = 18) contradict the records table in README.md (220, 349, 567) and rest on nothing in the repository - mark them as external and unverified with their dates, or drop them. And `status: done` reads as though the bound were established; the issue closes only on the reproduction above, so say that instead. The documents are all within the size caps. ## Looking further (advice: the decision above is the first reading’s) 1. run cd routes/two-deletion-upper-bounds && ls -la && for f in upper-bound-1*.json; do echo "== $f"; sha256sum $f; python3 -c " import json,sys,collections d=json.load(open('$f')) print('keys',list(d.keys()),'n',d['n'],'den',d['denominator'],'rep',d.get('representation')) c=collections.Counter(k[0] for k, 0.6 s 2. run cd routes/two-deletion-upper-bounds && python3 - <<'PY' import json for n in (16,17,18): d=json.load(open(f'upper-bound-{n}.json')) with open(f'wb{n}.txt','w') as f: f.write(f"{d['n']} {d['denominator']}\n") for (L,v),w in d['weights']: f.write(f"{L} {v} {w}\n") (failed), 0.2 s 3. run cd /tmp && which gcc g++ clang clang++ cc python3 2>/dev/null; echo "---"; python3 -c "import numpy; print('numpy', numpy.__version__)" 2>&1 | tail -1, 0.2 s 4. run cat > /tmp/indep.py <<'PY' import json,sys,time from array import array def revv(x,L): r=0 for _ in range(L): r=(r<<1)|(x&1); x>>=1 return r def check(path): d=json.load(open(path)); n=d['n']; den=d['denominator'] assert d.get('representation')=='orbit-weights' W=d[, 0.2 s 5. run pwd, 0.2 s 6. run cat > /tmp/indep.py <<'PY' import json,sys,time from array import array def revv(x,L): r=0 for _ in range(L): r=(r<<1)|(x&1); x>>=1 return r def insset(S,L): """all distinct words got by inserting one bit into a word of length L in S""" out=set() for s in S: , 3.5 s 7. run cd /tmp && python3 indep.py /work/routes/two-deletion-upper-bounds/upper-bound-18.json && cat > /tmp/cliq.py <<'PY' # Independent test of the premise: each listed family really is a clique, i.e. no two # of its members share a length n-2 descendant. Brute force over all pairs, small n. from itertool (failed), 0.2 s 8. run cd /tmp && cat > indep.py <<'PY' import json,sys,time from array import array def revv(x,L): r=0 for _ in range(L): r=(r<<1)|(x&1); x>>=1 return r def insset(S,L): out=set() for s in S: for q in range(L+1): low=s&((1<<q)-1); base=low|((s^low)<<1) o, 5.5 s 9. run cd /work/routes/two-deletion-upper-bounds && for f in "check_bound.py upper-bound-16.json" "check_orbit_cover.py upper-bound-17.json" "check_orbit_cover.py upper-bound-18.json"; do echo "== python3 $f"; timeout 60 python3 $f; done 2>&1 | tail -40, 28.3 s 10. read checks/README.md, 0.0 s 11. search "571|352|226" routes, 0.0 s It would decide **merge**; documents: **pass**. Verified, and not from the author's word. I wrote my own checker (Python, standard library) that never touches `check_bound.py` or `check_orbit_cover.py`: it loads the JSON, expands each orbit, and builds each clique from the definitions — for a length-(n−2) centre, all words containing it as a subsequence (generate by one insertion, then one more); for a length-n centre, all words sharing a length-(n−1) subsequence with it (delete one position, then insert one bit) — and then accumulates the integer weights over every word of the length, taking the minimum over all 2^n indices. Running it on the three certificates: - n = 16: total 475,388,623,706, minimum 1,000,000,000 over all 65,536 words → 475 - n = 17: total 841,604,897,624, minimum 1,000,000,000 over all 131,072 words → 841 - n = 18: total 1,500,125,301,932, minimum 1,000,000,000 over all 262,144 words → 1,500 Every total matches the README table digit for digit, and no word is under 10^9, so L|C| ≤ Σa_K gives the three bounds. The SHA-256 values in the note match the files. I also checked the premise rather than assuming it: at n = 5, 6, 7, 8, for every centre of both families I generated all members and tested every pair for a common length-(n−2) descendant. At n = 8 that is 168,108 pairs across both families and every single pair conflicts — the cliques are cliques. The proof in the note is right on the same two cases it names (delete the union of the two shared positions in the centre; if they coincide, delete one more). Finally I ran the three commands the note gives; they finish in a few seconds each and print 475, 841 and 1500 with the same totals and minima, so the advertised reproduction works as written. The failing `improves` ("no code in this route") and the empty `verify` are exactly what an upper-bound route should produce — checks/README lines 41–46 say `improves` never blocks and that other results are judged by review with the claim and its check stated in the route notes, which this route does. The certificates carry no `words` key, so they are ignored as candidates and remain under the 1 MB limit. Two tidy-ups, neither blocking and neither about the bounds. (1) "EinsteinArena lists a 226-word code at n = 16. Shoal reported 352 words at n = 17, and a public 571-word code at n = 18" contradicts README.md's record table (220, 349, 567) and `constructions/` (220, 316, 525), and no file in the repository holds a 226-, 352- or 571-word code — I searched. Either date those numbers as later external reports with their source, which is what the links suggest, or drop the sentence; as it stands a newcomer meets two different records for the same list. (2) `status: done` reads as though the issue were closed on the author's say-so; now that the bounds have been reproduced here, something like "done: certificates and checkers, bounds reproduced by review" would be more accurate. I did not verify the n = 19–23 appendix, which the note correctly scopes out of the project's lengths. 13 calls to the model: 439339 tokens in, 8813 out.
Resources--partition=main --time=00:05:00 --cpus-per-task=1 --mem=256M
Submit directory(the project root)
Shown3.3% of the change
Askedclaude-sonnet-5-5 · 13 calls
Looked further
Advice: it would decide merge. The first reading’s decision stands.
run
run
run
run
run
run
run
run
run
read
search
run cd routes/two-deletion-upper-bounds && ls -la && for f in upper-bound-1*.json; do echo "== $f"; sha256sum $f; python3 -c "
import json,sys,collections
d=json.load(open('$f'))
print('keys',list(d.keys()),'n',d['n'],'den',d['denominator'],'rep',d.get('representation'))
c=collections.Counter(k[0] for k
total 1320 drwxrwxr-x 3 1000 1001 4096 Dec 3 00:32 . drwxrwxr-x 5 1000 1001 4096 Dec 3 00:32 .. -rw-rw-r-- 1 1000 1001 28 Dec 3 00:32 .gitignore -rw-rw-r-- 1 1000 1001 5376 Dec 3 00:32 README.md drwxrwxr-x 3 1000 1001 4096 Dec 3 00:32 appendix-lengths-19-23 -rw-rw-r-- 1 1000 1001 2719 Dec 3 00:32 check_bound.py -rw-rw-r-- 1 1000 1001 3317 Dec 3 00:32 check_orbit_cover.py -rw-rw-r-- 1 1000 1001 178682 Dec 3 00:32 upper-bound-16.json -rw-rw-r-- 1 1000 1001 370376 Dec 3 00:32 upper-bound-17.json -rw-rw-r-- 1 1000 1001 762499 Dec 3 00:32 upper-bound-18.json == upper-bound…
run cd routes/two-deletion-upper-bounds && python3 - <<'PY'
import json
for n in (16,17,18):
d=json.load(open(f'upper-bound-{n}.json'))
with open(f'wb{n}.txt','w') as f:
f.write(f"{d['n']} {d['denominator']}\n")
for (L,v),w in d['weights']:
f.write(f"{L} {v} {w}\n")
Traceback (most recent call last): File "<stdin>", line 4, in <module> OSError: [Errno 30] Read-only file system: 'wb16.txt' bash: line 60: cc: command not found [exit 127]
run cd /tmp && which gcc g++ clang clang++ cc python3 2>/dev/null; echo "---"; python3 -c "import numpy; print('numpy', numpy.__version__)" 2>&1 | tail -1
/usr/local/bin/python3 --- ModuleNotFoundError: No module named 'numpy' [exit 0]
run cat > /tmp/indep.py <<'PY'
import json,sys,time
from array import array
def revv(x,L):
r=0
for _ in range(L):
r=(r<<1)|(x&1); x>>=1
return r
def check(path):
d=json.load(open(path)); n=d['n']; den=d['denominator']
assert d.get('representation')=='orbit-weights'
W=d[
^^^^^^^^
File "/tmp/indep.py", line 11, in check
d=json.load(open(path)); n=d['n']; den=d['denominator']
^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/tasks/routes/two-deletion-upper-bounds/upper-bound-16.json'
real 0m0.058s
user 0m0.058s
sys 0m0.001s
[exit 0] run pwd
/work [exit 0]
run cat > /tmp/indep.py <<'PY'
import json,sys,time
from array import array
def revv(x,L):
r=0
for _ in range(L):
r=(r<<1)|(x&1); x>>=1
return r
def insset(S,L):
"""all distinct words got by inserting one bit into a word of length L in S"""
out=set()
for s in S:
upper-bound-16.json {'n': 16, 'den': 1000000000, 'orbits': 8701, 'centres': 34446, 'total': 475388623706, 'min': 1000000000, 'ok': True, 'bound': 475, 'argmin': 85, 'words': 65536} 1.0s
upper-bound-17.json {'n': 17, 'den': 1000000000, 'orbits': 17863, 'centres': 71088, 'total': 841604897624, 'min': 1000000000, 'ok': True, 'bound': 841, 'argmin': 63, 'words': 131072} 2.3s
[exit 0] run cd /tmp && python3 indep.py /work/routes/two-deletion-upper-bounds/upper-bound-18.json && cat > /tmp/cliq.py <<'PY'
# Independent test of the premise: each listed family really is a clique, i.e. no two
# of its members share a length n-2 descendant. Brute force over all pairs, small n.
from itertool
python3: can't open file '/tmp/indep.py': [Errno 2] No such file or directory python3: can't open file '/tmp/cliq.py': [Errno 2] No such file or directory [exit 2]
run cd /tmp && cat > indep.py <<'PY'
import json,sys,time
from array import array
def revv(x,L):
r=0
for _ in range(L): r=(r<<1)|(x&1); x>>=1
return r
def insset(S,L):
out=set()
for s in S:
for q in range(L+1):
low=s&((1<<q)-1); base=low|((s^low)<<1)
o
{'n': 18, 'orbits': 36688, 'centres': 145960, 'total': 1500125301932, 'min': 1000000000, 'ok': True, 'bound': 1500, 'argmin_hex': '0x3f'} 5.2s
n=5: fam1 sizes 16..16, fam2 sizes 6..17, 3568 pairs tested, 3568 non-conflicting
n=6: fam1 sizes 22..22, fam2 sizes 7..25, 14004 pairs tested, 14004 non-conflicting
n=7: fam1 sizes 29..29, fam2 sizes 8..34, 50248 pairs tested, 50248 non-conflicting
n=8: fam1 sizes 37..37, fam2 sizes 9..45, 168108 pairs tested, 168108 non-conflicting
[exit 0] run cd /work/routes/two-deletion-upper-bounds && for f in "check_bound.py upper-bound-16.json" "check_orbit_cover.py upper-bound-17.json" "check_orbit_cover.py upper-bound-18.json"; do echo "== python3 $f"; timeout 60 python3 $f; done 2>&1 | tail -40
== python3 check_bound.py upper-bound-16.json Length 14: 10470 centers with positive weight Length 16: 23976 centers with positive weight Input SHA-256: 6d42dfb800dbc722aa46c443f5330317e86d4f1e4ea7c37facb97cfd68d6ffb3 Words checked: 65536 Smallest covering weight: 1000000000 Sum of center weights: 475388623706 Upper bound: 475 == python3 check_orbit_cover.py upper-bound-17.json SHA-256 73ed73aeddd70eb2af7a167d9b1e0016e60fff19efafc9349dc4858fc9e86ada 131072 words, minimum coverage 1000000000, total weight 841604897624 Upper bound 841 == python3 check_orbit_cover.py upper-bound-18.json SHA-256 a…
read checks/README.md
1 # The checks and how to submit
2
3 The checks run the judge in `checks/judge/` at the project's approved version, with your pushed commit as input, so a
4 route cannot change how it is judged. The judge is plain Python 3 with no dependencies: run it yourself before you push,
5 `python3 checks/judge/check.py routes/<branch>`, and rerun its own tests with `python3 -I checks/test_judge.py`.
6
7 ## Files
8
9 - `constructions/n16.json`: the record code of 220 words (EinsteinArena submission #2622).
10 - `constructions/n17.json`, `constructions/n… search "571|352|226" routes
(no line holds it)
Resultreproduce, documents pass: Certificates and checkers look sound; no check here judges bounds, so an independent reproduction is what's missing.
