0% found this document useful (0 votes)
62 views

Graphs: Basic Terminologies: Meenakshi D'Souza

This document provides definitions and concepts related to graph theory. It defines what a graph is consisting of vertices and edges. It discusses applications of graphs in modeling acquaintance relations, job assignments, and scheduling. It also covers paths, cycles, isomorphisms, connectedness, complete graphs, and bipartite graphs. Graph representations using adjacency and incidence matrices are introduced along with concepts like degrees, subgraphs, and complements.

Uploaded by

Naman Dosi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views

Graphs: Basic Terminologies: Meenakshi D'Souza

This document provides definitions and concepts related to graph theory. It defines what a graph is consisting of vertices and edges. It discusses applications of graphs in modeling acquaintance relations, job assignments, and scheduling. It also covers paths, cycles, isomorphisms, connectedness, complete graphs, and bipartite graphs. Graph representations using adjacency and incidence matrices are introduced along with concepts like degrees, subgraphs, and complements.

Uploaded by

Naman Dosi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and

rees and counting

Graphs: Basic Terminologies

Meenakshi D’Souza

International Institute of Information Technology


Bangalore.

Term II 2018-19
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Graph theory: Origin

Königsberg bridge problem: Can we leave from a region,


cross each bridge exactly once and return to the same region?
Not possible, as each time we enter and leave a region, we
need two bridges.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Graph

A graph is a pair G = (V , E ) where V is a set of vertices


and E ⊆ (V × V ) is a set of edges.
Edges are unordered for now.
The two end vertices of an edge are called its endpoints. If u
and v are endpoints of one edge, they are called neighbours.
A loop is an edge whose endpoints are equal.
Multiple edges are those that have the same pair of
endpoints.
A simple graph is a graph with no loops or multiple edges.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Acquaintance relations

Does every set of six people contain three mutual acquaintances or


three mutual strangers?
A clique in a graph is a set of pairwise adjacent vertices.
An independent set in a graph is a set of pairwise
non-adjacent vertices.
Is it true that every six vertex graph has a clique of size 3 or an
independent set of size 3?
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Job assignments

There are m jobs and n people, some people are qualified for some
jobs. Can we employ qualified people for the jobs, exactly one
person per job?
A graph is G bipartite if V (G ) is the union of two disjoint
independent sets (possibly empty). Each set is called a
partite set of G .
The above problem amounts to finding matchings in bipartite
graphs.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Scheduling and graph colouring

Consider scheduling a timetable such that no two courses with a


common student are assigned the same date and time. How many
different time periods do we need?
Create a vertex for each course, with two courses being
adjacent if they have a common student.
We have to assign labels to vertices such that endpoints of
each edge receive a different label.
The chromatic number of a graph G is the minimum
number of colouts needed to label the vertices so that
adjacent vertices receive different colours.
A graph G is k-partite if V (G ) can be expressed as a union
of k (possibly empty) independent sets.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Maps and colouring

Can we colour the regions of every map using at most four colours
so that neighbouring regions have different colours?
A planar graph is a graph that can be drawn in a plan
without crossing edges.
The four colour conjecture was finally proved in 1976 using a
computer.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Routes in road networks

Distance and travel time are two measures to travel between


destinations in a road network. Can we find the shortest route
from x to y ?
Paths, walks and cycles in graphs with optimal properties can
be used.
A Hamiltonian path is a path that visits each vertex exactly
once. A graph is Hamiltonian if it has a Hamiltonian path.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Graph representations

Let G = (V , E ) be a loopless graph with V = {v1 , v2 , . . . , vn } and


E = {e1 , e2 , . . . , em }.
The adjacency matrix of G , A(G ), is the n × n matrix in
which entry aij is the number of edges in G with endpoints
vi , vj .
The incidence matrix of G , M(G ), is the n × m matrix in
which entry mij is 1 if vi is an endpoint of ej and is 0
otherwise.
If v is an endpoint of e, v and e are incident. u and v that
are endpoints of e (neighbours) are adjacent.
The degree of a vertex (in a loopless graph) is the number of
incident edges.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

More about adjacency matrices

An adjacency matrix is determined by a vertex ordering, does


not need naming.
Since we considered unordered graphs, adjacency matrices are
symmetric, i.e., aij = aji ∀i, j.
Adjacency matrix of a simple graph has 0s on the diagonal
and 1 in all other entries.
The degree of a vertex v is the sum of entries in the row for v
in either A(G ) or M(G ).
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Isomorphism in graphs

