Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Graph Theory: Concepts and Properties, Lecture notes of Mathematics

Various concepts and properties in graph theory, including vertices, edges, neighbors, social graphs, degrees, isomorphic graphs, connected components, and detached pairs. It also provides examples and proofs for these concepts.

What you will learn

  • How are vertices and edges related in a graph?
  • What is a detached pair in a graph?
  • What are the basic elements of a graph?
  • What is a connected component in a graph?
  • What does it mean for two graphs to be isomorphic?

Typology: Lecture notes

2021/2022

Uploaded on 03/31/2022

rothmans
rothmans 🇺🇸

4.7

(20)

252 documents

1 / 86

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Notes on graph theory
Darij Grinberg
Thursday 10th January, 2019 at 1:14am (unfinished draft!)
These notes are frozen in a (very) unfinished state.
Currently, only two chapters (beyond the preface) exist,
and they too are incomplete (although hopefully
readable).
Contents
1. Preface 2
1.1. Acknowledgments ............................. 3
2. Introduction 3
2.1. Notations and conventions . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2. Simplegraphs................................ 4
2.3. Drawinggraphs............................... 7
2.4. A first fact: The Ramsey number R(3, 3)=6.............. 11
2.5. Degrees.................................... 17
2.6. Graphisomorphisms............................ 26
2.7. Examples of graphs, and basic operations . . . . . . . . . . . . . . . . 32
2.7.1. Complete and empty graphs . . . . . . . . . . . . . . . . . . . 32
2.7.2. Path and cycle graphs . . . . . . . . . . . . . . . . . . . . . . . 33
2.7.3. A few more examples . . . . . . . . . . . . . . . . . . . . . . . 35
2.7.4. Subgraphs.............................. 37
2.7.5. Disjointunions ........................... 37
2.8. Walksandpaths............................... 39
2.8.1. Definitions and examples . . . . . . . . . . . . . . . . . . . . . 39
2.8.2. Composing and reverting walks . . . . . . . . . . . . . . . . . 40
2.8.3. Reducing a walk to a path . . . . . . . . . . . . . . . . . . . . . 42
2.8.4. The equivalence relation 'G................... 45
2.8.5. Dijkstra’s algorithm . . . . . . . . . . . . . . . . . . . . . . . . 49
2.8.6. Circuits and cycles . . . . . . . . . . . . . . . . . . . . . . . . . 50
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56

Partial preview of the text

Download Graph Theory: Concepts and Properties and more Lecture notes Mathematics in PDF only on Docsity!

Notes on graph theory

Darij Grinberg

Thursday 10

th

January, 2019 at 1:14am (unfinished draft!)

These notes are frozen in a (very) unfinished state.

Currently, only two chapters (beyond the preface) exist,

and they too are incomplete (although hopefully

readable).

Contents

  1. Preface 2 1.1. Acknowledgments............................. 3
  2. Introduction 3 2.1. Notations and conventions........................ 4 2.2. Simple graphs................................ 4 2.3. Drawing graphs............................... 7 2.4. A first fact: The Ramsey number R (3, 3) = 6.............. 11 2.5. Degrees.................................... 17 2.6. Graph isomorphisms............................ 26 2.7. Examples of graphs, and basic operations................ 32 2.7.1. Complete and empty graphs................... 32 2.7.2. Path and cycle graphs....................... 33 2.7.3. A few more examples....................... 35 2.7.4. Subgraphs.............................. 37 2.7.5. Disjoint unions........................... 37 2.8. Walks and paths............................... 39 2.8.1. Definitions and examples..................... 39 2.8.2. Composing and reverting walks................. 40 2.8.3. Reducing a walk to a path..................... 42 2.8.4. The equivalence relation 'G................... 45 2.8.5. Dijkstra’s algorithm........................ 49 2.8.6. Circuits and cycles......................... 50

2.8.7. Connectedness........................... 51 2.9. Questions to ask about graphs...................... 53

  1. Dominating sets 53 3.1. Definition.................................. 53 3.2. Brouwer’s theorem and the Heinrich-Tittmann formula........ 55 3.3. The Iverson bracket............................. 56 3.4. Proving the Heinrich-Tittmann formula................. 60 3.5. Distances in graphs; first proof of Proposition 3.1.5.......... 74 3.6. Independent sets; second proof of Proposition 3.1.5.......... 74
  2. Hamiltonian paths 82

1. Preface

