combinatorics

© 2015,2022-2024 John Abbott, Anna M. Bigatti
GNU Free Documentation License, Version 1.2



CoCoALib Documentation Index

Examples

User documentation

Here are some basic combinatorial functions.

Operations

Counting integer partitions

Subset iterator

Notes:

Tuple iterator

Notes:

Random subsets and random tuples

Notes:

Maintainer documentation

The algorithm for RandomSubsetIndices(n,r) was taken from the Wikipedia page on "Reservoir Sorting". Also RandomPermutation was taken from Wikipedia (which page?)

Bugs, shortcomings and other ideas

Ugly fn names RandomSubsetIndices and RandomTupleIndices For thread-safety the fns should also accept as input a random source!

Main changes

2023

2022

2015