An isomorphism from a simple graph G to a simple graph H


is a bijection f : V (G ) → V (H) such that uv ∈ E (G ) iff
f (u)f (v ) ∈ E (H).
When G is isomorphic to H, we write it as G ∼ = H.
For non-simple graphs G and H, G is isomorphic to H is a
bijection f from V (G ) to V (H) and E (G ) to E (H) such that
each edge of G with endpoints u and v is mapped to an edge
with endpoints f (u) and f (v ).
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

More on isomorphisms

Proposition: The isomorphism relation ∼ = is an equivalence


relation on the set of (simple) graphs.
Proof: Reflexivity follows from identity permutation.
Symmetry and transitivity follows from “iff” in the definition
of isomorphism.
An isomorphism class of graphs is an equivalence class of
graphs under the isomorphism relation.
An automorphism of G is an isomorphism from G to itself.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Paths and cycles

A path is a simple graph whose vertices can be ordered so


that two vertices are adjacent iff they are consecutive in the
list.
A cycle is a path whose beginning and end vertices are the
same. Or, a cycle is a graph with an equal number of vertices
and edges whose vertices can be placed around a circle so that
two vertices are adjacent iff they appear consecutively along
the circle.
An n-cycle is a cycle with n vertices.
The (unlabelled) path and cycle with n vertices are denoted
by Pn and Cn respectively.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

More on graphs

A sub-graph of a graph G is a graph H such that


V (H) ⊆ V (G ) and E (H) ⊆ E (G ), and the assignment of
endpoints to edges in H is the same as in G .
When H is a sub-graph of G , we write H ⊆ G , and say that G
contains H.
A graph G is connected if each pair of vertices in G belongs
to a path, otherwise G is disconnected.
The complement Ḡ or G C of a simple graph G is the simple
graph with vertex set V (G ) and uv ∈ E (Ḡ ) iff uv 6∈ E (G ).
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Complete graphs and complete bipartite graphs

A complete graph is a simple graph whose vertices are


pairwise adjacent. The (unlabelled) complete graph on n
vertices is denoted Kn .
A complete bipartite graph or a biclique is a simple
bipartite graph such that two vertices are adjacent iff they are
in different partite sets. When the sets have sizes s and r , the
(unlabelled) biclique is denoted Kr ,s .
Note: A clique is a set of pairwise adjacent vertices in a
graph. But, many authors use the terms complete graph and
clique interchangeably.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Number of n vertex graphs

How many simple graphs are there with n vertices?


Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

More on graphs

A graph is self-complementary if it is isomorphic to its


complement.
A 4-path and 5-cycle are self-complementary.
A decomposition of a graph is a list of subgraphs such that
each edge appears in exactly one subgraph in the list.
Proposition: An n-vertex graph H is self-complementary iff
Kn has a decomposition consisting of two copies of H.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Petersen graph

The Petersen graph is the simple graph whose vertices are


the 2-element subsets of a 5-element set and whose edges are
the pairs of disjoint 2-element subsets.
It is (in)famous as a counter-example for many conjectured
results in graph theory!
Proposition: If two vertices are nonadjacent in the Petersen
graph, then they have exactly one common neighbour.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Petersen graph

The Petersen graph is the simple graph whose vertices are


the 2-element subsets of a 5-element set and whose edges are
the pairs of disjoint 2-element subsets.
It is (in)famous as a counter-example for many conjectured
results in graph theory!
Proposition: If two vertices are nonadjacent in the Petersen
graph, then they have exactly one common neighbour.
Proof: Non-adjacent vertices are 2-element sets sharing one
element. Their union S is a set of size 3. A vertex adjacent to
both is a 2-element set disjoint from both.
Since 2-element sets are chosen from {1, 2, 3, 4, 5}, there is
exactly one 2-element set disjoint from S.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Paths, walks, trails and cycles

A walk is a list v0 , e1 , v1 , e2 , . . . , ek , vk of vertices and edges


such that for 1 ≤ i ≤ k, the edge ei has endpoints vi−1 and vi .
A trail is a walk with no repeated edge.
A u, v -walk or u, v -trail has u as first vertex and v as last
vertex; they are its endpoints.
The length of a walk, trail, path or cycle is its number of
edges.
A walk or trail is closed if its endpoints are the same.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Walks vs. paths

A walk W contains a path P means that the vertices and


