What does A Screenshot Is Not a Payment conclude, in numbers, about “The Last Five Digits and a Time Window: How Far Collisions Fall, and What Will Not Fall”?

Answer: Chapter 2 shows that at a thousand orders a day, amount plus last five digits plus a thirty-minute window collides once in 93.9 days on average, and at five thousand once in 3.8 days; repeat orders by the same buyer still tie on the key 1.220 times a day. The finite-state transducer of Chapter 3 fails nowhere in an exhaustive round trip of 509,498 texts.

Scope of the numbers: Orders, account tails, amounts, screenshots and hashes are synthesised from fixed seeds, parameters are illustrative, and every calculation is generated by the book's programs. Marked boxes separate published evidence, runnable Python calculations (20 programs), classical sources and the author's hypotheses.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 3.8, 93.9

collision mass of amounts s0.051690
window factor q30 min 0.04123, 10 min 0.01384
expected tied pairs per day
key n20 n=50 n=200 n=1000 n=5000
AMT9.82104 63.31984 1028.6 25819.0 645991.6
AMT+L40.00098 0.00633 0.10286 2.58190 64.59916
AMT+L50.00010 0.00063 0.01029 0.25819 6.45992
AMT+L5+W300.00000 0.00003 0.00042 0.01065 0.26636
AMT+L5+W100.00000 0.00001 0.00014 0.00357 0.08941
days per expected tie, key AMT+L5+W30 and AMT+L5
n20 246945.7 days 10182.2 days
n50 38301.8 days 1579.3 days
n200 2357.8 days 97.2 days
n1000 93.9 days 3.9 days
n5000 3.8 days 0.2 days
Show the full program
# Chapter 2. p21: adding the last digits and a time window to the key
# Model: the amount law of p12 (collision mass s, recomputed here);
# the payer's last k account digits are uniform on 10^k values and
# independent of the amount; payment times are uniform over a
# 1,440-minute day, so two payments fall within w minutes of each
# other with probability q = (2wT - w^2) / T^2. A tie on the key
# needs all parts to agree, so E[tied pairs per day] is
# C(n,2) * s * 10^-k * q. Independence is an assumption that Chapter
# 2 relaxes for repeat buyers (p22). Daily volumes of 20, 50, 200,
# 1,000 and 5,000 orders are illustrative.
import math
from collections import defaultdict

PRICES = [59 + 40 * k for k in range(30)]
W = [1.0 / r for r in range(1, 31)]
POP = [w / math.fsum(W) for w in W]
MIX = {1: 0.70, 2: 0.25, 3: 0.05}
T = 1440.0


def collision_mass():
    parts = defaultdict(list)
    for k, pk in MIX.items():
        def walk(depth, total, prob):
            if depth == k:
                parts[total + (15 if total < 299 else 0)].append(prob)
                return
            for i, p in enumerate(POP):
                walk(depth + 1, total + PRICES[i], prob * p)
        walk(0, 0, pk)
    law = [math.fsum(v) for v in parts.values()]
    return math.fsum(p * p for p in law)


def q_window(w):
    return (2 * w * T - w * w) / (T * T)


s = collision_mass()
KEYS = [("AMT", 1.0), ("AMT+L4", 1e-4), ("AMT+L5", 1e-5),
        ("AMT+L5+W30", 1e-5 * q_window(30)),
        ("AMT+L5+W10", 1e-5 * q_window(10))]
VOL = (20, 50, 200, 1000, 5000)
print("collision mass of amounts s = %.6f" % s)
print("window factor q: 30 min %.5f, 10 min %.5f"
      % (q_window(30), q_window(10)))
print("expected tied pairs per day")
print("key           " + "".join("%11s" % ("n=%d" % n) for n in VOL))
for name, f in KEYS:
    row = ""
    for n in VOL:
        lam = n * (n - 1) / 2.0 * s * f
        row += "%11.5f" % lam if lam < 100 else "%11.1f" % lam
    print("%-14s%s" % (name, row))
print("days per expected tie, key AMT+L5+W30 and AMT+L5")
for n in VOL:
    a = n * (n - 1) / 2.0 * s * KEYS[3][1]
    b = n * (n - 1) / 2.0 * s * KEYS[2][1]
    print("   n=%5d  %12.1f days  %10.1f days" % (n, 1 / a, 1 / b))

Single source and citation

Fan, Y. (2026). Fault-Tolerant Parsing of Payment Receipts and Spoken Orders: Last-Five-Digit Write-Off Automata and Blocking Duplicate-Screenshot Fraud (Version 1.0.0), Chapter 2: The Last Five Digits and a Time Window: How Far Collisions Fall, and What Will Not Fall. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-267 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026267,
  author    = {Fan, Yafu},
  title     = {Fault-Tolerant Parsing of Payment Receipts and Spoken Orders: Last-Five-Digit Write-Off Automata and Blocking Duplicate-Screenshot Fraud},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book