By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,238 Members | 1,746 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,238 IT Pros & Developers. It's quick & easy.

Dijkstra Algorithm

P: n/a
Can somebody please explain and provide pseudocode for the Dijkstra

I'm trying to implement the Dijkstra shortest path algorithm. However, I'm
finding it extremely difficult to understand.

I've a node class that hold the node name, and the x,y coordinate.
I've an edge class the takes two(2) nodes, from and to, and a name for the
I'm using only simple arrays to store the nodes and the edges, no priority

I've also read the pseudocode on:'s_algorithm
but find it too mathematical.

Can somebody please provide me with pseudocode and comments/exlanation that
uses simple arrays and programming contructs?

Many thanks

Jul 26 '06 #1
Share this Question
Share on Google+
1 Reply

P: n/a
How about googling +Dijkstra +c# +"shortest path" - yields a good hit:
(I cannot vouch for the quality of code / math)

However; graph theory is by definition quite math orientated; if you don't
understand the math, I would advise sticking to pre-written code - otherwise
you will struggle to maintain it. Or - go to the library and get a book on
graph theory; some books make it quite easy to follow with visualisations
etc - note that "quite easy" in this context is subjective.

Jul 26 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.