edges of P occur as a sub-list of the vertices and edges of W
but not necessarily consecutive.
Lemma: Every u, v -walk contains a u, v -path.
Proof: By induction on the length l of a u, v -walk W.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Components of a graph

A graph G is connected if each pair of vertices in G belongs


to a path, otherwise G is disconnected.
If G has a u, v -path, then u is connected to v in G .
The connection relation on V (G ) consists of the ordered
pairs (u, v ) such that u is connected to v .
The components of a graph are its maximal connected
subgraphs.
A component is trivial if it has no edges. It is non-trivial
otherwise.
An isolated vertes is a vertex of degree 0.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Number of components

Note: Adding an edge decreases the number of components by 0


or 1 and deleting an edge increases the number of components by
0 or 1.
Proposition: Every graph with n vertices and k edges has n − k
components.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Number of components

Note: Adding an edge decreases the number of components by 0


or 1 and deleting an edge increases the number of components by
0 or 1.
Proposition: Every graph with n vertices and k edges has n − k
components.
Proof:
An n-vertex graph with no edges has n components. Each edge
added reduces this by at most 1, so when k edges have been
added, the number of components is at least n − k.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Cut vertices and cut edges

A cut-edge or cut-vertex of a graph is an edge or vertex


whose deletion increases the number of components. Deleting
a vertex deletes the edges incident to it.
For a graph G , G − e (G − M) denotes the subgraph of G
obtained by deleting an edge e (set of edges M).
An induced subgraph is a subgraph obtained by deleting a
set of vertices. For a graph G , G − v (G − S) denotes the
induced subgraph of G obtained by deleting a vertex v (set of
vertices S).
G [T ] is the subgraph induced by T , with vertices G − T̄ .
A set of vertices is an independent set iff the sub-graph
induced by it has no edges.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Cut edges

Theorem: An edge is a cut-edge iff it belongs to no cycle.


Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Walks and cycles

Lemma: Every closed odd walk contains an odd cycle.


Proof: By induction on the length l of a closed odd walk.
Note: A closed even walk need not contain a cycle, it may simply
repeat. But, if an edge e appears exactly once in a closed walk it
contains a cycle through e.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Bipartite graphs and odd cycles

Theorem: A graph is bipartite iff it has no odd cycle.


Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Union of graphs

The union of graphs G1 , G2 , . . . , Gk , written as


G1 ∪ G2 ∪ . . . Gk , is the graph with vertex set ∪ki=1 V (Gi ) and
edge set ∪ki=1 E (Gi ).
Note: Edges can repeat in union, but, not in decomposition of
graphs.
Theorem: The complete graph Kn can be expressed as the
union of k bipartite graphs iff n ≤ 2k .
Proof: By induction on k.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Eulerian circuits

A graph is Eulerian if it has a closed trail containing all edges.


A closed trail is a circuit if we do not specify the first vertex
but keep the list in cyclic order.
An Eulerian circuit or Eulerian trail in a graph is a circuit or
trail containing all edges.
An even graph is a graph with vertex degrees all even. A
vertex is odd (even) when its degree is odd (even).
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Eulerian graphs and vertex degrees

Lemma: If every vertex of a graph G has degree at least 2,


then G contains a cycle.
Theorem: A graph G is Eulerian iff it has at most one
non-trivial component and its vertices all have even degree.
Proposition: Every even graph decomposes into cycles.
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Vertex degrees

The degree of a vetex v in a graph G , dG (v ) or d(v ) is the


number of edges incident to v .
Exception: Each loop at v counts twice.
Maximum degree is ∆(G ), minimum degree is δ(G ).
G is regular if ∆(G ) = δ(G ).
It is k-regular if the common degree is k.
The neighbourhood of v , NG (v ) or N(v ) is the set of vertices
adjacent to v .
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Order and size of a graph

The order of a graph G , n(G ), is the number of vertices in G .


The size of a graph G , e(G ), is the number of edges in G .
Proposition: (Degree-Sum Formula) For a graph G ,

Σv ∈V (G ) d(v ) = 2e(G )
Basic definitions Applications using graphs as models Other definitions Paths, walks and cycles Vertex degrees and counting

Additional results on vertex degrees

2e(G )
Corollary: In a graph G , the average vertex degree is n(G ) ,
2e(G )
and hence δ(G ) ≤ n(G ) ≤ ∆(G ).
Corollary: Every graph has an even number of vertices of odd
degree. No graph of odd order is regular with odd degree.
Corollary: A k-regular graph with n vertices has nk/2 edges.

You might also like