📜 ⬆️ ⬇️

Calculating the binomial coefficients ... manually

Earlier in two articles, the topic of calculating binomial coefficients using a computer was touched upon.
Calculation of binomial coefficients in C (C ++)
Calculation of binomial coefficients using Fourier transforms
According to their reading, there may be an opinion that this is a complex and resource-intensive task.
Before programming something, try to figure out what's what.

Factor formula: image

Let's open it:
')
It's obvious that and then

And now we will try to count for example :



We immediately see that 10, 9 and 8 are mutually reduced, leading us to

Looking closer, we see that the abbreviations do not end there. 14 is divided by 7, 12 by 6, 15 by 5, 16 by 4. The remaining 15 are divided by three, and the remaining from 7 2 are divided by the last two. Making all these cuts, we get rid of the denominator, we get this product:

Let's try to count



First abbreviation:

Further it is easy to see that 114/57 = 2, 112/56 = 2, 110/55 = 2 and so on, up to 62/31 = 2

The second abbreviation:

So, we got in the numerator 27 twos, which we will try to reduce with the denominator. To begin with, we cross out all the powers of two from the denominator and the corresponding number of twos from the numerator. (2, 4, 8, 16 = 10 twos, 17 left)



In the denominator there are 11 more even numbers, some of them are multiple even. After all the cuts in the denominator, there are no even numbers left, and in the numerator there will be two deuces.



Let us now take for threes.


Well and further, we reduce to 5, 7, 11, 17, 19, 23, 29

It remains:

which is equal to 23 544 809 717 399 465 172 377 319 715 292 496 .

Source: https://habr.com/ru/post/274889/


All Articles