Do you want to find poweret
In mathematics, given a set S, the power set (or powerset) of S, written , P(S), , is the set of all subsets of S
There is a power search algorithm in this link .
You basically take first element say 1 and find a all subsets {{},{1}}. Call this power set Take next element 2 and add to powerset and get {{2},{1,2}} and take union with powerset. {{},{1}} U {{2},{1,2}} = {{},{1},{2},{1,2}}
But a simple way to do this is described in the answers above. Here is a link that explains this in detail.
source share