These are lecture notes on graph theory – the part of mathematics involved with graphs. They are currently work in progress (but the parts that are finished are self-contained!); once finished, they should contain a semester’s worth of material. I have tried to keep the presentation as self-contained and elementary as possible; the reader is nevertheless assumed to possess some mathematical maturity (in par- ticular, to know how to read combinatorial proofs, filling in simple details)^1 and know how to work with modular arithmetic (i.e., congruences between integers

modulo a positive integer n) and summation signs (such as

n ∑ i= 1

and (^) ∑ a∈A

, where n is

an integer and A is a finite set)^2. In some chapters, familiarity with matrices (and their products), permutations (and their signs)^3 and polynomials will be required. I hope that the proofs are readable; feel free to contact me (at dgrinber@umn.edu) for any clarifications. The choice of material surveyed in these notes is idiosyncratic (sometimes even purposefully trying to wander some seldom trodden paths). Some standard mate- rial (Eulerian walks, Hamiltonian paths, trees, bipartite matching theory, network flows) is present (at least in the eventual final form of these notes), whereas other

(^1) I believe that the MIT lecture notes [LeLeMe16] are a good source for achieving this mathematical maturity. (Actually, there is some intersection between [LeLeMe16, Chapters 10 and 12] and our notes, but [LeLeMe16] mostly keeps to the basics of graph theory.) Two other resources to familiarize oneself with proofs are [Hammac15] and [Day16]. Generally, most good books about “reading and writing mathematics” or “introductions to abstract mathematics” should convey these skills, although the extent to which they actually do so may differ. (^2) See [Grinbe16, §1.4] for a list of important properties of summation signs. (^3) A summary of the most fundamental results about signs of permutations can be found in [LaNaSc16, §8.1]. These results appear with proofs in [Day16, Chapter 6.B]. For an even more detailed treatment (also including proofs), see [Grinbe16, §4.1–4.3]. Some of the most important properties of signs of permutations are also proven in [Strick13, Appendix B], which also gives one of the best introductions to determinants I have seen in the literature. Another treatment can be found in [Conrad], but this requires some familiarity with group theory.

2.1. Notations and conventions

Before we get to anything interesting, let me get some technicalities out of the way. Namely, I shall be using the following notations:

  • In the following, we use the symbol N to denote the set {0, 1, 2,.. .}. (Be warned that some other authors use this symbol for (^) {1, 2, 3,.. .} instead.)
  • We let Q denote the set of all rational numbers; we let R be the set of all real numbers.
  • If X and Y are two sets, then we shall use the notation “X → Y, x 7 → E” (where x is some symbol which has no specific meaning in the current context, and where E is some expression which usually involves x) for “the map from X to Y that sends every x ∈ X to E”. For example, “ NN , x 7 → x^2 + x + 6” means the map from N to N that sends every x ∈ N to x^2 + x + 6. For another example, “ NQ , x 7 →

x 1 + x

” denotes the map from N to Q that

sends every x ∈ N to

x 1 + x

  • If S is a set, then the powerset of S means the set of all subsets of S. This powerset will be denoted by P (S). For example, the powerset of {1, 2} is P (^) ({1, 2}) = (^) {∅, (^) { (^1) } , (^) { (^2) } , (^) {1, 2}}. Furthermore, if S is a set and k is an integer, then Pk (S) shall mean the set of all k-element subsets of S. (This is empty if k < 0.)

2.2. Simple graphs

As already hinted above, there is not one single concept of a “graph”. Instead, there are several mutually related (but not equivalent) concepts of “graph”, which are often kept apart by adorning them with adjectives (e.g., “simple graph”, “directed

(^5) A word of warning: Of course, the notation “X → Y, x 7 → E” does not always make sense; indeed, the map that it stands for might sometimes not exist. For instance, the notation “ NQ , x 7 → x 1 − x ” does not actually define a map, because the map that it is supposed to define (i.e., the map from N to Q that sends every x ∈ N to x 1 − x ) does not exist (since^

x 1 − x is not defined for x = 1). For another example, the notation “ NZ , x 7 → x 1 + x ” does not define a map, because the map that it is supposed to define (i.e., the map from N to Z that sends every x ∈ N to x 1 + x ) does not exist (for x = 2, we have x 1 + x = 2 1 + 2 /∈ Z , which shows that a map from N to Z cannot send this x to this x 1 + x ). Thus, when defining a map from X to Y (using whatever notation), do not forget to check that it is well-defined (i.e., that your definition specifies precisely one image for each x ∈ X, and that these images all lie in Y). In many cases, this is obvious or very easy to check (I will usually not even mention this check), but in some cases, this is a difficult task.

graph”, “loopless graph”, “loopless weighted undirected graph”, “infinite graph”, etc.) or prefixes (“digraph”, “multigraph”, etc.). Let me first define the simplest one of these:

