Solved

k-shortest path implementation with C language

Posted on 2008-10-04
4
580 Views
Last Modified: 2012-05-05
Hi.
By using Dijkskta algorimth i have implemented an application for find the 1st shortest path of an optical network. Unfortunately, this is not enough. It is necessary to calculate the 2st & 3rd shortest path, using the same algorithm or something else, always by using language C. Do you have any idea how to do it??

www.cs.bham.ac.uk/~mhe/foundations2/node113.html - 16k -
(my code is similar to  the code of the above link)
0
Comment
Question by:tsakyr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 22640091
http://www.dis.uniroma1.it/~challenge9/papers/santos.pdf

Implementation of K-shortest Path Dijkstra Algorithm used in All-optical Data Communication Networks
http://www.u.arizona.edu/~saurabh/SIE/kDijkstra546.pdf
0
 
LVL 45

Accepted Solution

by:
sunnycoder earned 500 total points
ID: 22640100
Btw, you can use your existing algo too ...

Find the shortest path
second_shortest = HIGH_VALUE
for all edges in shortest path
     remove the edge
     current = find the shortest path
     second_shortest = min (second_shortest, current)
     put back edge
end for

If you iterate over this pseudocode k times - removing the edge for shortest path each time, you would have k shortest paths.
0
 

Author Closing Comment

by:tsakyr
ID: 31503003
Realy, thanks a lot.
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 22640216
Glad to help :)

Was wondering why you chose a B grade. Pls refer to grading guidelines here
http://www.experts-exchange.com/help.jsp#hi403
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Coverting 24 hour time to 12 hour in C++ 15 188
C dll call freezes 5 115
How to programmatically differentiate between C and Java 10 218
Why is compiler in oracle server ? 9 109
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question