group centrality with bfs and dijkstra