Structure of a graph
A graph is a set of nodes (or vertices) and links (or edges). Each link is a pair of node references (such as source or target). Links may be considered as directed or undirected, depending if the relationship is mutual or not. The most common way to computationally represent a graph is by using an adjacency matrix. We use the index of the matrix as a node identifier and the value of the coordinates to represent whether there exists a link (the value is 1) or not (the value is 0). The links between nodes may have a scalar value (weight) to define a distance between the nodes. Graphs are widely used in Sociology, Epidemiology, Internet, Government, Commerce, and Social networks to find groups and information diffusion.
Graph analytics can be split into three categories:
Structural algorithms
Traversal algorithms
Pattern-matching algorithms
Undirected graph
In the undirected graph, there is no distinction between the nodes source and target. As we can observe in the following...