954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Help needed for implementing shortest path algorithm for large number of nodes

I'm developing a Java application where I have to implement Shortest path algorithm (dijkstra's).
I've stored the details of nodes in database.

But my problem is that the number of nodes is very large (1000+) and taking all the nodes into consideration will increase the time and space consumption of the application.

Also taking such large number of nodes into consideration will be inefficient as many nodes will be irrelevant in finding the shortest path.

Hence, I'm looking for a solution this problem.

I don't want the code, I just want the idea/method to solve it.
So, please suggest me some method.

nishant52
Newbie Poster
21 posts since Oct 2008
Reputation Points: 10
Solved Threads: 0
 
__avd
Posting Genius (adatapost)
Moderator
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

Hi,

I am pasting some useful links which help you to solve the algorithm.

http://www.dgp.toronto.edu/people/JamesStewart/270/9798s/Laffra/DijkstraApplet.html

Read another article at http://renaud.waldura.com/doc/java/dijkstra/

and

http://www.delphiforfun.org/Programs/Math_Topics/ShortestPath.htm


Thank you for the reply. But still my problem is not solved.
I want a method of finding the shortest distance which does not consider all the nodes(1000+) in finding the path.

nishant52
Newbie Poster
21 posts since Oct 2008
Reputation Points: 10
Solved Threads: 0
 
Thank you for the reply. But still my problem is not solved. I want a method of finding the shortest distance which does not consider all the nodes(1000+) in finding the path.

You said you had already selected the method and that it was Dijkstra's Method. Also, how can you not consider all the nodes? If you have 1000 nodes and you only look at 999 of them, how do you know that the 1000th node, the one you don't look at, isn't one of the nodes on the shortest path?

VernonDozier
Posting Expert
5,527 posts since Jan 2008
Reputation Points: 2,633
Solved Threads: 711
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You