GraphUtils allSubGraphOf: Algorithm to generate all sub graph of a base graph. SetUtils powerset: Algorithm to generate the power set for a given set.