A, C, E, H, and I are the end vertices,
D, J, L, and M are the middle vertices,
B, F, G, and K are the middle-end vertices.
So, now we will follow Dijkstra’s Algorithm
mechanism to determine the shortest path between
the nodes L and E.
The following steps are taken to find the
shortest path between L and E as shown in Figure 5
STEP I: Mark node E with a distance of zero. After
the nodes are named, record the distances in
brackets ([]). For each node leading to E, we
calculate the distance. We mark E as visited.
STEP II: Now, we mark node D with the smallest
recorded distance as current. For each node leading
to D (and not leading to a visited node), we
determine the distance from the end. Since C is 4.96
km from D, then C is (4.96 + 4.65 =) 9.61 km from
E. We mark D as visited.
STEP III: Now, node F has the smallest recorded
distance from the end and we designate it as current.
For each node leading to F (and not leading to a
visited node), we determine the distance from the
end.
i. Since G is 3.11 km from F, then G is (3.11
+ 6.87 =) 9.98 km from E.
ii. Since I is 3.36 km from F, then I is (3.36 +
6.87 =) 10.23 km from E.
We mark F as visited.
STEP IV: Now, we mark node C with the smallest
recorded distance as current. For each node leading
to C (and not leading to a visited node), we
determine the distance from the end. Since B is 8.26
km from C, then B is (8.26 + 9.61 =) 17.87 km from
E. We mark C as visited.
STEP V: Now, we mark node G with the smallest
recorded distance as current. For each node leading
to G (and not leading to a visited node), we
determine the distance from the end. Since H is 6.84
km from G, then H is (6.84 + 9.98 =) 16.82 km from
E. We mark G as visited.
STEP VI: Now, we mark node I with the smallest
recorded distance as current. For each node leading
to I (and not leading to a visited node), we
determine the distance from the end. Since J is 1.5
km from I, then J is (1.5 + 10.23 =) 11.73 km from
E. We mark I as visited.
STEP VII: Now, we mark node B with the smallest
recorded distance as current. For each node leading
to B (and not leading to a visited node), we
determine the distance from the end. Since A is 2.33
km from B, then A is (2.33 + 17.87 =) 20.2 km from
E. We mark B as visited.
STEP VIII: Now, we mark the node J with the
smallest recorded distance as current. For each node
leading to J (and not leading to a visited node), we
determine the distance from the end. Since K is 4.97
km from J, then K is (4.97 + 11.73 =) 16.7 km from
E. We mark J as visited.
STEP IX: Now, we mark the node K with the
smallest recorded distance as current. For each node
leading to K (and not leading to a visited node), we
determine the distance from the end. Since L is 3.2
km from K, then L is (3.2 + 16.7 =) 19.9 km from E.
STEP X: Now, we mark node H with the smallest
recorded distance as current. For each node leading
to H (and not leading to a visited node), we
determine the distance from the end. Since L is 3.48
km from H, then L is (3.48 + 16.82 =) 20.3 km from
E. Since this distance is longer than the previously
calculated distance from E to L through K (which is
through J), we do not replace it. We mark H as
visited.
STEP XI: Now, we mark node A with the smallest
recorded distance as current. For each node leading
to A (and not leading to a visited node), we
determine the distance from the end. Since M is
4.25 km from A, then M is (4.25 + 20.2 =) 24.45 km
from E. We mark A as visited.
STEP XII: Now, we mark the node M with the
smallest recorded distance as current. For each node
leading to M (and not leading to a visited node), we
determine the distance from the end. Since K is 4.75
km from M, then K is (4.75 + 24.45 =) 29.2 km
from E. Since this distance is longer than the
previously calculated distance from E to L through
K (which is through J), we do not replace it. We
mark M as visited. Hence K is also visited.
Since all the nodes are visited.
Fig. 5: Visited nodes
Therefore, the shortest path from E to L
through K (which is through J) is found to be
19.9 km.
The shortest route between Bodoland University
and Basugaon is given below (Figure 6).
WSEAS TRANSACTIONS on COMPUTER RESEARCH
DOI: 10.37394/232018.2024.12.19
Pranjal Sen, Dhruba Jyoti Nath,
Abdur Rohman, Surajit Kr. Nath, Moushumi Mitra