0

My calculator cannot calculate anything over 69!, so how would I calculate

$\frac{80!}{60! \cdot 20! }$

without having to calculate

$\frac{80\cdot79\cdot78...61}{20\cdot19\cdot18...2}$

which would take a very long time to input?

  • 6
    One option: don't calculate it at all. For most intellectual purposes, having an answer of $\binom{80}{20}$ is good enough and we don't actually care what the number is in final numerical form. Another option: write a program. Sufficiently powerful graphing calculators (E.g. the ti-80 series such as ti-83, ti-89 etc...) have the ability to program in a form of BASIC and you can write simple loops effectively. You should be able to with relative ease tell it to multiply the numbers from $61$ to $80$ in very few lines of code. A third option: use a more powerful calculator – JMoravitz Jun 12 '17 at 02:26
  • 2
    There also exist "permutation" calculations on many scientific or graphing calculators (often found in the probability/statistics menus), usually labeled something like $nPr$, where it takes two inputs, sometimes written as $nPr(80,20)$ or written as $80~nPr~20$ to refer to the calculation $80\cdot 79\cdot 78\cdots 61$ – JMoravitz Jun 12 '17 at 02:28
  • 1
    I think now looking back that my calculator is capable of calculating $\frac{{80}P{20}}{20!}$ which is equivalent to ${80}C{20}$. –  Jun 12 '17 at 02:29
  • Usually, in the "numerical side", we do not evaluate the factorial because it causes overflow for relatively low argument values. It is something like ${m \choose n} = \left\lfloor,\exp\left(,\ln\left(,m!,\right) - \ln\left(,n!,\right) - \ln\left(,\left[,m - n,\right]!,\right),\right) + 0.5,\right\rfloor$ – Felix Marin Jun 12 '17 at 04:49

3 Answers3

1

Stirling's formula gives $$\log n!\approx n\log n - n + 1/2\log n + \log\sqrt{2\pi}$$ so $\log\frac{80!}{60!20!}\approx (80\log80-80+1/2\log80 + \log\sqrt{2\pi})-(60\log60-60+1/2\log60 + \log\sqrt{2\pi})-(20\log20-20+1/2\log20 + \log\sqrt{2\pi})=80.5\log80-60.5\log60-20.5\log20 - \log\sqrt{2\pi}$

which your calculator can calculate as $42.70933440$, so $$\frac{80!}{60!20!}\approx e^{42.70933440}=10^{42.70933440/\log 10}=10^{18.54842825}$$ $$=3.5353161\times10^{18}$$ compare with the precise result $$3.535316142212174320\times 10^{18}$$ we get the most significant $7$ digits right.

MaudPieTheRocktorate
  • 3,796
  • 16
  • 34
0

I agree with JMoravitz's comment that $\binom{80}{20}$ is probably acceptable and that if you absolutely need an actual number, a program is the right way to go. However, if you multiply all those numbers together, you will likely have overflow: the numbers will be too big to store in a 64 bit integer. However, if the numbers given here are accurate, the final value itself appears to be small enough to fit into a 64 bit integer. There is another method to calculate this answer using 64 bit integers.

I assume you have heard of Pascal's Triangle?

Mike
  • 13,318
0

you could just cancel a lot of the terms away 80=16*5;78=2*3*13;76=4*19;74=2*37 the 37 isn't able to be cancelled. etc. reduce it to a form you can compute easy if need be.

  • In fact you can potentially decrease the values used by an order, of $\frac{20!}{10!}$, because at least one of the numerators numbers, is distinctly divisible by all numbers greater than 10:

    $79\cdot77\cdot37\cdot73\cdot71\cdot23\cdot67\cdot65\cdot16\cdot9\cdot62\cdot61$ is roughly what I get when I pair things down.

    –  Jul 04 '17 at 22:55