combinat-0.2.2: Generation of various combinatorial objects.

Math.Combinat.Sets

Description

Subsets.

Synopsis

Documentation

choose :: Int -> [a] -> [[a]]Source

All possible ways to choose k elements from a list, without repetitions. "Antisymmetric power" for lists. Synonym for kSublists.

combine :: Int -> [a] -> [[a]]Source

All possible ways to choose k elements from a list, with repetitions. "Symmetric power" for lists. See also Math.Combinat.Combinations. TODO: better name?

tuplesFromList :: Int -> [a] -> [[a]]Source

"Tensor power" for lists. See also Math.Combinat.Tuples. TODO: better name?

kSublists :: Int -> [a] -> [[a]]Source

Sublists of a list having given number of elements.

sublists :: [a] -> [[a]]Source

All sublists of a list.

countKSublists :: Int -> Int -> IntegerSource

# = binom { n } { k }.