MATPMD2 Notes Session 1 With Additional Notes-2
MATPMD2 Notes Session 1 With Additional Notes-2
1 Graph Theory
Graph theory is about connections between objects. Informally a graph is a set of vertices or nodes,
together with a set of edges or lines between pairs of vertices. The diagram illustrating this
information is commonly referred to as a graph.
Here the objects are villages and the connections are bus routes between them. Multiple edges arise
because of multiple service providers; the loop is a scenic tour. If we are interested solely in whether
or not you can get from one village to another by bus then we can disregard the multiple edges, and
the loop.
Simplified:
UNIVERSITY OF STIRLING MATPMD2
Computing Science & Mathematics 2020
Here the objects are people and the connections are phone calls made from one person to another. The
edges are given a direction and we call this a directed graph, or digraph.
The number of edges incident with a vertex is called the degree of a vertex. For a digraph this idea is
extended to in-degrees (the number of edges going into a vertex) and out-degrees (the number of
edges leaving a vertex). An edge going in both directions can be represented by an undirected edge.
Here the objects can be described as points p1 , p2 , . . . , pk and sets of points S1 , S2 , . . . Sr . The
connections arise between the points and the sets of points with an edge between pi and Sj if and only
if pi ∈ Sj .
One application is suitability matching; we construct the corresponding incidence graph and obtain a
perfect matching (a set of pairwise disjoint edges) if possible.
In this example we have five people and five jobs. Here Si is the set of jobs person i is suited to:
Perfect matching:
The perfect matching shows person 1 should do job d, person 2 job c, person 3 job e, person 4 job a
and person 5 job b.
UNIVERSITY OF STIRLING MATPMD2
Computing Science & Mathematics 2020
Example
Let V (G) = V = {1, 2, 3, 4, 5}, E(G) = {(1, 2), (1, 3), (1, 4), (2, 5), (3, 4)}.
UNIVERSITY OF STIRLING MATPMD2
Computing Science & Mathematics 2020
Given a graph G, the complement G has vertex set V (G) = V (G) and edge set
E(G) = V (G)2 \ E(G).
UNIVERSITY OF STIRLING MATPMD2
Computing Science & Mathematics 2020
Given a graph G, a subgraph H of G is such that V (H) ⊆ V (G) and E(H) ⊆ E(G).
n(n−1)
The complete graph Kn has n vertices and all possible 2
edges. The complement of Kn is n
isolated vertices, denoted by nK1 .
A k-regular graph is a connected graph for which each vertex has degree k.
A complete bipartite graph has a vertex set which can be partitioned into two sets of isolated vertices
and an edge set consisting of all the edges between the two vertex sets. A bipartite graph is any
subgraph of a complete bipartite graph. The incidence graph is a bipartite graph.
All bipartite graphs have a 2-colouring. This means that we need no more than two colours to colour
vertices so that adjacent vertices have different colours.
UNIVERSITY OF STIRLING MATPMD2
Computing Science & Mathematics 2020
A walk is a sequence of vertices; called a trail if the edges are distinct, a path if the vertices are
distinct. A graph is connected if there exists a walk between every pair of vertices. A graph which is
not connected has two or more components.
The incidence matrix of a graph G is a matrix whose rows are indexed by V (G) and whose columns
are indexed by E(G) ; the (v, λ)-entry is 1 if v ∈ λ and 0 if v 6∈ λ. [Here v is a vertex, λ an edge.]