MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am interested in a formula which relating two functions over a multiset.

I have a multiset $X$ of sets where each element in $X$ is a set $x \subseteq \{1,2,\ldots,m\}$. Now I have two ``count'' functions

$p_s = |\{x \in X : s = x\}|$

$\eta_s = |\{x \in X : s \subseteq x\}|$

One can expand the formula for the marginal count $\eta_s$ as

$\eta_s = \sum_{s \subseteq t,|t|\leq m} p_t$

I have confirmed for up to $m = 4$ that the following results holds

$p_s = \sum_{s \subseteq t,|t|\leq m} (-1)^{|s|-|t|}\eta_t$

Does the above result hold for arbitrary $m$? This seems like it must be related to the inclusion/exclusion principle ( but there is a subtle difference, in that the summation is over set which include $s$ as subsets. Perhaps this difference is immaterial, but I don't see the argument just yet. Also, in the general problem that I wish to solve I will have $x \subseteq \{(i,a_i)\}_{i \in I}$ where $I$ is all combinations of $\{1,\ldots,m\}$ and $a_i$ is drawn from a finite set $A:|A|=n$.

share|cite|improve this question
up vote 4 down vote accepted

The answer is yes, and this is known as Moebius inversion. See Section E.1, p.286 in Graphical models, exponential families, and variational inference.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.