Shortest path
Moderator: Board moderators
Shortest path
How to find m-th shortest path in weighted graph.
It's pretty complex, you could search for k shortest path on google or look over this paper: http://www.ics.uci.edu/~eppstein/pubs/p-kpath.html
-
- Guru
- Posts: 584
- Joined: Thu Jun 19, 2003 3:48 am
- Location: Sanok, Poland
- Contact:
-
- Guru
- Posts: 584
- Joined: Thu Jun 19, 2003 3:48 am
- Location: Sanok, Poland
- Contact:
In SSSP you extract each node from a queue exactly once. Instead extract it exactly k times. Keep inserting it until then. I solved problem 10740 this way.
Can you explain the idea of DP solution in a few words?
Edit: never mind, I read some papers on that. I admit that I seriously underestimeted the problem, some pretty complex O(k * m) solutions exist. However, in most cases you don't need to tune it so much.
Can you explain the idea of DP solution in a few words?
Edit: never mind, I read some papers on that. I admit that I seriously underestimeted the problem, some pretty complex O(k * m) solutions exist. However, in most cases you don't need to tune it so much.
I wonder if this sol runs in time on sgu: http://acm.sgu.ru/problem.php?contest=0&problem=145
-
- Guru
- Posts: 584
- Joined: Thu Jun 19, 2003 3:48 am
- Location: Sanok, Poland
- Contact:
-
- Guru
- Posts: 584
- Joined: Thu Jun 19, 2003 3:48 am
- Location: Sanok, Poland
- Contact:
-
- Guru
- Posts: 584
- Joined: Thu Jun 19, 2003 3:48 am
- Location: Sanok, Poland
- Contact: