Thursday, September 23, 2004

Partition

Find partition of a set of size k ( rephrasing the problem :) )

blackbox ( given set, and a set of subsets ) -> gives back a partition if one
exists ( or null )

So your_function(given set, set of subsets , k )

generate all possible subsets of size k.. from ur set of subsets..
Eg: set has N elements, no: of subsets = M ,
generate C(M,K) sets of subsets, give this to the blackbox algorithm.
The 1st non-null value is your partition

No comments: