Expand description
Exact combinatorial counting functions over num_bigint::BigUint.
Constants§
- MAX_
BINOMIAL_ INPUT - Largest effective
k(min(k, n - k)) accepted bybinomial_checkedbeforeCombError::LimitExceeded. - MAX_
FACTORIAL_ INPUT - Largest
naccepted byfactorial_checkedbeforeCombError::LimitExceeded. - MAX_
PARTITION_ INPUT - Largest
naccepted byinteger_partition_count_checkedbeforeCombError::LimitExceeded.
Functions§
- bell_
number - The Bell number
B(n) = sum_k S(n, k): total partitions of ann-set. - binomial
n choose kvia the multiplicative formula (0whenk > n).- binomial_
checked n choose kwith an explicit ceiling on the effective loop length (min(k, n - k)).- factorial
n!(withfactorial(0) == 1).- factorial_
checked n!with an explicit input ceiling (MAX_FACTORIAL_INPUT).- falling_
factorial - The falling factorial
n * (n-1) * ... * (n-k+1)(0whenk > n). - integer_
partition_ count - The partition count
p(n): ways to writenas a sum of positive integers, order ignored. - integer_
partition_ count_ checked p(n)with an explicit input ceiling (MAX_PARTITION_INPUT).- multinomial
- The multinomial coefficient
(sum parts)! / prod(part!). - permutation_
count - The number of
k-permutations ofn,nPk(0whenk > n). - stirling2
- Stirling numbers of the second kind
S(n, k): partitions of ann-set intoknon-empty unlabeled blocks.