Skip to content

MoebiusFunction ​

The Möbius function μ(x,y)\mu(x,y) of a finite poset — the inverse of the zeta function in the incidence algebra. Specialising the poset recovers number theory's μ\mu and inclusion–exclusion.

MoebiusFunction(poset, x, y)μ\mu on the interval [x,y][x,y], and 0 when x≰yx \not\le y
Typed signatures
TypePackageApplies
(expression<BooleanLattice> | expression<Chain> | expression<DivisorLattice>, value, value) -> integerincidencealways

Domain: Incidence algebras

Details
  • Defined by μ(x,x)=1\mu(x,x) = 1 and μ(x,y)=−∑x≤z<yμ(x,z)\mu(x,y) = -\sum_{x \le z < y}\mu(x,z) — which is exactly the statement that μ\mu inverts ζ\zeta
  • On DivisorLattice(n), μ([a,b])\mu([a,b]) is the classical number-theoretic μ(b/a)\mu(b/a)
  • On BooleanLattice(n), μ([S,T])=(−1)∣T∖S∣\mu([S,T]) = (-1)^{|T \setminus S|} — the signs of inclusion–exclusion
  • On a chain, μ\mu is 1 on a point, −1-1 on a cover, and 0 on anything longer
  • Posets: Chain(n), BooleanLattice(n) (elements are subsets), DivisorLattice(n) (elements are divisors)

Examples

Basic #

30=2⋅3⋅530 = 2\cdot3\cdot5 is squarefree with three primes

live ↗
InMoebiusFunction(DivisorLattice(30),1,30)\mathrm{MoebiusFunction}(\mathrm{DivisorLattice}(30), 1, 30)Out−1-1
Properties #

4 divides 12, so μ\mu vanishes

live ↗
InMoebiusFunction(DivisorLattice(12),1,12)\mathrm{MoebiusFunction}(\mathrm{DivisorLattice}(12), 1, 12)Out00

(−1)3(-1)^3 — inclusion–exclusion

live ↗
InMoebiusFunction(BooleanLattice(3),[],[1,2,3])\mathrm{MoebiusFunction}(\mathrm{BooleanLattice}(3), \bigl\lbrack\bigr\rbrack, \bigl\lbrack1, 2, 3\bigr\rbrack)Out−1-1

not a cover, so zero

live ↗
InMoebiusFunction(Chain(5),2,4)\mathrm{MoebiusFunction}(\mathrm{Chain}(5), 2, 4)Out00
About
Examples4
CrosswalkWikipediaMathWorldWikidata

See also: MoebiusInvert, PosetZeta, PosetElements