nCk ( n k -- nCk ) (original) (raw)
Vocabulary
math.combinatorics
Inputs
n | a non-negative integer |
---|---|
k | a non-negative integer |
Outputs
nCk | an integer |
---|
Word description
Outputs the total number of unique combinations of size k (order does not matter) that can be taken from a set of size n. Commonly written as "n choose k".
Examples
USING: math.combinatorics prettyprint ; 10 4 nCk .
210
Definition