Part I · Foundations

How to Read Mathematics

Created by

Mathematical notation is a compact written language, and like any language it can be learned. After this chapter you will be able to read set notation, function notation, quantifiers, and proof arguments fluently enough to open Diestel's Graph Theory without fear.

Why notation exists

Try writing this sentence without symbols: "the collection consisting of every whole number that is bigger than one and is divisible only by one and by itself." That is twenty-one words. A mathematician writes \(\{p \in \mathbb{N} : p \text{ is prime}\}\) and is done. Notation exists for two reasons. The first is compression: ideas that take a paragraph in English take a line in symbols, and once compressed they can be combined into larger ideas without the page collapsing under its own weight. The second is precision. English is ambiguous ("some students passed" could mean one, several, or all but one); the symbol \(\exists\) means exactly "at least one exists," no more and no less. Every symbol in this chapter is an abbreviation for a short English phrase. When you read mathematics, the skill is to expand each symbol back into its phrase, out loud if it helps, until the expansion becomes automatic. That is the whole game. Nothing in this chapter is deep; all of it is vocabulary.

An 1847 title page, foxed and cream-coloured, in an open red-bound book, with a coloured red, yellow, blue and black geometric figure printed below the lettering.
Plate 0.A. Byrne's edition of Euclid, London, 1847. The subtitle makes this section's argument in the book's own words: coloured diagrams and symbols used instead of letters "for the greater ease of learners". The line underneath gives the author's day job, surveyor of Her Majesty's settlements in the Falkland Islands. Oliver Byrne, 1847. Wikimedia Commons, public domain.
Intuition

Reading mathematics is slow reading. A page of a novel takes two minutes; a page of Diestel can honestly take an hour, and that is normal even for professionals. You are not skimming a story, you are decoding a dense message. Read with a pencil, expand every symbol into words, and check each claim on a small example before moving on.

Two facing printed pages where small red, blue, yellow and black squares and triangles sit inline between short lines of italic type, with a large coloured diagram at the top left.
Plate 0.B. Oliver Byrne proving Pythagoras in 1847, Book I Proposition 47, without a single lettered point. Where an ordinary Euclid says “the square on AB”, Byrne prints the square itself, in colour, inside the sentence. The proof still runs: Draw, To each add, hence, Q.E.D. Oliver Byrne, 1847. Wikimedia Commons, public domain.

The section claims notation buys precision, not just brevity. What does writing \(\exists\) buy over the English word "some"?

  1. It is faster to write by hand
  2. It fixes the meaning as exactly "at least one"
  3. It fixes the meaning as exactly "exactly one"
  4. English has no way to talk about existence
Answer: B. "Some students passed" could mean one, several, or all but one, while \(\exists\) admits only "at least one exists." Option C is the usual misreading: \(\exists\) never promises there is just one.

New notation in this chapter

This table is your dictionary for the whole chapter. Skim it now, then come back to it whenever a later section uses a symbol you have half-forgotten. Every chapter of this course opens with a table like this one.

