One of the items missing in the "combinat" package is that there exists no procedure to produce one combination at a time from C(n,k). The only possibility is to generate a list of all possible subsets of C(n,k) in a single go.

I am looking for a function/library to generate sequences of combination C(n,k), which would generate the next (successor) sequence, given a sequence. ie next:=some_proc(n,k,prev) should return the next sequence after the sequence "prev". Is this available anywhere ?

Please Wait...