CombinatorialFunctionCategoryΒΆ
trigcat.spad line 217 [edit on github]
Category for the usual combinatorial functions.
- binomial: (%, %) -> %
binomial(n, r)
returns the(n, r)
binomial coefficient (often denoted in the literature byC(n, r)
). Note:C(n, r) = n!/(r!(n-r)!)
wheren >= r >= 0
.
- factorial: % -> %
factorial(n)
computes the factorial ofn
(denoted in the literature byn!
) Note:n! = n (n-1)! when n > 0
; also,0! = 1
.
- permutation: (%, %) -> %
permutation(n, m)
returns the number of permutations ofn
objects takenm
at a time. Note:permutation(n, m) = n!/(n-m)!
.