A graph is a structure that represents data in terms of vertices and edges. A graph is represented as aGraph = (𝓥, 𝓔), where 𝓥 represents a set of vertices and 𝓔 represents a set of edges. Note that aGraph has |𝓥| vertices and |𝓔| edges.
A vertex, 𝓋 ∈ 𝓥, represents a real-world object, such as a person, a computer, or an activity. An edge, 𝓋 ∈ 𝓔, connects two vertices in a network:
e(𝓋1, 𝓋2) | e ∈ 𝓔 & 𝓋i ∈ 𝓥
The preceding equation indicates that in a graph, all edges belong to a set, 𝓔, and all vertices belong to a set, 𝓥.
An edge connects two vertices and so represents a relationship between them...