Combinatorial Generators
Posted: Wed Jul 26, 2006 5:43 am
Hi,
can any one tell me an algorithm on how to make combinatorial generators?
for example i need to generate all possible subsets from a given string, order is not important:
"abc"
should generate
"a","b","c","ab","ac",bc"
i know that there is a function called next_permutation() in c++, but how to write a combinatorial generator as next_combinatorial(), so i can call it in a while() loop.
thanks alot
can any one tell me an algorithm on how to make combinatorial generators?
for example i need to generate all possible subsets from a given string, order is not important:
"abc"
should generate
"a","b","c","ab","ac",bc"
i know that there is a function called next_permutation() in c++, but how to write a combinatorial generator as next_combinatorial(), so i can call it in a while() loop.
thanks alot