Jump to content

Talk:Yen's algorithm

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 212.96.233.83 (talk) at 14:07, 30 November 2015 (A problem with Q_k.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Apologies if I am misunderstanding the algorithm, but as stated, I'm not sure what guarantees that a spur path doesn't circle back and intersect a node that is already on the root path, resulting in a cyclic result? Are these to be removed later in an unstated step? Its hard to imagine this scenario in the illustrated example (a directed graph), but particularly with undirected graphs (edges can be traversed both ways) I think this could happen very readily.

Note the following in the original 1971 paper "Finding the K shortest loopless paths in a network": "(b) Apply a shortest-path algorithm to find the shortest path from (i) to (N), allowing it to pass through those nodes that are not yet included in the path" — Preceding unsigned comment added by 184.69.64.162 (talk) 01:26, 5 April 2014 (UTC)[reply]

Answer: nodes in the root path are removed from the graph before computing the spur path. — Preceding unsigned comment added by 193.136.33.222 (talk) 18:15, 7 August 2014 (UTC)[reply]

A problem with Qk and Qkk

What is the difference between Qk and Qkk? They seem to be the same.