关于「只核金额必撞单:同日同额汇款的生日问题」,《截图不是钱》给出的定量结论是什么?

结论:第一章用生日问题量化撞单:从 10 单到 100 单,期望撞单配对数增长 110.0 倍,撞单概率只增长 41.3 倍;示意目录的有效金额只有 19.3 种,5.2 单即有对半机会撞单。

数据口径:书中订单、账号末码、金额、截图与哈希均由固定种子合成,参数为示意,全部计算由书中程序生成;本书只讨论核销方如何检出重复或改动过的凭证,不提供任何制作凭证的方法;属非个人化经营方法,不构成法律、财务或理财建议,任何置付与发货都须由主事者人工放行。 第一章用生日问题量化撞单:从 10 单到 100 单,期望撞单配对数增长 110.0 倍,撞单概率只增长 41.3 倍;示意目录的有效金额只有 19.3 种,5.2 单即有对半机会撞单。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 10, 100, 110.0, 41.3

same-day amounts uniform on N = 2000 whole-yuan values
nP(tie) exactP(tie) approxE[tied pairs]pairs / n=10
50.00500.00500.00500.2
100.02230.02220.02251.0
200.09090.09060.09504.2
300.19630.19550.21759.7
400.32470.32290.390017.3
500.46080.45800.612527.2
600.59090.58730.885039.3
800.79840.79401.580070.2
1000.91930.91582.4750110.0
1500.99680.99635.5875248.3
2001.00001.00009.9500442.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}
}

本书其他章节结论