Definition 2.2.1. A simple graph is a pair (V, E), where V is a finite set, and where E is a subset of P 2 (V).

Let us unpack this definition first. The word “simple” in “simple graph” (roughly speaking) has the meaning of “with no bells and whistles”; i.e., it says that the notion of “simple graph” is one of the crudest, most primitive notions of a graph known. It does not mean that everything that can be said about simple graphs is simple (this is far from the case, as we will see below). The condition “E is a subset of P 2 (V)” in Definition 2.2.1 can be rewritten as “E is a set of 2-element subsets of V” (since P 2 (V) is the set of all 2-element subsets of V). Thus, a simple graph is a pair consisting of a finite set V, and a set of 2-element subsets of V. For example, (^) ({1, 2, 3} , (^) {{1, 3} , (^) {3, 2}}) and (^) ({2, 5} , (^) {{2, 5}}) and (^) (∅, ∅) are three simple graphs.

Warning 2.2.2. (a) Our Definition 2.2.1 differs from the definition of a “simple graph” in many sources, in that we are requiring V to be finite. (b) Simple graphs are often just called “graphs”. But then again, some other concepts of graphs (such as multigraphs, which we will encounter further be- low) are also often just called “graphs”. Thus, the precise meaning of the word “graph” depends on the context in which it appears. For example, Bollobás (in [Bollob79]) uses the word “graph” for “simple graph”, whereas Bondy and Murty (in [BonMur08]) use it for “multigraph with loops allowed” (a concept we will define further below). When reading literature, always check the definitions (and, if these are missing, try to take an educated guess, ruling out options that make some of the claims false).

So far, we have not explained how we should intuitively think of simple graphs, and why they are interesting. We will spend a significant part of these notes an- swering the latter question; but let us first comment on the former. Simple graphs can be used to model symmetric relations between different ob- jects. For example, if you have n integers (for some n ∈ N ), then you can define a graph (V, E) for which V is the set of these n integers, and E is the set of all 2-element subsets {u, v} of V for which |u − v| ≤ 3. (Notice that {u, u} does not count as a 2-element subset.) For a non-mathematical example, consider an (ideal- ized) group P of (finitely many) people, each two of which are either mutual friends or not^6. Then, you can define a graph (P, E), where E is the set of all 2-element subsets {u, v} of P for which u and v are mutual friends. This graph then models the friendships between the people in the group P; in a sense, it is a social network

(^6) We assume that if a person u is a friend of a person v, then v is a friend of u. We also assume that no person u is a friend of u itself (or, at least, we don’t count this as friendship).

Example 2.2.4. Let U be the 5-element set (^) {1, 2, 3, 4, 5}. Let E be the subset {{u, v} ∈ P 2 (U) | u + v ≥ 5 } of P 2 (U). This set E is well-defined, because the sum u + v of two integers u and v depends only on the set {u, v} and not on how this set is written (since u + v = v + u). (This is important, because if we had used the condition u − v ≥ 3 instead of u + v ≥ 5, then the set E would not be well-defined, because it would not be clear whether {1, 5} should be inside it or not – indeed, if we write {1, 5} as {u, v} with u = 5 and v = 1, then u − v ≥ 3 is satisfied, but if we write {1, 5} as {u, v} with u = 1 and v = 5, then u − v ≥ 3 is not satisfied.) Let G be the simple graph (^) (U, E). Then, V (^) (G) = U = (^) {1, 2, 3, 4, 5} and

E (G) = E = {{u, v} ∈ P 2 (U) | u + v ≥ 5 } = {{1, 4} , {1, 5} , {2, 3} , {2, 4} , {2, 5} , {3, 4} , {3, 5} , {4, 5}}. (1)

Thus, G has |V (G)| = |U| = 5 vertices and |E (G)| = |E| = 8 edges. Using the shorthand notation uv for {u, v} (introduced in Definition 2.2.3 (b) ), the equality (1) rewrites as

E (G) = {14, 15, 23, 24, 25, 34, 35, 45}.

