Definition 1.2 (Perfect cover). A perfect cover of an -by- chessboard by -ominoes is an arrangement of -ominoes on the chessboard so that no two -ominoes overlap.
Proof. side is obvious: Place all dominoes vertically or horizontally.
side: Consider the cyclic coloring (generalization of the alternate black-white coloring):
|
It follows that, no matter how the -ominos are placed, each of them will over exactly one square of each of the colors.
We color the -board in this way. Suppose and . Then, we divide the chessboard as
Apparently, the and parts have the same number of squares for each color. If the whole board has a perfect covering, then the remaining part must also have the same number of squares for each color. WLOG, we can assume that (if not, switch the two dimensions of the board). Then, the top left corner of the part must be . By the nature of the cyclic coloring, occurs times (look at the diagonal) in this part, thus, so do other colors. That is, . We can infer from this that . □
Definition 1.3 (magic square). A magic square of order is an -array constructed out of the integers in such a way that the sum of each row, each column, and each diagonal is the same. The sum is called the magic sum of the magic square.
Method 1.1 (De La Loubère’s method). This is only for magic square of odd order. We consider a double infinite chessboard with the -th entry denoted by , where .
Steps:
Definition 2.1 (Nim Game). Suppose there are 2 players and heap containing coins, respectively.
Rules:
The game ends when all the heaps are empty. The player who takes the last coin wins.
Definition 2.2. Writing the sizes of heaps as binary numbers. A nim game is called balanced if the sums of bits are even on all positions.
Proposition 2.1 (From balanced to unbalanced). The removal of any amount of coins from any heap breaks the balance.
Proof. In binary representation, this is just subtracting multiple 1s, which turns some but necessarily all even positions to odd. This is because some position with sum 0 will borrow a 1 from the next position. A concrete example: two piles 110 and 110. Subtract 011 from the first pile, which becomes 0 1 1. The sums become 1 2 1 from 2 2 0. □
Proposition 2.2 (From Unbalanced to Balanced). A player can always turn an unbalanced state to a balanced one.
Proof. Suppose we have heaps and at least one of them is non-empty.
Suppose we add the restriction that each player can move only coins each time.
Definition 3.1 (Product Rule).
e.g. There are three cities A, B and C. Suppose you start from A, pass through B and end at C. There are ways from A to B, ways from B to C. Then the number of total ways from A to B to C is .
e.g. There are method to transport from A to B, by train, by car and by plane. These method have choices, respectively. Then there are total ways.
Theorem 3.1 (Pigeonhole Principle). Different descriptions:
Proof: by contradiction
Example 3.1. points are marked inside the area bounded by a rectangle that is cm long and cm wide. Show that there are at least points that are at most cm apart.
Proof: Divide the area into squares of cm. By the pigeonhole Principle, at least points will be in the same square, The biggest distance between a square is cm.
Theorem 3.2 (Pigeonhole Principle, Strong form). Different descriptions:
Proof: by contradiction.
Remark 1. Why I prefer the second description? The first description implies that (1) the objects are identical, (2) boxes have no size limits, and (3) the objects are distributed into boxes uniformly at random. While this scenario is valid, many applications of the Pigeonhole principle involve more complex conditions and relations between objects and boxes. Relying solely on the first description may make it unobvious or difficult to apply the theorem.
See
It is common to these examples that they cannot be simply modeled by randomly putting identical objects into boxes.
Corollary 3.1. When , we have the following: If objects are placed into boxes, then there is at least one box containing or more objects.
Example 3.2. If we draw distinct integers from , then there are always two which differ by 1.
Let be a non-negative integer variable representing the number of integers drawn from and . We have , but this upper bound does not affect us applying PP to derive .
Example 3.3. In a room there are 10 people. Their ages are given in whole numbers only and are between 1 and 60 (both included). Then, one can always find two disjoint non-empty groups of people (no need to cover all people) the sum of whose ages is the same. Can 10 be replaced by a smaller number.
(An observation irrelevant to PP) It suffices to find two different (but possibly overlapping) subsets of people with the same sum of ages. This is because we can take the intersection out of the two subsets to form two disjoint groups satisfying the condition (think of why).
For 10 people, there are subsets. The possible sum of ages ranges from 1 to 600. Let be a non-negative integer variable representing the number of subsets with the sum equal to . Then, . Note that we allow some redundancy here. E.g., the empty subset and the entire subset.
The result also holds for 9 people, though not that trivially provable because . We can prune out the easy case where there exists two people with the same age. Then, the sum of age can be at most .
Actually, the results still hold for 8 people but not 7 people. It’s no longer easy to use PP for the proof, which is reasonable because we only apply PP to partial information.
Example 3.4. Consider an undirected graph with 100 nodes. Each node has an even degree. Then, there must be three nodes with the same degree.
Let be a non-negative integer variable representing the number of nodes with degree , for . Then, a necessary but not sufficient condition for the problem is that . With this we can only infer that . To approach the intended result, we have to prune the case a bit:
Definition 3.3 (Permutation). Let be two integers with . A -permutation of a set of distinct elements is an ordered selection of elements arrangement from the set. The number of such permutations is denoted by
Definition 3.4 (Circular permutation). A circular -permutation of a set is an ordered selection of elements from arranged as a circle.
Generalized to multisets.
Definition 3.5. Let be a multiset of type ( distinct objects; is the count of the -th one). An -permutation of the multiset is an ordered arrangement of objects from , where the order among identical objects is disregarded.
Proof. Direct proof: Divide the number of permutations within each type of objects.
Alternatively, we can view this problem as distributing distinct positions to each type of objects, which becomes this combination problem 3.7. The number of ways is (See below). □
Method 3.1. We assign a direction to each integer : or . A permutation where each integer is given a direction is called a directed permutation. An integer in a directed permutation is called mobile if its arrow points to a smaller integer adjacent to it.
Now we present an algorithm to generate permutations of using directed permutations:
E.g., , , , , , .
Proof: TODO
Definition 3.6 (Combination). A -combination of a set of distinct elements is unordered selection of elements from the set.
The number of -combination of a set of distinct elements is denoted by (\binom{n}{k}).
Proof. -permutation can be obtained by ordering a -combination. Consequently,
From and , we can derive . □
Proof: Combinatorially by bijection principle.
Bijection Principle:
_______________________________________________________________________________________
_______________________________________________________________________________________
This is another way to solve “Permutation with multisets”.
Definition 3.7. An ordered collection of disjoint subsets of an -set (a partition with order) is called a combination of objects of type if and . The number of such combinations is denoted by .
In other words, this is the number of ways to distribute distinguishable objects to distinguishable boxes so that the sizes are .
Proof. Similar. Think of the segment as the objects distributed to the -th box. The order within this segment (box) does not matter, so we divide the number of interior permutations. We can map such a partition uniquely to a combination of type , and vice versa.
Alternatively, it is equal to
Definition 3.8. An -combination with repetition of a set of distinguishable objects is a selection of elements where each object can be selected unlimited times. The number of -combinations with repetition is denoted by .
Let be a multiset comprising infinitely many copies of objects in . Then the combination can also be viewed as an -combination of the multiset (without repetition, in usual sense).
E.g., objects: , a valid selection of elements: .
Proposition 3.3. is the number of ways to distribute indistinguishable balls to distinguishable boxes.
Interpretation: Every time choose one box to put in an object, with repetition allowed. Repeat times.
Proof. Stars and Bars: This problem can be represented as a sequence of bars and stars. The bars (together with head and tail of the sequence) mark cells, which correspond to objects respectively. The stars correspond to selections, and the number of stars in -th cell represents the times the -th object was selected. Note that there is a bijection from above sequences to -combinations, then the answer is the number of ways to choose OR positions out of . □
Corollary 3.3. is the number of solutions for the following equation of non-negative variables: .
Interpretation: Every time choose one variable (initially 0) to add , with repetition allowed. Repeat times.
Find the number of ways to select distinct numbers from so that no two numbers differ by 1.
Use the difference between the selected elements to rewrite the condition. Let be the selected elements sorted in ascending order. Let for , , and . Then the conditions are equivalent to:
The number of the solutions can be derived using the corollary above, .
We add a number and combine with for . Then, the condition is equivalent to choosing (combined) items such that no two overlap. There are empty spaces left, so the number of ways equals to the number of arrangements of (identical) dominos and (identical) empty spaces.
Find the number of solutions to the system: .
Let . Then, the condition is equivalent to . Thus, the system becomes . Note that the solutions to the two systems have one-to-one correspondence. The answer is .
That is, to generate the power set of a set.
Definition 3.9 (unit cube). The unit -cube is a graph whose vertex set is the set of 0-1 sequences of length , where two sequences are adjacent iff they differ in only one place.
Definition 3.10 (Gray code). A Gray code of order is a path of that visits every vertex of exactly once, i.e., a Hamilton path of .
A Gray code is called cyclic if it is a closed path (the first vertex is visited twice), i.e., a Hamilton cycle of .
We want to generate the power set as a (special) Gray code.
Definition 3.11 (reflected Gray code). The Gray codes obtained in the following way are called reflected Gray codes. It’s based on induction:
Inductive step: For , let be the reflected Gray code of order . Then, the one of order is constructed as:
It is easy to see that these are valid Gray codes.
Derivation 3.1. Note that, starting with , the sums of bits of the sequences in the reflected Gray code alternate in parity.
Based on the inductive construction above, we observe that:
Whenever the sum changes from odd to even, it corresponds to the joint of some reflection. Ignoring the prefix added later, at the joint, a 0 is added at the beginning of the previous sequence and a 1 for the next sequence, or the opposite occurs if the reflection is done an odd number of times.
Also, by the trait of reflection, the last sequence always differs with the first sequence in only the highest bit, i.e., it is (there can be no 0). Thus, one side of the joint must be and the other side . Therefore, we can find the rightmost index with 1, and flip the bit on the left to it.
Method 3.2. The following algorithm generates the reflected Gray code of order in order:
Definition 3.12 (Binomial coefficients). For any real number and integer , define the binomial coefficients
|
Theorem 3.9 (Newton’s binomial expansion). Let be a real number. If , then
|
Consequently, we have, for :
|
Proof. Apply the Taylor expansion for around :
TODO: It can be shown that the R.H.S. has a radius of convergence . Thus, the formula holds for .
Let . Then we can derive the second formula. □
Definition 3.13 (Unimodality). A sequence is said to be unimodal if there is an integer () such that .
E.g., the sequence of binomial coefficients (integer) is unimodal.
Definition 3.14 (log-concave). A sequence of positive numbers is said to be log-concave if for . This condition is equivalent to that the sequence is concave, i.e., .
Proof. is equivalent to . Discuss if is between two adjacent ratios. □
Four methods:
Definition 3.15 (inversion, inversion sequence, total disorder, sign). Let be a permutation of .
Theorem 3.10. For every (valid) inversion sequence, we can recover the original permutation using Method 3.3 or Method 3.4.
Method 3.3. Let be a valid inversion sequence.
Method 3.4. Let be a valid inversion sequence.
Proof: easy.
Define a “move” of a permutation as selecting an element and inserting it somewhere in the permutation. Find an algorithm to compute the minimal number of moves to restore an arbitrary input permutation of back to the natural order.
Observe that if we move two disjoint subsets and of , then the relative order among is the same as if we only perform the moves for , and so as .
Let be the minimal number of moves for . It is natural to consider first how to move to the right place (similar for 1). This can be done by moving directly or moving others to indirectly restore (or some combination). Suppose .
Thus, the other option is to move others only. We have to move to the left of because they are all smaller than . Again, by the observation, no matter how we move them, the relative order among does not change after the moves. We have to at least:
It turns out that these are enough because we can do the 2nd part first followed by the 1st part, in which we restore the order across the two subsets by the way.
Thus, .
Definition 3.16 (Cycle). Let be distinct elements in . We denote by the cycle . Additionally, we view this as a function mapping elements on the cycle to the next element and mapping other elements to themselves:
|
Remark: A cycle is invariant to “rotation” or “cyclical permutation”. E.g., still represents the same cycle.
_______________________________________________________________________________________
Definition 3.17 (Transposition). A transposition is a cycle of length 2. An adjacent transposition is a transposition with adjacent elements, of the form , where .
Derivation 3.2. Let be a non-adjacent transposition. Since , WLOG, we can assume . We try to insert some intermediate element in between. If we break into , then can be successfully swapped to position , but this introduces the position change of and puts wrongly on position . Then, we need to add another on the left to correct this. Thus, .
Generally, one can first use to swap to the target position , with the effect of moving to one position smaller.
Then, one can use to move back, by the way swapping to .
In summary,
_______________________________________________________________________________________
Definition 3.18 (Standard Cycle Notation). Let be a permutation of . We derive the standard cycle notation as follows:
The resulting function is called the standard cycle notation of that permutation, denoted by . Obviously, we have .
E.g., .
Proposition 3.6. We can remove the parentheses in a standard cycle notation and still recover the permutation.
Proof. In each cycle, the leading element should be strictly greater than the following elements. On the other hand, the leading elements are increasing. So we can identify the end of a cycle by finding the first element greater than the leading element. □
Definition 3.19. Let , where , denote the permutation of obtained from by deleting all the parentheses.
Derivation 3.3. Let denote the recovering function in the proposition above. is by definition an inverse function of (for any permutation , ). Thus, the latter one is a bijection.
Consider chains and anti-chains of subsets of .
Theorem 4.1 (Sperner’s Theorem). Every anti-chain of subsets of an -element set has size at most and it is achievable.
Proof. Let be an arbitrary anti-chain of subsets of and an arbitrary chain. It is easy to easy that is either 0 or 1 from the properties the intersection has to satisfy.
Now consider an arbitrary partition of the power set into disjoint chains . Then,
It follows that , which is the number of disjoint chains.
To find the with the largest size, it suffices to construct an and a partition such that their sizes are equal (it turned out to be feasible). The construction is done by induction on :
Induction: Based on the chain partition for .
Clearly, they are valid chains. Additionally, all possible subsets containing have been covered, so it is also a valid chain partition. P.S., this partition is a symmetric chain partion because it has the following two properties:
On the other hand, if we pick the subset with size in each chain (can be shown that it exists and is unique), they form an antichain (can be shown using the size). The length of this antichain is equal to the size of the chain partition, which is equal to because all subsets of size are included here. □
Lemma 4.2. Let be a finite poset (as we are counting the elements). For any chain of and anti-chain partition of ,
|
Likewise, for any anti-chain of and chain-partition of ,
|
Proof. . Similar for the other one. □
The following theorems state that the equality can be achieved.
Proof. [TODO: ] □
Proof. [TODO: ] □
Definition 4.2. A coloring is called proper if no two adjacent nodes receive the same color. The number of proper colorings is a polynomial function of , called the chromatic polynomial of , denoted by . Thus, it can be written in the form
We denote a complete graph of vertices by .
Theorem 4.4 (Ramsey Number). Given . A (edge-)coloring of by colors is said to satisfy the Ramsey property of type if there exists
Ramsey theorem states that there exists a smallest integer, , called the Ramsey number, such that, any coloring of satisfies the Ramsey property. This condition on is sometines denoted as .
No proof.
_______________________________________________________________________________________
Theorem 4.5 (Ramsey Theorem, more colors). Given . A -(edge-)coloring of by colors is said to satisfy the Ramsey property of type if there exists
Ramsey theorem states that there exists a smallest integer, , called the Ramsey number, such that, any -coloring of satisfies the Ramsey property. This condition on is sometines denoted as .
No proof
_______________________________________________________________________________________
We consider -uniform hypergraph, in which edges are -element subsets of the vertex set (i.e., undirectional). A -uniform complete graph with vertex set has the collection of all -element subsets of as its edge set. It’s called a complete -family of size , denoted by . The graph itself is denoted by .
Theorem 4.6 (Ramsey Theorem, hypergraph). Given . A -(edge-)coloring of by colors is said to satisfy the Ramsey property of type if there exists
Ramsey theorem states that there exists a smallest integer, , called the Ramsey number, such that, any -coloring of satisfies the Ramsey property. This condition on is sometines denoted as .
Proof: See a partial proof below.
Proof. Pigeon principle. □
Proof.
If , it’s easy to verify. Next, we consider .
We have to simultaneously satisfies the following two cases of coloring:
Since the Ramsey number is clearly , which always satisfies case 1, the condition becomes exactly equivalent to the condition for case 2. That is, .
In summary, we have .
Similar. Generalize the notion of “edges” in “case 1”.
Trivial when . Now, we only consider .
We have to satisfy the following two cases of coloring:
Since the Ramsey number has to be at least , which satisfies case 1, the condition is the same as the one for case 2. Thus, .
This proves the proposition.
_______________________________________________________________________________________
Proof. It can be easily proved using Lemma 4.3. Here, we give a proof purely based on the definition.
Let . We want to show that any coloring of satisfies the property. Fix a coloring. Consider choosing an arbitrary vertex . Let and define analogously. By Pigeonhole Principle, either or . WLOG, we assume the first case. Therefore,
Thus, satisfies the property. □
Proof. Induction on the sum of and . (Assume it is true for , …) □
E.g., .
_______________________________________________________________________________________
Proposition 4.5. The case is just Thm 3.2 Pigeonhole principle, strong form:
|
Proof: TODO
Proof. Consider . Any □
Theorem 5.1. Let be a finite set. Let be properties referring to the objects of . Let denote the set of elements satisfying in . The number of elements in satisfying none of the properties is given by
|
Proof. □
Let be a set (either finite or infinite). Let denote the set of functions from to . is a vector space (with usual addition and scalar multiplication). Moreover, is an algebra with usual product and identity .
Let be a weight function which is nonzero at only finitely many points.
The weight of a function is defined as (finite sum over the support).
We can verify that, for functions and constants (), . Thus, is a linear function from to , i.e., a linear functional on .
Theorem 5.2. Let be a finite or infinite set. Let be properties referring to the objects of . Let denote the set of elements satisfying in . Then,
|
Given a weight function on , as a corollary, we have
|
Proof. [TODO: ] □
Let be a finite set and be subsets of . We define two functions and on as follows:
|
Derivation 5.1. Applying the weighted inclusion-exclusion principle ((5.2)) to (), we have
Applying it to () (complement of the properties), we have
Adding and to the above results, we get:
Definition 5.1. A permutation of is called a derangement if no is placed at the -th position. The number of derangements of is denoted by .
Proposition 5.2. The derangement sequence satisfies the recurrence relation
|
with the initial conditions .
Proof. Consider how to satisfy the derangement requirement for the -th position. We can put any one from at the -th position. Fix . There are two cases:
Thus, . □
Derivation 5.2. Let denote the property that a permutation of has the integer in the -th position. Let denote the set of all permutations satisfying . We want to count .
For , . By the Inclusion-Exclusion principle, we have
Definition 5.3. A placement of indistinguishable rooks on an -by- board is called non-attacking if no two rooks share the same column or row.
For convenience, let us denote by the set of placements of non-attacking indistinguishable rooks on an -board. It is clear that there is a one-to-one correspondence between permutations of and placements in by placing the -th rook to . A rook placement in is said to satisfy the property if the rook in the -th row has column index in . Let denote the set of rook placements satisfying . Then,
Definition 5.4. A permutation of is called nonconsecutive if the consecutive words of length two
do not occur. We denote by the number of nonconsecutive permutations of .
Proof. Let be the property that occurs in the permutation and be the set of permutations with this property.
We have to know for . Notice that, unlike previous situations, the property involves two positions. Assume consists of consecutive segments, with length , respectively. . Then, there are in total remaining elements and groups free to arrange. The number of permutations in this case is , which happens to depend only on . [TODO: interpretation]
Then,
□
Proof. [TODO: ] □
Theorem 5.6. Let be a positive integer factorized into the form
where are distinct primes with powers . Then,
|
Proof. Hint: The number of integers from to divisible by distinct primes is . Use the Inclusion-Exclusion principle. □
Definition 6.1 (locally finite poset). A poset is called locally finite, if for any the closed interval is a finite set.
Definition 6.2. Let be a locally finite poset. The incidence algebra of is a tuple , where
The product is the convolution:
|
The red color emphasizes that the order is associated with the poset.
P.S. Why the variable in the convolution is taken instead of as usual? Actually, under the assumption that the incidence functions have a value for empty intervals, the usual convolution
is still well-defined: If , either or . Thus, either or . Therefore, .
We can check that
Definition 6.3. An incidence function is called an identity of the algebra if
|
There is a unique identity (using Method 6.1), which is the delta function defined by
|
Method 6.1. Given incidence functions and and an equation , we can solve inductively as follows:
|
Definition 6.4. Given an incidence function ,
Proposition 6.1. An incidence function is invertible iff for all (using Method 6.1).
[TODO: locally finite?]
Clearly, is invertible. Using Method 6.1, we can solve :
|
Lemma 6.1. Let be isomorphic posets, that is, there exists a bijection preserving the partial order:
|
Then, the induced map defined by
is an algebra isomorphism.
In particular,
Proof. [TODO: ] □
Given a finite . Let denote the set of functions . For every , we define the product as
|
Proof. The LHSs can be written as and , respectively. Then, apply the previous proposition. □
Let and be two posets. Then the partial order of the product poset is defined by
Proof. Following Equation (6),
We proceed by induction. Note that the length of the longest chain in is strictly smaller than the one of , so we induct on the length.
The sum can be decomposed into a product of two sums because comprises two “independent” conditions, and .
□
Definition 6.7. The poset with the partial order of divisibility is locally finite. Let be the Möbius function of . Then, the Möbius function of number theory is defined by
|
Proof. Using the poset isomorphism and Lemma 6.1, we have [TODO: ]. □
By Equation 6, we have
Derivation 6.1. Lemma 6.1
Its Möbius function is partially given by
Proof. by Möbius inversion 6.1. . □
Theorem 6.4. The Euler totient function (Defn. 5.5) and Möbius function are related by
|
Proof. Let . [TODO: is a bijection] . Thus, . □
Definition 6.8. Let , where , be a multiset of distinct elements. A circular -permutation of is an arrangement of elements of on a circle.
Theorem 6.5. The number of circular -permutations of a set of distinct objects with repetition allowed is
|
Proof. [TODO: ] □
Proof. [TODO: ] □
Definition 7.1. A sequence of numbers is said to satisfy a linear recurrence relation of order if there exist functions ’s, with , and a function such that
|
The linear recurrence relation in (7.1) is said to be homogeneous if for all and non-homogeneous otherwise.
A linear recurrence relation with constant coefficients has constant functions (excluding ).
A solution of the relation is a sequence satisfying the relation. A general solution is a solution with parameters and functions :
|
provided that for arbitrary initial values there exist constants such that (7.1) is the (unique) solution satisfying the initial conditions.
P.S. There can be many sequences satisfying the same linear recurrence relation. When we talk about the set of solutions / general solution, we refer to the case where the initial values are unspecified.
Let denote the infinite-dimensional vector space of all sequences under the ordinary addition and scalar multiplication.
Theorem 7.1. Let denote the set of solutions of a homogeneous linear recurrence relation. Then, is -dimensional subspace of .
Consequently, if are linearly independent solutions in , then all solutions in can be written as
|
Proof. It is easy to check that is a vector subspace.
To show that is -dimensional, we just need to find an isomorphism between and . Consider the projection defined by . Then, is an isomorphism. □
Corollary 7.1. Given a set of specific solutions of a homogeneous linear recurrence relation, any linear combination of them is also a solution.
Theorem 7.2. Let denote the set of solutions of a non-homogeneous linear recurrence relation. Let be the set of solutions of the corresponding homogeneous linear recurrence. Then, is a translate of in , i.e.,
|
(a.k.a. a -dimensional affine subspace of )
Geometrical intepretation: not through the origin
Proof. Let . Show that ( is cancelled). This proves that .
Conversely, show that, for any , is a solution. □
Method 7.1. By Theorem 7.2, we can summarize a general framework for finding the solutions to a nonhomogeneous linear recurrence relation:
Definition 7.2. Let be solutions in . Then the Wronskian of the solutions is defined as
|
i.e., the window of items of the solutions starting from position .
Derivation 7.1. Consider linear recurrence relation of order 1: . It is heuristic that the solution of it is a geometric sequence, . This hints that higher order relation with constant coefficients may have some solutions of the same form (not unique).
In this section, we consider homogeneous linear recurrence relations with constant coefficients.
Definition 7.3. Let be a homogeneous linear recurrence relation of order with constant coefficients:
|
Its characteristic equation is formed by substituting , defined as
|
Its characteristic polynomial is defined as
|
Proof.
Example 7.1. Fibonacci sequence: , for .
The characteristic equation is , with two roots . By Theorem 7.3 (b), the general solution is
Plugging this into and , we can obtain . Thus, the general formula for the Fibonacci sequence is
Definition 7.4. A number is a root of multiplicity of a polynomial if it occurs times in the multiset of roots. In other words, the polynomial can be decomposed as where is a polynomial with .
If is a nonzero root with multiplicity of the characteristic equation (7.3), then
|
are linearly independent solutions for (7.3).
Suppose the nonzero roots of the characteristic equation (7.3) are distinct values with the multiplicities respectively. Then
|
are linearly independent solutions of (7.3). Morever, their linear combinations form all solutions of (7.3).
Proof.
For every , is a solution.
Plugging into
we have (Hint, the coefficients here do not matter much)
Note that for . If we lift the degree of by multiplying it with , we have
Thus, .
Since the root has multiplicity , we can write the characteristic polynomial (7.3) as for some polynomial of degree . Then,
In this section, we consider nonhomogeneous linear recurrence relations with constant coefficients.
Theorem 7.5 (coefficient variation methods). Given a recurrence relation of the second order of the form
|
where are constants. Let be roots of its characteristic euqtion . Then (7.5) has a particular solution of the following forms, where is a constant to be determined:
Theorem 7.6 (not required). Given a recurrence relation of the second order
|
where is a polynomial with degree .
If , then there is a particular solution of the form
where ’s are constants to be determined. If , then a particular solution has the form
If , then the relation can be reduced to a first order recurrence relation
where .
Since , we can apply case (a). has degree 1, so a particular solution is . We can solve that .
The corresponding homogeneous relation has the general solution .
The general solution of the nonhomogenous relation is then . Plugging this into the intial conditions, we can obtain .
Definition 8.1. The ordinary generating function of an infinite sequence is the power series
The power series is said to have a rational form if, within its domain of convergence, it can be written as a quotient of two polynomials.
Theorem 8.1. Let be a positive integer. Let be the number of ways to distribute indistinguishable balls into distinct boxes. Then,
|
An algebraic proof is already provided in Remark 2.
combinatorial proof. The meaning of the LHS is clear.
Consider the expansion of the RHS without merging like terms. Every term is of the form
formed by multiplying ’s from the corresponding series. We view this as “1 way of distributing indistinguishable balls into distinguishable boxes,” achieved by “a conjunction of these independent events: distributing balls into -th box”.
Then, we collect the like terms. For every fixed ,
The addition here is viewed as a “disjunction of different kinds of ways to distribute balls”.
This precisely describe the process of enumerating all the ways to distribute the balls. □
Theorem 8.2 (generalized). Let be the number of ways to distribute indistinguishable balls into distinguishable boxes, such that the number of balls held in the -th box is allowed in a subset . Then,
|
Example 8.1. Let multiset . What is the generating function for , where is the number of -combinations of satisfying the following conditions? (1) occurs , , or times, (2) occurs at least times, (3) occurs a multiple of 3 number of times.
.
Definition 8.2. The exponential generating function of an infinite sequence is the power series
The power series is said to have a rational form if, within its domain of convergence, it can be written as a quotient of two polynomials.
Theorem 8.3. Let be a positive integer. Let be the number of ways to distribute distinct balls into distinct boxes. Then,
|
Proof. This is related to Combination with distinguishable boxes 3.7. Easy to prove algebraically. □
Theorem 8.4 (generalized). Let be the number of ways to distribute distinct balls into distinct boxes, such that the number of balls held in the -th box is allowed in a subset . Then,
|
Example 8.2. Determine the number of ways of -permutations of a multiset such that the number of is even and the number of is at least one.
Thus, for and .
Method 8.1. Suppose we have a recurrence relation of degree . To solve it,
This gives a formula of as a quotient of two polynomials. (E.g., Theorem 8.5)
Let be a sequence satisfying the homogeneous linear recurrence relation of order with constant coefficients (7.3). Then its generating function has a rational form, i.e.,
where is a polynomial of degree with a nonzero constant term and is a polynomial of degree strictly less than .
See the explicit formula in the proof.
Proof.
Let .
Thus,
WLOG, we can assume and . Let be a generating function. Suppose . Then (assuming for )
For , equating the coefficients of , we have
Therefore, the quotient can indeed be represented by a generating function and the sequence is given by the recurrence relation above.
Proposition 8.1 (partial fractions).
where are constants to be determined.
where are polynomials of degree , , , respectively.
No proof.
Let denote the number of ways to divide a labeled convex -polygon into triangles. We consider a partition (i.e., into distinct sets) of all divisions according to the first node connected with node 1 except node 2.
Suppose is the first node connected to node 1, then there must be a segment between node 2 and node . This leaves a polygon and an polygon free to divide.
The number of divisions under this category is .
We thus obtain the recurrence relation
Here, we define (the triangle collapse to a segment for a 2-polygon).
Consider the generating function .
Theorem 9.1. is the number of lattice paths along the edges of an grid ( square cells and vertices) from to , which do not pass above the diagonal.
Proof. Any lattice path from to have exactly right moves and up moves.
Let call a path “bad” if it passes above the diagonal. This happens iff it touches the next higher diagonal (red). Consider the first contact point of a bad path and the next higher diagonal. The portion of the path before (including) this point (black solid) has one more up move than right moves, and the portion after (including) it (red dotted) has one more right move than up moves. If we flip the latter portion about the next higher diagonal (red solid), the entire path has the same number of total moves, but with two more up moves than right moves. In conclusion, if a path is bad then it has right moves and up moves.
Conversely, if a path has right moves and up moves then it ends up at . To reach this ending point, the path must cross the main diagonal. Therefore, having right moves and up moves is the exact condition for the path to be bad.
Thus, .
Theorem 9.2. is the number of words of length consisting of exactly positive ones and exactly negative ones and satisfying
Proof. Similar. □
Definition 9.2. The first order difference sequence of a sequence defined as
|
The -th order difference sequence is the difference sequence of the sequence .
Viewing sequences as functions , we can represent the difference sequence in the following way.
Definition 9.3. Let denote the vector space of functions with the ordinary addition and scalar multiplication. The difference operator is defined by
|
Proof: trivial.
Proof. Observe that can be represented a linear combination 0-th order terms . Specifically, every “computation path” from to contribute to the sum. E.g.,
The coefficient is determined by the number of “right moves”, which flip the sign. For , it takes exactly moves, of which moves are to the left and moves are to the right. Thus, the final coefficient for is . □
Theorem 9.4. The difference table of a sequence can be determined by its -th diagonal sequence . Specially, the sequence itself can be determined by
|
This is an analogy with Taylor expansion.
Proof. Similar combinatorial explanation:
□
Proof. Use . □
Definition 9.5. A sequence is called a polynomial sequence of degree if it has the form
|
where ’s are constants and .
Proof. The 1st order difference sequence of a polynomial sequence of degree is a polynomial sequence of degree at most : This is because is a polynomial of degree .
Specially, the 1st order difference sequence of a polynomial sequence of degree is a zero sequence: . □
Proof. Discuss and . □
They are introduced by James Stirling in a purely algebraic setting (as connnection coefficients between monomials and falling polynomials) in 1730 and were rediscovered and given a combinatorial meaning by Masanobu Saka in 1782 [Mansour and Schork, 2015]. In the following, the definitions will be given by combinatorics and their algebraic meaning will be stated as theorems.
Definition 9.6. The Stirling numbers of the second kind, written , are defined as the number of ways to partition a set of labeled objects into nonempty unlabeled subsets.
We have for and for and assume .
Definition 9.7. The -th Bell number is the number of partitions of an -set into nonempty unlabeled subsets, that is,
Proposition 9.3. The Stirling numbers of the second kind satisfy the recurrence relation
|
with initial conditions
Proof. The initial conditions are easy to show.
To prove the recurrence, consider how to put the -th object based on partition of the first objects:
Definition 9.8. Let be a non-negative integer. The falling factorial polynomials in variable are defined by (refers to Defn 3.12)
|
The rising factorial polynomials are defined by
|
When is a non-negative integer, we have
Specially, for , .
combinatorial, when . is the number of ways to partition a set of labeled objects into nonempty labeled subsets.
Consider partitioning a set of labeled objects into labeled subsets of which are nonempty. Then the number of ways of such partitions is .
Then, the number of ways to deliver labeled objects into labeled boxes (with empty boxes allowed) can be written as
Proof. The middle term in Theorem 9.5 takes the same form as Equation (9.4). Since the inverse of the process of taking the difference is the process of taking the sum (refer to the difference table), . □
Definition 9.9. The (unsigned) Stirling numbers of the first kind, written , are defined as the number of permutations of elements with disjoint circles (Section 3.7.2).
We have for all and assume .
Proposition 9.4. For any , the (unsigned) Stirling numbers of the first kind satisfy
|
with initial conditions for all .
Proof. The permutations of a -set can be divided into two kinds:
Theorem 9.7 (algebraic meaning). The signed Stirling numbers of the first kind are the coefficients of in the expansion the falling factorial :
|
It is easy to see from the expansion of that the coefficient of is a product of negative numbers, so the sign of is . The unsigned Stirling numbers of the first kind satisfy
|
Definition 9.10. The elementary symmetric polynomials in variables are defined as the coefficients in the of in the expansion of the polynomial , i.e.,
Proof. [TODO: ] □
Plugging in the polynomial, we have
Thus, we have . We define .
Proof. Let be a variable. Fix . The following holds for any :
Thus, for any , the coefficient of is .
Similar for the other part. □
Definition 10.1 (Matching). Given a graph , a subset is a matching if no two edges in share a common endpoint.
A matching is said to be
Definition 10.2. A vertex subset of a graph is a vertex cover of if every edge of has an endpoint in . A vertex cover is said to be minimum if there is no vertex cover with fewer vertices.
Proof. The vertex cover has to contain at least one endpoint of each edge in the matching. □
Corollary 10.1. Let be a graph. If a matching and a vertex cover of have the same cardinality, then is a maximum matching and is a minimum vertex covering.
Theorem 10.1 (Kőnig’s theorem [Kőnig, 1931]2 ). If is a bipartite graph, then the number of edges in a maximum matching equals the number of vertices in a minimum vertex covering.
Proof. TODO □
Definition 10.3. Let be a family of nonempty subsets of a given set . A system of distinct representatives (SDR) of is a family of distinct members, where for all .
It is easy to see that:
Proposition 10.2 (graph theoretical formulation). Let be a family of nonempty subsets. Construct a bipartite graph with bipartite sets and and edge set . Then, has an SDR iff has a matching of size (i.e., an -perfect matching).
Definition 10.4. Let be a family of nonempty subsets of a given set . Then is said to satisfy the marriage condition (aka Hall’s condition) iff
|
It is obvious that the marriage condition is necessary for to have a system of distinct representatives. However, it turns out that this condition is also sufficient:
Theorem 10.2 (Hall [1935]). The theorem has two equivalent formulations:
graph theoretical. We only need to prove that if there does not exist an -perfect matching then the Hall’s condition does not hold.
If the maximum matching has fewer than edges, then, by Kőnig’s Theorem 10.1, the minimum vertex covering also has fewer than nodes. Let be a minimum vertex covering. Let . .
Edges connected with can only be covered by nodes in , implying that . Since , we have , violating the Hall’s conditions.
□
Definition 10.5. The stable matching problem is the problem of finding a stable matching between two equally sized sets of elements (men) and (women), where each element in one set has a total ordering about the other set.
A complete marriage (i.e., matching) is unstable if there exists two women and two men such that
In other words, there exist a pair of woman and man who both prefer each other to their current partner. Otherwise, the complete marriage is stable.
Proof. [TODO: ] □
D. Gale and L. S. Shapley. College admissions and the stability of marriage. The American Mathematical Monthly, 69(1):9–15, 1962. doi: 10.1080/00029890.1962.11989827. URL https://doi.org/10.1080/00029890.1962.11989827.
P. Hall. On representatives of subsets. Journal of the London Mathematical Society, s1-10(1):26–30, 1935. doi: https://doi.org/10.1112/jlms/s1-10.37.26. URL https://londmathsoc.onlinelibrary.wiley.com/doi/abs/10.1112/jlms/s1-10.37.26.
D. Kőnig. Gráphok és mátrixok. Matematikai és Fizikai Lapok, 38, 1931. URL https://real-j.mtak.hu/7307/.
T. Mansour and M. Schork. Commutation Relations, Normal Ordering, and Stirling Numbers. Chapman and Hall/CRC, 09 2015. doi: https://doi.org/10.1201/b18869.
G. Szárnyas. Graphs and matrices: A translation of "graphok és matrixok" by dénes kőnig (1931), 2020. URL https://arxiv.org/abs/2009.03780.