Vous êtes sur la page 1sur 6

11 - Mobius inversion and Inclusion/Exclusion.

Consider the following problems:


Problem 1. Suppose f(n) and g(n) are functions from the set 0, 1, 2, . . . to the set of
real (or complex) numbers. Suppose that, for every n 0,
f(n) =
n

i=0
g(i) =

in
g(i).
Suppose that we only know a formula for the function f(n), not for g(n). Can we somehow
deduce the formula for g(n)?
For example, if f(n) = n
2
, one may discover that g(n) = 2n1 for n > 0 and g(0) = 0.
Problem 2. Suppose now that f(n) and g(n) are functions from the set 1, 2, 3, . . . to
the set of real (or complex) numbers. Suppose that, for every n > 0,
f(n) =

i|n
g(i),
(the sum being taken over all positive divisors of n). If we are given only the function
f(n), can we deduce g(n)?
For example, if f(n) = n, one may nd that g(n) = (n) (the Euler phi-function).
Problem 3. Suppose X is a set, and f(S) and g(S) are functions dened for every subset
S X. Suppose that for every subset S, we have
f(S) =

US
g(U),
(the sum being taken over all subsets of S). Again, if we are given only the function f(S),
can we deduce g(S)?
For example, if f(S) = #(S) (the cardinality of S), then we might (eventually) dis-
cover that the only g function which works is g(S) =
_
1 if #(S) = 1,
0 otherwise.
All these are inversion problems on a partially ordered set. In each case, we can
determine the g function by working from the bottom up. For example:
Solution to problem 1. Note that f(0) = g(0), so g(0) = f(0). Then f(1) = g(1) +
g(0) = g(1) +f(0), so g(1) = f(1) f(0). Then f(2) = g(2) +g(1) +g(0) = g(2) +
_
f(1)
f(0)
_
+ f(0) = g(2) + f(1), so g(2) = f(2) f(1). Continuing in like manner, we soon
discover that g(n) =
_
f(n) f(n 1) if n > 0
f(0) if n = 0.
Note that this solution does not depend
on the specic nature of f(n). It simply expresses g(n) in terms of f(n).
Solution to problem 2. Again, f(1) = g(1), so g(1) = f(1). Then f(2) = g(2) +
g(1) = g(2) + f(1), so g(2) = f(2) f(1). Similarly, f(3) = g(3) + g(1) (divisors only),
so f(3) = g(3) + f(1), hence g(3) = f(3) g(1). Then f(4) = g(4) + g(2) + g(1) =
g(4) +
_
f(2) f(1)
_
+ f(1) = g(4) + f(2), so g(4) = f(4) f(2). Continuing, we nd
that g(5) = f(5) f(1), g(6) = f(6) f(3) f(2) +f(1), etc. Clearly this process can be
continued to nd g(n) in terms of f(i) (over all divisors i of n), but it is dicult to nd a
simple expression. Well derive the full answer in Corollary 11.1.
Solution to problem 3. Clearly, f() = g(), so
g() = f().
Likewise, if S = a, then f(S) = g(S) + g() = g(S) + f(), so
g(a) = f(a) f().
if S = a, b, then f(S) = g(S) + g(a) + g(b) + g() = g(S) +
_
f(a) f()
_
+
_
f(b) f()
_
+ f() = g(S) + f(a) + f(b) f(), so
g(a, b) = f(a, b) f(a) f(b) + f().
Further experimenting leads to the following theorem, which we will later prove:
Theorem 11.1 Let X be a nite set. If f and g are functions from the power-set of X to
the real (or complex) numbers, and f(S) =

US
g(U) for every S X, then
g(S) =

