470,822 Members | 1,381 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,822 developers. It's quick & easy.

Dijkstra Algorithm

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:
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
1 15915
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.

Similar topics

2 posts views Thread by Ricardo Batista | last post: by
6 posts views Thread by ThanhVu Nguyen | last post: by
3 posts views Thread by A_StClaire_ | last post: by
3 posts views Thread by Ook | last post: by
9 posts views Thread by Josh Zenker | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.