Namespaces

Types

Type Combinatorics

Namespace MathNet.Numerics

Enumerative Combinatorics and Counting.

Methods

Public static methods

double Combinations(int n, int k)

Counts the number of possible combinations without repetition. The order does not matter and each object can be chosen only once.
Parameters
return double Maximum number of combinations.
int n Number of elements in the set.
int k Number of elements to choose from the set. Each element is chosen at most once.

double CombinationsWithRepetition(int n, int k)

Counts the number of possible combinations with repetition. The order does not matter and an object can be chosen more than once.
Parameters
return double Maximum number of combinations with repetition.
int n Number of elements in the set.
int k Number of elements to choose from the set. Each element is chosen 0, 1 or multiple times.

double Permutations(int n)

Counts the number of possible permutations (without repetition).
Parameters
return double Maximum number of permutations without repetition.
int n Number of (distinguishable) elements in the set.

double Variations(int n, int k)

Counts the number of possible variations without repetition. The order matters and each object can be chosen only once.
Parameters
return double Maximum number of distinct variations.
int n Number of elements in the set.
int k Number of elements to choose from the set. Each element is chosen at most once.

double VariationsWithRepetition(int n, int k)

Counts the number of possible variations with repetition. The order matters and each object can be chosen more than once.
Parameters
return double Maximum number of distinct variations with repetition.
int n Number of elements in the set.
int k Number of elements to choose from the set. Each element is chosen 0, 1 or multiple times.