View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Modified Dijsktra's Algorithm to return all paths that tie for shortest

5.0 | 1 rating Rate this file 12 Downloads (last 30 days) File Size: 3.24 KB File ID: #36086 Version: 1.0

Modified Dijsktra's Algorithm to return all paths that tie for shortest


David B (view profile)


A modification of code published by Jorge Barrera to return all paths that tie for shortest path.

| Watch this File

File Information

This code is heavily based on code published by Jorge Barrera, to the point that I have chosen to include his original documentation along with my own. His original code is linked below.

I produced this modification because I found that no implementation of Dijkstra's Algorithm available on Mathworks File Exchange would return multiple paths that tie for shortest. I have debugged this modification using several small networks, and I believe it works, but I have not yet tested it against large networks so I cannot promise that it is entirely bug-free.

In my additional documentation, you will see that I attempted, unsuccessfully, to further modify the code so that costs are computed through probabilistic addition instead of arithmatic addition (e.g. cost of moving along edges e1 and e2 = 1 - (1-coste1)(1-coste2, instead of e1+e2). I'd greatly appreciate any help that you can offer me to modify the code in this manner.


Dijkstra Very Simple inspired this file.

Required Products MATLAB
MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
13 Apr 2016 sirui

sirui (view profile)


Contact us