The vertices 2 and 4 of G are adjacent (since 24 ∈ E). In other words, 4 is a neighbor of 2. Equivalently, 2 is a neighbor of 4. On the other hand, the vertices 1 and 3 of G are not adjacent (since 13 /∈ E); thus, 1 is not a neighbor of 3. The neighbors of 1 are 4 and 5.

2.3. Drawing graphs

There is a common method to represent graphs visually: Namely, a graph can be drawn as a set of points in the plane and a set of curves connecting some of these points with each other. More precisely:

Definition 2.3.1. A simple graph G can be visually represented by drawing it on the plane (or on some other surface). To do so, we represent each vertex of G by a point (at which we put the name of the vertex), and then, for each edge uv of G, we draw a curve that connects the point representing u with the point representing v. The positions of the points and the shapes of the curves can be chosen freely, as long as they allow the reader to unambigously reconstruct the graph G from the picture. (Thus, for example:

  • the points should be distinct and spaced reasonably far apart;
  • the curves should not pass through points other than the ones they connect;
  • the curves should not be too jagged (and they should certainly be contigu- ous);
  • the curves should intersect in such a way that one can easily see which strand is the continuation of which one.

Various examples of graphs being drawn are given below.)

Example 2.3.2. Let us draw some simple graphs. (a) The simple graph ({1, 2, 3} , {12, 23}) (where we are again using the short- hand notation uv for {u, v}) can be drawn as follows:

1 2 3.

This is (in a sense) the simplest way to draw this graph: The edges are repre- sented by straight lines (rather than tortuous curves). There are other options as well. For example, we can draw the same graph as follows:

1 3 2.

Here, we have placed the points representing the vertices 1, 2, 3 differently. As a consequence, we were not able to draw the edge 12 as a straight line, because it would then have overlapped with the vertex 3, which would make the structure of the graph ambiguous (the edge 12 could be mistaken for two edges 13 and 32). We can just as well draw both edges as curves:

1 3 2.

This drawing still represents the same graph ({1, 2, 3} , {12, 23}). We do not have to place the three vertices all along the same line. We can just as well draw the graph ({1, 2, 3} , {12, 23}) as follows:

2

So far we have drawn our edges in such a way that they did not intersect. But this is not a requirement. We could just as well have represented our graph ({1, 2, 3} , {12, 23}) as follows:

2

This last drawing is, of course, needlessly complicated for such a graph, but it is perfectly legitimate.

criterion):

2 3

This drawing is bad because of the muddle that happens in the center of the rectangle formed by the vertices 2, 3, 4 and 5. Two curves are touching each other at that center, making the reader wonder whether they are two curves representing the edges 24 and 35 “passing through each other”, or two curves representing the edges 25 and 34 “bouncing off each other”, or both, or maybe even three curves. (The answer is “both”: they represent all four edges 24, 35, 25 and 34. But this is not clear from the drawing.) (c) Let us draw one further graph: the simple graph ({1, 2, 3, 4, 5} ,^ P 2 ({1, 2, 3, 4, 5})).^ This^ is^ the^ simple^ graph^ whose^ vertices are 1, 2, 3, 4, 5, and whose edges are all possible two-element sets consisting of its vertices (i.e., each pair of two distinct vertices is adjacent). We shall later (in Definition 2.7.1) refer to this graph as the “complete graph K 5 ”. Here is a simple way to draw this graph:

2 3

This drawing is useful for many purposes; for example, it makes the abstract symmetry of this graph (i.e., the fact that, roughly speaking, its vertices 1, 2, 3, 4, 5 are “equal in rights”) obvious. But sometimes, you might want to draw it dif- ferently, to minimize the number of intersecting curves. Here is a drawing with fewer intersections:

2 3

In this drawing, we have only one intersection between two curves left. Can we get rid of all intersections? This is a non-combinatorial question, since it really is about curves in the plane rather than about finite sets and graphs. The answer is “no”. (That is, no matter how you draw this graph in the plane, you will always have at least one pair of curves intersect.) This is a classical result (one of the first theorems in the theory of planar graphs), and proofs of it can be found in various textbooks on graph theory (e.g., [Harary69, Corollary 11.1(d)] or [BonMur08, Theorem 10.2]). These proofs, however, are usually not self-contained; they rely on some basic facts from the topology of the real plane (mostly, the Jordan curve theorem). We shall not study geometrical questions like this in these notes, but instead refer the reader to texts such as [FriFri98] for careful and complete treatments of the topological technicalities. (If you are willing to take certain intuitively obvious topological facts about curves for granted, you can also read the chapters about planar graphs appearing in most books on graph theory.)

