bug-gmp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Binomial Coefficients


From: Libor Spacek
Subject: Binomial Coefficients
Date: Fri, 24 May 2002 15:49:53 +0100

I wonder whether the following formula may be faster than your
implementation? I know it is recursive (oh horror!!) but it does reduce 
quickly and, most importantly, it completely eliminates division:

binom(n,k) = 1 + k(n-k) + sum(i=2,min(k,n-k), binom(k,i)*binom(n-k,i) )

Libor Spacek





reply via email to

[Prev in Thread] Current Thread [Next in Thread]