Computing equivalence classes among the edges of a graph with applications

Abstract For two edges e =( x , y ) and e ′=( x ′, y ′) of a connected graph G =( V , E ) let e Θ e ′ iff d ( x , x ′)+ d ( y , y ′)≠ d ( x , y ′)+ d ( x ′, y ). Here d ( x , y ) denotes the lenght of a shortest path in G joining vertices x and y . An algorithm is presented that computes the equivalence classes induced on E by the transitive closure ΘJ of Θ in time O(| V | | E |) and space O(| V | 2 ). Finding the equivalence classes of Θ is the primary step of several graph algorithms.