Section 5.2 Basic Definitions
Objectives
- Define basic graph theoretic concepts such as vertex, edge, path, trail, degree and so on.
- Prove simple properties about graphs by applying these definitions appropriately.
- Determine whether or not a given degree sequence can be realized as a graph.
Video: Graph Theory Definitions
We now formally state the definition of a graph. Unless otherwise specified, the graphs you will encounter in this text are simple graphs.
Definition 5.2.1. Graph.
A graph \(G\) is defined as a pair \(G = (V,E)\) where \(V\) is a finite set consisting of elements called vertices, and \(E\) is a collection of unordered pairs of elements in \(V\) called edges.
If \(e = (u,v)\) is an edge of the graph, then we say that the vertices \(u\) and \(v\) are the endpoints of the edge \(e\text{.}\) The vertices \(u\) and \(v\) are called adjacent vertices; the edge \(e\) is also said to be incident to the vertices \(u\) and \(v\text{.}\)
Definition 5.2.2. Simple Graphs and Multigraphs.
A graph \(G = (V,E)\) is a simple graph if \(E\) has no repeated elements, i.e., between every pair of vertices there is at most one edge. A graph that is permitted to have multiple edges between a pair of vertices is called a multigraph.
Visually, a graph can be drawn by using points to represent its vertices, and lines connecting pairs of vertices to represent the edges.
Example 5.2.3. First Graph.
Define the graph \(G\) to have vertices
and edges
We can represent this graph by labeling five nodes, and drawing each edge.
Checkpoint 5.2.4. Draw These Graphs.
Draw each of the following graphs:
- \(G_1 = (V_1, E_1)\) where \(V_1 = \{p, q, r, s, t, u\}\) and \(E_1 = \{(p,q),(q,r),(q,s),(q,t),(q,u),(r,s),(r,t),(r,u),(s,u)\}\text{.}\)
- \(G_2 = (V_2, E_2)\) where \(V_2 = \{1,2,3,4\}\) and \(E_2\) contains all pairs of elements from \(V_2\text{.}\)
Checkpoint 5.2.5. List Vertices and Edges.
List all elements in the vertex and edge sets of each graph below.
Definition 5.2.6. Degree of a vertex.
The degree \(d(v)\) of a vertex \(v\) is the number of edges incident to it.
The degree sequence of a graph is the nonincreasing sequence of numbers formed by the degrees of its vertices.
The degree sequence of a graph is a well-defined object, since the nonincreasing condition gives a canonical ordering of the vertex degrees to form the sequence.
Example 5.2.7. Degree sequence.
In the graph of Example 5.2.3, the degrees of each vertex are:
Vertex | \(v_1\) | \(v_2\) | \(v_3\) | \(v_4\) | \(v_5\) |
Degree | 3 | 2 | 1 | 2 | 2 |
We write this as \(d(v_1) = 3\text{,}\) \(d(v_2) = 2\text{,}\) and so on. Hence the degree sequence of the graph is 3, 2, 2, 2, 1 (just rearrange the numbers in nonincreasing order).
Checkpoint 5.2.8. Write the Degree Sequence.
Determine the degrees of each vertex of the graphs \(G_1\text{,}\) \(G_2\text{,}\) \(G_3\text{,}\) and \(G_4\) from Checkpoint 5.2.4 and Checkpoint 5.2.5, then write the degree sequence of each graph.
Checkpoint 5.2.9. Zero Degrees.
In a graph, what does it mean for a vertex \(v\)to have degree \(d(v) = 0\text{?}\) Can you draw a graph with degree sequence 0, 0, 0, 0, 0?
While it is easy to write the degree sequence of a given graph, it is much harder to start with a nonincreasing sequence and determine whether or not it is possible to draw a graph with that particular sequence of vertex degrees.
From the next result we can derive one simple way to tell if given sequence cannot be realized as a graph. This will be our first graph theory proof: that the sum of the degrees of all vertices must be equal to twice the number of edges in the graph.
Video: Handshake Lemma
Theorem 5.2.10. Degree-Sum Formula.
Let \(G\) be a graph with \(m\) edges. Then
Proof.
If \((u,v)\) is an edge of \(G\text{,}\) then it contributes 2 to the sum of all vertex degrees (one to the degrees of each of its endpoints: \(d(u)\) and \(d(v)\)). This is true for all edges of \(G\text{,}\) so twice the number of edges must be exactly the sum of all degrees.
Remark 5.2.11.
In the above statement we used the notation \(V(G)\) to refer to the vertex set of \(G\text{;}\) we will also use the notation \(E(G)\) to refer to the collection of edges of \(G\text{.}\) This notation comes in handy if we are talking about the vertex or edge sets of different graphs.
Checkpoint 5.2.12. Verify Theorem 5.2.10.
Verify Theorem 5.2.10 on the graphs you've seen so far in this section.
Checkpoint 5.2.13. Even Number of Odd Degree Vertices.
Use Theorem 5.2.10 to prove that any graph must have an even number of vertices with odd degree.
Checkpoint 5.2.14. Handshakes at a [Pre-pandemic] Party.
Explain how Checkpoint 5.2.13 implies that in a party, the number of people who shook hands with an odd number of other people's hands must be even.
Because of Checkpoint 5.2.14, the result of Checkpoint 5.2.13 is sometimes called the Handshake Lemma. This can be used to prove that certain sequences will never occur as the degree sequence of a graph.
Lemma 5.2.15. Handshake Lemma.
Any graph (simple or otherwise) must have an even number of vertices of odd degree.
Example 5.2.16. Counting Collaborators.
Checkpoint 5.1.5 can be resolved by arguing that the coauthorship relations among the six mathematicians can be represented using a graph: by taking the six mathematicians as vertices and placing an edge between two mathematicians if they have coauthored a paper together.
The sequence 3, 2, 2, 2, 1, 1 cannot be the degree sequence of this graph, since there is an odd number of vertices of odd degree. (There are three: 3, 1, 1.) Therefore someone must have made a mistake counting.
Try proving the following basic properties about degree sequences.
Checkpoint 5.2.17. Degree Sequence 3, 2, 1, 0.
Can a graph on 4 vertices have degree sequence 3, 2, 1, 0?
Checkpoint 5.2.18. Degree Sequence with 0 and \(n-1\).
Is it possible for the numbers \(0\) and \(n-1\) to both occur in the degree sequence of a graph with \(n\) vertices? Prove your answer.
Checkpoint 5.2.19. Maximum Degree Sum.
Show that the sum of the degrees of a simple graph cannot add up to more than \(n(n-1)\text{.}\)