Möbius inversion on posets
Recover local contributions from cumulative counts using the recursively defined inverse of interval summation.
On this page
The question for today
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.
Recovering local data from cumulative data
Suppose on a finite poset. Substitute this expression into a proposed inverse sum with coefficients and interchange the finite sums. The coefficient multiplying a fixed local value becomes the sum of 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.
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.
Work it through
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.
At the empty set, f(∅)=F(∅)=1 because it has no proper lower subsets.
Subtract the empty-set contribution from each singleton: f({a})=4−1=3 and f({b})=3−1=2.
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.
The exact counts are one, three, two, and five. The added empty-set term corrects its double subtraction from the singleton totals.
The living notebook
Explore the model
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.
- Mean · np
- 5
- Variance · np(1−p)
- 2.5
- Total probability
- 1
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.
Pause & reason
Check your understanding
Your turn
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.
Keep the idea
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.