US
(1)
#(U)
f(U).
The set 0, 1, 2, . . . with the relation , the set 1, 2, 3, . . . with the relation [ (di-
vides), and the set P(X) (power set) with the relation , are all examples of partially
ordered sets (sometimes called posets). The three problems are examples of Mobius inver-
sion, as dened by Theorem 11.2 below.
Denition 11.1 A partially order set (poset) is a set S, together with a binary relation
_ on S such that
(i) s _ s for all s S (the reexive law),
(ii) If s _ t and t _ s then s = t (antisymmetric law),
(iii) If s _ t and t _ u then s _ u (transitive law).
Theorem 11.2 Let S be a poset, with relation _, and assume that for every s S, the set
t

t _ s is nite. Then there exists a unique function : S S Z (called the Mobius


function) with (s, t) ,= 0 only if s _ t and such that whenever f and g are functions from
S to the real (or complex) numbers and
f(s) =

ts
g(t),
then
g(s) =

ts
(s, t)f(t).
Proof. Note, if s, t S, and t _ s, and there exists a unique Mobius function for each
poset x[x _ s (called the initial segment of s), and x[x _ t (called the initial segment
of t), then the functions agree on the initial segment of t since the Mobius function for
the initial segment of s also serves for the initial segment of t. Similarly, if we remove the
condition that t _ s, then the Mobius functions for the two posets must agree on their
intersection. Thus, if we can prove there exists a unique Mobius function on the poset
x[x _ s, for every s S, we will have proved it for all of S.
We proceed by induction on the number of elements in x[x _ s. The theorem is clear
when that set has only one element (when f(s)=g(s) then g(s)=f(s), so (s, s) = 1. Assume
there exists a unique Mobius function on the initial segment of s

, whenever #
_
x[x _
s

_
< n, and let #
_
x[x _ s
_
= n. Consider the poset P = x[x _ s, x ,= s, which has
n1 elements. By the inductive hypotheses, there is a unique Mobius function on P. Thus
if f(s) =

xs
g(x) = g(s) +

xP
g(x), then we may express the latter sum in terms of f(x)
(over all x P), using the Mobius function on P. Thus f(s) = g(s) +

xP
m
s,x
f(x), where
the coecients m
s,x
are uniquely determined by the Mobius function on P. Necessarily,
g(s) = f(s)

xs
m
s,x
f(x). In other words, there is a Mobius function for the initial
segment of s, and it is uniquely determined by the (also uniquely determined) Mobius
function on P. By induction, we have proved the theorem.
Lemma 11.1 Let (S, _) be a poset with Mobius function . Then for any x, y S with
x _ y, we have

xzy
(y, z) =
_
1 if x = y,
0 otherwise.
In particular, (x, x) = 1 for any x S.
Proof. Let g be dened by g(s) =
_
1 if s = x,
0 otherwise.
Then f(s) =
_
1 if x _ s,
0 otherwise.
Applying
Mobius inversion (Theorem 11.2) gives the desired result.
Now we only need a means of computing the Mobius function. We may do it recur-
sively, by using Lemma 11.1, as follows:
Exercise 11.1. Let S be the poset consisting of element 1, 2, 3, 4, 5, where 1 _ 1, 1 _ 2,
1 _ 3, 1 _ 4, 1 _ 5, 2 _ 2, 2 _ 3, 2 _ 5 3 _ 3, 3 _ 5, 4 _ 4, 4 _ 5, and 5 _ 5. Satisfy
yourself that this is a poset (does it satisfy the reexive, antisymmetric and transitive
laws?), then use Lemma 11.1 to compute (i, j) for all i, j in S with j _ i. In particular,
show that (5, 1) = 1.
There are two other ways (at least) of computing the Mobius function. One involves
computing inverses of matrices (which well consider in the problems). It is often easier,
however, to start with something very simple and build up the Mobius function for more
complicated posets. We will use the theorem below.
Denition 11.2 Let (S
1
, _) and (S
2
, _) be posets. The product poset is the Cartesian
product S
x
S
2
together with the relation (x, y) _ (x

, y

) i x _ x

and y _ y

.
Theorem 11.3 (Product Theorem). If (S
1
, _) has Mobius function
1
and (S
2
, _)
has Mobius function
2
, then the Mobius function for the product poset is given by

_
(x

, y

), (x, y)
_
=
1
(x

, x)
2
(y

, y),
when x _ x

and y _ y

(and zero otherwise).


Proof. As in the previous theorem, we proceed by induction on the size n of initial segments.
The case n = 1 is trivial. Suppose the cardinality of the initial segment of (x, y) is n, and
suppose the theorem is true for all smaller initial segments. Clearly, the theorem is true if
n = 1 (since
1
(x, x) = 1 and
2
(y, y) = 1 and
_
(x, y), (x, y)
_
= 1 = 1 1.
Now suppose the theorem is true for all smaller initial segments than that of the
element (x, y). Let (x

, y

) _ (x, y) (in other words, x

_ x and y

_ y). Assume (x

, y

) ,=
(x, y) since the result is trivial otherwise. Let I = (x, y)

(x

, y

) _ (x, y) _ (x, y),


and let I

= I (x

, y

). Let J = x[x

_ x _ x and K = y[y

_ y _ y. Now
either x

,= x or y

,= y, so either

xJ

1
(x, x) = 0 or

yK

2
(y, y) = 0 (by lemma
11.1).
Thus
_

xJ

1
(x, x)
_

_

yK

2
(y, y)
_
= 0
and so
0 =

(x,y)I

_
(x, y), (x, y)
_
=
_
(x, y), (x

, y

)
_
+

(x,y)I

_
(x, y), (x, y)
_
=
_
(x, y), (x

, y

)
_
+

(x,y)I

1
(x, x)
2
(y, y)
=
_
(x, y), (x

, y

)
_
+
_
_

xJ

1
(x, x)
_

_

yK

2
(y, y)
_

1
(x, x

)
2
(y, y

)
_
Thus

_
(x, y), (x

, y

)
_
=
1
(x, x

)
2
(y, y

),
as required.
Exercise 11.2. The poset in Problem 1 is the non-negative integers under the relation
. The Mobius function for that poset is (i, j) =
_
1 if i = j,
1 if i = j + 1,
0 otherwise.
Using this Mobius
function, and Theorem 11.2, re-derive the solution to Problem 1.
The poset in Problem 2 is the positive integers under the relation i[j (meaning that i
is a divisor of j). It is also a product (in the sense of Theorem 11.3) of copies of the poset
from Problem 1. Let (P
1
, [) be the poset consisting of all non-zero powers of the rst prime
p
1
= 2, under divisibility, and let (P
2
, [) be the poset consisting of all multiples of the second
prime p
2
= 3, under divisibility, etc. Any instance of Problem 2 will involve only a nite set
of integers in which there will be a largest prime. Call it p
k
. Thus we may restrict ourselves
to the poset P = P
1
P
2
P
3
P
k
. Note that (by unique factorization) this is just the
poset consisting of all positive integers (under divisibility) whose prime divisors are a subset
of p
1
, p
2
, . . . , p
k
. Note also that (P
i
, [) is isomorphic to the the poset from Problem 1
the non-negative integers under . Thus, on that poset (p
j
i
, p
k
i
) =
_
1 if j = k
1 if j = k + 1
0 otherwise
.
Thus, on (P, [), if n = p
f
1
1
p
f
2
2
p
f
k
k
and m = p
e
1
1
p
e
2
2
p
e
k
k
, then (n, m) =

(1)
(f
i
e
i
)
,
provided f
i
e
i
f
i
1 for all i, and (n, m) = 0 if the latter condition isnt met. We
may summarize this answer as follows:
Corollary 11.1 The Mobius function for the poset (P, [) (the positive integers under
divisibility) is given by (n, m) =
_
(n/m) if m[n,
0 otherwise,
where
(k) =
_
(1)
t(k)
(where t(k) is the number of prime divisors of k) if k is square-free
0 otherwise.
This is the familiar Mobius function from number theory.
What about Problem 3?
Exercise 11.3. Let I be the sub-poset of the poset from Problem 1, consisting of 0, 1
under the relation . Thus it has the same Mobius function, namely
(i, j) =
_
1 if i = j,
1 if i = j + 1,
0 otherwise.
If the set X from Problem 3 has n elements, show that the poset consisting of all subsets
of X, under the relation , is isomorphic to the product I I I (taken n times).
Thus the Mobius function for the latter poset is just
(A, B) =
_
(1)
#(A\B)
if B A
0 otherwise.
In other words, if f(A) =

BA
g(B), then
g(A) =

BA
(1)
(#(A)#(B))
f(B).
Mobius matrices. The Mobius function is actually an inverse matrix, but well show
this in the nite case only. Suppose our poset S = s
1
, s
2
, . . . , s
n
. There is a theorem
which says we can always arrange the indices so that whenever s
i
_ s
j
then i j. Let M
be the n n matrix whose entries satisfy
M
ij
=
_
1 if x
i
_ x
j
0 otherwise.
With our arrangement of indices, the matrix M will be upper-triangular, with all diagonal
elements equal to 1. Thus the determinant of M is 1, which means that M is invertible,
and all the entries of M
1
will be integers.
Exercise 11.4. Prove that the Mobius function for this lattice is given by (s
i
, s
j
) = N
ji
where N is the inverse of M. [Hint: Show that Lemma 11.1 is just a statement of the
relationship between M and its inverse.]
Exercise 11.5. Show that M (below) is the relation matrix for the poset in Exercise
11.1, and compute M
1
and verify that it gives the same values of the Mobius function as
obtained in Exercise 11.1.
M =
_
_
_
_
_
1 1 1 1 1
0 1 1 0 1
0 0 1 0 1
0 0 0 1 1
0 0 0 0 1
_
_
_
_
_
.

Vous aimerez peut-être aussi