algorithm - What would be an efficient way of calculating ratio of two factorials with arbitrary precision? -
in research paper, read following statement
the computations of s (...) , c (...) involve computing ratios of factorials such (2n)!/(2k)!, 0 ≤k ≤ n. can done in time o(n^2(logn)^2) straightforward algorithm.
they have not mentioned straightforward algorithm talking about. if talking direct multiplication of integers, according this link, total time n! calculation alone o(n^2 log n) leaves around o(log n) time division, think not possible.
one approach can think of is:- 1.) choosing fast factorial algorithm here. 2.) dividing using schönhage–strassen algorithm combined newton’s reciprocal method.
it's initial idea though.
is there more specific efficient algorithm calculating ratio of 2 factorials arbitrary precision?
you not need divide, multiply numbers (2k+1) (2n), can done in limits specified;).
Comments
Post a Comment