Video Presentation
Watch the visual explanation of berkeDet, meryemSign, and meryemPer:
Downloads
Download Paper (PDF) · LaTeX source
Download Presentation
Benchmark & Verification Scripts
Everything in the paper is executable. Fixed seeds; correctness asserted in-script; runs abort on any mismatch. All are single-file Python. The first group needs only a CPU (Google Colab's free tier is enough); the Version 4 streaming scripts additionally use a GPU where indicated.
- verify.py — determinants vs LU (orders 1–10), structural lex-order and sign checks
- colab_sign_benchmark.py — isolated sign generation: meryemSign vs inversion count, merge parity, and Narayana + $O(1)$ flip
- colab_benchmark.py — serial end-to-end Leibniz determinant, four methods
- colab_parallel_benchmark.py — vectorized tree vs chains: permutations, signs, and the full exact determinant
Version 4 — streaming execution. Rank-locality windows, the block-size overflow law, exact big-integer reduction, and the fused GPU kernel. Every determinant these produce is certified in-script against independent exact fraction-free Bareiss elimination.
- phaseA_stream.py — CPU streaming core and full verification battery (exhaustive line-and-sign checks, the block-size law table, prepare/execute pipeline, LU comparison). No GPU required.
- colab_t4_phaseB.py — streaming on a free Tesla T4: the exact $14 \times 14$ determinant (87.2 billion terms) in 194 MB, plus the dual-stream prepare/execute measurement (the honest 0.99× finding). GPU runtime.
- runpod_summit_n18_v2.py — fused register-resident CUDA kernel: $n = 16$, 20,922,789,888,000 terms exact in 361 s at 57.9 G lines/s on one NVIDIA B300, with checkpointing, rank-partitioning across devices, and measured horizons for $n = 17$–$19$. Large-GPU runtime.
Preprint Repositories
View on Zenodo — DOI 10.5281/zenodo.21709734
Quick Start (Python)
Copy this code, paste it into any Python environment (such as online-python.com), and run it. Full code with detailed comments is on the Algorithm page.
def meryemSign(n):
b = [1]
for e in range(1, n):
c = b[:]
for d in range(e):
if d % 2 == 0:
f = [-x for x in c]
else:
f = c[:]
b.extend(f)
return b
def meryemPer(n):
a = [[1]]
for b in range(2, n + 1):
c = list(range(1, b + 1))
d = []
for f in c:
g = [e for e in c if e != f]
for h in a:
j = [g[i - 1] for i in h]
d.append([f] + j)
a = d
return a
def berkeDet(matrix):
n = len(matrix)
signs = meryemSign(n)
perms = meryemPer(n)
det = 0
for sign, perm in zip(signs, perms):
product = 1
for i in range(n):
product *= matrix[i][perm[i] - 1]
det += sign * product
return det
# Try it!
A = [[6, 1, 1],
[4, -2, 5],
[2, 8, 7]]
print("Determinant:", berkeDet(A)) # Output: -306
Citation
If you use berkeDet in your work, please cite:
Gülmen, B., Gülmen, M., & Gülmen, Ö. (2026).
berkeDet: Data-Parallel Lexicographic Permutation Generation and
Streaming Exact Determinant Evaluation via Block Replication and
Index Mapping (Version 4).
Zenodo. https://doi.org/10.5281/zenodo.21709734
Version History
- Version 4 (July 2026) — Generator-first rework for a parallel-computing readership. New: streaming execution with the block-size overflow law and exact big-integer reduction; prepare/execute pipeline with the honest single-GPU 0.99× finding; fused register-resident CUDA kernel; Tesla T4 results (n=14 exact in 194 MB) and NVIDIA B300 results (n=16: 20.9 trillion terms exact in 361 s at 57.9 G/s, Bareiss-certified); measured horizons for n=17/18/19; Bareiss added as independent exact baseline. Archived: DOI 10.5281/zenodo.21709734.
- Version 3 (July 2026, DOI 10.5281/zenodo.21326563) — Complete rewrite. Isolated sign-generation benchmarks (~100× / 350–400× / 15–18×); formal parallel-complexity analysis (factorial tree, work–span model: span $O(n)$ vs chains' $\Omega(n!)$); vectorized NumPy implementations with benchmarks (6× over C itertools; $S_{12}$ signs in 0.19 s; vectorized determinant 15× over SJT); verification extended to order 10; the serial n=10 crossover vs SJT explained and resolved.
- Version 2 (April 2026) — Strengthened meryemPer analysis with explicit comparison to naive (suffix sort) and optimized (Narayana Pandita) lexicographic generators. Added sort-free column to comparison table. Updated title.
- Version 1 (February 2026) — Initial release.