What is the complexity of subset of the power set of a set

29 Views Asked by At

The complexity is $2^n$, if I have a set $B$ and want to find the power set $\mathcal{P}(B)$.

But what if I want to find only sets of max size $i$ of $\mathcal{P}(B)$? So a subset of $\mathcal{P}(B)$ where there only exist sets with sizes less or equal to $i$

Something points in the direction that the complexity is $n^i$ but I have trouble understanding why.

1

There are 1 best solutions below

0
On BEST ANSWER

Provided that the cardinality of a finite set $\mathbf B$ is $n$ the number of subsets of $\mathbf B$ with cardinality $j$ equals $\binom{n}{j}$, so the number of subset with cardinality that does not exceed $i$ equals:$$\sum_{j=0}^i\binom{n}j$$

There is no closed form of this expression.

Substituting $i=n$ observe that $\sum_{j=0}^n\binom{n}j=2^n$ which is in accordance with your observation that the cardinality of $\wp(\mathbf B)$ equals $2^n$.