0

Is there any way with polynomial complexity(or better than that) to get kth or k shortest path of an undirected graph?

or can Yen's k shortest path algorithm modified for undirected graphs?

nagleria
  • 29
  • 5

1 Answers1

0

Try to find the permutations of paths from source vertex to final vertex (taking all vertex atleast once) upto k permutations but this would also mean if the total permutations of paths from source vertex to final vertex (taking all vertex atleast once) are finite but that wouldnt be the case as in case of NP hard problems. if you can find this heuristic in polynomial time then you can select kth shortest path. so apply brute force dfs bfs then find the shortest path via dynamic programming and compare your permutations with kth case

Himanshu
  • 3,830
  • 2
  • 10
  • 29
  • But how can i decide to all permutations when i dont know if a vertex appears in path 100 times or 2 times – nagleria Dec 30 '18 at 19:02