shortestPathWithFixedEnds