Remark 2.3.3. When drawing a simple graph G, we have so far labelled the points by the names of the vertices that they represent. However, often, the names of the vertices will be unimportant. In such cases, we can just as well label the points by little circles. For example, the simple graph G from Example 2.2. can thus be drawn as follows:

◦ ◦

Of course, from such a drawing, we cannot unambiguously reconstruct the graph, since we do not know which edge connects which vertices. But often, all we want to know about the graph is visible on such a drawing, and the names of the vertices would only be distracting.

2.4. A first fact: The Ramsey number R (^) (3, 3) = 6

After these definitions, it might be time for a first result. The following classical fact (which is actually the beginning of a deep theory – the so-called Ramsey theory) should neatly illustrate the concepts introduced above:

Proposition 2.4.1. Let G be a simple graph with |V (G)| ≥ 6 (that is, G has at least 6 vertices). Then, at least one of the following two statements holds:

  • Statement 1: There exist three distinct vertices a, b and c of G such that ab, bc and ca are edges of G.

(b) Let G be the simple graph (^) (V, E), where

V = {−2, −1, 0, 1, 2, 3} and E = (^) {{u, v} ∈ P 2 (V) | u 6 ≡ v mod 3}.

(This graph can be drawn as follows:

0 − 1 − 2

) This graph satisfies Statement 1 of Proposition 2.4.1 for a = 1, b = 2 and c = 3. (Again, other choices of a, b and c are also possible.)

(c) Let G be the graph (V, E), where

V = {1, 2, 3, 4, 5, 6} and E = {{1, 2} , {2, 3} , {3, 4} , {4, 5} , {5, 6} , {6, 1} , {1, 3}}.

(This graph can be drawn in such a way as to look like a hexagon with one extra diagonal:

1 2

) This graph satisfies Statement 1 of Proposition 2.4.1 for a = 1, b = 2 and c = 3. It also satisfies Statement 2 of Proposition 2.4.1 for a = 2, b = 4 and c = 6.

(d) Let G be the graph (^) (V, E), where

V = {1, 2, 3, 4, 5} and E = {{1, 2} , {2, 3} , {3, 4} , {4, 5} , {5, 1}}.

(This graph can be drawn to look like a pentagon:

2 3

) Proposition 2.4.1 says nothing about this graph, since this graph does not satisfy the assumption of Proposition 2.4.1 (in fact, its number of vertices |V (G)| fails to be ≥ 6). By itself, this does not yield that the claim of Proposition 2.4.1 is false for this graph. However, it is easy to check that the claim actually is false for this graph: Neither Statement 1 nor Statement 2 hold.

Proof of Proposition 2.4.1. We need to prove that either Statement 1 holds or State- ment 2 holds (or both). Choose any vertex u ∈ V (G). (This is clearly possible, since |V (G)| ≥ 6 ≥ 1.) Then, |V (G) \ {u}| = |V (G)| − 1 ≥ 5 (since |V (G)| ≥ 6). We are in one of the following two cases: Case 1: At least 3 vertices in V (G) \ {u} are adjacent to u. Case 2: At most 2 vertices in V (^) (G) \ {u} are adjacent to u. Let us consider Case 1 first. In this case, at least 3 vertices in V (G) \ {u} are adjacent to u. Hence, we can find three distinct vertices p, q and r in V (G) \ {u} that are adjacent to u. Consider these p, q and r. If none of pq, qr and rp is an edge of G, then Statement 2 holds (in fact, we can just take a = p, b = q and c = r). Thus, if none of pq, qr and rp is an edge of G, then our proof is complete^10. Thus, we WLOG^11 assume that at least one pq, qr and rp is an edge of G. In other words, we can pick two distinct elements g and h of {p, q, r} such that gh is an edge of G. Consider these g and h. The vertex g is one of p, q and r (since g ∈ {p, q, r}). The vertices p, q and r are adjacent to u. Hence, the vertex g is adjacent to u (since the vertex g is one of p, q and r). In other words, ug is an edge of G. Similarly, uh is an edge of G. In other words, hu is an edge of G (since hu = uh). We have g ∈ {p, q, r} ⊆ V (G) \ {u} (since p, q and r belong to V (G) \ {u}). Hence, g 6 = u. In other words, u 6 = g. Similarly, u 6 = h. Hence, h 6 = u. Finally, g 6 = h (since g and h are distinct). Now, we know that the three vertices u, g and h are distinct (since u 6 = g, g 6 = h and h 6 = u), and have the property that ug, gh and hu are edges of G. Therefore, Statement 1 holds (in fact, we can just take a = u, b = g and c = h). Hence, the proof is complete in Case 1. Let us now consider Case 2. In this case, at most 2 vertices in V (G) \ {u} are adjacent to u. Thus, at least 3 vertices in V (G) \ {u} are non-adjacent to u 12.

