Nick Sabalausky wrote: > in cases where the computation stops recursing when it gets back > to itself May be you mean APSP = all pairs shortest path In your case: - get rid of all uneven numbered edges - reverse the remaining edges - compute APSP, where addition is replaced by concatnation - details left to the reader -manfred