core33 min studyLesson 229 in Mathematics

Möbius inversion on posets

Recover local contributions from cumulative counts using the recursively defined inverse of interval summation.

On this page

What you’ll understand

  • Define the Möbius function by finite interval recursion.
  • Recover a function from cumulative lower-set sums on a finite poset.
  • Recognize subset inversion and divisor inversion as distinct instances.

A report may give the number of configurations supported inside each allowed feature set, while the desired question asks how many use exactly a specified feature set. These are cumulative and local descriptions of the same data. On a chain, subtracting consecutive cumulative values recovers local values. On a general partial order, overlapping lower sets require more elaborate coefficients. The Möbius function supplies those coefficients, with inclusion-exclusion appearing as one particularly familiar special case.

Interval summation has a triangular inverse

Work first with a finite poset and functions taking values in the rationals or reals. The zeta kernel has value one on every comparable interval. Its convolution with another interval kernel sums over intermediate elements between the endpoints. A linear ordering compatible with the partial order represents this operation by upper-triangular matrices with diagonal ones, so it is invertible. This is the finite algebra behind Möbius inversion, with no analytic limiting process involved.

Define the Möbius kernel recursively: its diagonal values are one, and on a strict interval its value is minus the sum of the values from the lower endpoint to all earlier elements of that interval. The recursion ensures that summing these coefficients over any nontrivial interval gives zero. On a locally finite infinite poset the same interval recursion remains meaningful, because each interval is finite. However a cumulative sum over all predecessors also needs to be finite or otherwise justified; local finiteness alone does not guarantee finite lower sets.

μ(x,x)=1,μ(x,y)=−∑x≤z<yμ(x,z)(x<y),∑x≤z≤yμ(x,z)=δxy\mu(x,x)=1,\qquad\mu(x,y)=-\sum_{x\le z<y}\mu(x,z)\quad(x<y),\qquad\sum_{x\le z\le y}\mu(x,z)=\delta_{xy}
Finite intervals make the recursion well-defined. The last identity says that μ is the convolution inverse of the interval-summation kernel.↔ Scroll wide equations horizontally.

Recovering local data from cumulative data

Suppose F(x)=∑y≤xf(y)F(x)=\sum_{y\le x}f(y) on a finite poset. Substitute this expression into a proposed inverse sum with coefficients μ(y,x)\mu(y,x) and interchange the finite sums. The coefficient multiplying a fixed local value f(z)f(z) becomes the sum of μ(y,x)\mu(y,x) over intermediate y from z to x. Because the Möbius kernel is the two-sided inverse of zeta, that coefficient is one when z=x and zero otherwise. Thus all unwanted cumulative contributions cancel.

On the subset poset, an interval from T to S is itself a Boolean lattice on the elements in S but not T. Its Möbius value is minus one to the size of that difference. The binomial theorem verifies the required cancellation: the alternating sum over all subsets of a nonempty difference is zero. The familiar signs in inclusion-exclusion therefore arise from the interval structure, not from a universal rule that every poset uses alternating rank signs. Other posets have different Möbius coefficients, including zero values.

F(x)=∑y≤xf(y)⟺f(x)=∑y≤xμ(y,x)F(y),μ(T,S)=(−1)∣S∖T∣ (T⊆S)F(x)=\sum_{y\le x}f(y)\quad\Longleftrightarrow\quad f(x)=\sum_{y\le x}\mu(y,x)F(y),\qquad\mu(T,S)=(-1)^{|S\setminus T|}\ (T\subseteq S)
The equivalence is stated for a finite poset. The displayed sign formula is specific to the poset of subsets ordered by inclusion.↔ Scroll wide equations horizontally.

Divisibility gives a different interval geometry

For positive integers ordered by divisibility, the interval from one to n contains the divisors of n. The resulting arithmetic Möbius function is zero if n contains a squared prime factor, and otherwise is minus one to the number of its distinct prime factors. This follows from the recursion and cancellation over subsets of the distinct prime divisors. It is not the same as alternating by the number of divisibility steps in an arbitrary drawn chain.

