Skip to content

Shortest path algorithm implemented with labels and predecessors

Notifications You must be signed in to change notification settings

5p1n0/shortest-path-algo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Shortest Path Algorithm

Shortest path algorithm implemented with labels and predecessors.

Output tables have rows with processed values from the last algorithm iteration on the same graph table row.

# Input graph
------- G: ------- 

|  -  -  -  8 10 11 11  -  -  1|
|  -  -  5  4  -  3  9  3  -  -|
|  -  5  - 11  7 10  4  -  7  5|
|  8  4 11  -  2  4  6  -  - 12|
| 10  -  7  2  -  -  -  8  -  8|
| 11  3 10  4  -  -  -  -  - 10|
| 11  9  4  6  -  -  -  -  -  9|
|  -  3  -  -  8  -  -  -  -  -|
|  -  -  7  -  -  -  -  -  -  -|
|  1  -  5 12  8 10  9  -  -  -|


# Solution table
------- S: -------

|  1  -  -  -  -  -  -  -  -  -|
|  1  -  -  -  -  -  -  -  - 10|
|  1  -  3  -  -  -  -  -  - 10|
|  1  -  3  4  -  -  -  -  - 10|
|  1  -  3  4  5  -  -  -  - 10|
|  1  -  3  4  5  -  7  -  - 10|
|  1  2  3  4  5  -  7  -  - 10|
|  1  2  3  4  5  6  7  -  - 10|
|  1  2  3  4  5  6  7  -  9 10|
|  1  2  3  4  5  6  7  8  9 10|


# Labels Table
------- Lj: -------

|  -  -  8 10 11 11  -  -  1|
|  -  6  8  9 11 10  -  -  1|
| 11  6  8  9 11 10  - 13  1|
| 11  6  8  9 11 10  - 13  1|
| 11  6  8  9 11 10 17 13  1|
| 11  6  8  9 11 10 17 13  1|
| 11  6  8  9 11 10 14 13  1|
| 11  6  8  9 11 10 14 13  1|
| 11  6  8  9 11 10 14 13  1|
| 11  6  8  9 11 10 14 13  1|


# Predecessors table
------- Pj: -------

|  -  -  1  1  1  1  -  -  1|
|  - 10  1 10  1 10  -  -  1|
|  3 10  1 10  1 10  -  3  1|
|  3 10  1 10  1 10  -  3  1|
|  3 10  1 10  1 10  5  3  1|
|  3 10  1 10  1 10  5  3  1|
|  3 10  1 10  1 10  2  3  1|
|  3 10  1 10  1 10  2  3  1|
|  3 10  1 10  1 10  2  3  1|
|  3 10  1 10  1 10  2  3  1|

About

Shortest path algorithm implemented with labels and predecessors

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages