What does A Screenshot Is Not a Payment conclude, in numbers, about “Matching on Amount Alone Must Collide: the Birthday Problem of Same-Day, Same-Amount Payments”?
Answer: Chapter 1 quantifies collisions through the birthday problem: from 10 to 100 orders the expected number of colliding pairs grows 110.0 times while the collision probability grows only 41.3 times; an illustrative catalogue has only 19.3 effective amounts, giving even odds of a collision at 5.2 orders.
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: 10, 100, 110.0, 41.3
| same-day amounts uniform on N = 2000 whole-yuan values | ||||
| n | P(tie) exact | P(tie) approx | E[tied pairs] | pairs / n=10 |
| 5 | 0.0050 | 0.0050 | 0.0050 | 0.2 |
| 10 | 0.0223 | 0.0222 | 0.0225 | 1.0 |
| 20 | 0.0909 | 0.0906 | 0.0950 | 4.2 |
| 30 | 0.1963 | 0.1955 | 0.2175 | 9.7 |
| 40 | 0.3247 | 0.3229 | 0.3900 | 17.3 |
| 50 | 0.4608 | 0.4580 | 0.6125 | 27.2 |
| 60 | 0.5909 | 0.5873 | 0.8850 | 39.3 |
| 80 | 0.7984 | 0.7940 | 1.5800 | 70.2 |
| 100 | 0.9193 | 0.9158 | 2.4750 | 110.0 |
| 150 | 0.9968 | 0.9963 | 5.5875 | 248.3 |
| 200 | 1.0000 | 1.0000 | 9.9500 | 442.2 |
| smallest n with P(tie) >= 0.5: 53 | ||||
| rule of thumb 1.2 * sqrt(N): 53.7 | ||||
| from n=10 to n=100: pairs grow 110.0 times, P(tie) 41.3 times |
Show the full program
# Chapter 1. p11: amount-only matching as a birthday problem, exact
# Model: n same-day payments whose amounts fall on N equally likely
# whole-yuan values (here 100 to 2,099 yuan, so N = 2,000; an
# illustrative range, not data). P(at least two share an amount) is
# 1 - prod(1 - i/N) for i < n; the expected number of tied pairs is
# exactly C(n,2)/N. The pair count grows with n squared; the
# probability does so only while it is small, then it saturates.
# Products of probabilities are formed as exp of an fsum of logs.
import math
N = 2000
SIZES = (5, 10, 20, 30, 40, 50, 60, 80, 100, 150, 200)
def p_tie(n, cats):
if n > cats:
return 1.0
logs = [math.log1p(-i / cats) for i in range(n)]
return 1.0 - math.exp(math.fsum(logs))
def pairs(n, cats):
return n * (n - 1) / 2.0 / cats
print("same-day amounts uniform on N = %d whole-yuan values" % N)
print(" n P(tie) exact P(tie) approx E[tied pairs] pairs / n=10")
base = pairs(10, N)
for n in SIZES:
ex = p_tie(n, N)
ap = 1.0 - math.exp(-pairs(n, N))
print("%5d %12.4f %13.4f %13.4f %12.1f"
% (n, ex, ap, pairs(n, N), pairs(n, N) / base))
half = next(n for n in range(2, N) if p_tie(n, N) >= 0.5)
print("smallest n with P(tie) >= 0.5: %d" % half)
print("rule of thumb 1.2 * sqrt(N): %.1f" % (1.2 * math.sqrt(N)))
print("from n=10 to n=100: pairs grow %.1f times, P(tie) %.1f times"
% (pairs(100, N) / base, p_tie(100, N) / p_tie(10, N)))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 1: Matching on Amount Alone Must Collide: the Birthday Problem of Same-Day, Same-Amount Payments. 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
- Chapter 2 · The Last Five Digits and a Time Window: How Far Collisions Fall, and What Will Not Fall
- Chapter 3 · A Finite Automaton for Spoken and Written Chinese Amounts, Simplified and Traditional
- Chapter 4 · The Write-Off Automaton: a Screenshot Is a Claim, a Credit Is a Fact
- Chapter 5 · Average Hash and Hamming Distance: Detecting Repeated Screenshots, and Where Detection Is Blind
- Chapter 6 · The Receipt Fingerprint Library: the Birthday Problem Among Hashes, and Pigeonhole Search
- Chapter 7 · Classics East and West: Half-Seal Tallies in the Collected Statutes of the Ming and Galton's Finger Prints
- Chapter 8 · The Buying Agent's Reconciliation Loop and a Protocol for Refutation