Question: algorithm analysis graph proof Thanks in advance. A social media giant, such as Facebook, wants to determine a pair of its users that are the
A social media giant, such as Facebook, wants to determine a pair of its users that are the most socially distanced from each other. For that challenging task, they decided to consult a competitive computer scientist, such as you. They store their social network as a connected undirected graph 9 = (V, E) represented as adjacency lists, where users are modelled as vertices, and the friendship relationship between two users is modelled as an undirected edge. We use n and m denote the number of vertices and edges of g, respectively. The social distance for two vertices i, j V is defined as the length of the shortest path from i to j in 9. Note that the length of the shortest path from j to i is equal to the length of the shortest path from i to j since all edges are undirected. They want you to find a pair of vertices ((k. De V V) for which the social distance is maxi- mized. If there are multiple such pairs, it is OK if you find any one of them. The running time of your algorithm should be O(nm)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
