01 / 22

Degrees, Paths, Cycles
& Connectivity

Explore how vertex degrees, paths, and cycles reveal the structure and connectivity of graphs in discrete mathematics.

Discrete Math

What is a Graph?

A graph \( G = (V, E) \) consists of a set of vertices (nodes) \( V \) and a set of edges \( E \) that connect pairs of vertices. Graphs model relationships: friendships, road networks, web links, and much more.

A B C D E
\( |V| = 5 \) vertices, \( |E| = 6 \) edges

Vertex Degree

The degree of a vertex \( v \), written \( \deg(v) \), is the number of edges incident to \( v \). It tells you how "connected" that vertex is.

\(\deg = 3\)
\(\deg = 3\)
\(\deg = 2\)
\(\deg = 4\)
\(\deg = 2\)
A B C D E

Walks, Paths, and Trails

Walk
A sequence of vertices where each adjacent pair is connected by an edge. Edges and vertices may repeat.
Trail
A walk in which no edge is repeated, but vertices may repeat.
Path
A walk in which no vertex is repeated (and hence no edge repeats either).

What is a Cycle?

A cycle is a path that starts and ends at the same vertex, with at least 3 edges. More precisely: a closed trail where the only repeated vertex is the start/end vertex.

A B C D E
Cycle of length 5 (\(C_5\))

Graph Connectivity

A graph is connected if there exists a path between every pair of vertices. Otherwise, it breaks into connected components: maximal connected subgraphs.

1 2 3 Component 1 4 5 6 7 Component 2

The Handshaking Theorem

One of the most fundamental results in graph theory: the sum of all vertex degrees equals twice the number of edges.

Handshaking in Action

A
\(\deg 2\)
B
\(\deg 3\)
C
\(\deg 2\)
D
\(\deg 2\)
E
\(\deg 3\)
F
\(\deg 2\)
\( 2 + 3 + 2 + 2 + 3 + 2 = 14 = 2 \times 7 \) edges ✓

Path vs Cycle vs Walk

Walk Trail Path Cycle
Repeated edges? Yes No No No
Repeated vertices? Yes Yes No Start = End only
Closed? Maybe Maybe No Always
Min edges \( 0 \) \( 0 \) \( 0 \) \( 3 \)

Connected vs Disconnected

Connected Graph
A path exists between every pair of vertices. Has exactly 1 connected component.
Disconnected Graph
At least one pair of vertices with no path between them. Has 2 or more connected components.

How to Check Connectivity

1
Pick any starting vertex. Mark it as "visited."
2
Explore neighbors. Visit all unvisited vertices adjacent to the current vertex (BFS or DFS).
3
Repeat. Continue until no more unvisited neighbors are reachable.
4
Check result. If all \( n \) vertices are visited, the graph is connected. Otherwise, count the remaining components.

Example 1: Degree Sequence

A B C D E F

Example 2: Finding Paths and Cycles

A B C D E F

Example 3: Connectivity Check

A B C D E F Component 1 Component 2 Component 3

Bridges and Cut Vertices

Bridge
An edge whose removal disconnects the graph (increases the number of components).
Cut Vertex
A vertex whose removal (along with its edges) disconnects the graph.
bridge cut vertex 1 2 3 4 5 6 7

Common Mistakes

✕ Confusing Path and Walk
A walk allows repeated vertices and edges. A path does not. Calling any traversal a "path" is imprecise.
✕ Forgetting Self-Loops in Degree
A self-loop contributes 2 to the degree (not 1). In simple graphs, self-loops are not allowed.
✕ Odd Degree Sum
Claiming a graph exists with degree sequence summing to an odd number. The Handshaking Theorem says this is impossible.

Summary of Key Concepts

Concept Definition Key Property
Degree \( \deg(v) \) Number of edges at \( v \) \( \sum \deg(v) = 2|E| \)
Path Walk with no repeated vertices Open, unique route
Cycle Closed path, \( \geq 3 \) edges Start = End vertex
Connected Path between all vertex pairs 1 component, \( \geq n-1 \) edges
Bridge Edge whose removal disconnects Critical edge
Cut Vertex Vertex whose removal disconnects Critical vertex

Question 1 of 5

A graph has 5 vertices with degree sequence \( (2, 3, 3, 4, 4) \). How many edges does it have?

Question 2 of 5

A traversal in a graph follows the vertex sequence A-B-C-B-D. Which statement best describes this traversal?

Question 3 of 5

A connected graph has 8 vertices. What is the minimum number of edges it can have?

Question 4 of 5

By the Handshaking Theorem, can a graph exist with 5 vertices, each of degree 3?

Question 5 of 5

In a graph, removing a single edge splits the graph into two components. That edge is called a: