0
$\begingroup$

(nCr + nC(r+1) + nC(r+2) + .... + nCn)/2^n


value of this is atmost 1,but for large n(10^5) nCr value overflows. can any1 give me an efficent approach to solve this(r<=n). thanks.

  • 0
    $nCr = {n \choose r}$ ?2017-02-13
  • 0
    http://math.stackexchange.com/questions/2135431/how-to-calculate-the-summation-sum-p-kn-binomnp-2n-quickly2017-02-13
  • 0
    To avoid overflow when working with ratios of factorials and powers you can make us of the Log Gamma Function which can be efficiently numerically calculated.2017-02-14

0 Answers 0