I want to compute this sum: $$\sum_{S\,\subseteq\,Q} f\left(S\right)$$ where $Q$ is some finite set with $n$ elements. I think the first step should be: $$\sum_{i=0}^{n}\left(\sum_{S\,\subseteq\,Q\,;\,\vert S\vert\, =\,i}f\left(S\right)\right)$$
which can be useful if $f$ depends on $\vert S\vert$. Can the order of summation be interchanged?? I honestly don't know how to do it (if it can be done). The conditions $i=0,1,2,\dots,n$ and $\vert S\vert=i$ don't seem very "compatible" because there is no natural total order in $\{ \,S\subseteq Q:\vert S\vert=i\,\}$
Thanks in advance
$(*)$ since the formula isn't depending on the value of $i$.
$(**) \ \ i$ stays there as a constant of the first summation, so we get some $(\phi)$ function of $i$.
– Daniel P Jul 01 '18 at 01:16