Note:
The following results are all proved informally in lectures.
Proposition.
In any party with at least two people, there are two people that are friends with the exact same number of guests.
Proof:
Label rooms and place each guest in room if they are friends with other guests. The result is proved when one room has at least two people. But notice that room and room cannot both be nonempty simultaneously. Thus there can only be at most nonempty rooms. The pigeonhole principle hence proves the claim.
The party problem.
In any party with at least six guests, there are three mutual friends or three mutual strangers.
Proof:
Fix a guest and denote by the set of guests that are friends with and by the set of guests that are not friends with . By the pigeonhole principle, either or . Without loss of generality (by interchanging all friends with strangers and vice versa), suppose the former happens. Then, select three guests in . Either they are mutual strangers, in which case I am done, or two of them are friends, thus with the three are mutual friends.
A glimpse into Ramsey theory (out of scope of this course)
Corollary (Schur, 1916).
Split the naturals into two disjoint sets. Then, there are naturals and in the same set such that .
Another way of interpreting the above result is: I can find a set of size two all of whose finite sums are inside the same set. What is the largest size of such a set guaranteed to exist?
- There is always a set of size 2: Schur, 1916. (This is slightly stronger than the above, can you see why?)
- There is a set of any arbitrarily large finite size: Folkman-Rado-Sanders, 1969.
- You can always find an infinite such set: Hindman, 1974. (This requires significantly heavy machinery from set theory.)
Perhaps the result that gives this theory its name is the one below.
The finite Ramsey theorem for graphs, 1930.
For any positive integers with , there is a natural such that for any function , there is an such that is constant.
Very hard exercise.
Prove the above theorem for colors.
Hint.
Use induction on . The case when is trivial. The case when is the Party problem from before (thus works). You need to repeat this idea by dividing into two pieces, like in the Party problem, but then each of those pieces needs to be further split into two smaller pieces.
Graphs
Definition of graph.
A graph is a pair where is any set, called the vertex set, and is called the edge set.
When there is risk of confusion, I write and to clarify to the reader what graph I am referring to.
Instead of writing an edge as , I will write .
Common properties of graphs.
- The neighbors of a vertex are the elements of .
- The degree of a vertex is the number of neighbors. . For a finite nonempty graph , the minimum and maximum degree are denoted by and respectively.
- If , is called -regular.
- and are called the order and size of respectively; in the context of graphs, these are always denoted by and respectively.
Named examples of graphs
- The complete graph of order is the graph where is the vertex set and .
- The discrete graph of order is the graph .
- The path of length is the graph .
- The cycle of order is the graph .
- The complete bipartite graph of size is the graph that consists of two disjoint sets of sizes and , where two vertices are connected if and only if they are in different sets.
Exercise.
Determine all the common properties of the graphs mentioned in this subsection.
Handshaking lemma.
For any finite graph ,
This proof illustrates an important combinatorial technique called double counting.
Proof:
In lectures.
Say a vertex is odd if it has odd degree.
Corollary.
In any graph, the number of odd vertices is even.
Proof:
Reduce the equality given in the handshaking lemma modulo 2.
Subgraphs
Definition.
A graph is a subgraph of if is obtained from by removing edges or vertices. Formally, and . I also say that contains . I employ the notation to denote that is a subgraph of .
Exercise.
Let be a finite graph. Prove that if , then contains a cycle. Moreover, it contains a cycle with more than edges.
Show, with an example, that if is infinite then the conclusion might fail. What can you conclude in this case?
Solution in Tutorial 9.
A special case that deserves attention is that of paths as subgraphs. There are two very natural ways of formalizing the idea of “getting from one vertex to another”. For this, I need to introduce the following formality.
Morphisms between graphs
Definition.
Let and be two graphs. A function is called a graph homomorphism (also called an adjacency-preserving map) if
I abbreviate the fact that has this property by simply writing . Note that this is a slight abuse of language, but this will never cause confusion.
Moreover, if I don’t want to specify what is, I write when there is such a graph homomorphism.
Examples.
- The identity is always a graph homomorphism. Thus, . (Reflexivity)
- If , then the inclusion map is a graph homormorphism. In other words, if then . (Monotonicity)
- If and , then . (Transitivity)
Exercise.
For two cycles, if and only if is even, or is odd and .
Definition.
Let be a graph and two distinct vertices. If (recall that is the path of length defined earlier) satisfies that (the starting point) and (the endpoint), I call a walk between and .
If, in addition, happens to be injective, then I call a path between and .
Intuitively, walks can repeat vertices and contain cycles. Paths cannot.
Examples.
- Removing a single edge from a cycle produces a path.
- Draw a figure 8 and remove some edge of endpoints of degree 2. The remaining graph is a walk between and that is not a path.
Exercise.
If there is a walk between two vertices, then there is a path between the same vertices.
Solution in Tutorial 9.
You might be interested to learn that something as simple as deciding whether for an arbitrary graph , or , is an NP-complete problem, meaning that if you discover a deterministic polynomial time algorithm that decides it, you will have effectively solved every NP problem and answered one of the most important open problems in the history of mathematics and computer science.
An application: scheduling problems
Your university has a bunch of courses: MAT224, MAT246, MAT237, etc. Students can be enrolled in multiple courses. You need to schedule the exams so that every student can attend without conflicts.
- Some students take both MAT224 and MAT246,
- (make up some other restrictions yourself, I’m lazy…)
If you model this problem as a graph , where are the courses and is determined by whether some students take those courses at the same time, then finding a homomorphism for a minimal is equivalent to solving this scheduling problem efficiently. Here, is the number of timeslots you need to assign and the vertices of label these timeslots. So, for instance, you can find a trivial solution with where every course gets its own unique timeslot. But, if you want to save time and money, you should schedule exams for disjoint courses at the same time, saving one timeslot.
Exercise.
What is the optimal for when is a cycle?
Exercise.
What if you don’t care about students taking MAT246 and MAT224 at the same time because, say, those students can take a single exam for both courses or something. How do you model additional restrictions where some pairs of courses are allowed to conflict with each other?
What if two or more courses share the same coordinator and must be scheduled at different times independently of the students? How do you model this?
Hard. What if the timeslots are all fixed but some of them are close together, and you want to avoid students writing finals on consecutive days. How do you model this situation?
Hint.
- Remove edges from .
- Add edges to .
- Remove edges from .
Isomorphisms and automorphisms
The most important types of morphisms are defined here.
Definition.
Two graphs and are isomorphic, denoted , if there is a bijection such that
Such a function is called an isomorphism. Equivalently, a bijection between vertex sets is an isomorphism if
If in addition , then is called an automorphism.
The group (I didn’t define group in this course, but calling this a set is sufficient for my purposes) of all automorphisms of is denoted by .
Remark.
In the class of all graphs, is an equivalence relation.
Warning:
You might be tempted to think that and if and only if , but you’d be wrong.
Hard exercise ( is not antisymmetric).
Find two finite non-isomorphic graphs and such that and . You can even find such graphs of different orders.
Note:
Most examples are seen in lectures as it requires sketching on the board.
Exercise.
Given a graph, you can extract a sequence of naturals called the degree sequence, which is all the degree written in decreasing order. Prove that isomorphic graphs have equal degree sequence.
Then construct two non-isomorphic graphs with the same degree sequence.
Exercise.
Let be a graph. The complement of , denoted is the graph on the same vertex set where .
Prove that .
Exercise.
Is there a graph such that ?
More named examples of graphs
- The Kneser graph where is the graph with vertex set , where two sets are adjacent if and only if they are disjoint.
- The line graph of a graph is the graph with vertex set , where two edges of are adjacent in if and only if they share a vertex (their intersection is a singleton).
Exercise.
- Prove that for .
- Prove that for .
Symmetry
Definition.
Two vertices are called similar if there is such that .
The set of all vertices similar to is called the orbit of .
Examples.
- The two endpoints of a path are similar. How many orbits are there?
- The center of an odd path is not similar to any vertex. Its orbit is a singleton.
- All vertices of a cycle are similar to each other, meaning there is a single orbit.
- The complete and discrete graphs have a single orbit.
One can define an analogous notion for edge-similarity.
Exercise.
Prove that vertex similarity is an equivalence relation on , and that orbits are precisely the equivalence classes.
Hard exercise.
Prove that in a finite graph , the number of elements of any orbit divides .
Since the identity is an automorphism of any graph , is always nonempty. In fact, if is the number of vertices of , then .
Exercise.
Prove that for all graphs , . Then construct graphs and such that and .
Hard. can you find an infinite such graph ?
A graph is called asymmetric if . Equivalently, if all its orbits are singletons, or if no pair of vertices are similar.
Hard exercise.
Prove that all asymmetric graphs have order or more. Prove that for ever there is an asymmetric graph of order .
Very hard. Is there a regular asymmetric graph?
Hint.
Yes, there is. The smallest such graph has 10 vertices.
Exercise.
Is there a non-trivial graph where all vertices are similar but not all the edges?
Very hard.Actually easy. What about the other way around?
Exercise.
Suppose that . Join the first and third vertices of the path to every vertex of to obtain a new graph . Prove that .
Connectivity and trees
Definition.
Two vertices in a graph are said to be connected if there is a path in between and .
Examples.
- Any two vertices on a path are connected by a subgraph of that path, which is also a path.
- Any two vertices on a cycle are connected by two paths whose edges are disjoint.
Exercise.
Prove that connectedness is an equivalence relation on . The equivalence classes are called the components of .
Definition.
A graph is connected if it has a single component. That is, if every pair of vertices is a pair of endpoints of some path in .
A tree is a connected graph with no cycles.
Examples.
- Any component of a graph, seen as a subgraph, is connected.
- Paths, cycles and complete graphs are all connected.
- Discrete graphs with more than one vertex are not connected.
Exercise.
- Prove that any graph isomorphic to a connected graph is also connected.
- Any graph isomorphic to a tree is also a tree.
Theorem.
Any finite tree with at least two vertices has at least two vertices of degree 1.
Proof in Tutorial 9.
Corollary.
Let be a finite graph with -many components. Then either contains a cycle or it contains vertices of degree 1.
Exercise.
Is the above theorem true if you remove the word ‘finite’?
Theorem.
For any finite tree , .
Proof:
By induction on the order of the tree. Clearly, if , the result holds.
If , then contains a vertex of degree 1 . Then must satisfy the inductive hypothesis, but this new tree has exactly one vertex and one edge fewer than , so the result follows.
Exercise.
Is the converse of the above theorem true? That is, if is connected and has one edge fewer than vertices, must it be a tree?
Hard exercise (symmetries of finite trees).
Prove that if is a finite tree, then either contains only the identity, or it contains an element such that is the identity.
Construct a finite graph with one cycle in which the above conclusion fails. That is, such that contains more than one element, and for every , is not the identity.
Hint.
- Start with a cycle and append subgraphs to the vertices to break the reflection symmetries but preserving some rotational symmetries.
Very hard exercise (infinite trees).
A branch is an infinite path in a tree , that is, an injection .
Prove that every infinite tree with has a branch (König).
Construct an infinite tree with no branches.
Construct a tree such that is countable, but with uncountably many branches.
Hint.
- Pick a starting vertex and recursively apply the infinite pigeonhole principle: some must be such that is infinite.
- Define the tree on the decreasing sequences in . A branch would violate the well-ordering principle.
- Consider ordered by extension. The branches correspond to .
Bipartite graphs
Definition.
A graph is called bipartite if .
Recall that is a just an edge. As an exercise, try proving the following result on your own to understand the intuition behind bipartite graphs.
Proposition.
Prove that the following are equivalent for any graph .
- is bipartite.
- Any component of is bipartite.
- There is a set such that every edge of has an endpoint in and the other in .
- You can color the vertices of in two colors such that adjacent vertices always get different colors.
Examples.
- Paths are bipartite.
- Complete bipartite graphs are bipartite.
- Even cycles are bipartite but odd cycles are not. A much stronger result is true, see below.
Theorem.
A finite graph is bipartite if and only if it contains no odd cycle.
Proof:
Suppose that is bipartite, that is . If contained an odd cycle , then in particular . By transitivity, , contradicting the above example.
Conversely, suppose that all cycles of are even. For every component of , fix a vertex and define as the length of the shortest path between and whatever vertex of the form is in the same component as . Define and convince yourself that , as desired.
Remark.
The theorem above and corollary below are also true for infinite graphs by a compactness argument, for example the De Bruijn–Erdős theorem. The proof is outside of the scope of the course.
Corollary.
All finite trees are bipartite.
The hypercube
This section deals with a graph I personally find interesting, as it lies in the intersection of the chapters Infinity, Combinatorics, and Topology.
First, let me define the Boolean lattice graph . Consider , the set of all binary sequences of length , as vertex set and make two sequences adjacent if they differ in exactly one coordinate (or bit). Thus, for instance, and are adjacent in , but and are not.
For instance, has just a single edge . is isomorphic to the square . when drawn looks like a three-dimensional cube. looks like a tesseract. You get the idea.
Proposition.
For all positive integers ,
- is connected;
- is -regular; and
- is bipartite.
Proof:
For 3, define as the set of sequences with an even number of ‘s. Then every edge has an endpoint in and the other in the complement.
Now I introduce the protagonist of this section. Let be the graph on , the set of all countably infinite binary sequences, with the adjacencies defined the same way as for .
Theorem.
is bipartite. But, perhaps surprisingly, is not connected. In fact, it has uncountably many components.
Proof:
Hint: show that all cycles are even.
Exercise.
Two sequences are connected in if and only if they differ by finitely many coordinates. Equivalently, if their difference is eventually zero, in the sense of PS3-4.