To use inversion responsibly, identify what a local contribution means and what cumulative quantity sums those contributions. An index order on a list is not necessarily the relevant partial order; subset containment and divisibility organize different overlaps. Once the order is fixed, calculate small interval values to check orientation: a lower-sum formula needs coefficients from the lower argument to the upper one. Reversing the order changes the formula. A correct-looking alternating sum with the wrong comparable pairs can recover entirely different data.

F(n)=∑d∣nf(d)⟺f(n)=∑d∣nμ(n/d)F(d)F(n)=\sum_{d\mid n}f(d)\quad\Longleftrightarrow\quad f(n)=\sum_{d\mid n}\mu(n/d)F(d)
Each integer has finitely many divisors, so these sums are finite. Here μ is the arithmetic Möbius function from the divisibility poset.↔ Scroll wide equations horizontally.

Recovering exact feature usage

For feature sets contained in {a,b}, cumulative counts are F(∅)=1, F({a})=4, F({b})=3, and F({a,b})=11. Recover counts f(S) of objects using exactly S.

  1. At the empty set, f(∅)=F(∅)=1 because it has no proper lower subsets.

  2. Subtract the empty-set contribution from each singleton: f({a})=4−1=3 and f({b})=3−1=2.

  3. At the pair, subset inversion gives f({a,b})=11−4−3+1=5. Adding all four exact counts checks the top cumulative value: 1+3+2+5=11.

f({a,b})=F({a,b})−F({a})−F({b})+F(∅)=5f(\{a,b\})=F(\{a,b\})-F(\{a\})-F(\{b\})+F(\varnothing)=5
The signs come from the Möbius kernel of the two-element subset lattice.↔ Scroll wide equations horizontally.
The result

The exact counts are one, three, two, and five. The added empty-set term corrects its double subtraction from the singleton totals.

Explore the model

Interactive lab

Interactive lab · probability

Rank totals and cancellation in a Boolean interval

Pause and Reset, then set p=0.5 and n=3. Multiply the four bar masses by eight to recover the subset-rank counts. Predict their alternating sum and compare it with the Möbius cancellation on a nonempty three-element interval.

Rank totals and cancellation in a Boolean intervalThese are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Current readings: Mean · np: 5; Variance · np(1−p): 2.5; Total probability: 1. All parameters are adjustable with the labeled controls below.03581000.070.150.220.3Successes kP(X = k)k = 0 · P = 9.77e-4
Exact probabilityHighlighted outcomeMean np
Mean · np
5
Variance · np(1−p)
2.5
Total probability
1
t = 0 s

These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forThe rank counts 1,3,3,1 give 1−3+3−1=0. The histogram illustrates this Boolean-lattice cancellation only; it does not compute μ for an arbitrary poset.

Check your understanding

For the three-element chain a<b<c, what is μ(a,c)?

Try it yourself

Suppose F(n)=n and F(n)=Σ₍d∣n₎f(d). Find f(12) by divisor inversion and check by summing the resulting smaller values.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

List the divisors of twelve and note which quotients contain squared prime factors.

Compare with the solution

The divisors are 1,2,3,4,6,12. Their quotient Möbius values are μ(12)=0, μ(6)=1, μ(4)=0, μ(3)=−1, μ(2)=−1, μ(1)=1. Hence f(12)=0·1+1·2+0·3−4−6+12=4. Recursive subtraction gives f(1)=1, f(2)=1, f(3)=2, f(4)=2, and f(6)=2; these plus f(12)=4 sum to twelve, as required.

Take it with you

  • Möbius inversion undoes cumulative summation over a specified partial order.
  • Subset signs arise from Boolean intervals and are not universal poset coefficients.
  • On infinite posets, finite intervals do not by themselves justify infinite predecessor sums.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.