SymbolRead it asMeaningTiny example
\(\{a, b, c\}\)"the set a, b, c"The collection whose members are exactly \(a\), \(b\), \(c\). Order and repetition do not matter.\(\{2,1\} = \{1,2\} = \{1,1,2\}\)
\(x \in A\)"x is in A" / "x is an element of A"\(x\) is one of the members of the set \(A\).\(2 \in \{1,2,3\}\)
\(x \notin A\)"x is not in A"\(x\) is not a member of \(A\).\(5 \notin \{1,2,3\}\)
\(\emptyset\)"the empty set"The set with no members at all.\(\{x \in \mathbb{N} : x < 0\} = \emptyset\)
\(A \subseteq B\)"A is a subset of B"Every member of \(A\) is also a member of \(B\).\(\{1,2\} \subseteq \{1,2,3\}\)
\(A \subsetneq B\)"A is a proper subset of B"\(A \subseteq B\) and \(A \neq B\): \(B\) has at least one extra member.\(\{1\} \subsetneq \{1,2\}\)
\(A \cup B\)"A union B"The set of everything in \(A\) or in \(B\) (or both).\(\{1,2\} \cup \{2,3\} = \{1,2,3\}\)
\(A \cap B\)"A intersect B"The set of everything in both \(A\) and \(B\).\(\{1,2\} \cap \{2,3\} = \{2\}\)
\(A \setminus B\)"A minus B"The members of \(A\) that are not in \(B\).\(\{1,2,3\} \setminus \{2\} = \{1,3\}\)
\(\{x : P(x)\}\)"the set of all x such that P holds"Set-builder notation: collect exactly the objects with property \(P\).\(\{x \in \mathbb{N} : x \text{ is even}\}\)
\(|A|\)"the size of A"The number of elements of \(A\) (its cardinality).\(|\{a,b,c\}| = 3\), \(|\emptyset| = 0\)
\(\mathbb{N}\)"the natural numbers"\(\{0, 1, 2, 3, \dots\}\). In this course, following Diestel, zero is included.\(0 \in \mathbb{N}\)
\(\mathbb{Z}\)"the integers"All whole numbers: \(\{\dots,-2,-1,0,1,2,\dots\}\).\(-3 \in \mathbb{Z}\), \(-3 \notin \mathbb{N}\)
\(\mathbb{R}\)"the real numbers"All points on the number line, including fractions and irrationals.\(\sqrt{2} \in \mathbb{R}\)
\([a, b]\)"the interval from a to b"All real numbers from \(a\) to \(b\), endpoints included; \((a,b)\) excludes them.\(2.5 \in [2,3]\)
\([n]\)"the set one up to n"Shorthand for \(\{1, 2, \dots, n\}\).\([3] = \{1,2,3\}\)
\(\lfloor x \rfloor\)"the floor of x"\(x\) rounded down to the nearest integer.\(\lfloor 2.9 \rfloor = 2\)
\(\lceil x \rceil\)"the ceiling of x"\(x\) rounded up to the nearest integer.\(\lceil 2.1 \rceil = 3\)
\((a, b)\)"the ordered pair a, b"Two objects with a first and a second; order matters.\((1,2) \neq (2,1)\)
\(A \times B\)"A cross B"The set of all ordered pairs with first entry from \(A\), second from \(B\).\(\{1,2\} \times \{x\} = \{(1,x),(2,x)\}\)
\([A]^2\)"the 2-element subsets of A"The set of all unordered pairs of distinct elements of \(A\). Diestel's notation; edges of a graph live here.\([\{a,b,c\}]^2 = \{\{a,b\},\{a,c\},\{b,c\}\}\)
\(f\colon A \to B\)"f from A to B"A function: a rule assigning to each element of \(A\) exactly one element of \(B\).\(f\colon \mathbb{N} \to \mathbb{N}\), \(f(x) = x^2\)
\(f(A')\)"the image of A' under f"The set of outputs \(f\) produces on inputs from \(A' \subseteq A\).for \(f(x)=x^2\): \(f(\{1,2\}) = \{1,4\}\)
\(f^{-1}(y)\)"the preimage of y"The set of inputs that \(f\) sends to \(y\).for \(f(x)=x^2\) on \(\mathbb{Z}\): \(f^{-1}(4) = \{-2,2\}\)
\(g \circ f\)"g after f" / "g composed with f"Apply \(f\) first, then \(g\): \((g \circ f)(x) = g(f(x))\).\(f(x)=x+1,\ g(x)=2x\): \((g\circ f)(3)=8\)
\(\min A\), \(\max A\)"the minimum / maximum of A"The smallest / largest element of a set of numbers.\(\min\{4,1,7\} = 1\)
\(\sum_{i=1}^{n} a_i\)"the sum over i from 1 to n of a-i"Add up the terms \(a_1 + a_2 + \dots + a_n\).\(\sum_{i=1}^{4} i = 10\)
\(\prod_{i=1}^{n} a_i\)"the product over i from 1 to n"Multiply the terms \(a_1 \cdot a_2 \cdots a_n\).\(\prod_{i=1}^{4} i = 24\)
\(\binom{n}{k}\)"n choose k"The number of \(k\)-element subsets of an \(n\)-element set.\(\binom{4}{2} = 6\)
\(\forall\)"for all"The claim that follows holds for every object in view.\(\forall n \in \mathbb{N}: n \ge 0\)
\(\exists\)"there exists"At least one object with the stated property exists.\(\exists n \in \mathbb{N}: n^2 = 49\)
\(P \Rightarrow Q\)"P implies Q" / "if P then Q"Whenever \(P\) is true, \(Q\) must also be true.\(x > 2 \Rightarrow x > 1\)
\(P \Leftrightarrow Q\)"P if and only if Q"\(P\) and \(Q\) are true in exactly the same cases ("iff").\(x \text{ even} \Leftrightarrow x+2 \text{ even}\)
\(\neg P\)"not P"The claim that \(P\) is false.\(\neg(3 > 5)\) is true
\(O(n^2)\)"big-O of n squared"Grows no faster than a constant times \(n^2\), for large \(n\).\(5n^2 + 3n\) is \(O(n^2)\)
\(o(1)\)"little-o of one"A quantity that shrinks to \(0\) as \(n\) grows.\(1/n\) is \(o(1)\)
\(\log n\)"log n"Logarithm base 2 in this course, following Diestel: the power you raise 2 to in order to get \(n\).\(\log 8 = 3\)

Using the table, how should \([A]^2\) be read aloud, and what does it collect?

  1. "A squared": all ordered pairs \((x,y)\) with \(x, y \in A\)
  2. "A to the two": the set \(A\) written down twice
  3. "A sub two": the second element of \(A\)
  4. "The 2-element subsets of A": the unordered pairs of distinct elements
Answer: D. \([A]^2\) gathers the unordered pairs \(\{x,y\}\) with \(x \neq y\), which is where a graph's edges will live. Option A describes \(A \times A\), which keeps order and allows a repeat like \((x,x)\).

Sets: boxes of things

Almost everything in graph theory is built from one idea: the set. A set is a collection of distinct objects, considered as a single thing. You describe a small set by listing its members between curly braces: \(\{a, b, c\}\) is the set whose members are \(a\), \(b\), and \(c\). Two rules make sets simpler than everyday lists. First, order does not matter: \(\{1, 2\}\) and \(\{2, 1\}\) are the same set. Second, repetition does not matter: \(\{1, 1, 2\}\) is just \(\{1, 2\}\). A set is fully determined by one question: for each object, is it in, or is it out?

Definition — set, membership

A set is a collection of distinct objects, called its elements or members. We write \(x \in A\) ("\(x\) is in \(A\)") when \(x\) is an element of the set \(A\), and \(x \notin A\) ("\(x\) is not in \(A\)") when it is not. In plain words: a set is a membership list, and \(\in\) asks whether a name is on the list.

The membership symbol \(\in\) is a stylized Greek epsilon, chosen for the word "element." So \(2 \in \{1, 2, 3\}\) reads "two is an element of the set one, two, three," which is true, while \(5 \in \{1, 2, 3\}\) is false, which we write \(5 \notin \{1,2,3\}\).

One special set matters enough to get its own symbol: the empty set \(\emptyset\), the set with no members at all. It may feel like a lawyer's trick, but it is as useful as the number zero. When we ask "which vertices are in both of these two groups?" the honest answer is sometimes "none," and \(\emptyset\) is how we write that answer as a set.

Common mistake

\(\emptyset\), \(0\), and \(\{0\}\) are three different things. \(\emptyset\) is a set with no elements; \(0\) is a number, not a set; and \(\{0\}\) is a set with exactly one element (that element happens to be the number zero). In particular \(|\emptyset| = 0\) but \(|\{0\}| = 1\).

Next, containment between sets. We say \(A\) is a subset of \(B\), written \(A \subseteq B\) ("\(A\) is contained in \(B\)"), when every element of \(A\) is also an element of \(B\). For example \(\{1, 3\} \subseteq \{1, 2, 3\}\): both members of the smaller set appear in the larger one. Every set is a subset of itself, and the empty set is a subset of everything (there is no element of \(\emptyset\) that could fail the test). When \(A \subseteq B\) but \(A \neq B\), we call \(A\) a proper subset and write \(A \subsetneq B\): \(B\) contains everything in \(A\) plus at least one more element. In Chapter 1 the word "subgraph" will be built on exactly this idea.

Common mistake

Do not confuse \(\in\) with \(\subseteq\). The symbol \(\in\) relates an element to a set; \(\subseteq\) relates a set to a set. So \(1 \in \{1,2\}\) is correct, and \(\{1\} \subseteq \{1,2\}\) is correct, but \(1 \subseteq \{1,2\}\) and \(\{1\} \in \{1,2\}\) are both wrong. Ask: is the thing on the left a member, or a sub-collection?

2 3 5 7 4 9 A B
Figure 0.1. The set \(A = \{2,3,5,7\}\) drawn as a blob. The dots 4 and 9 lie outside: \(4 \notin A\). The dashed region \(B = \{2,3\}\) sits entirely inside \(A\), so \(B \subseteq A\), and since \(A\) has extra elements, \(B \subsetneq A\).

Combining sets

Three operations build new sets from old ones, and all three will appear on nearly every page of this course. The union \(A \cup B\) ("\(A\) union \(B\)") collects everything that is in \(A\) or in \(B\) or in both; the cup shape can be remembered as a container catching both sets. The intersection \(A \cap B\) ("\(A\) intersect \(B\)") keeps only what is in both sets at once. The set difference \(A \setminus B\) ("\(A\) minus \(B\)") keeps the elements of \(A\) that are not in \(B\). With \(A = \{1,2,3\}\) and \(B = \{3,4,5\}\):

\[ A \cup B = \{1,2,3,4,5\}, \qquad A \cap B = \{3\}, \qquad A \setminus B = \{1,2\}. \]

In words: the union has all five numbers, the intersection has only the shared element 3, and the difference removes 3 from \(A\), leaving 1 and 2. Two sets with nothing in common, meaning \(A \cap B = \emptyset\), are called disjoint. Disjointness is everywhere in graph theory: two paths that share no vertex, two teams that share no player.

1 2 3 4 5 A B
Figure 0.2. \(A = \{1,2,3\}\) and \(B = \{3,4,5\}\). The highlighted dot 3 lies in the overlap, so \(A \cap B = \{3\}\); the union \(A \cup B\) is all five dots; the difference \(A \setminus B\) is \(\{1,2\}\).

Set-builder notation

Listing elements only works for small sets. For large or infinite sets we describe membership by a property instead. The pattern \(\{x : x \text{ has property } P\}\) reads "the set of all \(x\) such that \(x\) has property \(P\)." The colon is pronounced "such that" (some books use a vertical bar \(\mid\) instead; it means the same). Often the left side also announces where \(x\) comes from: \(\{x \in \mathbb{Z} : x^2 < 10\}\) reads "the set of all integers \(x\) such that \(x\) squared is less than ten," which works out to \(\{-3,-2,-1,0,1,2,3\}\). Reading set-builder notation is a two-step routine: first identify the pool being drawn from, then apply the filter after the colon.

Worked example

Unpack \(D = \{n \in \mathbb{N} : n \text{ divides } 12\}\). Pool: the natural numbers. Filter: divides 12. Walk through candidates: 1 divides 12, yes; 2 yes; 3 yes; 4 yes; 5 no; 6 yes; 12 yes; anything above 12, no. So \(D = \{1,2,3,4,6,12\}\), and its size is \(|D| = 6\).

That last symbol deserves its own sentence. The cardinality \(|A|\) of a finite set is simply how many elements it has: \(|\{a,b,c\}| = 3\). Graph theory is full of counting, so these bars appear constantly; in Chapter 1 you will meet \(|G|\) for the number of vertices of a graph \(G\) and \(\|G\|\) for its number of edges.

Partitions

One more piece of set vocabulary carries a lot of weight later: cutting a set into non-overlapping pieces. Think of sorting a class of students into project groups where every student joins exactly one group and no group is empty.

Definition — partition

A partition of a set \(A\) is a collection of non-empty subsets of \(A\), called its blocks (or classes), such that the blocks are pairwise disjoint and their union is all of \(A\). In plain words: every element of \(A\) lands in exactly one block; nothing is left out, nothing is counted twice, and no block is empty.

For example, \(\{\{a,b\}, \{c\}, \{d,e\}\}\) is a partition of \(\{a,b,c,d,e\}\) into three blocks. But \(\{\{a,b\},\{b,c\}\}\) is not a partition of \(\{a,b,c\}\) (the element \(b\) appears twice), and \(\{\{a,b\}\}\) is not a partition of \(\{a,b,c\}\) (the element \(c\) is left out). Partitions will return when we split a graph's vertices into two sides (Chapter 1, bipartite graphs) and when we group vertices by colour in Chapter 5: a proper colouring is exactly a partition of the vertex set into classes that contain no edge.

a b c d e
Figure 0.3. A partition of \(\{a,b,c,d,e\}\) into the blocks \(\{a,b\}\), \(\{c\}\), \(\{d,e\}\). Every dot lies in exactly one cell.

Three of these are the same set. Which one is different from the other three?

  1. \(\{\{1\}, 2\}\)
  2. \(\{2, 1\}\)
  3. \(\{1, 1, 2\}\)
  4. \(\{1, 2\}\)
Answer: A. Its members are the set \(\{1\}\) and the number 2, so it is not the same collection as the other three. Those three agree, because order and repetition never change a set.

Which collection is a partition of \(\{1,2,3,4\}\)?

  1. \(\{\{1,2\}, \{2,3,4\}\}\)
  2. \(\{\{1,2\}, \{3\}\}\)
  3. \(\{\{1,3\}, \{2\}, \{4\}\}\)
  4. \(\{\{1,2,3,4\}, \emptyset\}\)
Answer: C. Every element lands in exactly one non-empty block. Option A puts 2 in two blocks, option B leaves 4 out, and option D includes an empty block, which the definition forbids.

The standard number sets

Three infinite sets of numbers get reserved letters, written in a doubled "blackboard bold" font so they can never be mistaken for ordinary variables. \(\mathbb{N}\) is the set of natural numbers: the counting numbers together with zero, \(\{0, 1, 2, 3, \dots\}\). Warning worth repeating: some books start \(\mathbb{N}\) at 1, but Diestel includes 0, and this course follows Diestel throughout[1]. \(\mathbb{Z}\) is the set of integers, all whole numbers including negatives (the letter comes from the German Zahlen, "numbers"). \(\mathbb{R}\) is the set of real numbers: every point on the continuous number line, including fractions like \(\tfrac{1}{2}\) and irrational values like \(\sqrt{2}\). Each set contains the previous one: \(\mathbb{N} \subsetneq \mathbb{Z} \subsetneq \mathbb{R}\).

From \(\mathbb{R}\) we carve out intervals. The closed interval \([a, b]\) is \(\{x \in \mathbb{R} : a \le x \le b\}\), endpoints included; the open interval \((a, b)\) excludes both endpoints. Graph theory uses intervals mostly for probabilities in Chapter 11, where every probability lives in \([0,1]\).

Two pieces of shorthand from Diestel's opening pages will recur constantly[1]. First, for a natural number \(n\), the set \([n] = \{1, \dots, n\}\) ("one up to \(n\)") is the standard \(n\)-element set; \([4] = \{1,2,3,4\}\). It is the mathematician's box of \(n\) interchangeable labels. Second, the floor and ceiling brackets round real numbers to integers: \(\lfloor x \rfloor\) rounds down, \(\lceil x \rceil\) rounds up. So \(\lfloor 7/2 \rfloor = 3\) and \(\lceil 7/2 \rceil = 4\), while for a whole number both do nothing: \(\lfloor 3 \rfloor = \lceil 3 \rceil = 3\). These appear whenever a count must be a whole number: you cannot have \(3.5\) vertices, so a theorem will promise "at least \(\lceil n/2 \rceil\)" of something.

Common mistake

Floor is not "chop off the decimals" for negative numbers: \(\lfloor -2.5 \rfloor = -3\), because floor always moves down the number line. Similarly \(\lceil -2.5 \rceil = -2\). For the non-negative quantities of this course the naive reading is safe, but keep the honest definition in mind.

What is \(\lceil 7/2 \rceil + \lfloor -2.5 \rfloor\)?

  1. \(2\)
  2. \(1\)
  3. \(0\)
  4. \(7\)
Answer: B. \(\lceil 3.5 \rceil = 4\), and floor always moves down the number line, so \(\lfloor -2.5 \rfloor = -3\); the sum is \(1\). Option A comes from chopping the decimals off \(-2.5\) to get \(-2\).

Pairs, products, and the notation behind edges

Sets ignore order, but sometimes order is the whole point. The ordered pair \((a, b)\) packages two objects with a designated first and second; \((1, 2) \neq (2, 1)\), unlike \(\{1,2\} = \{2,1\}\). Given two sets, the Cartesian product \(A \times B\) ("\(A\) cross \(B\)") is the set of all ordered pairs whose first entry comes from \(A\) and second from \(B\). For example \(\{1,2\} \times \{x, y\} = \{(1,x), (1,y), (2,x), (2,y)\}\): four pairs, because each of the 2 choices on the left combines with each of the 2 on the right, and in general \(|A \times B| = |A| \cdot |B|\). You have used a Cartesian product every time you read a spreadsheet cell as (row, column).

Common mistake

The notation \((a,b)\) is overloaded: it can mean an ordered pair or an open interval of real numbers. Context decides. If \(a\) and \(b\) are set elements, \((a,b)\) is a pair; if the text is about real numbers between \(a\) and \(b\), it is an interval. Diestel rarely needs open intervals, so in this course \((a,b)\) is almost always a pair.

Now the unordered counterpart, which matters more to us. For a set \(A\) and a natural number \(k\), Diestel writes \([A]^k\) for the set of all \(k\)-element subsets of \(A\)[1]. The case \(k = 2\) is the star of this course: \([A]^2\) ("the 2-element subsets of \(A\)") is the set of all unordered pairs of distinct elements of \(A\). With \(A = \{a, b, c\}\):

\[ [A]^2 = \bigl\{ \{a,b\},\ \{a,c\},\ \{b,c\} \bigr\}. \]

Note the difference from \(A \times A\): the pair \(\{a,b\}\) is the same object as \(\{b,a\}\), and pairs like \((a,a)\) do not exist here because the two elements must be distinct. Why care? Because this is literally how graphs are defined. In Chapter 1, a graph on a vertex set \(V\) will be given by choosing its edge set \(E \subseteq [V]^2\): an edge simply is an unordered pair of distinct vertices. Draw each element of \(A\) as a dot and each 2-element subset as a line between its two dots, and you have already drawn your first graph.

{a, b} {a, c} {b, c} a b c
Figure 0.4. The set \([\{a,b,c\}]^2\) has three members, each an unordered pair. Drawing each pair as a line between its elements produces a triangle: the complete graph on three vertices, which Chapter 1 will name \(K^3\).

Let \(V = \{u, v, w\}\). How many elements does \(V \times V\) have, and how many does \([V]^2\) have?

  1. 6 and 3
  2. 9 and 6
  3. 9 and 3
  4. 3 and 9
Answer: C. \(V \times V\) holds \(3 \cdot 3 = 9\) ordered pairs, repeats like \((u,u)\) included, while \([V]^2\) holds only the 3 unordered pairs of distinct elements. Option B counts each unordered pair twice.

Functions: rules with an input side and an output side

A function is a machine that takes inputs from one set and returns outputs in another, with one strict promise: every input produces exactly one output. The notation \(f\colon A \to B\) reads "\(f\) is a function from \(A\) to \(B\)": \(A\) is the domain (the set of allowed inputs), \(B\) the codomain (the set where outputs live), and for each input \(x \in A\) the output is written \(f(x)\). The rule can be a formula, like \(f(x) = x^2\), but it does not have to be; "assign to each student their seat" is a perfectly good function from students to seats.

Two derived notations let us talk about whole sets of inputs and outputs at once. The image of a subset \(A' \subseteq A\) is \(f(A') = \{f(x) : x \in A'\}\), the set of outputs actually produced from \(A'\). The preimage of an element \(y \in B\) is \(f^{-1}(y) = \{x \in A : f(x) = y\}\), the set of all inputs that map to \(y\); a preimage can have many elements or none. For \(f\colon \mathbb{Z} \to \mathbb{Z}\), \(f(x) = x^2\): the image \(f(\{-1, 2\}) = \{1, 4\}\), the preimage \(f^{-1}(4) = \{-2, 2\}\), and \(f^{-1}(3) = \emptyset\) since no integer squares to 3.

Three adjectives classify how a function uses its codomain, and all three will matter when we compare graphs in Chapter 1:

Definition — injective, surjective, bijective

A function \(f\colon A \to B\) is injective (one-to-one) if distinct inputs always give distinct outputs: \(x \neq y \Rightarrow f(x) \neq f(y)\). It is surjective (onto) if every element of \(B\) is hit: for every \(y \in B\) there is some \(x \in A\) with \(f(x) = y\). It is bijective if it is both. In plain words: injective means no output is reused, surjective means no output is missed, and bijective means the function is a perfect matching-up of \(A\) with \(B\), so the two sets must have the same size.

Bijections are how mathematics says "these two things are the same up to renaming." When Chapter 1 declares two graphs isomorphic, written \(G \simeq H\), the definition will be: a bijection between their vertex sets that preserves which pairs are edges. The word is new; the machinery is exactly this section.

Finally, functions chain. If \(f\colon A \to B\) and \(g\colon B \to C\), the composition \(g \circ f\) ("\(g\) after \(f\)") is the function from \(A\) to \(C\) defined by \((g \circ f)(x) = g(f(x))\): feed \(x\) to \(f\), feed the result to \(g\). Read compositions right to left; the function nearest the input acts first. With \(f(x) = x + 1\) and \(g(x) = 2x\), we get \((g \circ f)(3) = g(4) = 8\), while \((f \circ g)(3) = f(6) = 7\). Order matters.

1 2 3 p q r f 1 2 3 p q r g
Figure 0.5. Left: \(f\) sends both 2 and 3 to \(q\), so \(f\) is not injective; the element \(r\) (faded) is never hit, so \(f\) is not surjective either. Its image is \(f(\{1,2,3\}) = \{p, q\}\). Right: \(g\) uses each output exactly once: a bijection.

For \(f\colon \mathbb{Z} \to \mathbb{Z}\) with \(f(x) = x^2\), what is the preimage \(f^{-1}(9)\)?

  1. \(\{-3, 3\}\)
  2. \(\{3\}\)
  3. \(81\)
  4. \(3\)
Answer: A. The preimage collects every input sent to 9, and both \(3^2\) and \((-3)^2\) equal 9. Option B forgets that the domain \(\mathbb{Z}\) contains negatives; option C runs \(f\) forwards instead of backwards.

A function \(f\colon A \to B\) has \(|A| = 5\) and \(|B| = 4\). Which property is impossible for \(f\)?

  1. Surjective
  2. Injective
  3. Neither injective nor surjective
  4. Sending every element of \(A\) to the same output
Answer: B. Injective would need five distinct outputs, but \(B\) offers only four, so some output is reused. Surjective stays possible, since all four elements of \(B\) can still be hit, which is why option A tempts.

Picking, adding, and choosing

Given a finite set of numbers, \(\min\) and \(\max\) pick out its smallest and largest members: \(\min\{4, 1, 7\} = 1\) and \(\max\{4, 1, 7\} = 7\). Graph theory applies these to sets of degrees, distances, and sizes on nearly every page: "the minimum degree of \(G\)" in Chapter 1 will mean exactly \(\min\) applied to the set of all vertex degrees. One caution: an infinite set need not have a maximum (\(\mathbb{N}\) has none). For sets of real numbers, mathematicians use the supremum (\(\sup\)), the least upper bound, in place of a maximum that may not exist; you will only meet it briefly, around the infinite graphs of Chapter 8, and can read it as "the max, or the value the set climbs toward."

For adding many terms, capital sigma (the Greek S, for "sum") compresses a long addition into one expression. The notation

\[ \sum_{i=1}^{n} a_i \;=\; a_1 + a_2 + \dots + a_n \]

reads "the sum, over \(i\) running from 1 to \(n\), of \(a_i\)." The letter \(i\) is the index: a counter that takes each value from the bottom bound to the top one, contributing one term per value. It is a bound variable, meaning the name is internal scaffolding: \(\sum_{i=1}^{4} i\) and \(\sum_{j=1}^{4} j\) are the same number, namely \(1+2+3+4 = 10\). Sums can also run over a set instead of a range: \(\sum_{v \in V} d(v)\) reads "sum, over all elements \(v\) of the set \(V\), of \(d(v)\)," and this exact sum stars in the theorem at the end of this chapter. Capital pi \(\prod\) works the same way for multiplication: \(\prod_{i=1}^{4} i = 1 \cdot 2 \cdot 3 \cdot 4 = 24\), which is the factorial \(4!\).

Last comes the counting symbol you will meet from Chapter 1 to Chapter 11: the binomial coefficient \(\binom{n}{k}\), read "\(n\) choose \(k\)," counts the ways to choose a \(k\)-element subset from an \(n\)-element set. In our earlier language, \(\binom{n}{k} = \bigl|[A]^k\bigr|\) whenever \(|A| = n\). For example \(\binom{4}{2} = 6\): from \(\{a,b,c,d\}\) you can pick \(\{a,b\}, \{a,c\}, \{a,d\}, \{b,c\}, \{b,d\}, \{c,d\}\). The formula is \(\binom{n}{k} = \frac{n!}{k!\,(n-k)!}\), but the combinatorial reading is what you should hear when you see the symbol. One consequence worth memorizing now: a graph on \(n\) vertices can have at most \(\binom{n}{2} = \frac{n(n-1)}{2}\) edges, because that is how many unordered pairs of vertices exist.

At most how many edges can a graph on 6 vertices have?

  1. 36
  2. 30
  3. 12
  4. 15
Answer: D. Edges are unordered pairs of distinct vertices, and there are \(\binom{6}{2} = \frac{6 \cdot 5}{2} = 15\) of those. Option B is \(6 \cdot 5\), which counts every pair twice by treating the two orders as different.

The language of logic

Mathematical claims are built from a small logical toolkit, and misreading it is the single most common beginner error, so we go slowly here. The universal quantifier \(\forall\) ("for all") claims something about every object in view: \(\forall n \in \mathbb{N}: n^2 \ge n\) reads "for every natural number \(n\), \(n\) squared is at least \(n\)." The existential quantifier \(\exists\) ("there exists") claims only that at least one witness exists: \(\exists n \in \mathbb{N}: n^2 = 49\) reads "there is a natural number whose square is 49" (the witness is 7). A \(\forall\) claim is strong and fragile: one bad object breaks it. An \(\exists\) claim is modest and sturdy: one good object proves it.

Order of quantifiers changes meaning. "\(\forall x\ \exists y\)" lets \(y\) depend on \(x\) (for every person there is a birthday); "\(\exists y\ \forall x\)" demands one fixed \(y\) that works for everyone (one single day on which every person was born). The first is true of people, the second absurd. When you read nested quantifiers, process them left to right, imagining a game: each \(\forall\) is a move by an adversary who picks the worst case, each \(\exists\) is your move, and the claim says you can always win.

The implication \(P \Rightarrow Q\) ("if \(P\) then \(Q\)") promises that whenever \(P\) holds, \(Q\) holds too. It says nothing about situations where \(P\) fails. "If it rains, the street gets wet" is not contradicted by a dry rainless day, nor by a street soaked by a burst pipe. Two rephrasings are worth learning as vocabulary: \(P\) is a sufficient condition for \(Q\) (having \(P\) is enough to guarantee \(Q\)), and \(Q\) is a necessary condition for \(P\) (without \(Q\), you cannot have \(P\)). A graph preview: being connected is necessary for a graph to have a Hamilton cycle (Chapter 10), but it is nowhere near sufficient.

Common mistake

An implication and its converse are different claims. From \(P \Rightarrow Q\) you may NOT conclude \(Q \Rightarrow P\). "If \(G\) is complete then \(G\) is connected" is true; "if \(G\) is connected then \(G\) is complete" is false (a path is connected but far from complete). When both directions do hold, we write \(P \Leftrightarrow Q\), "\(P\) if and only if \(Q\)," often abbreviated iff. Definitions are always secretly iff statements.

What is genuinely equivalent to \(P \Rightarrow Q\) is its contrapositive, \(\neg Q \Rightarrow \neg P\) ("if \(Q\) fails then \(P\) fails"). "If it rains, the street gets wet" carries exactly the same information as "if the street is dry, it is not raining." Keep this in your pocket; it becomes a proof technique two sections from now.

Finally, negation. To negate a quantified claim, flip the quantifier and negate the inside. The negation of "\(\forall x: P(x)\)" is "\(\exists x: \neg P(x)\)": to deny that all swans are white, you need one non-white swan, not a world of black ones. Symmetrically, the negation of "\(\exists x: P(x)\)" is "\(\forall x: \neg P(x)\)". So the negation of "every vertex has degree at least 3" is "some vertex has degree at most 2." Not "every vertex has degree less than 3": that is a far stronger claim than the negation requires. Getting this reflex right is half of reading proofs by contradiction.

Compare "for every integer \(x\) there is an integer \(y\) with \(y > x\)" and "there is an integer \(y\) such that \(y > x\) for every integer \(x\)". Which is true?

  1. Only the first
  2. Only the second
  3. Both
  4. Neither
Answer: A. In the first, \(y\) may depend on \(x\), so \(y = x+1\) always works. The second demands one fixed integer larger than every integer, and none exists: swapping the quantifiers changed the claim.

How proofs work

A theorem is a claim; a proof is an airtight argument that the claim is true. Reading proofs is easier once you recognize that almost all of them follow one of a handful of standard shapes. Here are the five you will meet in this course, each with a miniature genuine example.

Direct proof

Start from the hypothesis, push forward with definitions and known facts, arrive at the conclusion. To prove "if \(n\) is even then \(n^2\) is even": \(n\) even means \(n = 2k\) for some integer \(k\) (that is the definition); then \(n^2 = 4k^2 = 2(2k^2)\), which is 2 times an integer, hence even. No tricks, just unpacking definitions and computing. When a proof in this course is direct, we will usually only sketch the push.

Contrapositive

To prove \(P \Rightarrow Q\), you may instead prove \(\neg Q \Rightarrow \neg P\); we saw these are the same claim. This helps when the negations are easier to compute with. To prove "if \(n^2\) is even then \(n\) is even," the direct route is awkward, but the contrapositive is the previous paragraph in disguise: if \(n\) is odd, say \(n = 2k+1\), then \(n^2 = 4k^2 + 4k + 1\), which is odd. Done.

Contradiction

Assume the theorem is false, then derive something absurd; since mathematics cannot contain an absurdity, the assumption must have been wrong. The classic: there are infinitely many primes. Suppose not, so a complete finite list \(p_1, \dots, p_k\) exists. Multiply them all and add one: \(m = p_1 p_2 \cdots p_k + 1\). Dividing \(m\) by any listed prime leaves remainder 1, so no prime on the list divides \(m\). But every number greater than 1 has some prime factor, so there is a prime missing from our "complete" list. Contradiction; no finite list can exist. When you read "suppose, for a contradiction, that..." the author is announcing this shape: everything after that phrase lives inside the doomed assumption.

A torn brown papyrus in two joined pieces, carrying about eight lines of Greek in dark ink, with a small drawn rectangle divided by lines at the lower right.
Plate 0.C. Elements Book II, Proposition 5, copied out between AD 75 and 125 and excavated at Oxyrhynchus in the 1890s. The freehand figure at the lower right is the proposition's diagram, among the oldest that survive from Euclid. A proof is a physical object somebody wrote by hand, and most of this one is gone. c. AD 100. Wikimedia Commons, public domain.

Induction

Induction proves a statement for every natural number at once. You verify the base case (the statement for \(n = 1\), or wherever it starts) and the induction step: assuming the statement for \(n\) (the induction hypothesis), you prove it for \(n+1\). The two together cover everything: the base case lights the first rung of the ladder, and the step says each lit rung lights the next. Diestel's proofs use induction constantly, often on the number of vertices or edges of a graph: delete something, apply the hypothesis to the smaller graph, and rebuild.

Worked example

Claim. For every \(n \ge 1\), the sum of the first \(n\) odd numbers is \(n^2\): \(\;\sum_{i=1}^{n} (2i-1) = n^2\).

Base case (\(n=1\)): the first odd number is 1, and \(1 = 1^2\). True.

Induction step: assume the claim holds for some \(n\), i.e. \(1 + 3 + \dots + (2n-1) = n^2\). The next odd number is \(2n+1\). Adding it to both sides: \(1 + 3 + \dots + (2n-1) + (2n+1) = n^2 + 2n + 1 = (n+1)^2\). That is exactly the claim for \(n+1\). By induction, the claim holds for every \(n \ge 1\). Check against Figure 0.6: \(1 + 3 + 5 + 7 = 16 = 4^2\).

1 3 5 7 4 x 4 = 16
Figure 0.6. Why the sum of the first \(n\) odd numbers is \(n^2\): each new odd number is an L-shaped shell wrapped around the previous square. Here \(1 + 3 + 5 + 7\) fills a \(4 \times 4\) square exactly. The induction step is the act of adding one more shell.

The pigeonhole principle

If you put more than \(n\) objects into \(n\) boxes, some box receives at least two. Obvious, and surprisingly powerful. Formally: if \(m\) objects go into \(n\) boxes and \(m > n\), then some box holds at least \(\lceil m/n \rceil\) objects (note the ceiling: objects come in whole numbers). Instant application: among any 13 people, two share a birth month, because 13 people distribute into 12 months. A graph application you will be able to verify after Chapter 1: in any graph with at least two vertices, two vertices have the same degree. Pigeonhole arguments run through matching theory in Chapter 2 and grow into the deep counting arguments of Ramsey theory in Chapter 9, which is pigeonhole with ambition.

5 objects, 4 boxes
Figure 0.7. The pigeonhole principle: 5 objects in 4 boxes force some box (highlighted) to hold at least \(\lceil 5/4 \rceil = 2\) objects. No cleverness in the distribution can avoid it.

Two phrases and one warning

You will often read "without loss of generality" (WLOG). It means: the situation has a symmetry, so we may fix one of several interchangeable cases and the argument covers the rest by renaming. If \(x\) and \(y\) are two distinct numbers, we may say "WLOG \(x < y\)": if instead \(y < x\), swap the names and rerun the identical argument. When you meet WLOG, pause and check that the symmetry is real; authors occasionally smuggle a genuine assumption inside it, and spotting that is good sport.

The warning concerns evidence versus proof. A universal claim (\(\forall\)) is never established by examples, however many; it is destroyed by a single counterexample. "Every odd number greater than 1 is prime" survives 3, 5, 7, then dies at \(9 = 3 \times 3\). One counterexample ends the discussion for all time. This asymmetry explains mathematicians' habits: to support a "for all" statement they reach for proof, and to attack one they hunt for a small ugly example. When this course states a conjecture (an unproven claim), the honest status is: no proof, and no counterexample found yet.

You decide to prove "if \(n^3\) is even then \(n\) is even" by contrapositive. Which statement do you prove instead?

  1. If \(n\) is even then \(n^3\) is even
  2. If \(n^3\) is odd then \(n\) is odd
  3. If \(n\) is odd then \(n^3\) is odd
  4. Assume \(n^3\) is even and \(n\) is odd, then derive an absurdity
Answer: C. The contrapositive negates both halves and swaps their roles. Option B negates without swapping, which is the converse in disguise, and option D describes proof by contradiction, a different shape.

Thirty students have birthdays spread over the seven days of the week. What is the strongest conclusion the pigeonhole principle gives?

  1. Some day carries at least 2 of the birthdays
  2. Some day carries at least 4 of the birthdays
  3. Some day carries at least 7 of the birthdays
  4. Some day carries at least 5 of the birthdays
Answer: D. The bound is \(\lceil 30/7 \rceil = 5\). Option B rounds the other way: four per day accounts for only 28 students, so four cannot be the strongest guarantee.

Growth language: big-O and friends

Later chapters, especially the random graphs of Chapter 11 and the algorithmic material in Part IV, compare quantities for large \(n\), where only the dominant trend matters. The notation \(O(n^2)\) ("big-O of \(n\) squared") describes any quantity that, for all large enough \(n\), stays below some fixed constant times \(n^2\). So \(5n^2 + 3n + 40\) is \(O(n^2)\): the \(n^2\) term dominates, and the constant 5 is deliberately ignored. Big-O is an upper-bound statement about growth shape, not an exact count.

Common mistake

"\(f\) is \(O(n^2)\)" does not mean \(f\) grows like \(n^2\); it means \(f\) grows at most like \(n^2\). The function \(n\) is also \(O(n^2)\), true but unflattering. When authors want "at most," they write \(O\); a growth rate that is also matched from below is signalled with words like "of order exactly" or with sharpness claims.

The companion \(o(1)\) ("little-o of one") denotes a quantity that tends to 0 as \(n\) grows; \(1/n\) and \(1/\log n\) are both \(o(1)\). More generally \(o(g)\) means "grows strictly slower than \(g\)." The word asymptotically means "in the limit of large \(n\)": the phrase "asymptotically almost surely," which saturates Chapter 11, means "with probability tending to 1 as the graph grows." And a convention to pin down once: in this course, as in Diestel, \(\log n\) means logarithm base 2, and \(\ln n\) is the natural logarithm[1]. Since \(\log 1024 = 10\), logarithms grow ludicrously slowly, which is why an \(O(\log n)\) bound is a compliment.

In this course, what is \(\log 32\)?

  1. \(5\), because \(\log\) here means base 2
  2. About \(1.5\), because \(\log\) here means base 10
  3. About \(3.5\), because \(\log\) here means the natural logarithm
  4. \(16\), because \(\log\) halves its input
Answer: A. Following Diestel, \(\log\) is base 2, and \(2^5 = 32\); the natural logarithm is written \(\ln\) instead. Option B is the calculator convention from school, which this course does not use.

The Greek letters you will meet

Graph theory names its central quantities with Greek letters, one letter per concept, held fixed across the whole book. Learning the letters now removes a layer of friction later. Here are the ones this course uses, with their future meanings as a preview; each will be properly defined in its own chapter.

LetterNameWhat it will mean in this courseWhere
\(\alpha\)alphaIndependence number: the size of the largest set of pairwise non-adjacent vertices.Chapter 5
\(\delta\)delta (lowercase)Minimum degree: the smallest number of edges at any one vertex.Chapter 1
\(\Delta\)Delta (capital)Maximum degree: the largest number of edges at any one vertex.Chapter 1
\(\varepsilon\)epsilonEdge density: the ratio of edges to vertices. (Elsewhere in mathematics, a tiny positive number.)Chapter 1
\(\kappa\)kappaConnectivity: how many vertices must be deleted to disconnect the graph.Chapter 3
\(\lambda\)lambdaEdge-connectivity: how many edges must be deleted to disconnect the graph.Chapter 3
\(\chi\)chiChromatic number: the fewest colours needed to colour vertices with no clash; \(\chi'\) for edges.Chapter 5
\(\omega\)omegaClique number: the size of the largest set of pairwise adjacent vertices.Chapter 5
\(\pi\)piThe circle constant \(3.14159\dots\), appearing in counting and probability estimates.Chapter 11

Notice the pattern in the pairs: lowercase \(\delta\) versus capital \(\Delta\) (minimum versus maximum degree), and the vertex/edge twins \(\kappa\)/\(\lambda\) and \(\chi\)/\(\chi'\). Diestel keeps these assignments rigidly consistent, which is a kindness: after a few chapters, \(\kappa\) will trigger "connectivity" in your head before you consciously read it.

In a graph \(G\), every vertex has between 2 and 5 edges at it, and both extremes occur. Which line is written correctly?

  1. \(\delta(G) = 5\) and \(\Delta(G) = 2\)
  2. \(\delta(G) = 2\) and \(\Delta(G) = 5\)
  3. \(\kappa(G) = 2\) and \(\chi(G) = 5\)
  4. \(\alpha(G) = 2\) and \(\varepsilon(G) = 5\)
Answer: B. Lowercase \(\delta\) is the minimum degree and capital \(\Delta\) the maximum, so the small letter takes the small number. Option A swaps the pair, the most common slip with these two letters.

How to read a theorem

A theorem statement is a machine with two chambers. The hypothesis is everything before the main verb: the conditions you must check before the theorem applies. The conclusion is what you get once they hold. "Every connected graph on \(n\) vertices has at least \(n-1\) edges" has hypothesis "the graph is connected, with \(n\) vertices" and conclusion "at least \(n-1\) edges." The theorem is silent about disconnected graphs; applying a theorem whose hypothesis fails is the mathematical equivalent of using a ticket for the wrong train.

Hidden quantifiers do most of the work. "Every connected graph..." is a \(\forall\) claim over all connected graphs, of any size and shape, including monstrous ones no one will ever draw. That is why examples cannot prove it and one counterexample would kill it. Meanwhile the conclusion "has at least \(n-1\) edges" contains a bound, and bounds invite a follow-up question that mathematicians ask reflexively: can the bound be improved? Here the vocabulary of quality control enters. A bound is sharp (or best possible) if some example actually achieves it, so no stronger bound of the same form is true. The bound \(n-1\) is sharp because trees, coming in Chapter 1, are connected with exactly \(n-1\) edges. Similarly, "among 13 people two share a birth month" is sharp in the count 13: with 12 people, all months can differ. When Diestel remarks that a theorem is best possible, he is exhibiting such an extremal example; the whole of Chapter 7 is devoted to this game.

Let us dissect one real statement slowly. It is the first result of graph theory you will meet, stated here informally as a preview; Chapter 1 will define every term and prove it.

Theorem — the degree-sum formula (the "handshake lemma")

In every finite graph, the sum of the degrees of all vertices equals twice the number of edges: \(\;\sum_{v \in V} d(v) = 2\,|E|\).[2]

Reading it with this chapter's tools: the hidden quantifier is "\(\forall\) finite graphs," so the claim covers every graph without exception. The symbol \(\sum_{v \in V} d(v)\) reads "the sum, over all vertices \(v\) in the vertex set \(V\), of the degree of \(v\)," where the degree \(d(v)\) counts the edges touching \(v\). And \(|E|\) is the cardinality of the edge set: the number of edges. The proof idea is one sentence of double counting: walk through the edges one at a time, and note that each edge has exactly two ends, so it contributes exactly 2 to the total degree count, once at each endpoint. The observation goes back to Leonhard Euler's 1736 study of the bridges of Königsberg, the paper usually taken as the birth of graph theory[2]. The nickname comes from the party version: the total number of hands shaken, summed over all guests, is even, because every handshake involves two people.

a b c d 3 2 3 2
Figure 0.8. A graph with 5 edges (the diagonal \(ac\) highlighted). The number beside each vertex is its degree. Check: \(3 + 2 + 3 + 2 = 10 = 2 \times 5\). Each edge contributes 2 to the sum, once at each end.

One immediate consequence shows how much a small formula can carry: since the degree sum is always even, every graph has an even number of vertices of odd degree. At any party, ever held or ever possible, the number of guests who shook an odd number of hands is even. A one-line double count settling a universal claim: that is the kind of return on effort this subject keeps delivering.

You now own the vocabulary. When Chapter 1 opens with "a graph is a pair \(G = (V, E)\) of sets with \(E \subseteq [V]^2\)," you will read it calmly: a graph is an ordered pair, its first entry a set of vertices, its second a chosen collection of unordered pairs of them. Everything else in this course is commentary on that sentence.

Which list of vertex degrees is impossible for a finite graph?

  1. \(1, 1, 2, 2\)
  2. \(3, 2, 2, 1\)
  3. \(3, 3, 2, 1\)
  4. \(2, 2, 2, 2\)
Answer: C. Those degrees sum to 9, but the degree-sum formula forces the total to equal \(2\,|E|\), which is even. The other three lists sum to 6, 8 and 8, so each one survives this test.

Check your understanding

What is the set \(\{x \in \mathbb{Z} : x^2 < 10\}\)?

  1. \(\{0, 1, 2, 3\}\)
  2. \(\{1, 2, 3\}\)
  3. \(\{-3, -2, -1, 0, 1, 2, 3\}\)
  4. \(\{-9, \dots, 9\}\)
Answer: C. The pool is \(\mathbb{Z}\), all integers, so negatives are included: \((-3)^2 = 9 < 10\). Option A forgets the negatives by silently reading \(\mathbb{Z}\) as \(\mathbb{N}\); option D filters on \(x\) instead of \(x^2\).

Which of the following statements is true?

  1. \(\emptyset \subseteq \{1, 2\}\)
  2. \(\emptyset \in \{1, 2\}\)
  3. \(1 \subseteq \{1, 2\}\)
  4. \(\{1\} \in \{1, 2\}\)
Answer: A. The empty set is a subset of every set: no element of \(\emptyset\) can violate the membership test. The others confuse \(\in\) with \(\subseteq\): the elements of \(\{1,2\}\) are the numbers 1 and 2, not \(\emptyset\) or \(\{1\}\), and the number 1 is an element, not a subset.

With \(A = \{1,2,3\}\) and \(B = \{3,4\}\), what is \(|A \cup B|\)?

  1. 5
  2. 4
  3. 6
  4. 3
Answer: B. \(A \cup B = \{1,2,3,4\}\): the shared element 3 is counted once, because sets ignore repetition. Answer A adds the sizes \(3 + 2\) and double-counts the overlap.

In Diestel's notation, what does \([5]\) mean?

  1. The set \(\{0, 1, 2, 3, 4, 5\}\)
  2. The number 5 in brackets, with no special meaning
  3. The set \(\{5\}\)
  4. The set \(\{1, 2, 3, 4, 5\}\)
Answer: D. \([n]\) is shorthand for \(\{1, \dots, n\}\), the standard \(n\)-element set. It starts at 1, not 0, even though Diestel's \(\mathbb{N}\) includes 0.

What is \(\lfloor 2.7 \rfloor + \lceil 2.1 \rceil\)?

  1. 4
  2. 6
  3. 5
  4. 4.8
Answer: C. Floor rounds down: \(\lfloor 2.7 \rfloor = 2\). Ceiling rounds up: \(\lceil 2.1 \rceil = 3\). So the sum is 5. Option A rounds both numbers down; ceiling is not a second floor.

Let \(f\colon \{1,2,3\} \to \{p,q\}\) with \(f(1) = p\), \(f(2) = q\), \(f(3) = q\). Which description fits \(f\)?

  1. Injective but not surjective
  2. Surjective but not injective
  3. Bijective
  4. Neither injective nor surjective
Answer: B. Both outputs \(p\) and \(q\) are hit, so \(f\) is surjective; but 2 and 3 share the output \(q\), so \(f\) is not injective. A bijection is impossible here anyway: the domain has 3 elements and the codomain only 2.

What is the negation of "every vertex of \(G\) has degree at least 3"?

  1. Every vertex of \(G\) has degree less than 3
  2. No vertex of \(G\) has degree at least 3
  3. Every vertex of \(G\) has degree exactly 2
  4. Some vertex of \(G\) has degree less than 3
Answer: D. Negating a "for all" gives a "there exists": one vertex of degree at most 2 is enough to falsify the claim. Options A and B negate the inner statement but keep (or strengthen) the universal quantifier, which claims far more than the negation is entitled to.

"If \(G\) is complete, then \(G\) is connected" is true. Which statement follows logically from it?

  1. If \(G\) is not connected, then \(G\) is not complete
  2. If \(G\) is connected, then \(G\) is complete
  3. If \(G\) is not complete, then \(G\) is not connected
  4. \(G\) is complete if and only if \(G\) is connected
Answer: A. That is the contrapositive, which is equivalent to the original implication. Options B and C are the converse and the inverse: independent claims that happen to be false here (a path is connected but not complete).

Among any 25 people, at least three were born in the same month. Which principle proves this, and how?

  1. Induction: the base case of 12 people has one per month
  2. Pigeonhole: 25 objects in 12 boxes force a box with at least \(\lceil 25/12 \rceil = 3\)
  3. Contradiction: assume all 25 share a month and derive absurdity
  4. Counterexample: exhibit 25 people, three sharing a month
Answer: B. With months as boxes, some month receives at least \(\lceil 25/12 \rceil = 3\) people; 24 people could still manage two per month, so 25 is exactly where three becomes forced. Option D has it backwards: examples support existence claims, never universal ones.

A running time is described as \(O(n^2)\). What exactly is being claimed?

  1. The running time equals \(n^2\) steps for every input size
  2. The running time grows at least as fast as \(n^2\)
  3. The running time is \(n^2\) plus a small constant
  4. For large \(n\), the running time is at most a constant times \(n^2\)
Answer: D. Big-O is an upper bound on growth, up to a constant factor and only for large \(n\). It is not an exact count (A, C) and not a lower bound (B); a time of \(n\) steps is also, unhelpfully, \(O(n^2)\).

Sources and further reading

  1. R. Diestel, Graph Theory, 6th ed., Springer GTM 173 (2024), Chapter 1 preliminaries and §1.1: notational conventions, including \(\mathbb{N}\) containing 0, \([n]\), \([A]^k\), floor and ceiling, and \(\log\) taken base 2.
  2. R. Diestel, Graph Theory, 6th ed., Springer GTM 173 (2024), §1.2: vertex degrees and the degree-sum formula (Proposition 1.2.1), with the historical roots of graph theory in Euler's 1736 Königsberg bridges paper discussed in the book's notes.
  3. P. R. Halmos, Naive Set Theory, Springer (1974). A short, readable classic on sets, functions, and the habits of set-theoretic notation.
  4. D. J. Velleman, How to Prove It: A Structured Approach, 3rd ed., Cambridge University Press (2019). A patient full-course treatment of logic, quantifiers, and every proof technique sketched in this chapter.