
Chapter 5
Distance and Centrality
5.1 Introduction
We have seen in Chapter 2 that distance between two vertices u and v in a graph
G(V,E) is the shortest path between them. This distance, denoted by d(u, v) is the
number of hops of the shortest path if G is unweighted, or is the sum of the weights
assigned to edges of the shortest path if it is weighted. In this chapter, we will first
describe the average distance of a graph and then show an algorithm to find distances
from a single node of the network to all other nodes called single source shortest
path (SSSP) algorithm. Distances between every pair of nodes are provided by all
pairs shortest path (APSP) ...