Professional Documents
Culture Documents
1 Graph Theory
1
1.1.2 Isomorphism
Two graphs G and G' are called isomorphic if there exists a one-to-one correspondence between the
vertices in G and the vertices in G' such that a pair of vertices are adjacent in G if and only if the
corresponding pair of vertices are adjacent in G'.
To be isomorphic, two graphs must have the same number of vertices and the same number of
edges.
Degrees of vertices are preserved under isomorphism, that is, two matched vertices must have
the same degree.
Two isomorphic graphs must have the same number of vertices of a given degree.
A subgraph G' of a graph G is a graph formed by a subset of vertices and edges of G.
If two subgraphs are isomorphic, then subgraphs formed by corresponding vertices and edges
must be isomorphic.
A graph with n vertices in which each vertex is adjacent to all the other vertices is called a complete
graph on n vertices, denoted Kn.
A complete graph on 2 vertices, K2, is just an edge.
Complete graphs are in a sense the building blocks of all larger graphs. Some smaller complete
subgraphs are joined in common vertices / or a common vertex.
Vertices which are of the same degree but do not match with one another, such that they are adjacent
are said to be mutually nonadjacent and they are called a set of isolated vertices.
Example 1 p.15 Tucker.
Symmetric Graphs
Two graphs could have a similar look with the same amount of vertices and edges.
If the two graphs exhibit symmetries, we start at one vertex and try to find a match between the two
graphs in a rotational symmetric way.
Break the graphs up into subgraphs of the neighbors of the selected vertices from both graphs.
The subgraphs must be matched isomorphic subgraphs to form a proper isomorphism.
Example 2 p.16 Tucker. (Look in textbook NB!!!)
Directed Graphs
The complement of a graph G is a graph G' with the same set of vertices but now with edges between
exactly those pairs of vertices not linked in G.
The union of the edges in G and G' forms a complete graph.
The two graphs G1 and G2 will be isomorphic if and only if G'1 and G'2 are isomorphic.
Look at description mid p.17 Tucker.
In general, if a graph has more pairs of vertices joined by edges than pairs not joined by edges, then its
complement will have fewer edges and thus will probably be simpler to analyze.
The number of edges pointed in toward a vertex is called the in-degree.
The number of edges that pointed out from a vertex is called the out-degree.
Look at example 3 p.17-18 Tucker.
2
In directed graphs there might be a difference in the directed path structure of two graphs that could be
exploited to proof non-isomorphism.
In these cases we seek for directed paths and directed circuits.
In example 3 p.17-18 the one graph contains directed paths and circuits from any vertex in the
graph. The other graph doesn't contain directed paths and directed circuits from all points.
Have a look again at this example.
Theorem 1:
In any graph, the sum of the degrees of all vertices is equal to twice the number of edges.
Proof:
Summing the degrees of all vertices counts all instances of some edge being incident at some
vertex. But each edge is incident with two vertices, and so the total number of such edge-vertex
incidences is simply twice the number of edges.
Corollary:
In any graph, the number of vertices of odd degree is even.
Proof:
For the sum of degrees to be an even integer, there must be an even number of odd integers in
the sum.
Impossible Graphs
Very Important!!!!!!!
In any graph, the number of vertices of odd degree is even.
Look at the explanation on p.7 of the notes.
Bipartite Graphs
A graph is bipartite if its vertices can be partitioned into two sets V1 and V2 and every edge joins a vertex
in V1 with a vertex in V2.
Bipartite graphs can be characterized by the fact that all circuits in such graphs have even length, where
the length of a circuit or path is the number of edges in it.
If there are no circuits, the graph is also bipartite.
3
Theorem 2:
A graph G is bipartite if and only if every circuit in G has even length.
Testing for a bipartite graph:
Pick any vertex, and put it on the left.
Put vertices joined to the vertex with even-length path on the left and vertices joined by an odd-
length path on the right.
If all the circuits in the graph are even-length, then theorem 2 will guarantee a bipartite graph.
If we end up with two vertices on the left or right that are adjacent, the graph cannot be bipartite.
Degree Sequence
The degree sequence of a graph is the sequence of the degrees of the vertices, with the numbers put in
ascending order, with repetitions as needed.
Scan p.10-12 notes. (Printout inside note file...)
4
If properly chosen the chord will force other chords to be drawn outside the circle.
If a chord is drawn inside the circle and it then forces another chord to be drawn outside the circle
and to cross some previous chord, we can claim the graph is non-planar.
If all chords can be added without crossing any other chords, then the graph is planar.
Examples 2&3 p.32-33 Tucker.
A subgraph is a K3,3 configuration if it can be obtained from a K3,3 bipartite graph by adding vertices in the
middle of some edges. (p.14 notes) (NB!!!!!!!!!)
K5 configuration is defined similarly. (p.14 notes)
1.2.2 Kuratowski
Theorem 1:
A graph is planar if and only if it does not contain a subgraph that is a K5 or K3,3 configuration.
We are talking about a configuration not a graph. (NB!!!!!!)
Most smaller non-planar graphs contain a K3,3 configuration. (NB!!!!!!!!)
The way to find a K3,3 configuration in a subgraph is to eliminate edge subdivisions in the graph (remove
each vertex of degree 2 and combine the two edges at each such vertex into a single edge). Fig 1.22c p.34
Tucker
5
1.2.4 Euler's Theorem
Theorem 2:
If G is a connected planar graph, then any plane graph of G has r=e-v+2 regions.
1. e=edges;
2. v=vertices.
6
1.3.1 Euler Cycles
An Euler cycle is a cycle that contains all the edges in a graph. (and visits each vertex at least once)
Properties of Euler Cycles:
A multigraph possessing of an Euler cycle will have an even degree at each vertex, since each time
the cycle passes through a vertex it uses two edges.
The multigraph must be connected.
Euler showed that these two properties are also sufficient to guarantee an Euler cycle.
Example 2 p.50 Tucker...
Connected and has even degree vertices.
Theorem 1:
An undirected multigraph has an Euler cycle if and only if it is connected and has all vertices of
even degree.
Proof:
If a multigraph G satisfies the two conditions, pick a vertex a and trace out a trail. (The trail will
terminate at the starting vertex)
At leaving a at the start, a will have an odd edge (1).
Let C be the cycle generated by the first trail and let G' be multigraph consisting of the remaining
edges of G-C.
The remaining graph G' must have vertices of even degree.
C and G' must have common vertices or else there is no path from vertices in C to vertices in G'.
Let a' be such a common vertex. Now build a cycle C' tracing through G' from a' just as C was
traced in G from a.
Incorporate C' into the cycle C' at a', to obtain a new larger cycle C'.
Repeat this process by tracing a cycle in the graph G'' of still remaining edges and incorporate the
cycle into C' to obtain C''.
Continue until there are no remaining edges.
Example 3 p.51-52 Tucker...
We now extend the Euler cycle to the Euler trail.
Euler trail:
An Euler trail is a trail that contains all the edges in a graph (and visits each vertex at least once,
can be more).
Each edge is used only once.
Corollary:
A multigraph has an Euler trail, but not an Euler cycle, if and only if it is connected and has
exactly two vertices of odd degree.
Proof:
Proof is explained properly in notes file p.22...
7
1.3.2 Hamilton Circuits
A Hamilton circuit in a graph is a cycle that includes all vertices of the graph exactly once.
A Hamilton path in a graph is a path that includes all vertices of the graph exactly once.
Our focus will be proving that a Hamilton circuit does not exist in particular graphs.
To prove nonexistence, we must begin building parts of a Hamilton circuit and then show that the
construction must always fail.
We use three simple rules that must be satisfied by the set of edges used to build a Hamilton circuit.
The idea is that any Hamilton circuit must contain exactly two edges incident to each vertex.
The three following rules must be satisfied:
If a vertex x has degree 2, both of the edges incident to x must be part of any Hamilton circuit.
No proper subcircuit, that is, a circuit not containing all vertices, can be formed when building a
Hamilton circuit.
Once the Hamilton circuit is required to use two edges at a vertex x, all other (unused) edges
incident at x must be removed from the consideration.
Example 1 p.57 Tucker...
Example 2 p.57-58 bottom Tucker... (First read p.57 bottom then example p.58)
Example 3 p.59-60 Tucker... (Both cases must be done)
Dirac
Theorem 1:
A graph with n vertices, n>2, has a Hamilton circuit if the degree of each vertex is at least n/2.
Grinberg
Theorem 3:
Suppose a planar graph G has a Hamilton circuit H.
1. Let G be drawn with any planar depiction, and let ri denote the number of regions inside
the Hamilton circuit bounded by i edges in this depiction.
2. Let r'i be the number of regions outside the circuit bounded by the i edges.
3. Then the numbers ri and r'i satisfy the equation i 2
(ri-ri)=0 .
4. Just as the inequity e<=3v-6 for planar graphs in the corollary in section 1.4 could be used
to prove that some graphs are not planar, Theorem 3 can be used to show that some
planar graphs cannot have Hamilton circuits.
Example 4 p.61 Tucker... (NB!!!!!!)
Example 5 p.62 - 63 Tucker... (NB!!!!!!)
8
Definition of a graph of an n-dimensional cube
The graph with one vertex for each n-digit binary sequence and an edge joining vertices that correspond
to sequences that differ in just one position is called an n-dimensional cube, or a hyper-cube.
n
An n-dimensional cube has 2 vertices, each of degree n.
It has the property that the longest path between any two vertices has length n.
Look at figure 2.9 p.62.
9
1.3.4 Coloring Theorems
The following three theorems are helpful in finding upper-bounds for chromatic numbers:
Let X(G) denote the chromatic number of the graph G.
Theorem 2 in section 1.3:
A graph is bipartite if and only if every circuit in G has even length.
X(G)<=2 if and only if G does not contain any circuit of odd length.
(Reason: A graph is bipartite if and only if it has a 2-coloring)
Being bipartite is the same as being 2-colorable, thus, a graph is 2-colorable if and only if
all circuits have even length.
Theorem 2 (Brooks):
If the graph G is not an odd circuit or a complete graph (Kn), then X(G)<=d, where d is the
maximum degree of a vertex of G.
If G is an odd circuit, then X(G)=3, and also X(Kn)=n, in both cases more than the maximum
degree.
The 4-Color Theorem:
If G is planar, then X(G)<=4.
1.4 Trees
1.4.1 Properties of Trees
A tree is a connected graph with no circuits. (In undirected graphs)
One may (but it is not necessary) choose a specific vertex of a tree, and call this vertex the root.
When we do choose a root, then it is possible to assign a direction to each edge away from the
root (in only one possible way), to form a new, directed tree.
This implies:
A rooted tree is a directed graph obtained in this manner from a tree with a root.
A graph with a designated vertex called the root has a unique path from the root to any other vertex in
the tree. (Directed and un-directed graphs)
If a tree is an undirected graph, then any vertex can be the root.
10
An undirected tree can be made into a rooted tree by choosing one vertex as the root and then directing
all edges away from the root.
Example on p.93 Tucker...
The level number of a vertex x in T is the length of the (unique) path from the root a to x.
Definitions:
For any vertex x in a rooted tree T, except the root, the parent of x is the vertex y with an edge
(,x) into x (the unique edge into x).
The children of x are vertices z with an edge directed from x to z. (Children have level numbers
one greater than parents)
Two vertices with the same parent are siblings.
Read p.94 mid Tucker... (NB!!!!!!!!!!!!!!!!!)
Theorem 1:
Let T be a connected graph, then the following statements are equivalent:
(a) T has no circuits;
(b) Let a be any vertex in T, then for any other vertex x in T, there is a unique path Px between a and x;
(c) There is a unique path between any pair of distinct vertices x,y in T;
(d) T is minimally connected, in the sense that the removal of any edge of T will disconnect T.
Proof of Theorem 1:
Note that (b) and (c) are immediately equivalent;
Let vertex a in (b) be vertex y in (c);
We shall show that (a) implies (d), (d) implies (c), and (c) implies (a).
(a)->(d): Suppose that the removal of some edge (a,b) does not disconnect T.
Let e=(u,v) be the first edge on P1, starting from a, that is not on P2 (Possibly, u=a or v=b).
T-e is disconnected by (d), so u and v must be in different components.
But following P2 from u to b and then coming back along P1 from b to v creates a path Q
connecting u and v.
Note: To make sure Q does not repeat any edges, we actually should follow P2 until the
first vertex w also on P1 is encountered (Such as w might occur before we get to b) and
then go back on P1 to v.
(c)->(a): T cannot contain a circuit, because the edge of a circuit provide two different paths joining
any two vertices that lie on the circuit.
11
Theorem 2:
A tree with n vertices has n-1 edges.
Proof:
Assume that the tree is rooted; if undirected, make it rooted as described earlier.
We can pair off a vertex x with the unique incoming edge (,x) from its parent.
Since each vertex except the root has such a unique incoming edge, there are n-1 non-root
vertices and hence n-1 edges.
Definitions:
Vertices of T with no children are called leaves of T.
Vertices with children are called internal vertices of T.
If every internal vertex of a rooted tree has m children, we call T an m-ary tree.
If m=2, T is a binary tree.
Theorem 3:
Let T be an m-ary tree with n vertices, of which i vertices are internal.
Then, n=mi+1.
Proof:
Each vertex in a tree, other than the root, is the child of a unique vertex. (its parent)
Each of the i internal vertices has m children, and so there are a total of mi children.
Adding one non-child vertex, the root, we have n=mi+1.
Corollary:
Let T be an m-ary tree with n vertices, consisting of i internal vertices and l leaves.
If we know one of n, i or l, then the other two parameters are given by the following formulas:
(a) Given i, then l=(m-1)i+1 and n=mi+1
(b) Given l, then i=(l-1)/(m-1) and n=(ml-1)/(m-1)
(c) Given n, then i=(n-1)/m and l=[(m-1)m+1]/m
Proof:
These formulas are all directly derived from n=mi+1 from theorem 3 and the fact that l+i=n.
Definitions:
The height of a rooted tree is the length of the longest path from the root or, equivalently, the
largest level number of any vertex.
A rooted tree of height h is called balanced if all leaves are at levels h and h-1.
12
Theorem 4:
Let T be an m-ary tree of height h with l leaves. Then:
h h
(a) l<=m , and if all leaves are at height h, l=m
(b) h>=
, and if the tree is balanced, h=
13
We then follow the following test:
Algorithm to test whether an undirected graph is connected:
Use a depth-first or breadth-first search to try to construct a spanning tree.
If all vertices of the graph are reached in the search, a spanning tree is obtained and the
graph is connected.
If the search does not reach all vertices, the graph is not connected.
An adjacency matrix of an (undirected) graph is a (0,1) matrix with a 1 in entry (i,j) if vertex xi and vertex xj
are adjacent; entry (i,j) is 0 otherwise.
A breadth-first spanning tree consists of shortest paths from the root to every other vertex in the graph.
(Special property!!!)
Constructing depth-first search trees is usually quicker.
Read p.31 mid in study guide (NB!!!!!!!!!!)
Depth-first search tree:
A preorder traversal of a tree is a depth-first search that examines an internal vertex when the vertex is
first encountered in the search tree.
A postorder traversal examines an internal vertex when last encountered (before the search backtracks
away from the vertex and its subtree).
If a tree is binary, we can define an inorder traversal that checks an internal vertex in between the
traversal of its left and right subtrees.
Important properties of preorder and postorder traversals:
In preorder traversal a vertex precedes its children and all its other descendants.
In a postorder traversal a vertex follows its children and all its other descendants.
Example p.109 mid Tucker...
14
Two approaches are used to solve the TSP:
1) The first approach is to systematically consider all possible ways to build Hamilton circuits in search of
the cheapest one.
It uses a "branch and bound" method to limit the number of different vertices in the search
tree that must be inspected in search of a minimal solution.
Each vertex in the tree will represent a partial Hamilton circuit, and each leaf in the tree will
present a complete Hamilton circuit.
The complete graph on n vertices has (n-1)! different Hamilton circuits.
The "branch and bound" method reduces substantially the number of circuits that must be
checked, although not enough to make it practical to solve large TSP's.
Example p.113-117 and 118 (figure) Tucker...
This is a huge amount of work to do.
2) The second approach is to construct a near-minimal solution using an algorithm that is quite fast.
15
Prim's Algorithm:
Repeat the following steps until tree T has n-1 edges:
Add to T the shortest edge between a vertex in T and a vertex not in T (initially pick any edge
of shortest length)
In both algorithms, if there is a tie for the shortest edge to be added, any of the ties edges may be chosen.
Example 1 p.131-132 Tucker...
The difficult part of the minimum spanning tree problem is proving the minimality of the trees produced by
the two algorithms.
Theorem:
Prim's algorithm yields a minimum spanning tree.
Proof:
For simplicity, assume that the edges all have different lengths.
Let T' be a minimum spanning tree chosen to have as many edges as possible in common with the
tree T* constructed by Prim's Algorithm.
If T*!=T', let ek=(a,b) be the first edge chosen by Prim's algorithm that is not in T'.
This means that the subtree Tk-1, composed of the first k-1 edges chosen by Prim's algorithm,
is part of the minimum tree T'.
In the figure, the edges of Tk-1 are in bold, ek's edge is dashed, and the other edges of T' are
drawn normally.
Since ek is not the minimum spanning tree T', there is a path, call it P, in T' that connects a to
b.
At least one of the edges of P must not be in Tk-1, for otherwise PUek would form a circuit in
the tree Tk formed by the first k edges in Prim's algorithm.
Let e* be the first edge along P (starting from a) that is not in Tk-1 (see figure). Note that one
end vertex of e* is in Tk-1.
If e* is shorter than ek, then on the kth iteration, Prim's algorithm would have incorporated
e* not ek.
If e* is greater than ek, we remove e* from T' and replace it with ek.
The new T' is still a spanning tree, but its length is shorter - this contradicts the minimality of
the original T'.
Look at figure in file notes p.43.
16
2 Enumeration
17
Important way of thinking in combinational problem solving:
Always try first to break a problem into a moderate number of manageable sub-problems.
There may be cleverer ways to solve the problem, but if we can reduce the original problem to a
set of sub-problems with which we are familiar, then we are less likely to make a mistake.
Permutation
A permutation of n distinct objects is an arrangement, or ordering, of the n objects.
From the multiplication principle we obtain P(n,n)=n!.
P(n,n)=n(n-1)(n-2)x...x3x2x1
r-Permutation
A r-permutation of n distinct objects is an arrangement using r of the n objects.
P(n,2)=n(n-1) (2-permutation of the n object)
P(n,3)=n(n-1)(n-2) (3-permutation of the n object)
P(n,r)=n(n-1)(n-2)x...x[n-(r-1)]=n!/(n-r)!
P(n,r)=n!/(n-r)! (n-permutation of the n object)
r-Combination
An r-combination of n distinct objects is an unordered selection, or subset, of r out of the n objects.
n Choose r.
C(n,r)=P(n,r)/P(r,r)=(n!/(n-r)!)/r!=n!/(r!(n-r)!).
n
C(n,r) is called binomial coefficients because of their role in the binomial expansion (x+y) .
Analytical Way 1
Pick which item goes in the first position, then which item goes in the second position, and so on.
Analytical Way 2
Pick which position to choose for the first item, which position to choose for the second item, and so on.
18
The Set Composition Principle
Suppose a set of distinct objects is being enumerated using the multiplication principle, multiplying the
number of ways to form some first part of the set by the number of ways to form a second part (for a
given first part).
The members of the first and second parts must be disjoint.
Another way to express this condition is:
Given any set S thus constructed, one must be able to tell uniquely which elements of S are in the
first part of S and which elements are in the second part.
Theorem 2 (p204)
The number of selections with repetition of r objects chosen from n types of objects is C(r+n-1,r).
Theorem 1 (p203)
If there are n objects, with r1 of type 1, r2 of type 2, ... , and rm of type m, where r1 + r2 + ... + rm = n, then
the number of arrangements of these n objects, denoted P(n; r1, r2, ... , rm), is:
P(n; r1, r2, ... , rm) = C(n,r1)C(n-r1,r2)C(n-r1-r2,r3)...C(n-r1-r2-...-rm-1,rm)
= n!/(r1!r2!...rm!)
2.1.4 Distributions
Generally a distribution problem is equivalent to an arrangement of selection problem with repetition.
Specialized distribution problems must be broken into sub-cases that can be counted in terms of
simple permutations and combinations (with and without repetition)
19
Basic Models for Distributions
Distinct Objects
The process of distributing r distinct objects into n different boxes is equivalent to putting the distinct
objects in a row and stamping one of the n different box names on each object.
The resulting sequence of box names is an arrangement of length r formed from n items (box
names) with repetition.
r
Thus there are nxnx...xn (r ns) = n distributions of the r distinct objects.
If ri objects must go in box i, 1<=i<=n, then there are P(r; r1, r2, ... , rn) distributions.
Identical Objects
The process of distributing r identical objects into n different boxes is equivalent to choosing an
(unordered) subset of r box names with repetition from among the n choices of boxes.
1. Thus there are C(r+n-1,r)=((r+n-1)!)/(r!(n-1)!) distributions of the r identical objects.
Integer Solutions
(NB!!!!!!!!!!!!!!)
1. We need to find an ordered set of integer values for the xis summing to a particular number.
2. Example 6 p.214 Tucker...
Binomial Theorem
n 2 k n
(1+x) = C(n,0) + C(n,1)x + C(n,2)x + ... + C(n,k)x + ... + C(n,n)x .
Pascal's Triangle
20
2.2 Generating Functions
Introduction to generating functions:
We illustrate the idea of generating functions with an example: Suppose you want to find the
number of ways of distributing 20 identical objects amongst 4 different boxes with
restrictions on the number allowed in each box.
For example, suppose you may not put more than 5 in the first box, you must put an odd number
in the second box, no fewer than 3 in the third box and a multiple of 5 in the fourth box. To
calculate the number of possible distributions using only combinations and permutations would be
incredibly tedious as you would have to consider many cases or think up a very clever trick. With
generating functions we can solve problems much harder than these with ease. The idea is the
following: With each box we associate a polynomial in x. The coefficient of each power of x in the
polynomial is 1. The powers of x appearing in the polynomial represent the possible number of
objects we may place in the corresponding box. So in our example our first polynomial will
5
contain all powers of x up to x , as we may put any number of objects up to 5 into the first box.
The polynomial associated with the first box is then (1 + x + x2 + x3 + x4 + x5) (remember 1 = x0
3 5 7
corresponding to putting none in this box). The second polynomial will then be (x + x + x + x +
3 4 5 5 10
...), the third (x + x + x + ...) and the fourth (1 + x + x + ...).
We now write the polynomials as a product:
2 3 4 5 3 5 7 3 4 5 5 10
(1 + x + x + x + x + x ) (x + x + x + x + ...) (x + x + x + ...) (1 + x + x + ...)
Now for the crucial observation. There is a bijection between
i) the distributions of 20 objects between the 4 boxes under the given constraints,
and
ii) choices of terms, one from each factor, such that the exponents of the product
of the terms sum to 20.
5 10 5
For example, choosing the term 1 in the first factor, x in the second, x in the third and x in the
5 10 5
fourth gives us a product 1x x x and this corresponds to the distribution: 0 in the first box, 5 in
the second, 10 in the third and 5 in the fourth.
Conversely, if we place, for example, 4 objects in the first box, 3 in the second, 3 in the third and
4 3 3 10
10 in the fourth, this corresponds to product x x x x .
The number of ways of distributing 20 objects among 4 boxes with the above constraints is
therefore exactly the number of products which can be obtained by taking one term from each
factor, such that the sum of the exponents of the terms is 20 and this is exactly the value of the
20
coefficient of x in the product of the four polynomials (since the product is obtained by taking
the products of terms, one from each factor, in all possible ways, and only those of which the
20
exponents add to 20 will contribute 1 to the coefficient of x ).
The number of ways of distributing 20 objects among 4 boxes with the above constraints is
20
therefore exactly the coefficient of x in the product above.
Hence, if we have constraints on the number of objects allowed in a certain box we only allow
the corresponding powers of x in the associated polynomial (easy!).
If you understand this, you understand why generating functions work, so make sure you do!
21
2.2.1 Generating Function Models
Three important points about generating function models:
1. The generating functions are more properly called ordinary generating functions.
1. This is done to distinguish them from exponential generating functions.
2. Ordinary generating functions can be used to model the following problems:
1. The number of integer solutions to a linear equation in several variables with constraints;
2. Selections with repetition, and distribution of identical objects in distinct containers
(study unit 8);
3. The distribution of identical objects in identical containers (section 6.3).
3. If you want to solve a specific combinatorial problem with generating functions, you first have to
generalize it.
1. For example, if you want to determine the number of selections with repetition of 10
objects from 20 types, you first have to set up the generating function for the number of
selections with repetition of r objects from 20 types, then find the coefficient ar, and
finally substitute r=10 into your answer.
If you want to model arrangements with repetition or the distribution of distinct objects in distinct
containers, you have to use exponential generating functions (study unit 11).
2.2.3 Partitions
A partition of a group of r identical objects divides the group into a collection of (unordered) subsets of
various sizes.
Thus, we can define a partition of the integer r to be a collection of positive integers whose sum is r.
Important explanation in file notes p.70.
22
2.2.4 A Summation Method
Do all examples in Tucker p.274-276
Theorem 1:
r
If h(x) is a generating function where ar is the coefficient of x , then h*(x)=h(x)/(1-x) is the generating
function of the sums of the ars. That is
h*(x)=a0+(a0+a1)x+(a0+a1+a2)x ++
xr+
2
23
Ways of solving Recurrence Relations
Examples 1 to 7 p280 - p483 in Tucker developed recurrence relation models either by breaking a
problem into a first step followed by the same problem for a smaller set or by observing the change in
going from the case of n-1 to the case of n.
There are two simple methods for solving the relations in examples 1 to 7 p280 - p483 in Tucker.
Recursive Backward substitution
Whenever an-1 occurs in the relation for an, we replace an-1 by the relation's formula for an-1 and then
replace an-2, and so on.
P284 top Tucker.
Guess the solution to the relation and then to verify it by mathematical induction
P284 in Tucker.
24
n
If 1, 2,..., r are the roots of ...4, then, for any i, 0<=i<=r, an= i is a solution to the recurrence
relation ...1.
It is easy to check that any linear combination of such solutions is also a solution
The explanation in the Study Guide p.77 is quite good on explaining this.
Look at equation ...5 p296...
2.4 Inclusion-Exclusion
Inclusion-exclusion formula is used to determine the number of elements in the union of sets, where these
sets are not disjoint.
Here we solve various combinatorial problems including the problem of arrangements with restricted
positions.
25
Memorize Theorem 1 p.232 Tucker.
Sk is the sum of the sizes of all k-tuple intersections of the Ais.
k n
The (-1) and (-1) is only to determine the + or - sign of a specific term in the formula.
Memorize Corollary of Theorem 1 on p.324 Tucker.
The corollary doesn't contain the N in the beginning and also the signs changes of the different S
terms.
Important:
To use this formula in a counting problem, one must select a universe U and a selection of sets Ai
in that universe such that the outcomes to be counted are subsets of elements in U that are in
none of the Ais.
That is, the Ais represent properties not satisfied by the outcomes being counted.
Important:
It is easy to mistake union problems, which use phrases such as with at least one empty box",
with standard inclusion-exclusion problems, which uses phrases such as "at least one object in
every box".
The former ask for at least one of a set of properties to hold, whereas the latter ask for every
property to hold.
Moreover, the latter problems must be solved by using the complementary properties, such as
"box i is empty", and determining all ways for none of these complementary properties to hold.
You have to reason carefully through a counting problem and determine whether to frame the
solution as counting outcomes where none of a set of properties hold or outcomes where one or
more properties hold.
Examples 1 and 2 on p.325-325 Tucker has direct reference.
The subscript Si's and the Ai's is another problem.
In example 1 the subscript of the A's is an ordinal (ordering) number.
A1 denotes the first set (in example 1 the set of all hands with a void in spades), A2 the
second set, A3 the third set,...
The S's is a cardinal (magnitude) number.
S1 is the sum of the sizes of all single sets, S2 the sum of the sizes of all pair-wise
intersections of sets, the sum of the sizes of all 3-way interaction of sets,...
Read the piece on p.327 Tucker on generating functions in the middle of the page...
Derangements:
If one is asked to find all the permutations of the sequence 1,2,...,n such that no number is left
fixed, that is, no number i is still in the ith position. Such rearrangements of a sequence are called
derangements.
The symbol Dn is used to denote the number of derangements of n integers.
The formula is on p.328 Tucker...
These derangements can be calculated more precisely using the simple recurrence relation on
p.328 Tucker...
26
2.4.3 Restricted Positions and Rook Polynomials
Here we solve the problem of counting arrangements where certain objects may not be put in certain
positions.
We denote these problems with a generalized chessboard of which certain blocks have been
shaded.
We use the inclusion-exclusion formula in the solution.
The solution is obtained by associating a polynomial with each such a chessboard.
This is then called the rook polynomial.
Theorems 1 & 3 are used to calculate the rook polynomial of a specific board.
Theorem 2 is then used to calculate the number of arrangements with restricted positions from the
coefficients of the rook polynomial.
See how theorem 1 is deduced from lemma 1 (p.335 - 339 Tucker) up to before example 1.
See also how theorem 2 is deduced from inclusion-exclusion formula.
It is not possible to obtain all rook polynomials as in example 1, by just using theorem 1.
A problem arises if the board cannot be decomposed into disjoint sub-boards.
A solution to this is to apply the recurrence relation derived after example 1, which is summarized
in theorem 3.
Example 2 shows you how to use both theorems 1 and 3 to obtain the rook polynomial of a board,
which is then used to solve a counting problem (with help from theorem 2).
In this section we look at this as a matching problem, matching letters with positions.
We want to count how many complete matchings there are.
We use the inclusion-exclusion formula to count the number of permissible arrangements.
Summary of the Rook Polynomials Theory:
Given a problem of counting arrangements or matchings with restricted positions, display the
constraints in an array with darkened squares for forbidden positions. (fig 8.7 p.335 Tucker)
Try to rearrange the array so that the board B of darkened squares can be decomposed into
disjoint sub-boards B1 and B2.
By inspection, determine the Rk(Bi)'s, the number of ways to place k non-capturing rooks on sub-
board Bi.
Use the Rk(Bi)'s to form the rook polynomials R(x,B1) and R(x,B2), and multiply R(x,B1)R(x,B2) to
obtain R(x,B).
Insert the coefficients Rk(B) of R(x,B) in theorem 2...
Example 1 & 2 are very good examples and explains the technique and the application of all three
theorems very clearly. Look at all markings in this section that has been marked NB!. They are all pointers
on what is important and should not be missed.
Also look at Shaum's Combinatorics p.75 - p.83
27