Published February 26, 2026 | Version Version 3

berkeDet: A Dual Iterative Algorithm for Exact Determinant Computation via Block Replication and Index Mapping

  • 1. Independent Researcher

Description

We introduce berkeDet, a dual iterative algorithm that evaluates the Leibniz determinant formula using two independent subroutines: meryemSign, which produces the complete list of permutation signs in lexicographic order, and meryemPer, which produces the corresponding permutations. Both subroutines are built exclusively from block replication and index-mapping operations, and both are compositional: each layer of the construction is a pure function of the previous layer, so every element of a layer can be computed independently. This yields three results. (1) Signs: meryemSign produces all n! signs in Θ(n!) total time — amortized O(1) per sign with no inversion counting; in isolated measurements it outperforms per-permutation inversion counting by roughly 100×, merge-based parity by 350–400×, and even the strongest classical baseline (lexicographic stepping with O(1) incremental parity updates) by 15–18×. (2) Permutations: meryemPer produces all n! permutations in lexicographic order in O(n·n!) total time with no sorting, no reversal, and no pivot scanning; the combined algorithm matches the Steinhaus–Johnson–Trotter bound while preserving lexicographic order. (3) Parallelism: in the work–span model both subroutines have span O(n), giving parallelism Θ(n!), whereas incremental chain generators have critical path Ω(n!) by construction. A vectorized realization confirms this empirically: it generates all permutations up to 6× faster than the C-implemented itertools chain, produces all 479,001,600 signs of S₁₂ in 0.19 seconds, and evaluates the exact 10×10 Leibniz determinant 15× faster than the fastest serial chain method. Correctness is proved by induction and verified exhaustively (element-by-element through order 10 for signs, order 9 for permutations) and numerically through order 10 against LU-based computation.
Version 3: complete rewrite. New: isolated sign-generation benchmarks; formal parallel-complexity analysis (factorial tree, work–span model); vectorized NumPy implementations with benchmarks; verification extended to order 10; serial n=10 crossover vs SJT explained and resolved by vectorization.

Files

berkeDet_v3.pdf

Files (312.1 kB)

Name Size Download all
md5:2e350350112b6901ecedea1690ae0fa4
312.1 kB Preview Download

Additional details

Dates

Created
2026-02-26
berkeDet meryemSign meryemPer
Updated
2026-04-11
Version 2
Updated
2026-07-12
Version 3