Update the shortest paths from node u to node v in kth distance