Element 'shortest pathfinding in a graph'