关于「只核金额必撞单:同日同额汇款的生日问题」,《截图不是钱》给出的定量结论是什么?
结论:第一章用生日问题量化撞单:从 10 单到 100 单,期望撞单配对数增长 110.0 倍,撞单概率只增长 41.3 倍;示意目录的有效金额只有 19.3 种,5.2 单即有对半机会撞单。
数据口径:书中订单、账号末码、金额、截图与哈希均由固定种子合成,参数为示意,全部计算由书中程序生成;本书只讨论核销方如何检出重复或改动过的凭证,不提供任何制作凭证的方法;属非个人化经营方法,不构成法律、财务或理财建议,任何置付与发货都须由主事者人工放行。 第一章用生日问题量化撞单:从 10 单到 100 单,期望撞单配对数增长 110.0 倍,撞单概率只增长 41.3 倍;示意目录的有效金额只有 19.3 种,5.2 单即有对半机会撞单。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 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 |
查看完整验算程序
# 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)))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《多模态汇款凭证与口语订单容错解析、转账末五码核销自动机与重复截图欺诈阻断母典》第 1 章「只核金额必撞单:同日同额汇款的生日问题」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 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}
}