Univerzálna asymptotická technika na rýchle odhady súčinov a súm
Universal asymptotic technique for fast estimates of products and sums
Metóda rozkladu podľa centra (MVDC) je nová univerzálna asymptotická technika, ktorá umožňuje rýchle a presné odhady súčinov a súm prepísateľných do súčinovej formy. Metóda automaticky volí optimálne "centrum" k na základe prvých momentov ln a_i a podporuje kaskádové korekcie pre dosiahnutie výnimočnej presnosti.
The Center Decomposition Method (MVDC) is a new universal asymptotic technique that enables fast and accurate estimates of products and sums that can be rewritten in product form. The method automatically selects the optimal "center" k based on the first moments of ln a_i and supports cascade corrections to achieve exceptional accuracy.
Na rozdiel od tradičných Taylorových rozvojov, ktoré sú lokálne, MVDC absorbuje globálny trend v hlavnom člene H = k^m, čo vedie k výrazne rýchlejšej konvergencii pre produkty so silným logaritmickým rastom.
Unlike traditional Taylor expansions, which are local, MVDC absorbs the global trend in the main term H = k^m, leading to significantly faster convergence for products with strong logarithmic growth.
Uvažujme kladné faktory \(a_i > 0\) a \(P = \prod_{i=1}^{m} a_i\). MVDC analyzuje logaritmy \(\ell_i = \ln a_i\) a konštruuje tri kandidátske centrá:
Consider positive factors \(a_i > 0\) and \(P = \prod_{i=1}^{m} a_i\). MVDC analyzes logarithms \(\ell_i = \ln a_i\) and constructs three candidate centers:
kde \(\mu_1\) a \(\sigma^2\) sú prvý a druhý moment \(\ell_i\). Vyberáme to \(k\), pre ktoré je reziduálny prvý moment \(R(k) = |\sum \ell_i - m\ln k|\) minimálny.
where \(\mu_1\) and \(\sigma^2\) are the first and second moments of \(\ell_i\). We select the \(k\) for which the residual first moment \(R(k) = |\sum \ell_i - m\ln k|\) is minimal.
Centrum \(k_*\), ktoré minimalizuje prvý logaritmický moment reziduálu, je \(k_0 = e^{\mu_1}\). Ak požadujeme navyše minimalizáciu druhého momentu \(\sum (\ell_i - \ln k)^2\), dostaneme posun \(\pm\frac{\sigma^2}{2}\) v log-priestore, čo vedie ku kandidátom \(k_\pm\).
The center \(k_*\) that minimizes the first logarithmic moment of the residual is \(k_0 = e^{\mu_1}\). If we additionally require minimization of the second moment \(\sum (\ell_i - \ln k)^2\), we get a shift of \(\pm\frac{\sigma^2}{2}\) in log-space, leading to candidates \(k_\pm\).
Algoritmus MVDC pozostáva z nasledujúcich krokov:
The MVDC algorithm consists of the following steps:
vstup: faktory a[1..m], požadovaný polynomiálny stupeň p
logs ← ln a_i
mu1 ← priemer(logs)
sigma2← rozptyl(logs)
pre znamienko v {0,+1,-1}:
k[znamienko] ← exp(mu1 + znamienko*sigma2/2)
res[znamienko] ← | súčet(logs) - m ln k[znamienko] |
najlepší_znak ← argmin res
H ← k[najlepší_znak]^m
R ← súčet(logs) - m ln k[najlepší_znak]
fituj polynóm c_j tak, že ln K ~ súčet c_j/m^j
vráť H, c_j
input: factors a[1..m], desired polynomial order p
logs ← ln a_i
mu1 ← mean(logs)
sigma2← variance(logs)
for sign in {0,+1,-1}:
k[sign] ← exp(mu1 + sign*sigma2/2)
res[sign] ← | sum(logs) - m ln k[sign] |
best_sign ← argmin res
H ← k[best_sign]^m
R ← sum(logs) - m ln k[best_sign]
fit polynomial c_j such that ln K ~ sum c_j/m^j
return H, c_j
Reziduál prvého stupňa definujeme ako:
The first-order residual is defined as:
Ak je \(|r_1| = O(m^{-(p+1)})\), môžeme naň aplikovať druhú vrstvu kaskády. Typicky postačí p = q = 5. V našich experimentoch s faktoriálom dosahuje Cascade2 relatívnu chybu < 10^{-13} už pre n ≥ 10.
If \(|r_1| = O(m^{-(p+1)})\), we can apply the second cascade layer to it. Typically p = q = 5 suffices. In our experiments with factorial, Cascade2 achieves relative error < 10^{-13} already for n ≥ 10.
Pre Wallisov súčin \(P_N = \prod_{n=1}^N \frac{4n^2}{4n^2-1}\) vyjde \(k_0 = 1\), reziduál začína \(-\frac{1}{8N}\) a kaskáda znižuje chybu z \(10^{-5}\) na \(10^{-9}\) už pri N = 10.
For the Wallis product \(P_N = \prod_{n=1}^N \frac{4n^2}{4n^2-1}\), we get \(k_0 = 1\), the residual starts with \(-\frac{1}{8N}\) and the cascade reduces the error from \(10^{-5}\) to \(10^{-9}\) already at N = 10.
Pre n! dostaneme \(k_+ = \frac{n}{e}(2\pi n)^{1/(2n)}\), takže hlavný člen je \(H = (n/e)^n\sqrt{2\pi n}\), čo reprodukuje Stirlingov rad.
For n! we get \(k_+ = \frac{n}{e}(2\pi n)^{1/(2n)}\), so the main term is \(H = (n/e)^n\sqrt{2\pi n}\), which reproduces Stirling's series.
Produktové vyjadrenie \(\binom{2n}{n} = \prod_{i=1}^n \frac{n+i}{i}\) vedie na \(k_-\) a hlavný člen \(\frac{4^n}{\sqrt{\pi n}}\) s reziduálom \(\frac{1}{8n} + \cdots\).
The product expression \(\binom{2n}{n} = \prod_{i=1}^n \frac{n+i}{i}\) leads to \(k_-\) and main term \(\frac{4^n}{\sqrt{\pi n}}\) with residual \(\frac{1}{8n} + \cdots\).
Pre \(\alpha = \frac{1}{2}\) a \(\beta = 0\) porovnáme MVDC s klasickou Stirlingovou expanziou. MVDC potrebuje len hlavný člen H a päť korekčných členov \(C_j/n^j\), ktoré sa fitujú raz z krátkeho tréningového intervalu. Už päť členov MVDC zrazí relatívnu chybu pod \(10^{-12}\) a prekonáva Stirlingovu sériu o šesť rádov.
For \(\alpha = \frac{1}{2}\) and \(\beta = 0\) we compare MVDC with classical Stirling expansion. MVDC needs only the main term H and five correction terms \(C_j/n^j\), which are fitted once from a short training interval. Just five MVDC terms bring the relative error below \(10^{-12}\) and surpass Stirling's series by six orders of magnitude.
Metóda MVDC je vhodná pre širokú škálu aplikácií:
The MVDC method is suitable for a wide range of applications:
Implementácia MVDC je dostupná v Python knižnici obsahujúcej:
The MVDC implementation is available in a Python library containing:
mvdc_utils.py - hlavné funkcie s automatickou voľbou centra kfactorial.py - demonstrácia použitia na faktoriálwallis_mvdc.py - implementácia pre Wallisov súčinbinom_mvdc.py - aplikácia na binomické koeficientygamma_ratio_mvdc.py - pomer gama funkciímvdc_utils.py - main functions with automatic center k selectionfactorial.py - demonstration of use on factorialwallis_mvdc.py - implementation for Wallis productbinom_mvdc.py - application to binomial coefficientsgamma_ratio_mvdc.py - gamma function ratioVšetky testovacie skripty porovnávajú MVDC s klasickými asymptotikami a demonštrujú výrazné zlepšenie presnosti.
All test scripts compare MVDC with classical asymptotics and demonstrate significant improvement in accuracy.
Nový preprint rozširuje MVDC na tzv. centrálne Bernoulliho čísla a ukazuje, ako z nich získať mikro-presné korekcie chýbajúcich chvostov Eulerových a Dirichletových produktov.
The new preprint extends MVDC to a family of central Bernoulli numbers and demonstrates micro-accurate corrections of truncated Euler and Dirichlet products.
Otvorené smery výskumu zahŕňajú:
Open research directions include: