Single-pair shortest-path problem