Discrete Mathematics - Graph Theory
DMA 25/26 Week 4 - Aarbaz Alam, LSBU
Course References
Chapters referenced: 1 & 2, Chapter 10, Sections 1 - 5.
Graph Theory
Definition of a Graph
A graph is defined as an algebraic structure consisting of:
Two sets:
Vertices/Nodes Set :
Denoted as: where is a non-empty set of vertices.
Edges/Links Set :
Denoted as: where edges connect pairs of vertices .
Graph Representation
Graphs can be represented visually through diagrams.
Example representation:
Vertices:
Edges:
Alternatively can be compactly noted as:
where
where
Graph as a Relation
Definition of a relation:
Given sets:
The Cartesian product generates all possible ordered pairs:
A subset of this relation forms a graph where:
and
Graph Terminologies
Key Definitions
Adjacency:
Two vertices are adjacent if they are endpoints of the same edge:
Example: & , & .
Incidence:
An edge is incident to a vertex if it is one of its endpoints:
Example: & , & .
Degree:
The degree of a vertex , denoted as $ ext{deg}(vi)$, is the number of edges incident to it:
.
Examples: $ ext{deg}(v1) = 3$, $ ext{deg}(v2) = 3$.
Pendent Vertex/Leaf:
A vertex with degree = 1 (e.g., ).
Isolated Vertex:
A vertex with degree = 0.
Parallel Edges/Chords:
When a pair of adjacent vertices has multiple edges between them:
Example: is parallel between & .
Self Loop:
An edge with identical endpoints:
Example: .
Types of Graphs
Undirected Graph
Graph where edges have no direction.
The connection between any two vertices is bidirectional:
.
Example: Friendship networks, where if A is a friend of B, then B is also a friend of A.
Represented as: where is a set of unordered pairs.
Directed Graph (Digraph)
Graphs where edges have a specific direction.
Connections are not bidirectional:
Edge - connection goes from to only.
Often depicted with arrows indicating direction.
Example: Following relationships on social platforms, e.g., Instagram follower graph.
Represented as: where is a set of ordered pairs.
Graph Types and Properties
Type | Edges | Multiple Edges Allowed? | Loops Allowed? |
|---|---|---|---|
Simple Graph | Undirected | No | No |
Multigraph | Undirected | Yes | No |
Pseudograph | Undirected | Yes | Yes |
Simple Directed Graph | Directed | No | No |
Directed Multigraph | Directed | Yes | Yes |
Mixed Graph | Directed and Undirected | Yes | Yes |
Problem Example: Königsberg Bridge Problem
Problem statement from the historical perspective:
There are 4 islands, labeled , connected by 7 bridges.
Objective:
Find a path that allows one to start from any of the islands, traverse all 7 bridges without repeating any, and return to the start point.
Reference: Königsberg Bridge
Graph Applications in Real Life
Example 1: Google Maps
Graph representation of different locations, roadways, and distances.
Example 2: London Tube
The tube network can be represented as a graph where stations are vertices and the lines are the edges connecting these vertices.
Example 3: Facebook Graph API
Demonstrates the social network as a graph using relationships:
Connections include:
friends, likes, follows, etc.
Example 4: Network Topologies in Computer Science
Utilizing graphs to represent network topologies, routers, and connections in operating systems.
Graph Classifications
Finite & Infinite Graph
A graph is:
Finite Graph: If and are both finite sets.
Infinite Graph: If either vertex set or edge set is infinite.
Regular Graph
A graph where all vertices have equal degree.
Null Graph
A graph that has a finite vertex set but does not have any edges:
Example: where and .
Isomorphism in Graphs
Definition and Conditions
Isomorphism:
Two graphs and are isomorphic () if they have:
A one-to-one correspondence between their vertices, edges, and adjacencies.
Necessary Conditions for Isomorphism:
Same number of vertices.
Same number of edges.
Identical sets of vertex degrees.
Testing for Isomorphism
Step 1: Evaluate:
Number of vertices:
and .
Number of edges:
and .
Degree sets:
and .
Step 2: Test if .
Properties of Subgraphs
Definition:
is a subgraph of written as if:
and .
Properties:
Reflexive: Every graph is a subgraph of itself.
Antisymmetric: Subgraph relation is non-commutative except for isomorphic graphs.
Transitive: A subgraph of a subgraph is also a subgraph.
Every vertex and edge in a graph is trivially considered a subgraph.
Walk, Path, and Circuit Definitions
Walk/Chain
Definition: A finite alternating sequence of vertices and edges beginning and ending with vertices.
No edge appears more than once.
End points are called Terminal Vertices; others are Intermediate Vertices.
Closed Walk: If a vertex is revisited; Open Walk: otherwise.
Path
Definition: An open walk where no redundant vertex exists.
Circuit
Definition: A closed walk, where the terminals are identical.
Denoted as for a circuit of n vertices.
Graph Connectivity
Connected Graph
A graph is connected if there is at least one path between every pair of vertices.
If not, the graph is considered disconnected.
Components: In a disconnected graph, each isolated connected graph is referred to as a component.
Eulerian Path and Circuit
Definitions
Euler Line: A walk that traverses every edge exactly once; an open walk.
Euler Circuit: A closed walk that visits every edge exactly once.
Euler Graph: A graph containing at least one Euler line.
Arbitrarily Traceable Graph: A graph from which an Euler line can be drawn from any origin point.
Hamiltonian Path and Circuit
Definition:
Hamiltonian Path: A walk visiting every vertex exactly once (open walk).
Hamiltonian Circuit: Returns to the starting vertex while visiting every vertex exactly once (closed walk).
Complete Graphs
A complete graph (or mesh or clique) is defined by maximal connectivity:
Number of edges for n vertices.
Denoted as .
Graph Colouring Problem
Given a graph :
Each vertex is assigned a color such that no two adjacent vertices share the same color.
The minimum number of colors required is known as the Chromatic Number, denoted .
Key Observations:
if n is even;
if n is odd (and greater than 1).
Theorems in Graph Theory
For a connected graph, the edge set is bounded by .
The sum of the degrees of all vertices is twice the number of edges:
The sum of degrees of all odd-degree vertices is an even number.
A disconnected graph can be partitioned into components.
There exists a path between pairs of odd-degree vertices in any graph.
A simple graph with n nodes and k components has a maximum of edges.
All vertices of an Euler graph have even degrees.
In a complete graph with n vertices, there are edge-disjoint Hamiltonian circuits when n is odd and .
Questions & Thank You
Any questions regarding the lecture content?
Thank you for your attention!