(^10) because our goal in this proof is to show that either Statement 1 holds or Statement 2 holds (or both) (^11) The word “WLOG” means “without loss of generality”. See, e.g., the corresponding Wikipedia page https://en.wikipedia.org/wiki/Without_loss_of_generality for its meaning. (^12) Proof. Let k be the number of vertices in V (G) \ {u} that are adjacent to u. Let be the number of vertices in V (G) \ {u} that are non-adjacent to u. Then, k + = |V (G) \ {u}| (since each vertex in V (G) \ {u} is either adjacent to u or non-adjacent to u, but not both at the same time). But k ≤ 2 (since at most 2 vertices in V (G) \ {u} are adjacent to u). Hence, k + ≤ 2 + = + 2, so that + 2 ≥ k + = |V (G) \ {u}| ≥ 5 and thus ≥ 3. In other words, at least 3 vertices in V (G) \ {u} are non-adjacent to u. Qed.

for each of these choices, whether the graph (^) (X, F) satisfies Proposition 2.4.1. (Just try each possible choice of three distinct vertices a, b and c of this graph (X, F), and check that at least one of these choices satisfies either Statement 1 or Statement 2.) After a huge but finite amount of checking (which you can au- tomate), you will see that Proposition 2.4.1 holds for (X, F). Thus, as we have already mentioned, Proposition 2.4.1 also holds for the original graph G.

Proposition 2.4.1 is the first result in a field of graph theory known as Ramsey theory. I shall not dwell on this field in these notes, but let me make a few more remarks. The first step beyond Proposition 2.4.1 is the following generalization:

Proposition 2.4.5. Let r and s be two positive integers. Let G be a simple graph

with |V (G)| ≥

r + s − 2 r − 1

. Then, at least one of the following two statements holds:

  • Statement 1: There exist r distinct vertices of G that are mutually adjacent (i.e., each two distinct ones among these r vertices are adjacent).
  • Statement 2: There exist s distinct vertices of G that are mutually non- adjacent (i.e., no two distinct ones among these s vertices are adjacent).

Applying Proposition 2.4.5 to r = 3 and s = 3, we can recover Proposition 2.4.1.

One might wonder whether the number

r + s − 2 r − 1

in Proposition 2.4.5 can be

improved – i.e., whether we can replace it by a smaller number without making Proposition 2.4.5 false. In the case of r = 3 and s = 3, this is impossible, because the number 6 in Proposition 2.4.1 cannot be made smaller^13. However, for some

other values of r and s, the value

r + s − 2 r − 1

can be improved. (For example,

for r = 4 and s = 4, the best possible value is 18 rather than

The smallest possible value is called the Ramsey number R (r, s), and finding it is a hard computational challenge; for small values of r and s it has been found using a computer, but R (5, 5) is still unknown. Proposition 2.4.5 can be further generalized to a result called Ramsey’s theorem. The idea behind the generalization is to slightly change the point of view, and re- place the simple graph G by a complete graph (i.e., a simple graph in which every two distinct vertices are adjacent) whose edges are colored in two colors (say, blue and red). This is a completely equivalent concept, because the concepts of “ad- jacent” and “non-adjacent” in G can be identified with the concepts of “adjacent through a blue edge” (i.e., the edge connecting them is colored blue) and “adjacent

(^13) Indeed, there is a graph with 5 vertices (namely, the graph G constructed in Example 2.4.2 (d) ) that satisfies neither Statement 1 nor Statement 2.

through a red edge”, respectively. Statements 1 and 2 then turn into “there exist r distinct vertices that are mutually adjacent through blue edges” and “there exist s distinct vertices that are mutually adjacent through red edges”, respectively. From this point of view, it is only logical to generalize Proposition 2.4.5 further to the case when the edges of a complete graph are colored in k (rather than two) colors. The corresponding generalization is known as Ramsey’s theorem. We refer to the well-written Wikipedia page https://en.wikipedia.org/wiki/Ramsey’s_theorem for a treatment of this generalization with proof, as well as a table of known Ramsey numbers R (r, s) and a self-contained (if somewhat terse) proof of Proposition 2.4.5. Ramsey’s theorem can be generalized further, and many variations of it can be de- fined, which are usually subsumed under the label “Ramsey theory”.^14 There are many papers and at least one textbook [GrRoSp90] available on Ramsey theory. For elementary introductions, see the Cut-the-knot page http://www.cut-the-knot. org/Curriculum/Combinatorics/ThreeOrThree.shtml in [Bogomoln], the above- mentioned Wikipedia article, as well as [Harju14, §4.2], [Bollob79, Chapter VI] and [West01, Section 8.3].

Exercise 2.4.6. Let G be a simple graph. A triangle in G means a set {a, b, c} of three distinct vertices a, b and c of G such that ab, bc and ca are edges of G. An anti-triangle in G means a set (^) {a, b, c} of three distinct vertices a, b and c of G such that none of ab, bc and ca is an edge of G. A triangle-or-anti-triangle in G is a set that is either a triangle or an anti-triangle. (Of the three words I have just introduced, only “triangle” is standard.) (a) Assume that |V (G)| ≥ 6. Prove that G has at least two triangle-or-anti- triangles. (For comparison: Proposition 2.4.1 shows that G has at least one triangle-or-anti-triangle.) (b) Assume that |V (G)| = m + 6 for some m ∈ N. Prove that G has at least m + 1 triangle-or-anti-triangles.

2.5. Degrees

Next, we introduce the notion of the degree of a vertex of a graph. This is simply the number of edges containing this vertex:

Definition 2.5.1. Let G = (V, E) be a simple graph. Let v ∈ V be a vertex of G. Then, the degree of v (with respect to G) is defined as the number of all edges of G that contain v. This degree is a nonnegative integer, and is denoted by deg v. It is also denoted by degG v, when the graph G is not clear from the context.

(^14) See [RaWiRa] for a popular view on the philosophy of Ramsey theory (in the wide sense of this word). It should probably be said that mathematicians usually define the word “Ramsey theory” somewhat more restrictively, and not every result of the form “you can find a pattern in any sufficiently large structure” belongs to Ramsey theory; but the rough idea is correct.

Consider this map α. This map α is injective^16 and surjective^17. Hence, the map α is bijective. Thus, we have found a bijective map α from U to Ev. Therefore, |Ev| = |U|. But Ev = {e ∈ E | v ∈ e} and thus |Ev| = |{e ∈ E | v ∈ e}| = deg v (by (4)). Hence, deg v = |Ev| = |U| = (the number of all neighbors of v). This proves (6). Now,

deg v = (the number of all neighbors of v)

the set of all neighbors of v ︸ ︷︷ ︸ ={u∈V | u is a neighbor of v}

= |{u ∈ V | u is a neighbor of v}| = |{u ∈ V | u is adjacent to v}|

(because for any vertex u ∈ V, the condition “u is a neighbor of v” is equivalent to the condition “u is adjacent to v”). Thus, (7) and (8) are proven. Furthermore,

deg v = |{u ∈ V | u is a neighbor of v}| = (^) |{u ∈ V | vu ∈ E}|

(^16) Proof. Let u 1 and u 2 be two elements of U satisfying α (u 1 ) = α (u 2 ). We shall show that u 1 = u 2. The definition of α yields α (u 1 ) = vu 1 = {v, u 1 }. Hence, {v, u 1 } = α (u 1 ) ∈ Ev ⊆ E ⊆ P 2 (V). Therefore, {v, u 1 } is a two-element set. Hence, v 6 = u 1. Therefore, {v, u 1 } \ {v} = {u 1 }. Hence, {u 1 } = {v, u 1 } ︸ ︷︷ ︸ = α (u 1 )

\ {v} = α (u 1 ) \ {v}. The same argument (but applied to u 2 instead of u 1 ) shows

that (^) {u 2 } = α (^) (u 2 ) \ {v}. Now,

{u 1 } = α (u 1 ) ︸ ︷︷ ︸ = α (u 2 )

\ {v} = α (u 2 ) \ {v} = {u 2 } ,

so that u 1 ∈ {u 1 } = (^) {u 2 } and therefore u 1 = u 2. Now, forget that we fixed u 1 and u 2. We thus have proven that if u 1 and u 2 are two elements of U satisfying α (u 1 ) = α (u 2 ), then u 1 = u 2. In other words, the map α is injective. (^17) Proof. Let f ∈ Ev. Thus, f ∈ Ev = {e ∈ E | v ∈ e}. In other words, f is an element of E satisfying v ∈ f. We have f ∈ E ⊆ P 2 (V). Thus, f is a 2-element subset of V. Thus, | f | = 2. Since v ∈ f , we have | f \ {v}| = | f | − 1 = 1 (since | f | = 2). Hence, f \ {v} is a 1-element set. Therefore, f \ {v} = {u} for some u. Consider this u. Now, u ∈ {u} = f \ {v} ⊆ f ⊆ V; thus, u is a vertex of G. Moreover, v ∈ f and thus f = ( ︸ f \ {︷︷v })︸ ={u}

∪ {v} = {u} ∪ {v} = {u, v} = {v, u} = vu.

Hence, vu = f ∈ E. In other words, u is a neighbor of v (by the definition of “neighbor”). In other words, u ∈ U (since U is the set of all neighbors of v). The definition of α now yields α (u) = vu = f. Hence, f = α (u) ∈ α (U). Now, forget that we fixed f. We thus have shown that f ∈ α (U) for each f ∈ Ev. In other words, Ev ⊆ α (U). In other words, the map α is surjective.

(because for any vertex u ∈ V, the condition “u is a neighbor of v” is equivalent to the condition “vu ∈ E”). Hence,

deg v =

u ∈ V | (^) ︸︷︷︸vu =uv

∈ E

= |{u ∈ V | uv ∈ E}|

= (^) |{u ∈ V | uv is an edge of G}|

(because for any vertex u ∈ V, the condition “uv ∈ E” is equivalent to the con- dition “uv is an edge of G”). Thus, we have proven (10) and (9). The proof of Proposition 2.5.3 is thus complete.

Remark 2.5.4. Different sources use different notations for the degree of a vertex v of a simple graph G. We call it deg v (and so do Ore’s [Ore90] and the intro- ductory notes [LeLeMe16]); Ore’s [Ore74] calls it ρ (^) (v); Bollobás’s [Bollob79] and Bondy’s and Murty’s [BonMur08] and [BonMur76] call it d (v).

At this point, we can state a few simple facts about degrees:

Proposition 2.5.5. Let G be a simple graph. Let n = |V (G)|. Let v be a vertex of G. Then, deg v ∈ {0, 1,... , n − 1 }.

Proof of Proposition 2.5.5. Let U be the set of all neighbors of v. Then,

|U| = (the number of all neighbors of v).

Comparing this with (6), we obtain |U| = deg v. But U ⊆ V (G) \ {v} 18. Hence, |U| ≤ |V (G) \ {v}| = |V (G)| − 1 (since v ∈ V (^) (G)). Since (^) |V (^) (G)| = n, this inequality can be rewritten as (^) |U| ≤ n − 1. Since |U| is a nonnegative integer, we thus have |U| ∈ {0, 1,... , n − 1 }. Since |U| = deg v, we can rewrite this as deg v ∈ {0, 1,... , n − (^1) }. This proves Proposition 2.5.5.

Proposition 2.5.6. Let G be a simple graph. The sum of the degrees of all vertices of G equals twice the number of edges of G. In other words,

v∈V(G)

deg v = 2 |E (G)|. (11)

Proof of Proposition 2.5.6. Write the simple graph G in the form G = (V, E). Thus, V (G) = V and E (G) = E. Now, let N be the number of all pairs (v, e) ∈ V × E such that v ∈ e. Then, we can express N in the following two ways:

(^18) Proof. Let u ∈ U. Thus, u is a neighbor of v (by the definition of U). In other words, u is a vertex of G such that vu ∈ E (G) (by the definition of “neighbor”). Thus, vu ∈ E (G) ⊆ P 2 (V (G)) (since each edge of G is a 2-element subset of V (G)). In particular, vu is a 2-element set. Hence, u 6 = v. But u ∈ V (G) (since u is a vertex of G). Combining this with u 6 = v, we obtain u ∈ V (G) \ {v}. Now, forget that we fixed u. We thus have shown that u ∈ V (G) \ {v} for each u ∈ U. In other words, U ⊆ V (G) \ {v}.