Among paths of minimum total weight, choose the fewest edges. Store a lexicographic order pair and extend it across weight as . For positive edge weights, every extension strictly increases its first component, so Dijkstra's algorithm settles these pairs correctly when its priority queue and relaxation both compare the full pair. Equal total weight then selects the smaller hop count; arbitrary vertex-name tie-breaking does not express this objective.
Articles by others on the same topic
There are currently no matching articles.