What does A Screenshot Is Not a Payment conclude, in numbers, about “The Write-Off Automaton: a Screenshot Is a Claim, a Credit Is a Fact”?

Answer: Chapter 4 proves by exhaustive search that a screenshot is a claim and a credit the fact; with amount alone about 0.17823 of credits are misassigned.

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: 0.17823

200 orders a day, 300 days
keyrulereceipts in tiesmisassigned share
AMTFIFO0.99970.17823
AMTLIFO0.99970.17200
AMT+L5FIFO0.00030.00000
AMT+L5LIFO0.00030.00000
Show the full program
# Chapter 4. p42: inside a tie, no algorithm recovers missing fields
# Model: a day of n = 200 orders with times uniform over 1,440
# minutes; amounts from an illustrative 12-point Zipf law; each buyer
# pays after a lognormal delay (median 6 minutes, sigma 1.0) and the
# receipt arrives at the payment time. Receipts are matched inside
# groups that share the key. FIFO pairs the k-th receipt with the
# k-th order in time (the optimal monotone matching for any convex
# cost of the delay); LIFO gives each receipt the latest open order
# placed before it. Keys: amount only, amount plus last five digits.
# A receipt matched to another buyer's order is a misassignment.
# Seeded Monte Carlo over DAYS days; all parameters illustrative.
import math
import random

N, DAYS = 200, 300
AMTS = [74 + 40 * k for k in range(12)]
WT = [1.0 / r for r in range(1, 13)]
CUM = [math.fsum(WT[:k + 1]) / math.fsum(WT) for k in range(12)]
rng = random.Random(20261113)


def amount():
    u = rng.random()
    for a, c in zip(AMTS, CUM):
        if u <= c:
            return a
    return AMTS[-1]


def day():
    orders = []
    for i in range(N):
        t = rng.random() * 1440.0
        pay = t + rng.lognormvariate(math.log(6.0), 1.0)
        orders.append((i, amount(), rng.randrange(100000), t, pay))
    return orders


def match(orders, use_tail, rule):
    groups = {}
    for o in orders:
        key = (o[1], o[2]) if use_tail else (o[1],)
        groups.setdefault(key, []).append(o)
    wrong = tied = 0
    for key in sorted(groups):
        g = groups[key]
        if len(g) > 1:
            tied += len(g)
        by_t = sorted(g, key=lambda o: o[3])
        recs = sorted(g, key=lambda o: o[4])
        if rule == "FIFO":
            for o, r in zip(by_t, recs):
                wrong += o[0] != r[0]
        else:
            open_ = list(by_t)
            for r in recs:
                before = [o for o in open_ if o[3] <= r[4]]
                pick = before[-1] if before else open_[0]
                open_.remove(pick)
                wrong += pick[0] != r[0]
    return wrong, tied


res = {}
for _ in range(DAYS):
    orders = day()
    for tail in (False, True):
        for rule in ("FIFO", "LIFO"):
            w, t = match(orders, tail, rule)
            a, b = res.get((tail, rule), (0, 0))
            res[(tail, rule)] = (a + w, b + t)
print("%d orders a day, %d days" % (N, DAYS))
print("key          rule   receipts in ties   misassigned share")
for tail in (False, True):
    for rule in ("FIFO", "LIFO"):
        w, t = res[(tail, rule)]
        print("%-11s  %-4s   %16.4f   %17.5f"
              % ("AMT+L5" if tail else "AMT", rule, t / (N * DAYS),
                 w / (N * DAYS)))

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 4: The Write-Off Automaton: a Screenshot Is a Claim, a Credit Is a Fact. 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