MathIdeasResearch in progressRepository ↗
← Research catalogOriginal Markdown ↓

Exact edit-distance baseline and source activation guards

This report uses RapidFuzz 3.14.6 in a fresh isolated Python 3.12 environment. It does not execute the repository's approximation algorithm. Runtime identity, installation wheel provenance, comparison data and seven source hashes, reproducible supporting script.

The literal source approximation branch requires ell >= 2^1000. From the selected integer definitions, the least length satisfying that guard alone is 2^(2^(2^999))-1. Other accuracy and bit-width conditions remain additional. The actual tower was never allocated; scaled boundaries were checked for exponents 1 through 4. At total length 10^12, ell=8. The source falls back to an exact answer below its physical guard. No source fallback timing was measured.

Generated existing-library comparisons

Symbols per string Generated pair Known exact distance Median unrestricted call, ms Cutoff 16 return Cutoff call, ms
4,096 equal 0 0.001708 0 0.001583
4,096 sparse_substitutions 4 0.230833 4 0.007792
4,096 shifted_periodic 2 0.405666 2 0.008334
4,096 all_substitutions 4,096 0.338417 17 0.000250
16,384 equal 0 0.006375 0 0.006416
16,384 sparse_substitutions 16 5.640459 16 0.031250
16,384 shifted_periodic 2 6.308292 2 0.036000
16,384 all_substitutions 16,384 4.967416 17 0.000500
65,536 equal 0 0.022167 0 0.022166
65,536 sparse_substitutions 64 97.687792 17 0.034292
65,536 shifted_periodic 2 101.358500 2 0.130500
65,536 all_substitutions 65,536 81.294833 17 0.001333

Unrestricted calls have three sequential same-process timing samples; cutoff has one. No warmup/isolation protocol, cross-machine analysis or customer corpus was used. A cutoff return of 17 means distance > 16, not exact distance 17. A return at or below 16 is the exact distance. These different output requirements explain why comparing their timings is not a like-for-like full-distance speedup.

Every source string is ab repeated to the specified length. Equal targets are identical; sparse targets replace every 1,024th symbol with c; shifted targets are ba repeated; all-substitution targets are entirely c. Sparse distance equals the new-symbol count, which both lower-bounds edits and is achieved by substitutions. All-substitution distance equals length by the same argument. Shifted nonempty pairs admit two edits and cannot be one substitution because more than one position differs. Inputs are stored as exact UTF-8 files without trailing newlines, with hashes in the JSON record.

Scope and controls

The 2,023 passed controls combine all 961 pairs over binary strings of length at most four against an independent dynamic program (distance, four cutoff values, edit count and script application); 1,025 independently iterated integer-log checks; 12 toy guard-boundary checks; seven representative source-length guards; six representation/sentinel checks; and these 12 long cases. Validation record.

Precomposed é versus decomposed e plus combining accent has codepoint distance 2, UTF-8 byte distance 3 and NFC-normalized distance 0. The transformation changes the declared problem. Default case is preserved. No semantic or visual-equivalence score is inferred from literal distance.

The source's bad random executions need not preserve either side of its distance sandwich. Its result is a distance estimate rather than an edit script. The numerical source cutoff suffices for two guards only, not the entire physical-large-input predicate. Full mathematical proof, imported formal closure and source algorithm execution remain unaccepted. The baseline supplies no novel backend advantage and no commercial validation. Revised opportunity.