NISHIO Hirokazu[English][日本語]

Combination in mod P

Combination ( binomial coefficient ) $_nC_k = C(n, k) = \binom{n}{k} = \frac{n!}{k!(n-k)!}$ for large numbers n and k.

Assume that the value in mod P is good.

After taking the remainder, no ordinary division can be performed. Then calculate and multiply Inverse Element in mod P.


This page is auto-translated from [/nishio/mod Pでの組み合わせ](https://scrapbox.io/nishio/mod Pでの組み合わせ) using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.


(C)NISHIO Hirokazu / Converted from Markdown (en)
Source: [GitHub] / [Scrapbox]