K shortest path problem have three ideas:
- recurrence method
based on P(i), recurrent resolve the P(i+1) shortest path. - direct method
direct find the shortest path, like delete method. - synthetic method
i have no idea yet.
Yen’s algorithm computes single-source K-shortest loopless paths for a graph with non-negative edge cost.
The algorithm was published by Jin Y. Yen in 1971 and employs any shortest path algorithm to find the best path,
then proceeds to find K − 1 deviations of the best path.
Reference
http://www.coolee.me/yen-k-shortest-path.html
https://en.wikipedia.org/wiki/Yen%27s_algorithm