组合数学 (Spring 2014)/Sieve methods
Contents
Principle of Inclusion-Exclusion
Let and be two finite sets. The cardinality of their union is
- .
For three sets , , and , the cardinality of the union of these three sets is computed as
- .
This is illustrated by the following figure.
Generally, the Principle of Inclusion-Exclusion states the rule for computing the union of finite sets , such that
In combinatorial enumeration, the Principle of Inclusion-Exclusion is usually applied in its complement form.
Let be subsets of some finite set . Here is some universe of combinatorial objects, whose cardinality is easy to calculate (e.g. all strings, tuples, permutations), and each contains the objects with some specific property (e.g. a "pattern") which we want to avoid. The problem is to count the number of objects without any of the properties. We write . The number of objects without any of the properties is
For an , we denote
with the convention that . The above equation is stated as:
Principle of Inclusion-Exclusion - Let be a family of subsets of . Then the number of elements of which lie in none of the subsets is
- .
- Let be a family of subsets of . Then the number of elements of which lie in none of the subsets is
Let . Conventionally, . The principle of inclusion-exclusion can be expressed as
Surjections
In the twelvefold way, we discuss the counting problems incurred by the mappings . The basic case is that elements from both and are distinguishable. In this case, it is easy to count the number of arbitrary mappings (which is ) and the number of injective (one-to-one) mappings (which is ), but the number of surjective is difficult. Here we apply the principle of inclusion-exclusion to count the number of surjective (onto) mappings.
Theorem - The number of surjective mappings from an -set to an -set is given by
- .
- The number of surjective mappings from an -set to an -set is given by
Proof. Let be the set of mappings from to . Then .
For , let be the set of mappings that none of is mapped to , i.e. , thus .
More generally, for , contains the mappings . And .
A mapping is surjective if lies in none of . By the principle of inclusion-exclusion, the number of surjective is
- .
Let . The theorem is proved.
Recall that, in the twelvefold way, we establish a relation between surjections and partitions.
- Surjection to ordered partition:
- For a surjective , is an ordered partition of .
- Ordered partition to surjection:
- For an ordered -partition of , we can define a function by letting if and only if . is surjective since as a partition, none of is empty.
Therefore, we have a one-to-one correspondence between surjective mappings from an -set to an -set and the ordered -partitions of an -set.
The Stirling number of the second kind is the number of -partitions of an -set. There are ways to order an -partition, thus the number of surjective mappings is . Combining with what we have proved for surjections, we give the following result for the Stirling number of the second kind.
Proposition - .
Derangements
We now count the number of bijections from a set to itself with no fixed points. This is the derangement problem.
For a permutation of , a fixed point is such an that . A derangement of is a permutation of that has no fixed points.
Theorem - The number of derangements of given by
- .
- The number of derangements of given by
Proof. Let be the set of all permutations of . So .
Let be the set of permutations with fixed point ; so . More generally, for any , , and , since permutations in fix every point in and permute the remaining points arbitrarily. A permutation is a derangement if and only if it lies in none of the sets . So the number of derangements is
By Taylor's series,
- .
It is not hard to see that is the closest integer to .
Therefore, there are about fraction of all permutations with no fixed points.
Permutations with restricted positions
We introduce a general theory of counting permutations with restricted positions. In the derangement problem, we count the number of permutations that . We now generalize to the problem of counting permutations which avoid a set of arbitrarily specified positions.
It is traditionally described using terminology from the game of chess. Let , called a board. As illustrated below, we can think of as a chess board, with the positions in marked by "".
For a permutation of , define the graph as
This can also be viewed as a set of marked positions on a chess board. Each row and each column has only one marked position, because is a permutation. Thus, we can identify each as a placement of rooks (“城堡”，规则同中国象棋里的“车”) without attacking each other.
For example, the following is the of such that .
Now define
Interpreted in chess game,
- : a set of marked positions in an chess board.
- : the number of ways of placing non-attacking rooks on the chess board such that none of these rooks lie in .
- : number of ways of placing non-attacking rooks on .
Our goal is to count in terms of . This gives the number of permutations avoid all positions in a .
Theorem - .
Proof. For each , let be the set of permutations whose -th position is in .
is the number of permutations avoid all positions in . Thus, our goal is to count the number of permutations in none of for .
For each , let , which is the set of permutations such that for all . Due to the principle of inclusion-exclusion,
- .
The next observation is that
- ,
because we can count both sides by first placing non-attacking rooks on and placing additional non-attacking rooks on in ways.
Therefore,
- .
Derangement problem
We use the above general method to solve the derange problem again.
Take as the chess board. A derangement is a placement of non-attacking rooks such that none of them is in .
Clearly, the number of ways of placing non-attacking rooks on is . We want to count , which gives the number of ways of placing non-attacking rooks such that none of these rooks lie in .
By the above theorem
Problème des ménages
Suppose that in a banquet, we want to seat couples at a circular table, satisfying the following constraints:
- Men and women are in alternate places.
- No one sits next to his/her spouse.
In how many ways can this be done?
(For convenience, we assume that every seat at the table marked differently so that rotating the seats clockwise or anti-clockwise will end up with a different solution.)
First, let the ladies find their seats. They may either sit at the odd numbered seats or even numbered seats, in either case, there are different orders. Thus, there are ways to seat the ladies.
After sitting the wives, we label the remaining places clockwise as . And a seating of the husbands is given by a permutation of defined as follows. Let be the seat of the husband of he lady sitting at the -th place.
It is easy to see that satisfies that and , and every permutation with these properties gives a feasible seating of the husbands. Thus, we only need to count the number of permutations such that .
Take as the chess board. A permutation which defines a way of seating the husbands, is a placement of non-attacking rooks such that none of them is in .
We need to compute , the number of ways of placing non-attacking rooks on . For our choice of , is the number of ways of choosing points, no two consecutive, from a collection of points arranged in a circle.
We first see how to do this in a line.
Lemma - The number of ways of choosing non-consecutive objects from a collection of objects arranged in a line, is .
Proof. We draw a line of black points, and then insert red points into the spaces between the black points (including the beginning and end).
This gives us a line of points, and the red points specifies the chosen objects, which are non-consecutive. The mapping is 1-1 correspondence. There are ways of placing red points into spaces.
The problem of choosing non-consecutive objects in a circle can be reduced to the case that the objects are in a line.
Lemma - The number of ways of choosing non-consecutive objects from a collection of objects arranged in a circle, is .
Proof. Let be the desired number; and let be the number of ways of choosing non-consecutive points from points arranged in a circle, next coloring the points red, and then coloring one of the uncolored point blue.
Clearly, .
But we can also compute as follows:
- Choose one of the points and color it blue. This gives us ways.
- Cut the circle to make a line of points by removing the blue point.
- Choose non-consecutive points from the line of points and color them red. This gives ways due to the previous lemma.
Thus, . Therefore we have the desired number .
By the above lemma, we have that . Then apply the theorem of counting permutations with restricted positions,
This gives the number of ways of seating the husbands after the ladies are seated. Recall that there are ways of seating the ladies. Thus, the total number of ways of seating couples as required by problème des ménages is
The Euler totient function
Two integers are said to be relatively prime if their greatest common diviser . For a positive integer , let be the number of positive integers from that are relative prime to . This function, called the Euler function or the Euler totient function, is fundamental in number theory.
We now derive a formula for this function by using the principle of inclusion-exclusion.
Theorem (The Euler totient function) Suppose is divisible by precisely different primes, denoted . Then
- .
Proof. Let be the universe. The number of positive integers from which is divisible by some , is .
is the number of integers from which is not divisible by any . By principle of inclusion-exclusion,
Reference
- Stanley, Enumerative Combinatorics, Volume 1, Chapter 2.
- van Lin and Wilson, A course in combinatorics, Chapter 10, 25.