finding combinatorial of large numbers
问题 What is an efficient way of finding the number of ways k gifts can be chosen from N gifts where N can be very large (N ~ 10^18). That is we have to calculate N(C)K or N chose K. K can also be of the order of N. 回答1: I guess there are no fast ways to compute such large numbers. You can approximate it using Stirling's formula 回答2: Stirling's formula would be useful only if you had further asymptotic information such as k ~ n / 3 or k ~ log n . With no further information on your specific