Skip to content

my algorithm that can give Djikstra's and Warshall's algorithm a run for its money

License

Notifications You must be signed in to change notification settings

radenwijaya/vlog7_shortestpath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vlog7_shortestpath

It was the flow of water that inspires my to write this algorithm. Water naturally flows finding the shortest path, because it requires the least energy. Hence I decided to create a shortest path algorithm inspired by the flow of water.

As usual, the data is presented in a 2 dimensional matrix, however simulating waterflow inside pipe using 2D matrix will result in something like highly inefficient BFS. Therefore a more efficient data structure is needed, and it is 1 Dimensional matrix. This results in a very efficient algorithm to find distance from one point to another on weighted directional graph.

Please note that this algorithm is originally made by me. You may use only for studying purposes only including doing assignment, impressing your classmates, lecturer or even in competitive programming.

However I strongly discourage the use of this algorithm in production even though for all the tests I conducted with this algorithm produces the same result as Floyd-Warshall's algorithm. The correctness of this algorithm has not yet been proven.

The main source code is contained in project3.dpr

The source code was written in Pascal, it is a simple, powerful and high performance programming language with speed comparable to C++. However I used Delphi 10.1 Berlin to compile and run as Turbo Pascal no longer works in Windows 10 x64.
Therefore the source code was in .dpr extension, but it can also be read using notepad. Download Delphi Community edition for free here: https://www.embarcadero.com/products/delphi/product-editions It is fully functional and can be used for both studying or writing commercial application.

Video is available here: https://youtu.be/WfwI-jA4_dA

About

my algorithm that can give Djikstra's and Warshall's algorithm a run for its money

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages