A simpler and more efficient algorithm for the next-to-shortest path problem

preprint2011arXivOpen access

Abstract

Given an undirected graph G=(V,E)G=(V,E) with positive edge lengths and two vertices ss and tt, the next-to-shortest path problem is to find an stst-path which length is minimum amongst all stst-paths strictly longer than the shortest path length. In this paper we show that the problem can be solved in linear time if the distances from ss and tt to all other vertices are given. Particularly our new algorithm runs in O(∣V∣log⁡∣V∣+∣E∣)O(|V|\log |V|+|E|) time for general graphs, which improves the previous result of O(∣V∣2)O(|V|^2) time for sparse graphs, and takes only linear time for unweighted graphs, planar graphs, and graphs with positive integer edge lengths.

Explore this paper’s authors, topics and related work.

Building this map preview

BZPEER is loading the nearby papers, people, topics and institutions for this page.

Reviews 0

Write a reviewWrite

No reviews yet.

Discussion 0

Add a commentWrite

No comments yet.