Abstract
In a previous publication, we have used the discrete Fourier transform to compute the binomial coefficients. In the present paper, we extend the previously proposed method to compute the multinomial coefficients, analyse its precision and performance. The other methods, analysed in our previous publication, are also extended to the multinomial case. The FFT method presents the best performance to compute all multinomial coefficients at a given level.
Similar content being viewed by others
Notes
The On-Line Encyclopedia of Integer Sequences (OEIS), created by Neil Sloane, is an online database of integer sequences. It is found at https://oeis.org/.
The type of a sequence is its empirical histogram, which adds up to the number of occurrence of each symbol in a sequence. The type of a sequence of length n is defined by the m-tuple \(\left (\frac {k_{1}}{n},\ldots ,\frac {k_{m}}{n}\right )\), which describes the number of occurrences kj of each j th symbol in an alphabet of size m.
References
IEEE: Standard for floating-point arithmetic (2008)
Araujo, L.: Bincoeff. https://github.com/leolca/bincoeff (2019)
Araujo, L.C., Sansȧo, JP.H., Vale-Cardoso, A.S.: Fast computation of binomial coefficients. Numerical Algorithms https://doi.org/10.1007/s11075-020-00912-x (2020)
Comtet, L.: Advanced Combinatorics: The art of finite and infinite expansions. D. Reidel. ISBN 9027703809 (1974)
Eaton, J.W.: Gnu octave (version 5.1.0). https://octave.org/doc/v5.1.0/Numeric-Data-Types.html (2018)
Goldberg, D.: What every computer scientist should know about floating-point arithmetic. ACM Comput. Surveys (CSUR) 23 (1), 5–48 (1991)
Hoggatt, V.E., Alexanderson, G.L.: A property of multinomial coefficients. Fibonacci Quarter. 9, 351–356 (1971)
Izsȧk, F.: Maximum likelihood estimation for constrained parameters of multinomial distributions–application to zipf–mandelbrot models. Comput Stat Data Anal 51(3), 1575–1583 (2006). https://doi.org/10.1016/j.csda.2006.05.008
Kochurkin, I.: How do i compute multinomials efficiently? Mathematics Stack Exchange. https://math.stackexchange.com/q/204150. (version: 2012-09-28) (2012)
Hornik, K.: Bincoeff function in GNU Octave (1994)
Manolopoulos, Y.: Binomial coefficient computation. ACM SIGCSE Bull 34(4), 65 (2002). https://doi.org/10.1145/820127.820168
McKeeman, B.: Matlab performance measurement. Technical report, Mathworks. https://www.mathworks.com/matlabcentral/fileexchange/18510-matlab-performance-measurement. [Online; Accessed 03 Feb 2020] (2008)
Muller, J.-M., Brisebarre, N., de Dinechin, F., Jeannerod, C.-P., Lefėvre, V., Melquiond, G., Revol, N., Stehlė, D., Torres, S.: Handbook of Floating-Point Arithmetic. Birkhäuser, Boston (2010)
Netto, E.: Lehrbuch Der Kombinatorik. Chelsea, New York (1958)
Osler, T.J.: Fermat’s little theorem from the multinomial theorem. College Math. J. 33(3), 239 (2002). https://doi.org/10.2307/1559040
Pinote, T.S.: Investigations in computer-aided mathematics:experimentation, computation, and certification. PhD dissertation, Université Paris-Saclay (2018)
Rolfe, T.: Binomial coefficient recursion. ACM SIGCSE Bull. 33 (2), 35 (2001). https://doi.org/10.1145/571922.571950
Schatzman, J.C.: Accuracy of the discrete Fourier transform and the fast Fourier transform. SIAM J. Sci. Comput. 17(5), 1150–1166 (1996)
Wells, D.: The penguin dictionary of curious and interesting numbers. Penguin Books. ISBN 0140080295 (1987)
Wikipedia contributors: Double-precision floating-point format - Wikipedia, the free encyclopedia. https://en.wikipedia.org/wiki/Double-precision_floating-point_format. [Online; Accessed 20 Mar 2020] (2020a)
Wikipedia contributors: Floating-point arithmetic. https://en.wikipedia.org/wiki/Floating-point_arithmetic. [Online; Accessed 26 Mar 2020] (2020b)
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Araujo, L.C., Sansão, J.P.H. & Vale-Cardoso, A.S. Fast computation of multinomial coefficients. Numer Algor 88, 837–851 (2021). https://doi.org/10.1007/s11075-020-01059-5
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11075-020-01059-5