Solving Large Factorial Division without writing out factorials

2.3k Views Asked by At

I am calculating entropy for a physics problem and it requires solving this equation:

$\ Entropy = \frac{949!}{899! 50!} $

However, I am not sure how to solve this mathematically without reverting to writing out every single number on the top factorial until I reach 899. Is there a shortcut to solving factorial division without writing out these numbers?

2

There are 2 best solutions below

3
On BEST ANSWER

You can cross out equal factors in numerator and denominator. For example:

$$\frac{6!}{4! \times2!} = \frac{6\times5\times4\times3\times2\times1}{(4\times3\times2\times1) (2\times1)} $$

Now cross out all similar factors in bottom and top. Only one factor at a time in top and bottom. Leaving the following:

$$ \frac{6\times5\times4\times3\times2\times1}{(4\times3\times2\times1) (2\times1)} = \frac{6\times5} {2\times1} = \frac{3\times5} {1} = 3\times5 = 15 $$

So for your problem it will still be a hassle. I'm sure you can factor out even more. Did you try a calculator, or are you getting an overflow?

You can perhaps solve it with programming. This is an R script for the calculation:

total = 1
for (i in 949:899){
  total = total * i
}
total/factorial(50)

It outputs 5.79942e+86

2
On

You can use Stirling's approximation , in log form $\log n! \approx n(\log n-1)+\log\sqrt {2\pi n}$ to avoid overflow. It is quite accurate.