关于「洗牌、混合时间与正逆位的相关结构」,《塔罗、雷诺曼与生命树的数学》给出的定量结论是什么?
结论:第二章计算交叉洗牌的混合时间:78 张牌需要八次 GSR 交叉洗牌才使全变差降到 0.5 以下(0.3065);交叉洗牌不产生逆位,逆位的相关结构取决于翻牌动作:对切转半后细致交叉洗牌的相邻相关系数为 −0.013,与独立翻牌无异,成叠转牌则升到 0.774。
数据口径:书中以标注框区分已发表的证据、可运行的 Python 计算(16 段程序)、原典与作者的假说。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.3065, 0.5, 78
| riffles | TV, 52 cards | TV, 78 cards |
| 1 | 1.0000 | 1.0000 |
| 2 | 1.0000 | 1.0000 |
| 3 | 1.0000 | 1.0000 |
| 4 | 1.0000 | 1.0000 |
| 5 | 0.9237 | 0.9996 |
| 6 | 0.6135 | 0.8926 |
| 7 | 0.3341 | 0.5713 |
| 8 | 0.1672 | 0.3065 |
| 9 | 0.0854 | 0.1532 |
| 10 | 0.0429 | 0.0780 |
| 11 | 0.0215 | 0.0392 |
| 12 | 0.0108 | 0.0196 |
| first k with TV < 0.5: 52 cards -> 7, 78 cards -> 8 | ||
| rule of thumb (3/2) log2 n: 52 -> 8.55, 78 -> 9.43 |
查看完整验算程序
# Chapter 2. p03: How many riffles mix a 78-card deck?
# Gilbert-Shannon-Reeds model; Bayer and Diaconis (1992): after k
# riffles a permutation with r rising sequences has probability
# C(2^k + n - r, n) / 2^(kn),
# and A(n, r) permutations (Eulerian numbers) have r rising sequences.
# Total variation distance to uniform:
# TV = 1/2 * sum_r A(n, r) * | C(2^k + n - r, n) / 2^(kn) - 1/n! |.
# A riffle moves cards but never turns one round: orientation is untouched.
from fractions import Fraction
from math import comb, factorial, log2
def eulerian(n):
row = [1] # n = 1: one permutation, 1 sequence
for m in range(2, n + 1):
new = [0] * m
for j in range(m): # j descents -> j + 1 rising sequences
a = row[j] if j < len(row) else 0
b = row[j - 1] if j >= 1 else 0
new[j] = (j + 1) * a + (m - j) * b
row = new
return row # row[r - 1] = A(n, r)
def tv(n, k, A):
nf = factorial(n)
s = Fraction(0)
for r in range(1, n + 1):
p = Fraction(comb(2 ** k + n - r, n), 2 ** (k * n))
s += A[r - 1] * abs(p - Fraction(1, nf))
return s / 2
if __name__ == "__main__":
tables = {n: eulerian(n) for n in (52, 78)}
for n in (52, 78):
assert sum(tables[n]) == factorial(n)
print(" riffles TV, 52 cards TV, 78 cards")
first = {}
for k in range(1, 13):
row = [float(tv(n, k, tables[n])) for n in (52, 78)]
for n, v in zip((52, 78), row):
if v < 0.5 and n not in first:
first[n] = k
print(" {:7d} {:12.4f} {:12.4f}".format(k, *row))
print(" first k with TV < 0.5: 52 cards -> {}, 78 cards -> {}".format(
first[52], first[78]))
print(" rule of thumb (3/2) log2 n: 52 -> {:.2f}, 78 -> {:.2f}".format(
1.5 * log2(52), 1.5 * log2(78)))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《塔罗超几何抽样、雷诺曼网格拓扑与卡巴拉生命树图论》第 2 章「洗牌、混合时间与正逆位的相关结构」(版本 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090191
DOI: 10.5281/zenodo.24090191 · 阅读本章所在专著 · 5DL-B-071 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026071,
author = {Fan, Yafu},
title = {Tarot Hypergeometric Sampling, Lenormand Grid Topology and Kabbalistic Tree Graphs},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.24090191},
url = {https://doi.org/10.5281/zenodo.24090191}
}