Shortest path analysis